7ec9027c06583aa1a0636e6117d2badb2cf534bd
[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 <if <not <get-var keywords>>
52     <set-var keywords="Linux, Oldenburg, Support, Schulung, Service, Perl, Python, \
53         PHP, JavaScript, Programmierung, Anpassung, Datenbanken, MySQL, PostgreSQL, \
54         Internet-Dienstleistung, Monitoring, Server, Administration, Administrator">>
55
56 # Titel im linken Submenü
57 <if <not <get-var menu>>
58     <set-var menu="<div align=center>&nbsp;</div><br>">
59     <set-var menu="<div align=center><b>Infos</b></div><br>">
60 >
61
62 <html lang="de">
63 <head>
64 <title>InfoCon - <get-var title></title>
65 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
66 <link href="<root_prefix>infocon.css" rel="stylesheet" type="text/css">
67 <link rel="icon" href="<root_prefix>favicon.ico" type="image/x-icon">
68 <link rel="shortcut icon" href="<root_prefix>favicon.ico" type="image/x-icon">
69 <meta name="Language"  content="de">
70
71 <meta name="Keywords"  content="<get-var keywords>">
72 <meta name="Robots"  content="index,follow">
73
74 </head>
75
76 <body>
77
78 <table cellspacing=0 cellpadding=0 border=0 width=100%>
79
80 <tr>
81   <td width=90><a href="<:=length($root_prefix)?$root_prefix:'/':>"><img src="<root_prefix>Pics/infocon-90.png" align=center alt="[InfoCon]" border=0></a></td>
82   <td width=<page-horiz-space>></td>
83   <td width=100%>
84         <h1 align=center><font face=Helvetica>Information &amp; Consulting</font></h1>
85
86 # Anfang der Menü-Tabelle
87 <table bgcolor=#5dbbf9 cellspacing=0 cellpadding=0 border=0 width=100%>
88 <tr>
89 <td><img src="<root_prefix>Pics/corner-upperleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
90 <td rowspan=2 align=center>
91
92 <:
93     # @menu = ('Infos','Dienstleistungen','Shop');
94     @menu = ('Infos','Dienstleistungen', 'Logbook');
95     %menu_dir = ('Infos'            => 'infos',
96                  'Dienstleistungen' => 'service',
97                  'Logbook'          => 'logbook',
98                  'Shop'             => 'shop',
99                  );
100     %menu_width = ('Infos'            => 50,
101                    'Dienstleistungen' => 120,
102                    'Logbook'          => 62,
103                    'Shop'             => 50,
104                    );
105     $menu_default = 'hspace="4" vspace="7" height="18" align="middle" border="0"';
106
107     foreach $rubrik (@menu) {
108         $dir = $menu_dir{$rubrik};
109         if ("<get-var WML_SRC_DIRNAME>" =~ /src\/$dir/) {
110             if ("<get-var WML_SRC_BASENAME>" eq "index") {
111                 # No link
112                 printf '<img src="%sPics/menu-%s.press.png" width="%d" alt="[%s]" %s>',
113                     $root_prefix, $dir, $menu_width{$rubrik}, $rubrik, $menu_default;
114             } else {
115                 # We're in but link required
116                 printf '<a href="%s%s/"><img src="%sPics/menu-%s.press.png" width="%d" alt="[%s]" %s></a>',
117                     $root_prefix, $dir, $root_prefix, $dir, $menu_width{$rubrik}, $rubrik, $menu_default;
118             }
119         } else {
120             # Link required
121             printf '<a href="%s%s/"><img src="%sPics/menu-%s.png" width="%d" alt="[%s]" %s></a>',
122                 $root_prefix, $dir, $root_prefix, $dir, $menu_width{$rubrik}, $rubrik, $menu_default;
123         }
124     }
125 :>
126
127 </td>
128 <td><img src="<root_prefix>Pics/corner-upperright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
129 </tr>
130
131 # Untere Zeile, nur die Ecken
132 <tr>
133 <td><img src="<root_prefix>Pics/corner-lowerleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
134 <td><img src="<root_prefix>Pics/corner-lowerright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16"></td>
135 </tr>
136 </table>
137 # Ende der Menü-Tabelle
138   </td>
139 </tr>
140
141 <tr>
142   <td width=90 valign=top bgcolor=#5dbbf9>
143     <img src="<root_prefix>Pics/corner-upperleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="16" height="16">
144     <img src="<root_prefix>Pics/corner-upperright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16">
145
146 &nbsp;
147 <div class=vmenu>
148 <ul>
149 #include "submenu.inc"
150 </ul>
151 </div>
152
153 </td>
154   <td width=<page-horiz-space>></td>
155   <td width=100% valign=top>
156   <table width=100% border=0 cellspacing=2 cellpadding=0><tr><td width=100% align=left valign=top>
157   <font face=Helvetica>
158
159 #  <td width=100% valign=top><font face=Helvetica>
160
161 <div class="date">
162 <script type="text/javascript">
163   var today = new Date;
164   var year = today.getYear();
165   var mon = ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];
166
167   if (year < 200)
168     year += 1900;    
169
170   if (year > 2006 && year < 2100)
171     document.write("<small>" + today.getDate()
172                    +". " + mon[today.getMonth()]
173                    +" " + year + "</small>");
174 </script>
175 </div>
176
177 <div id=page>
178 <div id=border>
179 <h3 id=pagetitle><get-var title></h3>
180 <div id=content>
181
182   %body
183
184 </div>
185 </div>
186 </div>
187
188   </font>
189   </td></tr></table>
190   </td>
191 </tr>
192 <tr>
193   <td width=90 valign=bottom bgcolor=#5dbbf9>
194     <img src="<root_prefix>Pics/corner-lowerleft.png" align="left" border="0" hspace="0" vspace="0" alt="" width="17" height="16">
195     <img src="<root_prefix>Pics/corner-lowerright.png" align="right" border="0" hspace="0" vspace="0" alt="" width="16" height="16">
196   </td>
197   <td width=<page-horiz-space>></td>
198   <td width=100% valign=bottom align=right><page-footer></td>
199 </tr>
200 </table>
201 </body>
202 </html>
203
204 </define-tag>
205
206 <define-tag menu-item>
207 <preserve base text href current>
208 <set-var %attributes>
209
210 <if <not <get-var href>>
211   <set-var href="<get-var base>.html">>
212
213 <ifeq <get-var WML_SRC_BASENAME> "<get-var base>" "<set-var current="id=\"current\"">">
214
215 <li><a <get-var current> href="<get-var href>"><get-var text></a></li>
216
217 <restore base text href current>
218 </define-tag>