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-tag title endtag=required>
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 { text-decoration: none; font-weight: bold; }
42 A:link { text-decoration: none; font-weight: bold; color: #666699; }
43 A:visited { text-decoration: none; font-weight: bold; color: #666699; }
44 A:hover { text-decoration: none; font-weight: bold; color: #666699; text-decoration: underline; }
45 \#red { color: #cc3333; }
46 \#sf { font-family: arial,helvetica; font-variant: normal; font-style: normal; }
47 \#sfl { font-weight: bold; font-family: arial,helvetica; font-size: 16pt; \
48 line-height: 16pt; font-variant: normal; font-style: normal; }
49 H1 { font-weight: bold; font-size: 18pt; line-height: 18pt; \
50 font-family: arial,helvetica; font-variant: normal; font-style: normal; }
51 H2 { font-weight: bold; font-size: 14pt; line-height: 14pt; \
52 font-family: arial,helvetica; font-variant: normal; font-style: normal; }
53 H3 { font-weight: bold; font-size: 12pt; line-height: 12pt; \
54 font-family: arial,helvetica; font-variant: normal; font-style: normal; }
57 # end of header and start of physical body
58 # (use additionally use colors here for older browsers)
60 <body link="#6666cc" alink="#6666cc" vlink="#6666cc" bgcolor="#666699" text="#000000"
61 marginheight=0 leftmargin=0 rightmargin=0 topmargin=0>
63 # now define the page layout by a nested table
64 # structure consisting of a 5x5 cell grid.
65 <table width=100% cellspacing=0 cellpadding=0 border=0>
66 # visually: the top line of the page
68 <td align=left width=100 bgcolor="#666699"><img src="$(IMG)/page-head-tl.jpg" alt="OpenSSL"></td>\
69 <td align=left colspan=2 width=600 bgcolor="#666699"><img src="$(IMG)/page-head-tm.jpg" alt=""></td>\
70 <td align=right width=20 bgcolor="#666699"> </td>\
71 <td align=right width=50 bgcolor="#666699"> </td>\
73 # visually: the top of the white body with the subnavbar
75 <td align=left width=100><img src="$(IMG)/page-head-bl.jpg"></td>\
76 <td align=left width=20><img src="$(IMG)/page-head-bm.jpg"></td>\
77 <td align=left width=100% bgcolor="#ffffff">\
80 <td align=right width=20><img src="$(IMG)/page-corner-tr.gif"></td>\
81 <td align=right width=50 bgcolor="#666699"> </td>\
83 # visually: the left main navigation bar and the white body
85 <td align=left valign=top width=100 bgcolor="#666699">{#PAGE_NAVBAR#}</td>\
86 <td align=left valign=top width=20 bgcolor="#ffffff"> </td>\
87 <td align=left valign=top bgcolor="#ffffff">\
89 :PAGE_HEAD][PAGE_BODY:
91 :PAGE_BODY][PAGE_FOOT:\
93 <td align=right width=20 bgcolor="#ffffff"> </td>\
94 <td align=right width=50 bgcolor="#666699"> </td>\
96 # visually: the bottom of the white body
98 <td align=left valign=top width=100 bgcolor="#666699"> </td>\
99 <td align=left width=20><img src="$(IMG)/page-corner-bl.gif"></td>\
100 <td align=left valign=top bgcolor="#ffffff"> </td>\
101 <td align=right width=20><img src="$(IMG)/page-corner-br.gif"></td>\
102 <td align=right width=50 bgcolor="#666699"> </td>\
104 # visually: the bottom of the page (only for esthetical
105 # reasons, i.e. the page doesn't end with the white body)
107 <td colspan=5 bgcolor="#666699"> </td>\
111 # the physical end of the body
117 ## The main Navigation Bar [left, vertically]
120 # define the navigation bar through a grammar
121 <navbar:define name=navbar imgstar="n:s:s"
122 imgbase="$(IMG)" urlbase="$(ROOT)">
131 <navbar:button id=title url="." txt="Title" img=page-navbar-ti-*.jpg>
132 <navbar:button id=FAQ url=support/faq.html txt="FAQ" img=page-navbar-fq-*.jpg>
133 <navbar:button id=about url=about/ txt="About" img=page-navbar-ab-*.jpg>
134 <navbar:button id=news url=news/ txt="News" img=page-navbar-ne-*.jpg>
135 <navbar:button id=docs url=docs/ txt="Documents" img=page-navbar-do-*.jpg>
136 <navbar:button id=source url=source/ txt="Source" img=page-navbar-so-*.jpg>
137 <navbar:button id=contrib url=contrib/ txt="Contribution" img=page-navbar-co-*.jpg>
138 <navbar:button id=support url=support/ txt="Support" img=page-navbar-su-*.jpg>
139 <navbar:button id=related url=related/ txt="Related" img=page-navbar-re-*.jpg>
149 # and then immediately render it into its layout location
150 # (Hint: The top and buttom images have to be part of the table
151 # structure because only this way we can put them 0pt to the
152 # buttons without a gap)
154 <table cellspacing=0 cellpadding=0 border=0>\
155 <tr><td><img src="$(IMG)/page-navbar-top.jpg"></td></tr>
157 <navbar:render name=navbar select=$(area) $(page:+subselected)>
158 <tr><td><img src="$(IMG)/page-navbar-bot.jpg"><br><p></td></tr>
163 ## The Sub Navigation Bar (SNB) [top, horizontally]
166 # define the <snb>...</snb> container tag
167 <define-tag snb endtag=required>
168 # 1. define the navigation bar through a grammar
169 <navbar:define name=snb urlbase="$(SNB_ROOT)"
170 txtcol_normal="#666666" txtcol_select="#000000">
173 <table cellspacing=0 cellpadding=0 border=0>
176 # button prolog (normal)
178 <td><font face="Arial,Helvetica">
180 # button prolog (selected)
181 <navbar:prolog type=S>\
182 <td bgcolor="#f0f0f0"> <font face="Arial,Helvetica"><b>
184 # ...here the <snb_button> tags will occur...
186 # button epilog (normal)
188 </font> </td><td>|</td>
190 # button epilog (selected)
191 <navbar:epilog type=S>\
192 </b></font> </td><td>|</td>
194 # last button epilog (normal)
195 <navbar:epilog pos=last>\
196 </font> </td><td></td>
198 # last button epilog (selected)
199 <navbar:epilog type=S pos=last>\
200 </b></font> </td><td></td>
208 # 2. render the navigation bar and divert
209 # divert it into it's final location
211 <navbar:render name=snb select="$(page)">\
215 # define the <snb_button> tag for the <snb> container
216 # (this is for consistency with the tag names)
217 <define-tag snb_button>
218 <navbar:button %attributes>
221 # predefine the contents of the SNB location
222 # by diverting a whitespace character to it.
223 # This prevents the table to be folded.
228 # and now the final WML trick: When the page=<page_name>
229 # attribute is specified for this template, we read in the SNB
230 # spec-file which now can use the <snb>..</snb> and
231 # <snb_button> tags to actually define and render a SNB. This
232 # is accomplished by doing some sort of a conditional #include. ;-)
233 $(page:*# )$(page:+#include ")$(SNB_RC:-.wmlsnb)$(page:+")
236 ## Useful tags (for convenience purposes only)
239 # define a <item> tag for <ul>/<ol> item similar to <li> but
240 # which is nice for URL lists like the Related area where
241 # we want a special layout.
248 <set-var %attributes>
249 <li><imgdot width=1 height=18>\
250 <a href="<get-var url>"><font size=+1 face="Arial,Helvetica"><b><get-var name></b></font></a>
251 <ifeq "<get-var aio>" "" <img src="aio.gif" alt="[all-in-one]" align=absmiddle>>
253 <a href="<get-var url>"><font size=-1><get-var url></font></a><br>
254 <ifeq "<get-var info>" "" "" "<get-var info>">
261 # define a <filelist> tag which can be used to create a file listing which
262 # is optically more compact than the stuff Apache's mod_autoindex creates.
263 # Especially the current version is marked red, too.
264 <define-tag filelist>
266 <b> Bytes Timestamp Filename</b>
267 <b>________ ____________________ ____________________________</b>
270 open(FP, "<index.current");
278 my (@F, @R, $f, @S, @T);
279 @F = sort { (stat($a))[9] <=> (stat($b))[9]; } (glob($pat));
282 next if ($f =~ m|^index.*|);
289 $f = "$f/" if (-d $f);
290 @T = localtime($S[9]);
291 my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
292 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
293 push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n",
294 $S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f));
300 next if ($l =~ m|^\s*$|);
301 $l =~ s|(\s+)(\S+[^/])(\s*\n)$|$1."<a href=\"$2\">$2</a>".$3|e;
302 $l =~ s|(\s+)(\S+/)(\s*\n)$|$1."<a href=\"$2\"><b>$2</b></a>".$3|e;
304 $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 <b>[LATEST]</b></font>|;
305 $l =~ s|>($hi)<|><font color="#cc3333">$1</font><|;
313 <define-tag rfilelist>
315 <b> Bytes Timestamp Filename</b>
316 <b>________ ____________________ ____________________________</b>
319 open(FP, "<index.current");
327 my (@F, @R, $f, @S, @T);
328 @F = sort { (stat($b))[9] <=> (stat($a))[9]; } (glob($pat));
331 next if ($f =~ m|^index.*|);
338 $f = "$f/" if (-d $f);
339 @T = localtime($S[9]);
340 my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
341 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
342 push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n",
343 $S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f));
349 next if ($l =~ m|^\s*$|);
350 $l =~ s|(\s+)(\S+[^/])(\s*\n)$|$1."<a href=\"$2\">$2</a>".$3|e;
351 $l =~ s|(\s+)(\S+/)(\s*\n)$|$1."<a href=\"$2\"><b>$2</b></a>".$3|e;
353 $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 <b>[LATEST]</b></font>|;
354 $l =~ s|>($hi)<|><font color="#cc3333">$1</font><|;
362 # define a <cvs> container which can be used to reference
363 # files within the CVS repository similar to <a>.
364 <define-tag cvs endtag=required>
366 <set-var %attributes>\
367 <a href="$(ROOT)/source/exp/<get-var href>"><get-var href></a>\
372 <define-tag newsflash>
376 <set-var %attributes>
377 <table width=500 cellspacing=0 cellpadding=1 border=0>
378 <tr><td><font face="Arial,Helvetica"><b>Date</b></font></td> <td> <font face="Arial,Helvetica"><b>Newsflash</b></font></td></tr>
379 <tr><td><hr noshade size=1></td> <td><hr noshade size=1></td></tr>
381 open(FP, "< <get-var from>") || die;
382 my $max = ("<get-var max>" eq '' ? 9999 : "<get-var max>");
390 $ncol = ($ncol + 1) % 2;
392 s|="ROOT|="$(ROOT)|g;
393 s|="CVS|="$(ROOT)/source/exp/|g;
394 if (m|^(.+?):(.+)|) {
395 print "<tr bgcolor=\"$col\">\n";
396 print " <td align=right><font face=\"Arial,Helvetica\"><b>$1:</b></font></td> <td> $2</td>\n";
400 last if ($n >= $max);
404 <ifeq "<get-var more>" "" "" <group
406 <td> </td> <td align=right><a href="<get-var more>">more...</a></td>
415 # define a <disclaimer> tag which displays the usual disclaimer stuff
416 <define-tag disclaimer>
417 <font face="Arial,Helvetica" size=-1>
418 This software package uses strong cryptography, so even if it is created,
419 maintained and distributed from liberal countries in Europe (where it is legal
420 to do this), it falls under certain export/import and/or use restrictions in
421 some other parts of the world.
423 PLEASE REMEMBER THAT EXPORT/IMPORT AND/OR USE OF STRONG CRYPTOGRAPHY
424 SOFTWARE, PROVIDING CRYPTOGRAPHY HOOKS OR EVEN JUST COMMUNICATING TECHNICAL
425 DETAILS ABOUT CRYPTOGRAPHY SOFTWARE IS ILLEGAL IN SOME PARTS OF THE WORLD.
426 SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR COUNTRY, RE-DISTRIBUTE IT FROM
427 THERE OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS OR EVEN SOURCE PATCHES TO THE
428 AUTHOR OR OTHER PEOPLE YOU ARE STRONGLY ADVISED TO PAY CLOSE ATTENTION TO
429 ANY EXPORT/IMPORT AND/OR USE LAWS WHICH APPLY TO YOU. THE AUTHORS OF OPENSSL
430 ARE NOT LIABLE FOR ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT
431 IS YOUR RESPONSIBILITY.
434 <font face="Arial,Helvetica" size=-1>
436 This product includes cryptographic software written by Eric A. Young
437 (eay@cryptsoft.com). This product includes software written by Tim J. Hudson
442 # a tag displaying the used tools
443 <define-tag website-tools>
444 <font face="Arial,Helvetica" size=-1>
446 <a href="http://www.engelschall.com/">Ralf S. Engelschall</a>
448 <a href="http://thewml.org/"><font color="#000000">
449 Website META Language</font></a> (WML).<br>
450 All markup code and graphics on this website
451 are Copyright © 1999-2002 <a href="http://www.openssl.org/">The OpenSSL Project</a>,
452 All rights reserved.<br>
453 This website is served by an
454 <a href="http://www.apache.org/"><font color="#000000">Apache</font></a>
455 webserver environment.<br>
456 Hardware and bandwidth provided by
457 <a href="http://www.cw.com/"><font color="#000000">
458 Cable & Wireless Germany</font></a>.
462 # construct an absolute URL out of a relative URL
463 # (essential for the mirroring of the website!)
464 <define-tag absolute>
466 my ($cwd, $baseurl, $basedir, $subdir, $page, $url);
468 # determine current working directory
469 $cwd = '<get-var WML_SRC_DIRNAME>';
472 $baseurl = '<get-var BASE_URL>' || 'file://';
474 # determine base directory
475 $basedir = '<get-var BASE_DIR>' || '<get-var WML_SRC_DIRNAME>';
476 $basedir = &canonpath("$cwd/$basedir") if ($basedir !~ m|^/|);
478 # determine subdir from base dir to current working dir
479 $subdir = &relpath($basedir, $cwd);
484 # construct final URL
485 $url = "$baseurl/$subdir/$page";
486 $url = &canonurl($url);
488 # replace this tag with the constructed URL
494 ## Finally, the layout is now rendered, so divert all
495 ## following stuff (the code in the local file after the #use
496 ## for this template!) into the white body area.