Add hardware and bandwith credit on sponsors request
[openssl-web.git] / openssl.wml
1 ##
2 ##  openssl.wml -- WML Template for the www.openssl.org website
3 ##  Written by Ralf S. Engelschall <rse@engelschall.com>
4 ##
5 ##  Usage: #use wml::openssl area=<area_name> [page=<page_name>]
6 ##
7
8 #use wml::std::tags
9 #use wml::std::info
10 #use wml::des::navbar
11 #use wml::des::space
12
13 ##
14 ##  The Global Page Layout
15 ##
16
17 #   start of page header
18 [PAGE_HEAD:\
19 <html>
20 <head>
21
22 #   insert information about the webpage
23 <info style=comment domainname="openssl.org"
24       copyright="1998,1999 The OpenSSL Project, http://www.openssl.org/">
25 <info style=meta domainname="openssl.org"
26       copyright="1998,1999 The OpenSSL Project, http://www.openssl.org/">
27
28 #   insert overideable title container
29 <title*>OpenSSL: <<PAGE_TITLE>></title*>
30 #   predefine it to show errors
31 ..PAGE_TITLE!>>Error: Undefined Title !!<<..
32 #   define override tag
33 <define-container title>
34 ..PAGE_TITLE>>%body<<..
35 </define-container>
36
37 #   define a style-sheet for adjusting some HTML layouting things
38 #   to conform to some typographically stronger conventions.
39 <style type="text/css"><!--
40 BODY      { position: absolute; left: 0px; top: 0px; background: #666699; }
41 A:link    { color: #6666cc; }
42 A:active  { color: #6666cc; }
43 A:visited { color: #6666cc; }
44 \#red { color: #cc3333; }
45 \#sf  { font-family: arial,helvetica; font-variant: normal; font-style: normal; }
46 \#sfl { font-weight: bold; font-family: arial,helvetica; font-size: 16pt; \
47         line-height: 16pt; font-variant: normal; font-style: normal; }
48 H1    { font-weight: bold; font-size: 18pt; line-height: 18pt; \
49         font-family: arial,helvetica; font-variant: normal; font-style: normal; }
50 H2    { font-weight: bold; font-size: 14pt; line-height: 14pt; \
51         font-family: arial,helvetica; font-variant: normal; font-style: normal; }
52 H3    { font-weight: bold; font-size: 12pt; line-height: 12pt; \
53         font-family: arial,helvetica; font-variant: normal; font-style: normal; }
54 --></style>
55
56 #   end of header and start of physical body
57 #   (use additionally use colors here for older browsers)
58 </head>
59 <body link="#6666cc" alink="#6666cc" vlink="#6666cc" bgcolor="#666699">
60
61 #   now define the page layout by a nested table 
62 #   structure consisting of a 5x5 cell grid.
63 <table width=100% cellspacing=0 cellpadding=0 border=0>
64   #   visually: the top line of the page
65   <tr>\
66     <td align=left width=100 bgcolor="#666699"><img src="$(IMG)/page-head-tl.jpg" alt="OpenSSL"></td>\
67     <td align=left colspan=2 width=600 bgcolor="#666699"><img src="$(IMG)/page-head-tm.jpg" alt=""></td>\
68     <td align=right width=20 bgcolor="#666699">&nbsp;&nbsp;&nbsp;</td>\
69     <td align=right width=50 bgcolor="#666699">&nbsp;</td>\
70   </tr>
71   #   visually: the top of the white body with the subnavbar
72   <tr>\
73     <td align=left width=100><img src="$(IMG)/page-head-bl.jpg"></td>\
74     <td align=left width=20><img src="$(IMG)/page-head-bm.jpg"></td>\
75     <td align=left width=100% bgcolor="#ffffff">\
76         <<PAGE_SUBNAVBAR>>\
77     </td>\
78     <td align=right width=20><img src="$(IMG)/page-corner-tr.gif"></td>\
79     <td align=right width=50 bgcolor="#666699">&nbsp;</td>\
80   </tr>
81   #   visually: the left main navigation bar and the white body
82   <tr>\
83     <td align=left valign=top width=100 bgcolor="#666699"><<PAGE_NAVBAR>></td>\
84     <td align=left valign=top width=20  bgcolor="#ffffff">&nbsp;</td>\
85     <td align=left valign=top bgcolor="#ffffff">\
86         <br>
87         :PAGE_HEAD][PAGE_BODY:
88         <<PAGE_BODY>>
89         :PAGE_BODY][PAGE_FOOT:\
90     </td>\
91     <td align=right width=20 bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>\
92     <td align=right width=50 bgcolor="#666699">&nbsp;</td>\
93   </tr>
94   #   visually: the bottom of the white body
95   <tr>\
96     <td align=left valign=top width=100 bgcolor="#666699">&nbsp;</td>\
97     <td align=left width=20><img src="$(IMG)/page-corner-bl.gif"></td>\
98     <td align=left valign=top bgcolor="#ffffff">&nbsp;</td>\
99     <td align=right width=20><img src="$(IMG)/page-corner-br.gif"></td>\
100     <td align=right width=50 bgcolor="#666699">&nbsp;</td>\
101   </tr>
102   #   visually: the bottom of the page (only for esthetical
103   #   reasons, i.e. the page doesn't end with the white body)
104   <tr>\
105     <td colspan=5 bgcolor="#666699">&nbsp;</td>\
106   </tr>
107 </table>
108
109 #   the physical end of the body
110 </body>
111 </html>
112 :PAGE_FOOT]
113
114 ##
115 ##  The main Navigation Bar [left, vertically]
116 ##
117
118 #   define the navigation bar through a grammar
119 <navbar:define name=navbar imgstar="n:s:s"
120                imgbase="$(IMG)" urlbase="$(ROOT)">
121   #   bar header
122   <navbar:header>
123   </navbar:header>
124   #   button prolog
125   <navbar:prolog>
126     <tr><td>
127   </navbar:prolog>
128   #   the buttons itself
129   <navbar:button id=title    url=""       txt="Title"        img=page-navbar-ti-*.jpg>
130   <navbar:button id=about    url=about/   txt="About"        img=page-navbar-ab-*.jpg>
131   <navbar:button id=news     url=news/    txt="News"         img=page-navbar-ne-*.jpg>
132   <navbar:button id=docs     url=docs/    txt="Documents"    img=page-navbar-do-*.jpg>
133   <navbar:button id=source   url=source/  txt="Source"       img=page-navbar-so-*.jpg>
134   <navbar:button id=contrib  url=contrib/ txt="Contribution" img=page-navbar-co-*.jpg>
135   <navbar:button id=support  url=support/ txt="Support"      img=page-navbar-su-*.jpg>
136   <navbar:button id=related  url=related/ txt="Related"      img=page-navbar-re-*.jpg>
137   #   button epilog
138   <navbar:epilog>
139     </td></tr>
140   </navbar:epilog>
141   #   bar footer
142   <navbar:footer>
143   </navbar:footer>
144 </navbar:define>
145
146 #   and then immediately render it into its layout location
147 #   (Hint: The top and buttom images have to be part of the table
148 #   structure because only this way we can put them 0pt to the
149 #   buttons without a gap)
150 ..PAGE_NAVBAR>>\
151   <table cellspacing=0 cellpadding=0 border=0>\
152     <tr><td><img src="$(IMG)/page-navbar-top.jpg"></td></tr>
153     #   render it!
154     <navbar:render name=navbar select=$(area) $(page:+subselected)>
155     <tr><td><img src="$(IMG)/page-navbar-bot.jpg"><br><p></td></tr>
156   </table>
157 <<..
158
159 ##
160 ##  The Sub Navigation Bar (SNB) [top, horizontally]
161 ##
162
163 #   define the <snb>...</snb> container tag
164 <define-container snb>
165   #   1. define the navigation bar through a grammar
166   <navbar:define name=snb urlbase="$(SNB_ROOT)" 
167                  txtcol_normal="#666666" txtcol_select="#000000">
168     #   bar header
169     <navbar:header>\
170       <table cellspacing=0 cellpadding=0 border=0>
171         <tr>
172     </navbar:header>
173     #   button prolog (normal)
174     <navbar:prolog>\
175           <td><font face="Arial,Helvetica">&nbsp;
176     </navbar:prolog>
177     #   button prolog (selected)
178     <navbar:prolog type=S>\
179           <td bgcolor="#f0f0f0">&nbsp;<font face="Arial,Helvetica"><b>
180     </navbar:prolog>
181     #   ...here the <snb_button> tags will occur...
182     %body
183     #   button epilog (normal)
184     <navbar:epilog>\
185           </font>&nbsp;</td><td>|</td>
186     </navbar:epilog>
187     #   button epilog (selected)
188     <navbar:epilog type=S>\
189           </b></font>&nbsp;</td><td>|</td>
190     </navbar:epilog>
191     #   last button epilog (normal)
192     <navbar:epilog pos=last>\
193           </font>&nbsp;</td><td></td>
194     </navbar:epilog>
195     #   last button epilog (selected)
196     <navbar:epilog type=S pos=last>\
197           </b></font>&nbsp;</td><td></td>
198     </navbar:epilog>
199     #   bar footer
200     <navbar:footer>\
201         </tr>
202       </table>
203     </navbar:footer>
204   </navbar:define>
205   #   2. render the navigation bar and divert
206   #      divert it into it's final location
207   ..PAGE_SUBNAVBAR>>\
208   <navbar:render name=snb select="$(page)">\
209   <<..
210 </define-container>
211
212 #   define the <snb_button> tag for the <snb> container
213 #   (this is for consistency with the tag names)
214 <define-tag snb_button>
215   <navbar:button %attributes>
216 </define-tag>
217
218 #   predefine the contents of the SNB location
219 #   by diverting a whitespace character to it.
220 #   This prevents the table to be folded.
221 ..PAGE_SUBNAVBAR!>>
222 &nbsp;
223 <<..
224
225 #   and now the final WML trick: When the page=<page_name>
226 #   attribute is specified for this template, we read in the SNB
227 #   spec-file which now can use the <snb>..</snb> and
228 #   <snb_button> tags to actually define and render a SNB. This
229 #   is accomplished by doing some sort of a conditional #include. ;-)
230 $(page:*# )$(page:+#include ")$(SNB_RC:-.wmlsnb)$(page:+")
231
232 ##
233 ##  Useful tags (for convenience purposes only)
234 ##
235
236 #   define a <item> tag for <ul>/<ol> item similar to <li> but
237 #   which is nice for URL lists like the Related area where
238 #   we want a special layout.
239 <define-tag item>
240 <preserve name>
241 <preserve url>
242 <preserve aio>
243 <preserve info>
244 <set-var aio=*>
245 <set-var %attributes>
246 <li><imgdot width=1 height=18>\
247     <a href="<get-var url>"><font size=+1 face="Arial,Helvetica"><b><get-var name></b></font></a>
248     <ifeq "<get-var aio>" "" <img src="aio.gif" alt="[all-in-one]" align=absmiddle>>
249     <br>
250     <a href="<get-var url>"><font size=-1><get-var url></font></a><br>
251     <ifeq "<get-var info>" "" "" "<get-var info>">
252 <restore info>
253 <restore aio>
254 <restore url>
255 <restore name>
256 </define-tag>
257
258 #   define a <filelist> tag which can be used to create a file listing which
259 #   is optically more compact than the stuff Apache's mod_autoindex creates.
260 #   Especially the current version is marked red, too.
261 <define-tag filelist>
262 <pre>
263 <b>   Bytes      Timestamp       Filename</b>
264 <b>________ ____________________ ____________________________</b>
265 <:
266 @HI = ();
267 open(FP, "<index.current");
268 while (<FP>) {
269    s|\s*\n$||;
270    push(@HI, $_);
271 }
272 close(FP);
273 sub ls {
274     my ($pat) = @_;
275     my (@F, @R, $f, @S, @T);
276     @F = sort { (stat($a))[9] <=> (stat($b))[9]; } (glob($pat));
277     @R = ();
278     foreach $f (@F) {
279         next if ($f =~ m|^index.*|);
280         if ('%1' ne '') {
281             if (! %1 $f) {
282                 next;
283             }
284         }
285         @S = stat($f);
286         $f = "$f/" if (-d $f);
287         @T = localtime($S[9]);
288         my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
289                    'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
290         push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n", 
291              $S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f));
292     }
293     return @R;
294 }
295 @L = &ls("%0");
296 foreach $l (@L) {
297     next if ($l =~ m|^\s*$|);
298     $l =~ s|(\s+)(\S+[^/])(\s*\n)$|$1."<a href=\"$2\">$2</a>".$3|e;
299     $l =~ s|(\s+)(\S+/)(\s*\n)$|$1."<a href=\"$2\"><b>$2</b></a>".$3|e;
300     foreach $hi (@HI) {
301         $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1&nbsp;&nbsp;<b>[LATEST]</b></font>|;
302         $l =~ s|>($hi)<|><font color="#cc3333">$1</font><|;
303     }
304     print $l;
305 }
306 :>
307 </pre>
308 </define-tag>
309
310 #   define a <cvs> container which can be used to reference 
311 #   files within the CVS repository similar to <a>.
312 <define-container cvs>
313 <preserve href>\
314 <set-var %attributes>\
315   <a href="$(ROOT)/source/exp/<get-var href>"><get-var href></a>\
316 <restore href>\
317 </define-container>
318
319 #
320 <define-tag newsflash>
321 <preserve from>
322 <preserve max>
323 <preserve more>
324 <set-var %attributes>
325 <table width=500 cellspacing=0 cellpadding=1 border=0>
326 <tr><td><font face="Arial,Helvetica"><b>Date</b></font></td> <td>&nbsp;&nbsp;&nbsp;<font face="Arial,Helvetica"><b>Newsflash</b></font></td></tr>
327 <tr><td><hr noshade size=1></td> <td><hr noshade size=1></td></tr>
328 <:
329     open(FP, "< <get-var from>") || die;
330     my $max = ("<get-var max>" eq '' ? 9999 : "<get-var max>");
331     @COL = (
332         '#ffffff',
333         '#f0f0f0',
334     );
335     $ncol = 1;
336     $n = 0;
337     while (<FP>) {
338         $ncol = ($ncol + 1) % 2;
339         $col  = $COL[$ncol];
340         s|="ROOT|="$(ROOT)|g;
341         s|="CVS|="$(ROOT)/source/exp/|g;
342         if (m|^(.+?):(.+)|) {
343             print "<tr bgcolor=\"$col\">\n";
344             print "  <td align=right><font face=\"Arial,Helvetica\"><b>$1:</b></font></td> <td>&nbsp;&nbsp;$2</td>\n";
345             print "</tr>\n";
346         }
347         $n++;
348         last if ($n >= $max);
349     }
350     close(FP);
351 :>
352 <ifeq "<get-var more>" "" "" <prog
353 <tr>
354   <td>&nbsp;</td> <td align=right><a href="<get-var more>">more...</a></td>
355 </tr>
356 >>
357 </table>
358 <restore more>
359 <restore max>
360 <restore from>
361 </define-tag>
362
363 #   define a <disclaimer> tag which displays the usual disclaimer stuff
364 <define-tag disclaimer>
365 <font face="Arial,Helvetica" size=-1>
366 This software package uses strong cryptography, so even if it is created,
367 maintained and distributed from liberal countries in Europe (where it is legal
368 to do this), it falls under certain export/import and/or use restrictions in
369 some other parts of the world.
370 <p>
371 PLEASE REMEMBER THAT EXPORT/IMPORT AND/OR USE OF STRONG CRYPTOGRAPHY
372 SOFTWARE, PROVIDING CRYPTOGRAPHY HOOKS OR EVEN JUST COMMUNICATING TECHNICAL
373 DETAILS ABOUT CRYPTOGRAPHY SOFTWARE IS ILLEGAL IN SOME PARTS OF THE WORLD.
374 SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR COUNTRY, RE-DISTRIBUTE IT FROM
375 THERE OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS OR EVEN SOURCE PATCHES TO THE
376 AUTHOR OR OTHER PEOPLE YOU ARE STRONGLY ADVISED TO PAY CLOSE ATTENTION TO
377 ANY EXPORT/IMPORT AND/OR USE LAWS WHICH APPLY TO YOU. THE AUTHORS OF OPENSSL
378 ARE NOT LIABLE FOR ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT
379 IS YOUR RESPONSIBILITY.
380 </font>
381 <p>
382 <font face="Arial,Helvetica" size=-1>
383 CREDIT INFORMATION:
384 This product includes cryptographic software written by Eric A. Young
385 (eay@cryptsoft.com).  This product includes software written by Tim J.  Hudson
386 (tjh@cryptsoft.com).
387 </font>
388 </define-tag>
389
390 #  a tag displaying the used tools   
391 <define-tag website-tools>
392 <font face="Arial,Helvetica" size=-1> 
393 Website designed by
394 <a href="http://www.engelschall.com/">Ralf S. Engelschall</a>
395 and generated with
396 <a href="http://www.engelschall.com/sw/wml/"><font color="#000000">
397 Website META Language</font></a> (WML).<br>
398 All markup code and graphics on this website
399 are Copyright &copy; 1999 <a href="http://www.openssl.org/">The OpenSSL Project</a>, 
400 All rights reserved.<br>
401 This website is served by an 
402 <a href="http://www.apache.org/"><font color="#000000">Apache</font></a>
403 webserver environment.
404 Hardware and bandwidth provided by 
405 <a href="http://opensource.ee.ethz.ch/"><font <ifeq "<get-var color>" "" ""
406 "color=<get-var color>">>Department of Electrical Engineering</font></a>
407 of Swiss Federal Institute of Technology, Zurich.
408 </font>
409 </define-tag>
410
411 #  construct an absolute URL out of a relative URL
412 #  (essential for the mirroring of the website!)
413 <define-tag absolute>
414 <:{
415     my ($cwd, $baseurl, $basedir, $subdir, $page, $url);
416
417     #   determine current working directory
418     $cwd = '<get-var WML_SRC_DIRNAME>';
419
420     #   determine base URL
421     $baseurl = '<get-var BASE_URL>' || 'file://';
422
423     #   determine base directory
424     $basedir = '<get-var BASE_DIR>' || '<get-var WML_SRC_DIRNAME>';
425     $basedir = &canonpath("$cwd/$basedir") if ($basedir !~ m|^/|);
426
427     #   determine subdir from base dir to current working dir
428     $subdir = &relpath($basedir, $cwd);
429
430     #   determine document
431     $page = '%0';
432
433     #   construct final URL
434     $url = "$baseurl/$subdir/$page";
435     $url = &canonurl($url);
436
437     #   replace this tag with the constructed URL
438     print $url;
439 }:>
440 </define-tag>
441
442 ##
443 ##  Finally, the layout is now rendered, so divert all
444 ##  following stuff (the code in the local file after the #use 
445 ##  for this template!) into the white body area.
446 ##
447
448 ..PAGE_BODY>>
449