Don't list the last change date, people are scared by pages that
[infodrom.org/infocon.infodrom.org] / Styles / infocon.style
1 # ========== Abstand berechnen ==========
2 # in ePerl: $root_prefix
3 # in WML: <get-var root_prefix>
4 <:
5   $root_prefix = "<get-var WML_SRC_DIRNAME>";
6   $root_prefix =~ s/^.*src\/?(.*)$/$1/;
7   @foo = split (/\//, $root_prefix);
8   $root_prefix = "../"x($#foo+1);
9 :>
10 <if <not <get-var root_prefix>>
11   <define-tag root_prefix><: print "$root_prefix"; :></define-tag>
12   "<: $root_prefix = \"<get-var root_prefix>\"; :>"
13 >
14
15
16 # ========== Page footer ==========
17 #
18 # Sollte eigentlich in <address></address> eingefaßt sein, kursiv sieht's aber nicht aus.
19 #
20 <define-tag page-footer>
21 <font face="Helvetica,Arial" size="-1">&copy; <a href="<root_prefix>impressum.html">InfoCon</a>
22 </font>
23 </define-tag>
24
25 <define-tag old-page-footer>
26 # &copy; = &#169;
27 <font face="Helvetica,Arial" size="-1">&copy; <a href="<root_prefix>impressum.html">InfoCon</a>, <:
28 @months =
29 #    ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
30     ("Dummy", "Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
31
32 #($date_sec,$date_min,$date_hour,$date_mday,$date_mon,$date_year,$date_wday,$date_isdst)
33 #    = localtime(); $date_year += 1900;
34 #printf "%d %s %d", $date_mday, $months[$date_mon], $date_year;
35
36 "<get-var WML_SRC_ISOTIME>" =~ /^(\d+)-(\d+)-(\d+)\s/;
37
38 printf "Letzte Änderung: %d. %s %d", $3, $months[$2], $1;
39 :></font>
40 </define-tag>
41
42
43 # ========== Page ==========
44 #
45 <define-tag page-horiz-space>10</define-tag>
46 <define-tag page endtag=required>
47 <set-var %attributes>
48
49 <if <not <get-var title>>
50     <set-var title="InfoCon - Information & Consulting">>
51
52 # Titel im linken Submenü
53 <if <not <get-var menu>>
54     <set-var menu="<div align=center>&nbsp;</div><br>">
55     <set-var menu="<div align=center><b>Infos</b></div><br>">
56 >
57
58 <html>
59 <head>
60 <title>InfoCon - <get-var title></title>
61 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
62 <link href="<root_prefix>infocon.css" rel="stylesheet" type="text/css">
63 </head>
64
65 <body>
66
67 <table cellspacing=0 cellpadding=0 border=0 width=100%>
68
69 <tr>
70   <td width=90><a href="<root_prefix>"><img src="<root_prefix>Pics/infocon-90.png" align=center alt="[InfoCon]" border=0></a></td>
71   <td width=<page-horiz-space>></td>
72   <td width=100%>
73         <h1 align=center><font face=Helvetica>Information &amp; Consulting</font></h1>
74
75 # Anfang der Menü-Tabelle
76 <table bgcolor=#5dbbf9 cellspacing=0 cellpadding=0 border=0 width=100%>
77 <tr>
78 <td><img src="<root_prefix>Pics/corner-upperleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
79 <td rowspan=2 align=center>
80
81 <:
82     # @menu = ('Infos','Dienstleistungen','Shop');
83     @menu = ('Infos','Dienstleistungen');
84     %menu_dir = ('Infos'            => 'infos',
85                  'Dienstleistungen' => 'service',
86                  'Shop'             => 'shop',
87                  );
88     %menu_width = ('Infos'            => 50,
89                    'Dienstleistungen' => 120,
90                    'Shop'             => 50,
91                    );
92     $menu_default = 'hspace="4" vspace="7" height="18" align="middle" border="0"';
93
94     foreach $rubrik (@menu) {
95         $dir = $menu_dir{$rubrik};
96         if ("<get-var WML_SRC_DIRNAME>" =~ /src\/$dir/) {
97             if ("<get-var WML_SRC_BASENAME>" eq "index") {
98                 # No link
99                 printf '<img src="%sPics/menu-%s.press.png" width="%d" alt="[%s]" %s>',
100                     $root_prefix, $dir, $menu_width{$rubrik}, $rubrik, $menu_default;
101             } else {
102                 # We're in but link required
103                 printf '<a href="%s%s/"><img src="%sPics/menu-%s.press.png" width="%d" alt="[%s]" %s></a>',
104                     $root_prefix, $dir, $root_prefix, $dir, $menu_width{$rubrik}, $rubrik, $menu_default;
105             }
106         } else {
107             # Link required
108             printf '<a href="%s%s/"><img src="%sPics/menu-%s.png" width="%d" alt="[%s]" %s></a>',
109                 $root_prefix, $dir, $root_prefix, $dir, $menu_width{$rubrik}, $rubrik, $menu_default;
110         }
111     }
112 :>
113
114 </td>
115 <td><img src="<root_prefix>Pics/corner-upperright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
116 </tr>
117
118 # Untere Zeile, nur die Ecken
119 <tr>
120 <td><img src="<root_prefix>Pics/corner-lowerleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
121 <td><img src="<root_prefix>Pics/corner-lowerright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
122 </tr>
123 </table>
124 # Ende der Menü-Tabelle
125   </td>
126 </tr>
127
128 <tr>
129   <td width=90 valign=top bgcolor=#5dbbf9>
130     <img src="<root_prefix>Pics/corner-upperleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="16" height="16">
131     <img src="<root_prefix>Pics/corner-upperright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16">
132   <font size="-1" face="Helvetica"><get-var menu>
133
134 #include "submenu.inc"
135
136   </font>
137
138 </td>
139   <td width=<page-horiz-space>></td>
140   <td width=100% valign=top>
141   <table width=100% border=0 cellspacing=2 cellpadding=0><tr><td width=100% align=left valign=top>
142   <font face=Helvetica>
143
144 #  <td width=100% valign=top><font face=Helvetica>
145
146 <div class="date">
147 <script type="text/javascript">
148   var today = new Date;
149   var year = today.getYear();
150   var mon = ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];
151
152   if (year < 200)
153     year += 1900;    
154
155   if (year > 2006 && year < 2100)
156     document.write(today.getDate()
157                    +". " + mon[today.getMonth()]
158                    +" " + year);
159 </script>
160 </div>
161
162 <div id=page>
163 <div id=border>
164 <h3 id=pagetitle><get-var title></h3>
165 <div id=content>
166
167   %body
168
169 </div>
170 </div>
171 </div>
172
173   </font>
174   </td></tr></table>
175   </td>
176 </tr>
177 <tr>
178   <td width=90 valign=bottom bgcolor=#5dbbf9>
179     <img src="<root_prefix>Pics/corner-lowerleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="17" height="16">
180     <img src="<root_prefix>Pics/corner-lowerright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16">
181   </td>
182   <td width=<page-horiz-space>></td>
183   <td width=100% valign=bottom align=right><page-footer></td>
184 </tr>
185 </table>
186 </body>
187 </html>
188
189 </define-tag>