diff --git a/bin/controller.rc b/bin/controller.rc index dfecc35..b67cf95 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -9,6 +9,8 @@ cd .. # config body=index +siteTitle='' +siteSubTitle='' title=Title template=default sidebar=sidebar @@ -17,6 +19,7 @@ sidebar=sidebar if (! ~ $#args 0 && ! ~ $args '') { title=$args($#args) + title=`{echo $title | sed 's/_/ /' } body=`{ echo -n $"args |sed 's, ,/,g' } } @@ -36,9 +39,52 @@ if (test -d tpl/$body) { body=`{echo tpl/^$"body^.md | sed 's, ,/,' } +# Sidebar +fn menu { + ls -F $1 | sed -e 's,^./,,' -e 's,\.md$,,' | grep -v '^_'| awk ' + BEGIN { print "
" } + /^([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 "Considered harmful:
' + cd tpl + menu . + cd .. +} + + +# Body + template.awk $template | rc -echo ''
-#echo $"args
-#env
+# Debug junk
+#echo ''
+#env
diff --git a/bin/sidebar.tpl b/bin/sidebar.tpl
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/bin/sidebar.tpl
@@ -0,0 +1 @@
+
diff --git a/etc/initrc b/etc/initrc
index 67fcf1d..77349ad 100644
--- a/etc/initrc
+++ b/etc/initrc
@@ -1,2 +1,3 @@
title=cat-v
-sitetitle=harmful.cat-v.org
+siteTitle='cat-v'
+siteSubTitle='Considered harmful'
diff --git a/pub/sitemap.txt b/pub/sitemap.txt
index d06b93d..bafe423 100644
--- a/pub/sitemap.txt
+++ b/pub/sitemap.txt
@@ -1,10 +1,15 @@
http://harmful.cat-v.org/
+http://harmful.cat-v.org/society/sweden
+http://harmful.cat-v.org/society/children/
+http://harmful.cat-v.org/society/children/fuck_the_children
+http://harmful.cat-v.org/society/children/i_dont_care
http://harmful.cat-v.org/cat-v/
+http://harmful.cat-v.org/software/firefox
http://harmful.cat-v.org/software/
http://harmful.cat-v.org/software/xml
-http://harmful.cat-v.org/children/
-http://harmful.cat-v.org/children/fuck_the_children
-http://harmful.cat-v.org/children/i_dont_care
+http://harmful.cat-v.org/software/object_oriented_programming
+http://harmful.cat-v.org/science/global_warming
+http://harmful.cat-v.org/economics/intellectual_property
http://harmful.cat-v.org/economics/subsidies
http://harmful.cat-v.org/economics/
http://harmful.cat-v.org/economics/minimum_wage
diff --git a/pub/style/style.css b/pub/style/style.css
index 3c160bf..8e38766 100644
--- a/pub/style/style.css
+++ b/pub/style/style.css
@@ -83,6 +83,10 @@ acronym, .titleTip {
font-style: italic;
}
+.headerTitle a {
+ color: black;
+ text-decoration: none;
+}
.subHeader {
display: none;
diff --git a/tpl/_inc/sidebar.tpl b/tpl/_inc/sidebar.tpl
deleted file mode 100644
index 6602701..0000000
--- a/tpl/_inc/sidebar.tpl
+++ /dev/null
@@ -1,35 +0,0 @@
-echo 'Considered harmful:
'
-fn menu {
- ls -F $1 | sed -e 's,^./,,' -e 's,\.md$,,' | grep -v '^_'| awk '
- BEGIN { print "" }
- /^([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 "