54e5a96be462cc35a9e3b0c3a0edf789d27a7150
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

1) #! /usr/bin/wml
Peter Palfrader Make translation status mor...

Peter Palfrader authored 19 years ago

2) <: use strict; :>
Peter Palfrader also use "use warnings"

Peter Palfrader authored 19 years ago

3) <: use warnings; :>
4) #use "perl-globals.wmi"
5) #use "links.wmi"
6) #use "versions.wmi"
7) #use "navigation.wmi"
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

8) 
Peter Palfrader We don't claim to do XML an...

Peter Palfrader authored 18 years ago

9) #<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Sebastian Hahn Change our doctype to refer...

Sebastian Hahn authored 15 years ago

10) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
Peter Palfrader We don't claim to do XML an...

Peter Palfrader authored 18 years ago

11) #<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
12) <html>
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

13) <head>
Roger Dingledine stop prefacing everything w...

Roger Dingledine authored 16 years ago

14)   <title>$(TITLE)</title>
Andrew Lewman change the author to tor, s...

Andrew Lewman authored 14 years ago

15)   <meta name="Author" content="The Tor Project, Inc." />
Peter Palfrader Add russian translation

Peter Palfrader authored 18 years ago

16)   <ifneq "$(CHARSET)" "" "<meta http-equiv="content-type" content="text/html; charset=$(CHARSET)" />">
17)   <ifeq "$(CHARSET)" "" "<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />">
Jacob Appelbaum A new header that selects e...

Jacob Appelbaum authored 16 years ago

18)   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)" />">
19)   <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/stylesheet-ltr.css" />">
Roger Dingledine make the favicon.ico link r...

Roger Dingledine authored 18 years ago

20)   <link rel="shortcut icon" type="image/x-icon" href="$(DOCROOT)/favicon.ico" />
Roger Dingledine Hack weasel's wml voodoo to...

Roger Dingledine authored 18 years ago

21)   <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)" />">
Sebastian Hahn Add a REDIRECT_GLOBAL varia...

Sebastian Hahn authored 14 years ago

22)   <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)" />">
Sebastian Hahn Attempt to create valid htm...

Sebastian Hahn authored 15 years ago

23)   <ifeq "$(ANNOUNCE_RSS)" "yes" "<link rel="alternate" title="Tor Project OR-announce" href="http://rss.gmane.org/gmane.network.onion-routing.announce" type="application/rss+xml" />">
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

24) </head>
25) 
26) <body>
27) 
28) <div class="center">
29) <table class="banner" border="0" cellpadding="0" cellspacing="0">
30)     <tr>
Andrew Lewman Updated the url to www.tp.o...

Andrew Lewman authored 17 years ago

31)         <td class="banner-left"><a href="https://www.torproject.org/"><img src="$(DOCROOT)/images/top-left.png" alt="Click to go to home page" width="193" height="79"></a></td>
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

32)         <td class="banner-middle">
Peter Palfrader also use "use warnings"

Peter Palfrader authored 19 years ago

33) 	<:{
Peter Palfrader Make translation status mor...

Peter Palfrader authored 19 years ago

34) 	    my %navigation;
35) 	    my @keys;
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

36) 	    while (@navigation) {
Peter Palfrader Make translation status mor...

Peter Palfrader authored 19 years ago

37) 	      my $key = shift @navigation;
38) 	      my $val = shift @navigation;
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

39) 	      push @keys, $key;
40) 	      $navigation{$key} = $val;
41) 	    }
42) 
Peter Palfrader Make translation status mor...

Peter Palfrader authored 19 years ago

43) 	    for my $key (@keys) {
44) 	      my $page = $WML_SRC_FILENAME;
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

45) 	      $page =~ s/\.wml//;
46) 	      if ($page ne $key) {
Peter Palfrader Add gui and minor fixes

Peter Palfrader authored 18 years ago

47) 	        if (-e "$(DOCROOT)/$(LANG)/$key.wml") {
Peter Palfrader Remove ././././././ from links

Peter Palfrader authored 18 years ago

48) 	          printf '<a href="%s">%s</a>'."\n",
49) 	                 stripDotSlashs("$(DOCROOT)/$key.html.$(LANG)"), $navigation{$key};
Roger Dingledine link to the blog from the n...

Roger Dingledine authored 16 years ago

50) 	        } elsif ($key =~ /^http/) {
51) 	          printf '<a href="%s">%s</a>'."\n", $key, $navigation{$key};
Roger Dingledine bugfix on the website: the...

Roger Dingledine authored 18 years ago

52) 	        } else {
Peter Palfrader Remove ././././././ from links

Peter Palfrader authored 18 years ago

53) 	          printf '<a href="%s">%s</a>'."\n",
54) 	                 stripDotSlashs("$(DOCROOT)/$key.html"), $navigation{$key};
Roger Dingledine bugfix on the website: the...

Roger Dingledine authored 18 years ago

55) 	        }
56) 	      } else {
57) 	       printf '<a class="current">%s</a>'."\n", $navigation{$key};
58) 	      }
59) 	    }
Peter Palfrader also use "use warnings"

Peter Palfrader authored 19 years ago

60) 	}:>
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

61)         </td>
62)         <td class="banner-right">
Peter Palfrader also use "use warnings"

Peter Palfrader authored 19 years ago

63) 	<:{
Peter Palfrader Make translation status mor...

Peter Palfrader authored 19 years ago

64) 	  my $page = $WML_SRC_FILENAME;
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

65) 	  $page =~ s/\.wml//;
Peter Palfrader Add russian translation

Peter Palfrader authored 18 years ago

66) 	  for my $dir (@LANGUAGES) {
Roger Dingledine this is a better hack. stil...

Roger Dingledine authored 18 years ago

67) 	    if (-e "$dir/$WML_SRC_FILENAME") {
Peter Palfrader More languages in the top r...

Peter Palfrader authored 18 years ago

68) 	      if ($dir eq '$(LANG)') {
Roger Dingledine make mouseovers of our lang...

Roger Dingledine authored 18 years ago

69) 	        printf('<acronym title="%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></acronym> ', $LANGUAGES{$dir}, $dir, $LANGUAGES{$dir});
Peter Palfrader More languages in the top r...

Peter Palfrader authored 18 years ago

70) 	      } else {
Roger Dingledine make mouseovers of our lang...

Roger Dingledine authored 18 years ago

71) 	        printf('<a href="%s.html.%s"><acronym title="%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></acronym></a> ', $page, $dir, $LANGUAGES{$dir}, $dir, $LANGUAGES{$dir});
Peter Palfrader More languages in the top r...

Peter Palfrader authored 18 years ago

72) 	      };
73) 	    } else {
74) 	      printf('<img src="$(IMGROOT)/green-flagspace.png"/> ');
75) 	    };
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

76) 	  };
Peter Palfrader also use "use warnings"

Peter Palfrader authored 19 years ago

77) 	}:>
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

78)         </td>
79)     </tr>
80) </table>
81) 
Roger Dingledine Hack weasel's wml voodoo to...

Roger Dingledine authored 18 years ago

82) <ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(DOCROOT)/$(REDIRECT)">$(DOCROOT)/$(REDIRECT)</a>.">