changeset: 211:8855e8393a69
tag: tip
user: arg_AT_localhost.localdomain
date: Sat Sep 05 19:51:06 2009 +0000
files: default.suckless.org/_werc/lib/footer.inc default.suckless.org/_werc/lib/sitemap.tpl default.suckless.org/_werc/lib/top_bar.inc dwm.suckless.org/_werc/lib/top_bar.inc libs.suckless.org/_werc/lib/top_bar.inc man.suckless.org/_werc/lib/top_bar.inc st.suckless.org/_werc/lib/top_bar.inc suckless.org/_werc/lib/top_bar.inc surf.suckless.org/_werc/lib/top_bar.inc tools.suckless.org/_werc/lib/top_bar.inc wmi.suckless.org/_werc/lib/top_bar.inc wmii.suckless.org/_werc/lib/top_bar.inc
description:
reorganized top_bar's to give a clue where a user looks at
diff -r a257ad177923 -r 8855e8393a69 default.suckless.org/_werc/lib/footer.inc
--- a/default.suckless.org/_werc/lib/footer.inc Fri Sep 04 01:37:36 2009 -0400
+++ b/default.suckless.org/_werc/lib/footer.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -1,7 +1,8 @@
<br class="doNotDisplay doNotPrint" />
-<div class="left"><a href="
http://werc.cat-v.org/">Powered by werc</a></div>
-
+<div class="left">
+ <a href="
http://werc.cat-v.org/">Powered by werc</a>
+</div>
<div class="right">
<form action="
http://www.google.com/cse" id="cse-search-box" style="display: in
line">
diff -r a257ad177923 -r 8855e8393a69 default.suckless.org/_werc/lib/sitemap.tpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/default.suckless.org/_werc/lib/sitemap.tpl Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,67 @@
+<h1>Site map</h1>
+
+%{
+tmpfile=/tmp/werc_sitemap_$pid.txt
+tmpfilex=/tmp/werc_sitemapx_$pid.txt
+saveddf=$dirfilter
+
+MON2NUM='s/Jan/01/; s/Feb/02/; s/Mar/03/; s/Apr/04/; s/May/05/; s/Jun/06/; s/Jul/07/; s/Aug/08/; s/Sep/09/; s/Oct/10/; s/Nov/11/; s/Dec/12/;'
+
+fn get_mdate {
+ t=`{mtime $1}
+ t=`{date $t(1) | sed -e $MON2NUM -e 's/ ([0-9]) / 0\1 /g'} # Make sure day of the month is two digits.
+ echo $t(6)^'-'^$t(2)^'-'^$t(3)
+}
+
+fn listDir {
+ d=$1
+ dirfilter=$saveddf
+ if(test -f $d/_werc/config)
+ . ./$d/_werc/config
+
+ if(~ $#perm_redir_to 0) {
+ echo '<ul class="sitemap-list">'
+
+ for(i in `{ls -dF $d^*/ $d^*.md $d^*.html $d^*.txt >[2]/dev/null | sed $dirfilter}) {
+ desc=`{get_file_title $i}
+ u=`{echo $i|sed 's!'$sitedir'!!; '$dirclean's!/index$!/!; '}
+ if(! ~ $#desc 0 && ! ~ $desc '')
+ desc=' - '$"desc
+ n=`{echo /$u|sed 's/[\-_]/ /g; s,.*/([^/]+)/?$,\1,'}
+ echo '<li><a href="'$u'">'^$"n^'</a>' $"desc '</li>'
+ echo $base_url^$u >> $tmpfile
+ echo '<url><loc>'$base_url^$u'</loc><lastmod>'^`{get_mdate $i}^'</lastmod></url>' >> $tmpfilex
+ if(test -d $i)
+ _AT_{ listDir $i }
+ }
+ echo '</ul>'
+ }
+}
+
+
+fltr_cache listDir $sitedir/
+
+if(test -s $tmpfile) {
+ mv $tmpfile $sitedir/sitemap.txt &
+}
+if not if(test -f $tmpfile)
+ rm $tmpfile
+
+if(test -s $tmpfilex) {
+ {
+ echo '<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="
http://www.sitemaps.org/schemas/sitemap/0.9">'
+
+ cat $tmpfilex
+ rm $tmpfilex &
+ echo '</urlset>'
+ # TODO Enable automaic search engine update notification.
+ #hget '
http://google.com/ping?sitemap='^`{url_encode $base_url'/sitemap.gz'} > /dev/null
+
+ } | gzip > $sitedir/sitemap.gz &
+ #} > $sitedir/sitemap.xml &
+}
+if not if(test -f $tmpfilex)
+ rm $tmpfilex
+
+%}
diff -r a257ad177923 -r 8855e8393a69 default.suckless.org/_werc/lib/top_bar.inc
--- a/default.suckless.org/_werc/lib/top_bar.inc Fri Sep 04 01:37:36 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,22 +0,0 @@
- <div class="left">
- <a href="
http://suckless.org">home</a>
- <a href="
http://hg.suckless.org">code</a>
- <a href="
http://dl.suckless.org">download</a>
- <a href="
http://man.suckless.org">man</a>
- <a href="
http://dwm.suckless.org">dwm</a>
- <a href="
http://libs.suckless.org">libs</a>
- <a href="
http://st.suckless.org">st</a>
- <a href="
http://surf.suckless.org">surf</a>
- <a href="
http://tools.suckless.org">tools</a>
- <a href="
http://wmii.suckless.org">wmii</a>
- <a href="
http://wmi.suckless.org">wmi</a>
- </div>
-
- <div class="right">
- <span class="doNotDisplay">Related sites:</span>
- <a href="/sitemap">site map</a>
- <!-- AddThis Button BEGIN -->
- <a class="addthis_button" href="
http://www.addthis.com/bookmark.php?v=250&pub=xa-4a9e7bf65546d320"><img src="
http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="
http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9e7bf65546d320"></script>
- <!-- AddThis Button END -->
- </div>
-
diff -r a257ad177923 -r 8855e8393a69 dwm.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a class="thisPage" href="
http://dwm.suckless.org"><i>dwm</i></a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 libs.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libs.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a class="thisPage" href="
http://libs.suckless.org"><i>libs</i></a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 man.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/man.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a class="thisPage" href="
http://man.suckless.org"><i>man</i></a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 st.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/st.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a class="thisPage" href="
http://st.suckless.org"><i>st</i></a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a class="thisPage" href="
http://suckless.org"><i>home</i></a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 surf.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a class="thisPage" href="
http://surf.suckless.org"><i>surf</i></a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 tools.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a class="thisPage" href="
http://tools.suckless.org"><i>tools</i></a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 wmi.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wmi.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a href="
http://wmii.suckless.org">wmii</a></li>
+ <li><a class="thisPage" href="
http://wmi.suckless.org"><i>wmi</i></a></li>
+ </ul>
diff -r a257ad177923 -r 8855e8393a69 wmii.suckless.org/_werc/lib/top_bar.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wmii.suckless.org/_werc/lib/top_bar.inc Sat Sep 05 19:51:06 2009 +0000
_AT_@ -0,0 +1,13 @@
+ <ul>
+ <li><a href="
http://suckless.org">home</a></li>
+ <li><a href="
http://hg.suckless.org">code</a></li>
+ <li><a href="
http://dl.suckless.org">download</a></li>
+ <li><a href="
http://man.suckless.org">man</a></li>
+ <li><a href="
http://dwm.suckless.org">dwm</a></li>
+ <li><a href="
http://libs.suckless.org">libs</a></li>
+ <li><a href="
http://st.suckless.org">st</a></li>
+ <li><a href="
http://surf.suckless.org">surf</a></li>
+ <li><a href="
http://tools.suckless.org">tools</a></li>
+ <li><a class="thisPage" href="
http://wmii.suckless.org"><i>wmii</i></a></li>
+ <li><a href="
http://wmi.suckless.org">wmi</a></li>
+ </ul>
Received on Sat Sep 05 2009 - 21:51:08 CEST