swerc

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

commit a848399c4f4346f7cfca3a7d61b015e51bd56c32
parent fc914b2719fa0c2fee7f3ce8e0482f603cba2315
Author: garbeam@gmail.com <unknown>
Date:   Sun,  5 Feb 2012 10:12:33 +0100

added adsense and special siteBarNavTitle handling
Diffstat:
Mbin/corehandlers.rc | 13++++++-------
Mlib/default_master.tpl | 12+++++++++++-
2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/bin/corehandlers.rc b/bin/corehandlers.rc @@ -1,14 +1,13 @@ # Werc builtin handlers fn nav_tree { - if(! ~ $#sideBarNavTitle 0) - echo '<p class="sideBarTitle">'$"sideBarNavTitle':</p>' - echo '<ul>' - if(~ $"req_paths_list /) - echo '<li><a href="/" class="thisPage">Home</a></li>' - if not - echo '<li><a href="/">Home</a></li>' + if(! ~ $#sideBarNavTitle 0) { + if(~ $"req_paths_list /) + echo '<li><a href="/" class="thisPage">'$"sideBarNavTitle'</a></li>' + if not + echo '<li><a href="/">'$"sideBarNavTitle'</a></li>' + } # Ignore stderr, last path element might be a file that doesn't exist (eg., foo for foo.md) # /./ to deal with p9p's ls failure to follow dir symlinks otherwise ls -F $sitedir/./$req_paths_list >[2]/dev/null \ diff --git a/lib/default_master.tpl b/lib/default_master.tpl @@ -19,7 +19,17 @@ % } <div id="ads"> -AD 1 + <script type="text/javascript"><!-- + google_ad_client = "ca-pub-9029609350780515"; + /* garbeus */ + google_ad_slot = "4837453445"; + google_ad_width = 160; + google_ad_height = 600; + //--> + </script> + <script type="text/javascript" + src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> + </script> </div> <div id="main">