Initial commit

This commit is contained in:
Uriel 2007-05-27 13:25:55 +02:00
commit 0257b46c7f
27 changed files with 4211 additions and 0 deletions

49
tpl/_inc/404.tpl Normal file
View file

@ -0,0 +1,49 @@
<h1>The page requested doesn't exist</h1>
<br />
Try searching in cat-v.org:
<div class="spam">
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="harmful.cat-v.org;cat-v.org"></input>
<label for="sbi" style="display: none">Enter your search terms</label>
% echo '<input type="text" name="q" size="32" maxlength="255" value="'$title'" id="sbi"></input>'
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Google Search" id="sbb"></input>
</td></tr>
<tr>
<td>&nbsp;</td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"></input>
<label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="harmful.cat-v.org" checked id="ss1"></input>
<label for="ss1" title="Search harmful.cat-v.org"><font size="-1" color="#000000">harmful.cat-v.org</font></label></td>
</tr>
<tr>
<td>
<input type="radio" name="sitesearch" value="cat-v.org" id="ss2"></input>
<label for="ss2" title="Search cat-v.org"><font size="-1" color="#000000">cat-v.org</font></label></td>
<td></td>
</tr>
</table>
<input type="hidden" name="client" value="pub-2060328396151526"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="6944454412"></input>
<input type="hidden" name="ie" value="UTF-8"></input>
<input type="hidden" name="oe" value="UTF-8"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:48;LW:48;L:http://plan9.bell-labs.com/plan9/img/9logo.jpg;S:http://harmful.cat-v.org;LP:1;FORID:1"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
</div>

35
tpl/_inc/sidebar.tpl Normal file
View file

@ -0,0 +1,35 @@
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 "\">&raquo;<i> " bname "</i></a>"
system("rc -c ''menu " $0 "''")
} else {
print "<li><a href=\"/" $0 d "\" class=\"thisPage\">&raquo;<i> " bname "</i></a>"
}
} else
print "<li><a href=\"/" $0 d "\">&rsaquo; " bname "</a>"
print "</li>"
}'
}
cd tpl
menu .
cd ..