From fc8b2f454c143afe6358ff8e811d915dd19c85e3 Mon Sep 17 00:00:00 2001 From: in2 Date: Thu, 3 Jul 2003 12:39:05 +0000 Subject: *** empty log message *** git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1007 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- staticweb/article.html | 17 +++++++++++++++++ staticweb/dir.html | 43 +++++++++++++++++++++++++++++++++++++++++++ staticweb/header.html | 15 +++++++++++++++ staticweb/index.html | 26 ++++++++++++++++++++++++++ staticweb/index.pl | 32 ++++++++++++++++++++++++++++++++ staticweb/man.pl | 9 +++++++-- staticweb/styles.css | 19 +++++++++++++++++++ 7 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 staticweb/article.html create mode 100644 staticweb/dir.html create mode 100644 staticweb/header.html create mode 100644 staticweb/index.html create mode 100755 staticweb/index.pl create mode 100644 staticweb/styles.css diff --git a/staticweb/article.html b/staticweb/article.html new file mode 100644 index 00000000..9cfee318 --- /dev/null +++ b/staticweb/article.html @@ -0,0 +1,17 @@ +[% INCLUDE header.html %] + +
+狾: [% brdname %]

+
+
+
+[% content %]
+
+
+
+
+у金金龟穨 (PttWeb) +
+ + + diff --git a/staticweb/dir.html b/staticweb/dir.html new file mode 100644 index 00000000..fe4392ba --- /dev/null +++ b/staticweb/dir.html @@ -0,0 +1,43 @@ +[% INCLUDE header.html %] + + + + + + + + +
+ +
+呼弘地跋 +[% brdname %]弘地跋 +у金金场辅 +
+狾嘿: [% brdname %] +
+
+[% IF !isroot %] +糷
+[% END %] + +[% FOREACH x=dat %] + + +[% x.title %]
+[% END %] +
+
+
+硂弘地跋ず陆 (under construction) + + +
+
+у金金龟穨 (PttWeb) +
+ + diff --git a/staticweb/header.html b/staticweb/header.html new file mode 100644 index 00000000..465e9ff7 --- /dev/null +++ b/staticweb/header.html @@ -0,0 +1,15 @@ + + + + + + у金金龟穨 + + + + + + diff --git a/staticweb/index.html b/staticweb/index.html new file mode 100644 index 00000000..d0722654 --- /dev/null +++ b/staticweb/index.html @@ -0,0 +1,26 @@ +[% INCLUDE header.html %] + + + + + + + +
+ +
+у金金龟穨ぇ弘地跋(experimental)
+ヘ玡矗ㄑ弘地跋戈:
+
+[% FOREACH x=dat %] +[% x.brdname %]
+[% END %] +
+
+у金金龟穨 (PttWeb) +
+ + diff --git a/staticweb/index.pl b/staticweb/index.pl new file mode 100755 index 00000000..ea48b874 --- /dev/null +++ b/staticweb/index.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# $Id: index.pl,v 1.1 2003/07/03 12:39:05 in2 Exp $ +use lib qw/./; +use LocalVars; +use CGI qw/:standard/; +use strict; +use Template; + +sub main +{ + my($tmpl, %rh); + + charset(''); + print header(); + + foreach( ){ + s/.*\///; + s/\.db//; + push @{$rh{dat}}, {brdname => $_}; + } + $tmpl = Template->new({INCLUDE_PATH => '.', + ABSOLUTE => 0, + RELATIVE => 0, + RECURSION => 0, + EVAL_PERL => 0, + COMPILE_EXT => '.tmpl', + COMPILE_DIR => $MANCACHE}); + $tmpl->process('index.html', \%rh); +} + +main(); +1; diff --git a/staticweb/man.pl b/staticweb/man.pl index 307108c7..db5b84d5 100755 --- a/staticweb/man.pl +++ b/staticweb/man.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: man.pl,v 1.1 2003/07/03 06:49:23 in2 Exp $ +# $Id: man.pl,v 1.2 2003/07/03 12:39:05 in2 Exp $ use CGI qw/:standard/; use lib qw/./; use LocalVars; @@ -30,11 +30,14 @@ sub main print header(); $rh = (($fpath =~ m|/$|) ? dirmode($fpath) : articlemode($fpath)); + $rh->{brdname} = $brdname; $tmpl = Template->new({INCLUDE_PATH => '.', ABSOLUTE => 0, RELATIVE => 0, RECURSION => 0, - EVAL_PERL => 0}); + EVAL_PERL => 0, + COMPILE_EXT => '.tmpl', + COMPILE_DIR => $MANCACHE}); $tmpl->process($rh->{tmpl}, $rh); } @@ -52,6 +55,7 @@ sub dirmode } $th{tmpl} = 'dir.html'; + $th{isroot} = ($fpath eq '/') ? 1 : 0; return \%th; } @@ -60,6 +64,7 @@ sub articlemode my(%th); $th{tmpl} = 'article.html'; $th{content} = $db{$fpath}; + $th{content} =~ s/\033\[.*?m//g; return \%th; } diff --git a/staticweb/styles.css b/staticweb/styles.css new file mode 100644 index 00000000..973c6ec7 --- /dev/null +++ b/staticweb/styles.css @@ -0,0 +1,19 @@ +#banner { + font-family: georgia, verdana, arial, sans-serif; + color: #FFFFFF; + font-size: 20px; + font-weight: bold; + + padding: 8px 8px 8px 8px; + border: none; +} + +A:link {color: #FFFFFF; text-decoration:none;} +A:active {color: #CCFFCC; text-decoration:none;} +A:visited {color: #FFFFCC; text-decoration:none;} +A:hover {background: #555555;} + +body { + background: #000000; + color: #FFFFFF; +} \ No newline at end of file -- cgit v1.2.3