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,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/">
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">
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=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>
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)
151 <table cellspacing=0 cellpadding=0 border=0>\
152 <tr><td><img src="$(IMG)/page-navbar-top.jpg"></td></tr>
154 <navbar:render name=navbar select=$(area) $(page:+subselected)>
155 <tr><td><img src="$(IMG)/page-navbar-bot.jpg"><br><p></td></tr>
160 ## The Sub Navigation Bar (SNB) [top, horizontally]
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">
170 <table cellspacing=0 cellpadding=0 border=0>
173 # button prolog (normal)
175 <td><font face="Arial,Helvetica">
177 # button prolog (selected)
178 <navbar:prolog type=S>\
179 <td bgcolor="#f0f0f0"> <font face="Arial,Helvetica"><b>
181 # ...here the <snb_button> tags will occur...
183 # button epilog (normal)
185 </font> </td><td>|</td>
187 # button epilog (selected)
188 <navbar:epilog type=S>\
189 </b></font> </td><td>|</td>
191 # last button epilog (normal)
192 <navbar:epilog pos=last>\
193 </font> </td><td></td>
195 # last button epilog (selected)
196 <navbar:epilog type=S pos=last>\
197 </b></font> </td><td></td>
205 # 2. render the navigation bar and divert
206 # divert it into it's final location
208 <navbar:render name=snb select="$(page)">\
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>
218 # predefine the contents of the SNB location
219 # by diverting a whitespace character to it.
220 # This prevents the table to be folded.
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:+")
233 ## Useful tags (for convenience purposes only)
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.
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>>
250 <a href="<get-var url>"><font size=-1><get-var url></font></a><br>
251 <ifeq "<get-var info>" "" "" "<get-var info>">
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>
263 <b> Bytes Timestamp Filename</b>
264 <b>________ ____________________ ____________________________</b>
267 open(FP, "<index.current");
275 my (@F, @R, $f, @S, @T);
276 @F = sort { (stat($a))[9] <=> (stat($b))[9]; } (glob($pat));
279 next if ($f =~ m|^index.*|);
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));
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;
301 $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 <b>[LATEST]</b></font>|;
302 $l =~ s|>($hi)<|><font color="#cc3333">$1</font><|;
310 # define a <cvs> container which can be used to reference
311 # files within the CVS repository similar to <a>.
312 <define-container cvs>
314 <set-var %attributes>\
315 <a href="$(ROOT)/source/exp/<get-var href>"><get-var href></a>\
320 <define-tag newsflash>
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> <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>
329 open(FP, "< <get-var from>") || die;
330 my $max = ("<get-var max>" eq '' ? 9999 : "<get-var max>");
338 $ncol = ($ncol + 1) % 2;
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> $2</td>\n";
348 last if ($n >= $max);
352 <ifeq "<get-var more>" "" "" <prog
354 <td> </td> <td align=right><td><a href="<get-var more>">more...</a></td>
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.
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 CAREFULLY YOURSELF, IT
379 IS YOUR RESPONSIBILITY.
382 <font face="Arial,Helvetica" size=-1>
384 This product includes cryptographic software written by Eric A. Young
385 (eay@cryptsoft.com). This product includes software written by Tim J. Hudson
390 # a tag displaying the used tools
391 <define-tag website-tools>
392 <font face="Arial,Helvetica" size=-1>
394 <a href="http://www.engelschall.com/">Ralf S. Engelschall</a>
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 © 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.
407 # construct an absolute URL out of a relative URL
408 # (essential for the mirroring of the website!)
409 <define-tag absolute>
411 my ($cwd, $baseurl, $basedir, $subdir, $page, $url);
413 # determine current working directory
414 $cwd = '<get-var WML_SRC_DIRNAME>';
417 $baseurl = '<get-var BASE_URL>' || 'file://';
419 # determine base directory
420 $basedir = '<get-var BASE_DIR>' || '<get-var WML_SRC_DIRNAME>';
421 $basedir = &canonpath("$cwd/$basedir") if ($basedir !~ m|^/|);
423 # determine subdir from base dir to current working dir
424 $subdir = &relpath($basedir, $cwd);
429 # construct final URL
430 $url = "$baseurl/$subdir/$page";
431 $url = &canonurl($url);
433 # replace this tag with the constructed URL
439 ## Finally, the layout is now rendered, so divert all
440 ## following stuff (the code in the local file after the #use
441 ## for this template!) into the white body area.