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