deb20ef5dcb01d7b2f39a6ec0b099cd5af73e8a5
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi   1) #! /usr/bin/wml
donate/en/thankyou-head.wmi   2) <: use strict; :>
donate/en/thankyou-head.wmi   3) <: use warnings; :>
donate/en/thankyou-head.wmi   4) #use "perl-globals.wmi"
donate/en/thankyou-head.wmi   5) #use "links.wmi"
donate/en/thankyou-head.wmi   6) #use "versions.wmi"
donate/en/thankyou-head.wmi   7) #use "navigation.wmi"
donate/en/thankyou-head.wmi   8) 
donate/en/thankyou-head.wmi   9) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
donate/en/thankyou-head.wmi  10) <html>
donate/en/thankyou-head.wmi  11) <head>
donate/en/thankyou-head.wmi  12)   <title>$(TITLE)</title>
donate/en/thankyou-head.wmi  13)   <link rel="shortcut icon" type="image/x-icon" href="$(IMGROOT)/favicon.ico">
donate/en/thankyou-head.wmi  14)   <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
donate/en/thankyou-head.wmi  15)   <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
donate/en/thankyou-head.wmi  16) 
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi    17)   # begin WML to generate css/js paths
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  18)   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/thankyou-head.wmi    19)   <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.min.css">">
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  20) 
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/thankyou-head.wmi    21)   <link href="$(DOCROOT)/css/thankyou.min.css" rel="stylesheet" type="text/css">
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  22)   <!--[if lte IE 8]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/thankyou-head.wmi    23)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie8-and-down.min.css">
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  24)   <![endif]-->
donate/en/thankyou-head.wmi  25)   <!--[if lte IE 7]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/thankyou-head.wmi    26)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.min.css">
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  27)   <![endif]-->
donate/en/thankyou-head.wmi  28)   <!--[if IE 6]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/thankyou-head.wmi    29)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.min.css">
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  30)   <![endif]-->
donate/en/thankyou-head.wmi  31) #  <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi    32)   # end WML to generate css/js paths
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  33) 
donate/en/thankyou-head.wmi  34)   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
donate/en/thankyou-head.wmi  35)   <meta name="author" content="The Tor Project, Inc.">
donate/en/thankyou-head.wmi  36)   <meta name="keywords" content="anonymity online, tor, tor project, censorship circumvention, traffic analysis, anonymous communications research">
Andrew Lewman patches to download page to...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  37) <script type="text/javascript" src="$(DOCROOT)/js/jquery.min.js" charset="utf-8"></script>
donate/en/thankyou-head.wmi  38) <script type="text/javascript" src="$(DOCROOT)/js/jquery.infieldlabel.min.js" charset="utf-8"></script>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/thankyou-head.wmi    39) <script type="text/javascript" src="$(DOCROOT)/js/functions.min.js" charset="utf-8"></script>
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  40) </head>
donate/en/thankyou-head.wmi  41) <body>
donate/en/thankyou-head.wmi  42) <div id="wrap">
donate/en/thankyou-head.wmi  43)   <div id="header">
donate/en/thankyou-head.wmi  44)     <h1 id="logo"><a href="<page index>">Tor</a></h1>
donate/en/thankyou-head.wmi  45)       # navigation menu generation
donate/en/thankyou-head.wmi  46)       <div id="nav">
donate/en/thankyou-head.wmi  47)         <ul>
donate/en/thankyou-head.wmi  48)         <:{
donate/en/thankyou-head.wmi  49)             # create a hash and maintain order of keys
donate/en/thankyou-head.wmi  50)             my %navigation;
donate/en/thankyou-head.wmi  51)             my @keys;
donate/en/thankyou-head.wmi  52)             while (@navigation) {
donate/en/thankyou-head.wmi  53)               my $key = shift @navigation;
donate/en/thankyou-head.wmi  54)               my $val = shift @navigation;
donate/en/thankyou-head.wmi  55)               push @keys, $key;
donate/en/thankyou-head.wmi  56)               $navigation{$key} = $val;
donate/en/thankyou-head.wmi  57)             }
donate/en/thankyou-head.wmi  58) 
donate/en/thankyou-head.wmi  59)             my $page = $WML_SRC_BASENAME;
donate/en/thankyou-head.wmi  60)             my $lang = "$(LANG)";
donate/en/thankyou-head.wmi  61) 
donate/en/thankyou-head.wmi  62)             for my $key (@keys) {
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi    63)               my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  64) 
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi    65)               # in directory of active link, set class active
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  66)               my $class;
donate/en/thankyou-head.wmi  67)               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
donate/en/thankyou-head.wmi  68)                 $class = 'class="active"';
donate/en/thankyou-head.wmi  69)               } else {
donate/en/thankyou-head.wmi  70)                 $class = '';
donate/en/thankyou-head.wmi  71)               }
donate/en/thankyou-head.wmi  72) 
donate/en/thankyou-head.wmi  73) 	            $dir = '.' unless defined $dir;
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi    74) 
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  75)               # translated version
donate/en/thankyou-head.wmi  76)               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
donate/en/thankyou-head.wmi  77)                   printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
donate/en/thankyou-head.wmi  78)                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key};
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi    79)               }
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi  80)               # english version
donate/en/thankyou-head.wmi  81)               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
donate/en/thankyou-head.wmi  82)               	printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
donate/en/thankyou-head.wmi  83)                   stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $navigation{$key};
donate/en/thankyou-head.wmi  84)               }
donate/en/thankyou-head.wmi  85)               # full url
donate/en/thankyou-head.wmi  86)               elsif ($key =~/^http/) {
donate/en/thankyou-head.wmi  87)                 printf '<li><a href="%s">%s</a></li>'."\n", $key, $navigation{$key};
donate/en/thankyou-head.wmi  88)               } else {
donate/en/thankyou-head.wmi  89)                 warn "$WML_SRC_FILENAME has a [page $key] (parses to
donate/en/thankyou-head.wmi  90) docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
donate/en/thankyou-head.wmi  91)               }
donate/en/thankyou-head.wmi  92)             }
donate/en/thankyou-head.wmi  93)         }:>
donate/en/thankyou-head.wmi  94)         </ul>
donate/en/thankyou-head.wmi  95)       </div>
donate/en/thankyou-head.wmi  96)       <!-- END NAV -->
donate/en/thankyou-head.wmi  97)      # end navigation generation
donate/en/thankyou-head.wmi  98)       <div id="calltoaction">
donate/en/thankyou-head.wmi  99)         <ul>
donate/en/thankyou-head.wmi 100)           <:{
donate/en/thankyou-head.wmi 101)             my %calltoaction;
donate/en/thankyou-head.wmi 102)             my @keys;
donate/en/thankyou-head.wmi 103)             while (@calltoaction) {
donate/en/thankyou-head.wmi 104)               my $key = shift @calltoaction;
donate/en/thankyou-head.wmi 105)               my $val = shift @calltoaction;
donate/en/thankyou-head.wmi 106)               push @keys, $key;
donate/en/thankyou-head.wmi 107)               $calltoaction{$key} = $val;
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi   108)             }
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi 109) 
donate/en/thankyou-head.wmi 110)             my $page = $WML_SRC_BASENAME;
donate/en/thankyou-head.wmi 111)             my $lang = "$(LANG)";
donate/en/thankyou-head.wmi 112)             for my $key (@keys) {
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi   113)               my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi 114) 
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi   115)               # in directory, set active
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi 116)               my $class;
donate/en/thankyou-head.wmi 117)               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
donate/en/thankyou-head.wmi 118)               #if ($WML_SRC_BASENAME eq $base) {
donate/en/thankyou-head.wmi 119)                 $class = 'class="active"';
donate/en/thankyou-head.wmi 120)               } else {
donate/en/thankyou-head.wmi 121)                 $class = '';
donate/en/thankyou-head.wmi 122)               }
donate/en/thankyou-head.wmi 123) 
donate/en/thankyou-head.wmi 124) 	          $dir = '.' unless defined $dir;
donate/en/thankyou-head.wmi 125)               # try to use a translated version
donate/en/thankyou-head.wmi 126)               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
donate/en/thankyou-head.wmi 127)                   printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
donate/en/thankyou-head.wmi 128)                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi   129)               }
Andrew Lewman create a thank you page for...

Andrew Lewman authored 12 years ago

donate/en/thankyou-head.wmi 130)               # default to english version
donate/en/thankyou-head.wmi 131)               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
donate/en/thankyou-head.wmi 132)               	printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
donate/en/thankyou-head.wmi 133)                   stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $calltoaction{$key};
donate/en/thankyou-head.wmi 134)               } else {
donate/en/thankyou-head.wmi 135)                 warn "$WML_SRC_FILENAME has a [page $key] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
donate/en/thankyou-head.wmi 136)               }
hiromipaw Move scripts to their own j...

hiromipaw authored 6 years ago

include/thankyou-head.wmi   137)             }