swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 4847b099a437dc6097291ac748bd8c958ff7684f
parent cb0c4a0f642d5c443c01d8323b84411e5d07c011
Author: garbeam@gmail.com <unknown>
Date:   Sat,  4 Feb 2012 19:20:27 +0100

added sitemap to the nav
Diffstat:
Mbin/corehandlers.rc | 9+++++++--
Mpub/style.css | 8++++++--
2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/bin/corehandlers.rc b/bin/corehandlers.rc @@ -17,7 +17,7 @@ fn nav_tree { if(! ~ $#synth_paths 0) echo $synth_paths | tr ' ' $NEW_LINE } | sort -u | awk -F/ ' function p(x, y, s) { for(i=0; i < x-y; i+=1) print s } - BEGIN { lNF=2; print "<ul>" } + BEGIN { lNF=2; } { d = "" if(match($0, "/$")) @@ -41,7 +41,12 @@ fn nav_tree { else print "<li><a href=\"" path "\">" bname "</a></li>" } - END { p(lNF, 2, "</ul></li>"); print "</ul>" }' + END { p(lNF, 2, "</ul></li>"); }' + if(~ $"req_paths_list '/ /sitemap') + echo '<li><a href="/sitemap" class="thisPage">Site map</a></li>' + if not + echo '<li><a href="/sitemap">Site map</a></li>' + echo '</ul>' } fn link_bar { diff --git a/pub/style.css b/pub/style.css @@ -1,7 +1,7 @@ body { background-color: #eee; color: #333; - font-family: Cantarell, Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; + font-family: 'Cantarell', Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; text-align: justify; padding: 0; margin: 0; @@ -19,7 +19,7 @@ a:hover { #menu { clear: both; color: #fff; - background-color: #36c; + background-color: #666; padding: 0.7ex; font-size: 84%; } @@ -134,8 +134,12 @@ h4 { .left { float: left; + margin: 0; + padding: 0; } .right { float: right; + margin: 0; + padding: 0; }