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