swerc

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

commit baa2929b9422b61ce332c30ebf3b3b974b131460
parent 501a05a44015a317637bd84ffaced7564f703710
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Sun, 16 Mar 2008 09:16:39 +0100

Make default dir listing a bit less ugly
Diffstat:
Mbin/controller.rc | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/controller.rc b/bin/controller.rc @@ -98,9 +98,9 @@ fn genbody { if not if ( test -f pub/^$reqpath^.tpl ) template.awk pub/^$reqpath^.tpl | rc $rcargs if not if(~ $body */index && ~ $#blogDirs 0) { - echo '<h1>' `{basename `{basename -d $body}}'</h1>' - echo '<ul>' - ls -F `{ basename -d $body } | sed $dirfilter' s,^'$sitedir'/(.*),<li><a href="\1">\1</a></li>,' + echo '<h1 style="text-transform: capitalize;">' `{basename -d $body|sed -e 's,.*//,,g' -e 's,/$,,' -e 's,/, / ,g' } '</h1>' + echo '<ul style="text-transform: capitalize;">' + ls -F `{ basename -d $body } | sed -e $dirfilter' s,^'$sitedir'/.*/([^$].*),<li><a href="\1">\1</a></li>,' echo '</ul>' } if not if(~ $#blogDirs 0)