Refine appearance of search contexts.

This commit is contained in:
Starbeamrainbowlabs 2016-08-19 13:47:56 +01:00
parent 7f41f41180
commit aae9365f5a
4 changed files with 7 additions and 3 deletions

View File

@ -223,6 +223,8 @@ a.redlink:visited { color: rgb(130, 15, 15); /*#8b1a1a*/ }
.search-result::before { content: attr(data-result-number); position: relative; top: 3.2rem; color: rgba(33, 33, 33, 0.3); font-size: 2rem; }
.search-result::after { content: "Rank: " attr(data-rank); position: absolute; top: 3.8rem; right: 0.7rem; color: rgba(50, 50, 50, 0.3); }
.search-result > h2 { margin-left: 2rem; }
.search-context { max-height: 20em; overflow: hidden; }
.search-context::after { content: ""; position: absolute; bottom: 0; width: 100%; height: 3em; display: block; background: linear-gradient(to bottom, transparent, #faf8fb); pointer-events: none; }
label:not(.link-display-label) { display: inline-block; min-width: 7rem; }
input[type=text]:not(.link-display), input[type=password], textarea { margin: 0.5rem 0; }
@ -2226,7 +2228,7 @@ register_module([
// number as people expect it to start from 1
$content .= "<div class='search-result' data-result-number='" . ($i + 1) . "' data-rank='" . $result["rank"] . "'>\n";
$content .= " <h2><a href='$link'>" . $result["pagename"] . "</a></h2>\n";
$content .= " <p>$context</p>\n";
$content .= " <p class='search-context'>$context</p>\n";
$content .= "</div>\n";
$i++;

View File

@ -68,7 +68,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
"id": "feature-search",
"lastupdate": 1471608025,
"lastupdate": 1471610450,
"optional": false
},
{

View File

@ -153,7 +153,7 @@ register_module([
// number as people expect it to start from 1
$content .= "<div class='search-result' data-result-number='" . ($i + 1) . "' data-rank='" . $result["rank"] . "'>\n";
$content .= " <h2><a href='$link'>" . $result["pagename"] . "</a></h2>\n";
$content .= " <p>$context</p>\n";
$content .= " <p class='search-context'>$context</p>\n";
$content .= "</div>\n";
$i++;

View File

@ -57,6 +57,8 @@ a.redlink:visited { color: rgb(130, 15, 15); /*#8b1a1a*/ }
.search-result::before { content: attr(data-result-number); position: relative; top: 3.2rem; color: rgba(33, 33, 33, 0.3); font-size: 2rem; }
.search-result::after { content: "Rank: " attr(data-rank); position: absolute; top: 3.8rem; right: 0.7rem; color: rgba(50, 50, 50, 0.3); }
.search-result > h2 { margin-left: 2rem; }
.search-context { max-height: 20em; overflow: hidden; }
.search-context::after { content: ""; position: absolute; bottom: 0; width: 100%; height: 3em; display: block; background: linear-gradient(to bottom, transparent, #faf8fb); pointer-events: none; }
label:not(.link-display-label) { display: inline-block; min-width: 7rem; }
input[type=text]:not(.link-display), input[type=password], textarea { margin: 0.5rem 0; }