mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 05:22:59 +00:00
Add some basic sltye rules to make the suggested pages look less terrible
Particularly with the photo theme we need to do some more work....
This commit is contained in:
parent
ec7cca0ccb
commit
94bda35906
4 changed files with 15 additions and 2 deletions
|
@ -72,7 +72,7 @@ register_module([
|
|||
page_renderer::register_part_preprocessor(function(&$parts) {
|
||||
global $env;
|
||||
|
||||
$html = "<h2>Other pages to explore</h2>\n\t\t<ul class='similar-page-suggestions'>\n";
|
||||
$html = "<aside class='similar-page-suggestions'><h2>Other pages to explore</h2>\n\t\t<ul class='similar-page-suggestions-list'>\n";
|
||||
$start_time = microtime(true);
|
||||
$suggestions = similar_suggest(
|
||||
$env->page,
|
||||
|
@ -81,7 +81,7 @@ register_module([
|
|||
$env->perfdata->similar_suggest = round((microtime(true) - $start_time) * 1000, 2);
|
||||
foreach($suggestions as $suggested_pagename => $rank)
|
||||
$html .= "<li data-rank='$rank'><a href='?page=".rawurlencode($suggested_pagename)."'>".htmlentities($suggested_pagename)."</a></li>\n";
|
||||
$html .= "</ul>\n\t\t<!-- Took {$env->perfdata->similar_suggest}ms to compute similar page suggestions -->\n";
|
||||
$html .= "</ul>\n\t\t<!-- Took {$env->perfdata->similar_suggest}ms to compute similar page suggestions -->\n\t\t</aside>\n";
|
||||
|
||||
$parts["{extra}"] = $html . $parts["{extra}"];
|
||||
});
|
||||
|
|
|
@ -504,6 +504,11 @@ summary{
|
|||
content:"\231b";
|
||||
margin:0 0.1em 0 -1.1em;
|
||||
}
|
||||
|
||||
.similar-page-suggestions { padding: 1em 2em; background: var(--bg-page-inset); /*box-shadow: 0 0.1rem 1rem 0.3rem var(--shadow);*/ }
|
||||
.similar-page-suggestions > h2 { text-align: center; }
|
||||
.similar-page-suggestions-list { list-style-type: none; display: flex; flex-wrap: wrap; justify-content: space-evenly; }
|
||||
|
||||
.comments{
|
||||
padding:1em 2em;
|
||||
background:hsl(31, 64%, 85%);
|
||||
|
|
|
@ -285,6 +285,10 @@ summary { cursor: pointer; }
|
|||
.new-comment::before { content: "\\1f4ac"; margin: 0 0.1em 0 -1.1em; }
|
||||
.reversion::before { content: "\\231b"; margin: 0 0.1em 0 -1.1em; }
|
||||
|
||||
.similar-page-suggestions { padding: 1em 2em; background: var(--bg-page-inset); /*box-shadow: 0 0.1rem 1rem 0.3rem var(--shadow);*/ }
|
||||
.similar-page-suggestions > h2 { text-align: center; }
|
||||
.similar-page-suggestions-list { list-style-type: none; display: flex; flex-wrap: wrap; justify-content: space-evenly; }
|
||||
|
||||
.comments { padding: 1em 2em; background: var(--bg-comments-1); box-shadow: 0 0.1rem 1rem 0.3rem var(--shadow); }
|
||||
.comments .not-logged-in { padding: 0.3em 0.65em; background: var(--bg-comments-2); border-radius: 0.2em; font-style: italic; }
|
||||
.comments textarea { resize: vertical; }
|
||||
|
|
|
@ -212,6 +212,10 @@ input[type=submit] {
|
|||
|
||||
.stacked-bar { display: flex; }
|
||||
|
||||
/* TODO: Actually refine this properly
|
||||
.similar-page-suggestions { padding: 1em 2em; background: var(--bg-page-inset); /*box-shadow: 0 0.1rem 1rem 0.3rem var(--shadow);*/ }
|
||||
.similar-page-suggestions > h2 { text-align: center; }
|
||||
.similar-page-suggestions-list { list-style-type: none; display: flex; flex-wrap: wrap; justify-content: space-evenly; }
|
||||
|
||||
.comments { grid-area: comments; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue