A bunch of stuff before breaking things up
This commit is contained in:
parent
755893185a
commit
546713b0d6
9 changed files with 73 additions and 52 deletions
|
|
@ -1,35 +0,0 @@
|
|||
echo '<p class="sideBarTitle">Considered harmful:</p>'
|
||||
fn menu {
|
||||
ls -F $1 | sed -e 's,^./,,' -e 's,\.md$,,' | grep -v '^_'| awk '
|
||||
BEGIN { print "<ul class=\"sidebar\">" }
|
||||
END { print "</ul>" }
|
||||
/^([a-zA-Z0-9_\-]+[\/*]?)+$/ && ! /index$/ {
|
||||
isdir = match($0, "/$")
|
||||
sub("[*/]$", "") # The '*' makes no sense to me
|
||||
|
||||
if(isdir)
|
||||
d = "/"
|
||||
bname = $0
|
||||
sub("^(.*/)?([0-9]+_)?", "", bname)
|
||||
gsub("_", " ", bname)
|
||||
|
||||
bname = bname d
|
||||
|
||||
if(index(ENVIRON["REQUEST_URI"], "/" $0) == 1) {
|
||||
if(isdir) {
|
||||
print "<li><a href=\"/" $0 d "\">»<i> " bname "</i></a>"
|
||||
system("rc -c ''menu " $0 "''")
|
||||
} else {
|
||||
print "<li><a href=\"/" $0 d "\" class=\"thisPage\">»<i> " bname "</i></a>"
|
||||
}
|
||||
} else
|
||||
print "<li><a href=\"/" $0 d "\">› " bname "</a>"
|
||||
|
||||
print "</li>"
|
||||
|
||||
}'
|
||||
|
||||
}
|
||||
cd tpl
|
||||
menu .
|
||||
cd ..
|
||||
Loading…
Add table
Add a link
Reference in a new issue