{"id":23121,"date":"2019-10-04T23:05:13","date_gmt":"2019-10-04T22:05:13","guid":{"rendered":"https:\/\/jurnsearch.wordpress.com\/?p=23121"},"modified":"2019-10-04T23:05:13","modified_gmt":"2019-10-04T22:05:13","slug":"carrot2-search-a-new-script-for-multi-column-results","status":"publish","type":"post","link":"https:\/\/jurn.link\/jurnsearch\/index.php\/2019\/10\/04\/carrot2-search-a-new-script-for-multi-column-results\/","title":{"rendered":"Carrot2 search &#8211; a new script for multi-column results"},"content":{"rendered":"<p>The Carrot2 search-engine has changed both URL and layout.  It was at search.carrot2.org\/stable\/search and it&#8217;s now just at the search.carrot2.org URL. I guess the public-facing search may have come out of beta? This is what their new layout looks like&#8230;<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/2019\/10\/wide1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/jurnsearch\/2019\/10\/wide1.jpg\" alt=\"\" width=\"500\" height=\"275\" class=\"alignnone size-full wp-image-23122\" \/><\/a><\/p>\n<p>Not good, on a widescreen desktop monitor.<\/p>\n<p>Which means I&#8217;ve made another custom CSS for it.  This slices the Carrot into a multi-column layout suited to a widescreen 1920px monitor.  It works in the Stylus browser addon, and you need to tell the script to target the <em>search.carrot2.org<\/em> site<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/2019\/10\/wide3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/jurnsearch\/2019\/10\/wide3.jpg\" alt=\"\" width=\"500\" height=\"275\" class=\"alignnone size-full wp-image-23132\" \/><\/a><\/p>\n<p>Yum, crunchy Carrot!  All the z-depths are set up nicely, so you can still click on\/in the filters and search box.<\/p>\n<p>I like to read the URLs in search-results and so I&#8217;ve turned them dark green and wrapped them to make this possible.  The results look good with URLs that line-wrap by up to three lines. But it&#8217;s unavoidable that some very long URLs will wrap over four lines, and will thus spill over the element below.<\/p>\n<p>In most cases there should be no need for any scrolling.<\/p>\n<p>It only works in Day mode, with the Carrot&#8217;s new toggle-able Night and Day mode&#8230;<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/2019\/10\/night-day.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/jurnsearch\/2019\/10\/night-day.jpg\" alt=\"\" width=\"162\" height=\"60\" class=\"alignnone size-full wp-image-23125\" \/><\/a><\/p>\n<p>If you want a night mode, you&#8217;ll have to manually change the colour chips to a charcoal black on&#8230;<\/p>\n<p><em>body, body.light {<\/em><\/p>\n<p>and<\/p>\n<p><em>div.ResultList<\/em><\/p>\n<p>The other drawback is that whereas the old multi-column fix showed about 25-30 results, now we&#8217;re down to about 16.  If you want it up to 20+ add the following code&#8230;<\/p>\n<p><code><br \/>\n.ResultClusters {<br \/>\n    display: none;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>There&#8217;s also the lack of a &#8220;more&#8230;&#8221; button, but this usefully forces the user to use the Carrot&#8217;s innovative faceting systems over in the left-hand pane.<\/p>\n<hr>\n<p>To install my fix, simply go to <a href=\"https:\/\/search.carrot2.org\/\">Carrot2<\/a>, then left-click on your icon for the <a href=\"https:\/\/addons.opera.com\/en-gb\/extensions\/details\/stylus\/\">Stylus browser addon<\/a> and click &#8220;Write style for&#8230;&#8221;.<\/p>\n<p>Then paste in this&#8230;<\/p>\n<p><code><br \/>\n\/* ==== CARROT2 - Multi-Columns v.02 Oct 2019 ==== *\/<br \/>\n\/* run this Stylus script on search.carrot2.org *\/<br \/>\ndiv.document div.url {<br \/>\n    overflow: hidden;<br \/>\n    color: #3a7730;<br \/>\n    font-size: 110%;<br \/>\n}<br \/>\nbody, body.light {<br \/>\n    background-color: #ece5db;<br \/>\n}<br \/>\n.ResultList &gt; div &gt; a &gt; span.url {<br \/>\n    color: #3f7126;<br \/>\n    font-size: 80%;<br \/>\n    font-weight: bold;<br \/>\n    white-space: pre;           \/* CSS 2.0 *\/<br \/>\n\twhite-space: pre-wrap;      \/* CSS 2.1 *\/<br \/>\n\twhite-space: pre-line;      \/* CSS 3.0 *\/<br \/>\n\twhite-space: -pre-wrap;     \/* Opera 4-6 *\/<br \/>\n\twhite-space: -o-pre-wrap;   \/* Opera 7 *\/<br \/>\n\twhite-space: -moz-pre-wrap; \/* Mozilla *\/<br \/>\n\twhite-space: -hp-pre-wrap;  \/* HP Printers *\/<br \/>\n\tword-wrap: break-word;      \/* IE 5+ *\/<br \/>\n}<br \/>\na {<br \/>\n    font-size: 100%;<br \/>\n}<br \/>\n.SearchForm {<br \/>\n    z-index:20;<br \/>\n}<br \/>\ndiv.ResultList {<br \/>\n    z-index:4;<br \/>\n    position:absolute;<br \/>\n    background-color: #ece5db;<br \/>\n    padding-top: 180px;<br \/>\n    top:0;<br \/>\n    bottom:0;<br \/>\n    right:0;<br \/>\n    column-count: 5;<br \/>\n    width: 70%<br \/>\n}<br \/>\n.ResultList &gt; div &gt; a &gt;div {<br \/>\n    font-size: 80%;<br \/>\n}<br \/>\ndiv.sources {<br \/>\n    padding-top: 25px;<br \/>\n}<br \/>\ndiv.ClusterList {<br \/>\n    background-color: #ece5db;<br \/>\n    padding-top: 10px;<br \/>\n    column-count: 2;<br \/>\n}<br \/>\ndiv.clusters-tabs {<br \/>\n    width: 40%<br \/>\n}<br \/>\ndiv.clusters {<br \/>\n    z-index:4;<br \/>\n    width: 50%<br \/>\n}<br \/>\n<\/code><\/p>\n<p>Tested in Opera, which is a browser that runs on Chrome. It will probably work with other CSS style injectors.<\/p>\n<p>Be warned that Carrot2 will perma-block an entire IP address (in the case of BT in the UK, or VPNs, that can mean hundreds of thousands of users) if it detects &#8220;excessive traffic&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Carrot2 search-engine has changed both URL and layout. It was at search.carrot2.org\/stable\/search and it&#8217;s now just at the search.carrot2.org &hellip;<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/index.php\/2019\/10\/04\/carrot2-search-a-new-script-for-multi-column-results\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,10,16],"tags":[],"class_list":["post-23121","post","type-post","status-publish","format-standard","hentry","category-jurn-tips-and-tricks","category-my-general-observations","category-spotted-in-the-news"],"_links":{"self":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/posts\/23121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/comments?post=23121"}],"version-history":[{"count":0,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/posts\/23121\/revisions"}],"wp:attachment":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/media?parent=23121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/categories?post=23121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/tags?post=23121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}