2 ## openssl.wml -- WML Template for the www.openssl.org website
3 ## Written by Ralf S. Engelschall <rse@engelschall.com>
5 ## Usage: #use wml::openssl area=<area_name> [page=<page_name>]
14 ## The Global Page Layout
17 # start of page header
22 # insert information about the webpage
23 <info style=comment domainname="openssl.org"
24 copyright="1998-2000 The OpenSSL Project, http://www.openssl.org/">
25 <info style=meta domainname="openssl.org"
26 copyright="1998-2000 The OpenSSL Project, http://www.openssl.org/">
28 # insert overideable title container
29 <title*>OpenSSL: <<PAGE_TITLE>></title*>
30 # predefine it to show errors
31 ..PAGE_TITLE!>>Error: Undefined Title !!<<..
33 <define-container title>
34 ..PAGE_TITLE>>%body<<..
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; }
56 # end of header and start of physical body
57 # (use additionally use colors here for older browsers)
59 <body link="#6666cc" alink="#6666cc" vlink="#6666cc" bgcolor="#666699" text="#000000">
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
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"> </td>\
69 <td align=right width=50 bgcolor="#666699"> </td>\
71 # visually: the top of the white body with the subnavbar
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">\
78 <td align=right width=20><img src="$(IMG)/page-corner-tr.gif"></td>\
79 <td align=right width=50 bgcolor="#666699"> </td>\
81 # visually: the left main navigation bar and the white body
83 <td align=left valign=top width=100 bgcolor="#666699"><<PAGE_NAVBAR>></td>\
84 <td align=left valign=top width=20 bgcolor="#ffffff"> </td>\
85 <td align=left valign=top bgcolor="#ffffff">\
87 :PAGE_HEAD][PAGE_BODY:
89 :PAGE_BODY][PAGE_FOOT:\
91 <td align=right width=20 bgcolor="#ffffff"> </td>\
92 <td align=right width=50 bgcolor="#666699"> </td>\
94 # visually: the bottom of the white body
96 <td align=left valign=top width=100 bgcolor="#666699"> </td>\
97 <td align=left width=20><img src="$(IMG)/page-corner-bl.gif"></td>\
98 <td align=left valign=top bgcolor="#ffffff"> </td>\
99 <td align=right width=20><img src="$(IMG)/page-corner-br.gif"></td>\
100 <td align=right width=50 bgcolor="#666699"> </td>\
102 # visually: the bottom of the page (only for esthetical
103 # reasons, i.e. the page doesn't end with the white body)
105 <td colspan=5 bgcolor="#666699"> </td>\
109 # the physical end of the body
115 ## The main Navigation Bar [left, vertically]
118 # define the navigation bar through a grammar
119 <navbar:define name=navbar imgstar="n:s:s"
120 imgbase="$(IMG)" urlbase="$(ROOT)">
129 <navbar:button id=title url="" txt="Title" img=page-navbar-ti-*.jpg>
130 <navbar:button id=FAQ url=support/faq.html txt="FAQ" img=page-navbar-fq-*.jpg>
131 <navbar:button id=about url=about/ txt="About" img=page-navbar-ab-*.jpg>
132 <navbar:button id=news url=news/ txt="News" img=page-navbar-ne-*.jpg>
133 <navbar:button id=docs url=docs/ txt="Documents" img=page-navbar-do-*.jpg>
134 <navbar:button id=source url=source/ txt="Source" img=page-navbar-so-*.jpg>
135 <navbar:button id=contrib url=contrib/ txt="Contribution" img=page-navbar-co-*.jpg>
136 <navbar:button id=support url=support/ txt="Support" img=page-navbar-su-*.jpg>
137 <navbar:button id=related url=related/ txt="Related" img=page-navbar-re-*.jpg>
147 # and then immediately render it into its layout location
148 # (Hint: The top and buttom images have to be part of the table
149 # structure because only this way we can put them 0pt to the
150 # buttons without a gap)
152 <table cellspacing=0 cellpadding=0 border=0>\
153 <tr><td><img src="$(IMG)/page-navbar-top.jpg"></td></tr>
155 <navbar:render name=navbar select=$(area) $(page:+subselected)>
156 <tr><td><img src="$(IMG)/page-navbar-bot.jpg"><br><p></td></tr>
161 ## The Sub Navigation Bar (SNB) [top, horizontally]
164 # define the <snb>...</snb> container tag
165 <define-container snb>
166 # 1. define the navigation bar through a grammar
167 <navbar:define name=snb urlbase="$(SNB_ROOT)"
168 txtcol_normal="#666666" txtcol_select="#000000">
171 <table cellspacing=0 cellpadding=0 border=0>
174 # button prolog (normal)
176 <td><font face="Arial,Helvetica">
178 # button prolog (selected)
179 <navbar:prolog type=S>\
180 <td bgcolor="#f0f0f0"> <font face="Arial,Helvetica"><b>
182 # ...here the <snb_button> tags will occur...
184 # button epilog (normal)
186 </font> </td><td>|</td>
188 # button epilog (selected)
189 <navbar:epilog type=S>\
190 </b></font> </td><td>|</td>
192 # last button epilog (normal)
193 <navbar:epilog pos=last>\
194 </font> </td><td></td>
196 # last button epilog (selected)
197 <navbar:epilog type=S pos=last>\
198 </b></font> </td><td></td>
206 # 2. render the navigation bar and divert
207 # divert it into it's final location
209 <navbar:render name=snb select="$(page)">\
213 # define the <snb_button> tag for the <snb> container
214 # (this is for consistency with the tag names)
215 <define-tag snb_button>
216 <navbar:button %attributes>
219 # predefine the contents of the SNB location
220 # by diverting a whitespace character to it.
221 # This prevents the table to be folded.
226 # and now the final WML trick: When the page=<page_name>
227 # attribute is specified for this template, we read in the SNB
228 # spec-file which now can use the <snb>..</snb> and
229 # <snb_button> tags to actually define and render a SNB. This
230 # is accomplished by doing some sort of a conditional #include. ;-)
231 $(page:*# )$(page:+#include ")$(SNB_RC:-.wmlsnb)$(page:+")
234 ## Useful tags (for convenience purposes only)
237 # define a <item> tag for <ul>/<ol> item similar to <li> but
238 # which is nice for URL lists like the Related area where
239 # we want a special layout.
246 <set-var %attributes>
247 <li><imgdot width=1 height=18>\
248 <a href="<get-var url>"><font size=+1 face="Arial,Helvetica"><b><get-var name></b></font></a>
249 <ifeq "<get-var aio>" "" <img src="aio.gif" alt="[all-in-one]" align=absmiddle>>
251 <a href="<get-var url>"><font size=-1><get-var url></font></a><br>
252 <ifeq "<get-var info>" "" "" "<get-var info>">
259 # define a <filelist> tag which can be used to create a file listing which
260 # is optically more compact than the stuff Apache's mod_autoindex creates.
261 # Especially the current version is marked red, too.
262 <define-tag filelist>
264 <b> Bytes Timestamp Filename</b>
265 <b>________ ____________________ ____________________________</b>
268 open(FP, "<index.current");
276 my (@F, @R, $f, @S, @T);
277 @F = sort { (stat($a))[9] <=> (stat($b))[9]; } (glob($pat));
280 next if ($f =~ m|^index.*|);
287 $f = "$f/" if (-d $f);
288 @T = localtime($S[9]);
289 my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
290 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
291 push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n",
292 $S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f));
298 next if ($l =~ m|^\s*$|);
299 $l =~ s|(\s+)(\S+[^/])(\s*\n)$|$1."<a href=\"$2\">$2</a>".$3|e;
300 $l =~ s|(\s+)(\S+/)(\s*\n)$|$1."<a href=\"$2\"><b>$2</b></a>".$3|e;
302 $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 <b>[LATEST]</b></font>|;
303 $l =~ s|>($hi)<|><font color="#cc3333">$1</font><|;
311 <define-tag rfilelist>
313 <b> Bytes Timestamp Filename</b>
314 <b>________ ____________________ ____________________________</b>
317 open(FP, "<index.current");
325 my (@F, @R, $f, @S, @T);
326 @F = sort { (stat($b))[9] <=> (stat($a))[9]; } (glob($pat));
329 next if ($f =~ m|^index.*|);
336 $f = "$f/" if (-d $f);
337 @T = localtime($S[9]);
338 my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
339 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
340 push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n",
341 $S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f));
347 next if ($l =~ m|^\s*$|);
348 $l =~ s|(\s+)(\S+[^/])(\s*\n)$|$1."<a href=\"$2\">$2</a>".$3|e;
349 $l =~ s|(\s+)(\S+/)(\s*\n)$|$1."<a href=\"$2\"><b>$2</b></a>".$3|e;
351 $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 <b>[LATEST]</b></font>|;
352 $l =~ s|>($hi)<|><font color="#cc3333">$1</font><|;
360 # define a <cvs> container which can be used to reference
361 # files within the CVS repository similar to <a>.
362 <define-container cvs>
364 <set-var %attributes>\
365 <a href="$(ROOT)/source/exp/<get-var href>"><get-var href></a>\
370 <define-tag newsflash>
374 <set-var %attributes>
375 <table width=500 cellspacing=0 cellpadding=1 border=0>
376 <tr><td><font face="Arial,Helvetica"><b>Date</b></font></td> <td> <font face="Arial,Helvetica"><b>Newsflash</b></font></td></tr>
377 <tr><td><hr noshade size=1></td> <td><hr noshade size=1></td></tr>
379 open(FP, "< <get-var from>") || die;
380 my $max = ("<get-var max>" eq '' ? 9999 : "<get-var max>");
388 $ncol = ($ncol + 1) % 2;
390 s|="ROOT|="$(ROOT)|g;
391 s|="CVS|="$(ROOT)/source/exp/|g;
392 if (m|^(.+?):(.+)|) {
393 print "<tr bgcolor=\"$col\">\n";
394 print " <td align=right><font face=\"Arial,Helvetica\"><b>$1:</b></font></td> <td> $2</td>\n";
398 last if ($n >= $max);
402 <ifeq "<get-var more>" "" "" <prog
404 <td> </td> <td align=right><a href="<get-var more>">more...</a></td>
413 # define a <disclaimer> tag which displays the usual disclaimer stuff
414 <define-tag disclaimer>
415 <font face="Arial,Helvetica" size=-1>
416 This software package uses strong cryptography, so even if it is created,
417 maintained and distributed from liberal countries in Europe (where it is legal
418 to do this), it falls under certain export/import and/or use restrictions in
419 some other parts of the world.
421 PLEASE REMEMBER THAT EXPORT/IMPORT AND/OR USE OF STRONG CRYPTOGRAPHY
422 SOFTWARE, PROVIDING CRYPTOGRAPHY HOOKS OR EVEN JUST COMMUNICATING TECHNICAL
423 DETAILS ABOUT CRYPTOGRAPHY SOFTWARE IS ILLEGAL IN SOME PARTS OF THE WORLD.
424 SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR COUNTRY, RE-DISTRIBUTE IT FROM
425 THERE OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS OR EVEN SOURCE PATCHES TO THE
426 AUTHOR OR OTHER PEOPLE YOU ARE STRONGLY ADVISED TO PAY CLOSE ATTENTION TO
427 ANY EXPORT/IMPORT AND/OR USE LAWS WHICH APPLY TO YOU. THE AUTHORS OF OPENSSL
428 ARE NOT LIABLE FOR ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT
429 IS YOUR RESPONSIBILITY.
432 <font face="Arial,Helvetica" size=-1>
434 This product includes cryptographic software written by Eric A. Young
435 (eay@cryptsoft.com). This product includes software written by Tim J. Hudson
440 # a tag displaying the used tools
441 <define-tag website-tools>
442 <font face="Arial,Helvetica" size=-1>
444 <a href="http://www.engelschall.com/">Ralf S. Engelschall</a>
446 <a href="http://www.engelschall.com/sw/wml/"><font color="#000000">
447 Website META Language</font></a> (WML).<br>
448 All markup code and graphics on this website
449 are Copyright © 1999 <a href="http://www.openssl.org/">The OpenSSL Project</a>,
450 All rights reserved.<br>
451 This website is served by an
452 <a href="http://www.apache.org/"><font color="#000000">Apache</font></a>
453 webserver environment.<br>
454 Hardware and bandwidth provided by
455 <a href="http://opensource.ee.ethz.ch/"><font color="#000000">
456 Department of Electrical Engineering</font></a>
457 of Swiss Federal Institute of Technology, Zurich.
461 # construct an absolute URL out of a relative URL
462 # (essential for the mirroring of the website!)
463 <define-tag absolute>
465 my ($cwd, $baseurl, $basedir, $subdir, $page, $url);
467 # determine current working directory
468 $cwd = '<get-var WML_SRC_DIRNAME>';
471 $baseurl = '<get-var BASE_URL>' || 'file://';
473 # determine base directory
474 $basedir = '<get-var BASE_DIR>' || '<get-var WML_SRC_DIRNAME>';
475 $basedir = &canonpath("$cwd/$basedir") if ($basedir !~ m|^/|);
477 # determine subdir from base dir to current working dir
478 $subdir = &relpath($basedir, $cwd);
483 # construct final URL
484 $url = "$baseurl/$subdir/$page";
485 $url = &canonurl($url);
487 # replace this tag with the constructed URL
493 ## Finally, the layout is now rendered, so divert all
494 ## following stuff (the code in the local file after the #use
495 ## for this template!) into the white body area.