/[suikacvs]/markup/h2h/implementation/classic/H2H/V090/general/theme.ph
Suika

Contents of /markup/h2h/implementation/classic/H2H/V090/general/theme.ph

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Jul 19 12:46:44 2003 UTC (22 years, 11 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Branch point for: norakuro-d
Imported to CVS

1 wakaba 1.1
2     =pod
3    
4     H2H -- General Template
5    
6     Copyright 2001 the Watermelon Project.
7    
8     2001-04-03 wakaba
9     - New file.
10    
11     =cut
12    
13     ## -- Include default diary style.
14     require $H2H::themepath.'default/theme.ph';
15    
16     ## -- Information about this template.
17     package H2H::Template;
18     $basepath = $H2H::themepath.'general/';
19     $header = $basepath.'head.htt';
20     $footer = $basepath.'foot.htt';
21    
22     ## Initialization of theme.
23     sub init {
24     package H2H::Command;
25     $_new = 1;
26     $_sub = 1;
27     $_fn = 1;
28     $fn = '';
29     $prefix = $_[3] || 'f'.$_[0].substr('0'.$_[1],-2).substr('0'.$_[2],-2);
30     package H2H::HnfFile;
31     $header = '';
32     $headered = 0;
33     }
34    
35     package H2H::Command;
36     sub textSEE {'<a href="#'.$_[0].'">'.$_[1].'</a>'}
37    
38     package H2H::HnfFile;
39    
40     sub start {'<div class="day" id="'.$H2H::Command::prefix.'">'.$H2H::nl}
41     sub headervar {
42     my ($name, $val) = @_; my $ret;
43     if ($name eq 'TITLE') {
44     $ret = '<h2><a href="'.$H2H::Page::uri.'#'.$H2H::Command::prefix.
45     '" class="self">ąŁ</a> '.$val.'</h2><div class="header">'.
46     $H2H::nl.$header;
47     undef $header; $headered = 1;
48     } else {
49     $ret = $HNS::Hnf::UserVar::Templates{$name};
50     $ret =~ s/\%value/$val/g;
51     $ret = $H2H::Error::invalidheader.$name unless $ret;
52     if ($headered) {
53     $ret = '<span class="var '.$name.'">'.$ret.'</span>';
54     } else {
55     $header .= '<span class="var '.$name.'">'.$ret.'</span>';
56     undef $ret;
57     }
58     }
59     $ret;
60     }
61     sub endheader {
62     $headered ? '</div>'.$H2H::nl :
63     $header ? '<div class="header">'.$H2H::nl.$header.'</div>'.$H2H::nl: $H2H::nl;
64     }
65     sub end {'</div>'.$H2H::nl}
66     sub tree {}
67    
68    
69     1;

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24