master
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi   1) #! /usr/bin/wml
download/en/dlhead.wmi   2) <: use strict; :>
download/en/dlhead.wmi   3) <: use warnings; :>
download/en/dlhead.wmi   4) #use "perl-globals.wmi"
download/en/dlhead.wmi   5) #use "links.wmi"
download/en/dlhead.wmi   6) #use "versions.wmi"
download/en/dlhead.wmi   7) #use "navigation.wmi"
hiromipaw Update to dropdown for sing...

hiromipaw authored 6 years ago

include/dlhead.wmi       8) #use "functions.wmi"
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi   9) 
download/en/dlhead.wmi  10) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
download/en/dlhead.wmi  11) <html>
download/en/dlhead.wmi  12) <head>
download/en/dlhead.wmi  13)   <title>$(TITLE)</title>
download/en/dlhead.wmi  14)   <link rel="shortcut icon" type="image/x-icon" href="$(IMGROOT)/favicon.ico">
download/en/dlhead.wmi  15)   <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
download/en/dlhead.wmi  16)   <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
download/en/dlhead.wmi  17) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      18)   # begin WML to generate css/js paths
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  19)   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      20)   <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.min.css">">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  21) 
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      22)   #<link href="css/master.min.css" rel="stylesheet" type="text/css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  23)   <!--[if lte IE 8]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      24)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie8-and-down.min.css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  25)   <![endif]-->
download/en/dlhead.wmi  26)   <!--[if lte IE 7]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      27)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.min.css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  28)   <![endif]-->
download/en/dlhead.wmi  29)   <!--[if IE 6]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      30)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.min.css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  31)   <![endif]-->
download/en/dlhead.wmi  32) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      33)   # end WML to generate css/js paths
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  34) 
download/en/dlhead.wmi  35)   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
download/en/dlhead.wmi  36)   <meta name="author" content="The Tor Project, Inc.">
download/en/dlhead.wmi  37)   <meta name="keywords" content="anonymity online, tor, tor project, censorship circumvention, traffic analysis, anonymous communications research">
download/en/dlhead.wmi  38)   <script type="text/javascript" src="../js/jquery.min.js">
download/en/dlhead.wmi  39) # /* jQuery */
download/en/dlhead.wmi  40)   </script>
download/en/dlhead.wmi  41)   <script type="text/javascript" src="../js/jquery.client.min.js">
download/en/dlhead.wmi  42) /* "jQuery Browser And OS Detection Plugin" by Stoimen
download/en/dlhead.wmi  43)    Source: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
download/en/dlhead.wmi  44)    License: Public Domain (http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/#comment-12498) */
download/en/dlhead.wmi  45)   </script>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      46)   <script type="text/javascript" src="../js/jquery-migrate-1.0.0.min.js"></script>
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 11 years ago

include/dlhead.wmi      47)   <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
include/dlhead.wmi      48) /*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
include/dlhead.wmi      49)   </script>
Nicolas Vigier Don't use minified version...

Nicolas Vigier authored 6 years ago

include/dlhead.wmi      50)   <script type="text/javascript" src="../js/dlpage01.js">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  51) # /* Displays detected section */
download/en/dlhead.wmi  52)   </script>
download/en/dlhead.wmi  53)   <script async type="text/javascript" src="../js/jquery.accordion.min.js">
download/en/dlhead.wmi  54) /* Modified version of "Stupid Simple jQuery Accordian Menu" originally developed by Ryan Stemkoski
download/en/dlhead.wmi  55)    Source: http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/
download/en/dlhead.wmi  56)    License: Public Domain (http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/#comment-32882) */
download/en/dlhead.wmi  57)   </script>
download/en/dlhead.wmi  58) </head>
hiromipaw Fix src unsafe error

hiromipaw authored 6 years ago

include/dlhead.wmi      59) <body class="onload">
Arthur Edelstein Bug 22357: Move download la...

Arthur Edelstein authored 6 years ago

include/dlhead.wmi      60)     <span class="hidden" id="version-data">
Nicolas Vigier Allow having different Tor...

Nicolas Vigier authored 6 years ago

include/dlhead.wmi      61)         { "torbrowserbundle" : "<version-torbrowserbundle>",
Arthur Edelstein Bug 22357: Move download la...

Arthur Edelstein authored 6 years ago

include/dlhead.wmi      62)           "torbrowserbundleosx64" : "<version-torbrowserbundleosx64>",
include/dlhead.wmi      63)           "torbrowserbundlelinux32" : "<version-torbrowserbundlelinux32>",
include/dlhead.wmi      64)           "torbrowserbundlelinux64" : "<version-torbrowserbundlelinux64>"  }
include/dlhead.wmi      65)     </span>
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  66) <div id="wrap">
download/en/dlhead.wmi  67)   <div id="header">
download/en/dlhead.wmi  68)     <h1 id="logo"><a href="<page index>">Tor</a></h1>
download/en/dlhead.wmi  69)       # navigation menu generation
download/en/dlhead.wmi  70)       <div id="nav">
download/en/dlhead.wmi  71)         <ul>
download/en/dlhead.wmi  72)         <:{
download/en/dlhead.wmi  73)             # create a hash and maintain order of keys
download/en/dlhead.wmi  74)             my %navigation;
download/en/dlhead.wmi  75)             my @keys;
download/en/dlhead.wmi  76)             while (@navigation) {
download/en/dlhead.wmi  77)               my $key = shift @navigation;
download/en/dlhead.wmi  78)               my $val = shift @navigation;
download/en/dlhead.wmi  79)               push @keys, $key;
download/en/dlhead.wmi  80)               $navigation{$key} = $val;
download/en/dlhead.wmi  81)             }
download/en/dlhead.wmi  82) 
download/en/dlhead.wmi  83)             my $page = $WML_SRC_BASENAME;
download/en/dlhead.wmi  84)             my $lang = "$(LANG)";
download/en/dlhead.wmi  85) 
download/en/dlhead.wmi  86)             for my $key (@keys) {
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      87)               my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  88) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      89)               # in directory of active link, set class active
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  90)               my $class;
download/en/dlhead.wmi  91)               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
download/en/dlhead.wmi  92)                 $class = 'class="active"';
download/en/dlhead.wmi  93)               } else {
download/en/dlhead.wmi  94)                 $class = '';
download/en/dlhead.wmi  95)               }
download/en/dlhead.wmi  96) 
download/en/dlhead.wmi  97) 	            $dir = '.' unless defined $dir;
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      98) 
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  99)               # translated version
download/en/dlhead.wmi 100)               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
download/en/dlhead.wmi 101)                   printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 102)                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key};
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     103)               }
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 104)               # english version
download/en/dlhead.wmi 105)               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
download/en/dlhead.wmi 106)               	printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 107)                   stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $navigation{$key};
download/en/dlhead.wmi 108)               }
download/en/dlhead.wmi 109)               # full url
download/en/dlhead.wmi 110)               elsif ($key =~/^http/) {
download/en/dlhead.wmi 111)                 printf '<li><a href="%s">%s</a></li>'."\n", $key, $navigation{$key};
download/en/dlhead.wmi 112)               } else {
download/en/dlhead.wmi 113)                 warn "$WML_SRC_FILENAME has a [page $key] (parses to
download/en/dlhead.wmi 114) docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
download/en/dlhead.wmi 115)               }
download/en/dlhead.wmi 116)             }
download/en/dlhead.wmi 117)         }:>
hiromipaw Modify languag switch to us...

hiromipaw authored 6 years ago

include/dlhead.wmi     118)      # LANGUAGE SWITCH 
hiromipaw Move language switch to the...

hiromipaw authored 6 years ago

include/dlhead.wmi     119)       <li>
hiromipaw Modify languag switch to us...

hiromipaw authored 6 years ago

include/dlhead.wmi     120)          <div class="dropdown">
hiromipaw Fix dropdown top link

hiromipaw authored 6 years ago

include/dlhead.wmi     121)            <div class="dropbtn">
hiromipaw Update to dropdown for sing...

hiromipaw authored 6 years ago

include/dlhead.wmi     122) 	      <:{ if (has_translations()) {  
include/dlhead.wmi     123)                     my @lngs = list_translations();
include/dlhead.wmi     124)    		    print $lngs[0];
include/dlhead.wmi     125) 		  }
include/dlhead.wmi     126)               }:>
hiromipaw Fix dropdown top link

hiromipaw authored 6 years ago

include/dlhead.wmi     127) 	   </div>
hiromipaw Use languages dropdown and...

hiromipaw authored 6 years ago

include/dlhead.wmi     128)            <div class="dropdown-content">
include/dlhead.wmi     129) 	     <:{
include/dlhead.wmi     130)                #import "perl-globals.wmi";
include/dlhead.wmi     131)                 use Cwd;
include/dlhead.wmi     132)                use Cwd 'abs_path';
include/dlhead.wmi     133)                use File::Spec;
include/dlhead.wmi     134)                my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
include/dlhead.wmi     135)                my $LANGUAGES;
include/dlhead.wmi     136)                my $page = $WML_SRC_FILENAME;
include/dlhead.wmi     137)                opendir(DIR, getcwd()) or die $!;
include/dlhead.wmi     138)                # take a look and see what language support we have
include/dlhead.wmi     139)                while (my $file = readdir(DIR)) {
include/dlhead.wmi     140)                  if (-d $file) {
include/dlhead.wmi     141)                    if (-e "$file/$page") {
include/dlhead.wmi     142)                      my $url = $WML_SRC_BASENAME.'.html.'.$file;
include/dlhead.wmi     143)                      print '<a href="'.$url.'" >'.$LANGUAGES{$file}.'</a>'."\n" unless not defined $LANGUAGES{$file};
include/dlhead.wmi     144)                    }
include/dlhead.wmi     145)                  }
include/dlhead.wmi     146)                }
include/dlhead.wmi     147)                closedir(DIR);
include/dlhead.wmi     148)              }:>
include/dlhead.wmi     149)              
include/dlhead.wmi     150)            </div>
hiromipaw Modify languag switch to us...

hiromipaw authored 6 years ago

include/dlhead.wmi     151)          </div> 
hiromipaw Move language switch to the...

hiromipaw authored 6 years ago

include/dlhead.wmi     152)        </li>
include/dlhead.wmi     153)        #
include/dlhead.wmi     154)       </ul>
include/dlhead.wmi     155)     
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 156)       </div>
download/en/dlhead.wmi 157)       <!-- END NAV -->
download/en/dlhead.wmi 158)      # end navigation generation
download/en/dlhead.wmi 159)       <div id="calltoaction">
download/en/dlhead.wmi 160)         <ul>
download/en/dlhead.wmi 161)           <:{
download/en/dlhead.wmi 162)             my %calltoaction;
download/en/dlhead.wmi 163)             my @keys;
download/en/dlhead.wmi 164)             while (@calltoaction) {
download/en/dlhead.wmi 165)               my $key = shift @calltoaction;
download/en/dlhead.wmi 166)               my $val = shift @calltoaction;
download/en/dlhead.wmi 167)               push @keys, $key;
download/en/dlhead.wmi 168)               $calltoaction{$key} = $val;
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     169)             }
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 170) 
download/en/dlhead.wmi 171)             my $page = $WML_SRC_BASENAME;
download/en/dlhead.wmi 172)             my $lang = "$(LANG)";
download/en/dlhead.wmi 173)             for my $key (@keys) {
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     174)               my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 175) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     176)               # in directory, set active
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 177)               my $class;
download/en/dlhead.wmi 178)               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
download/en/dlhead.wmi 179)               #if ($WML_SRC_BASENAME eq $base) {
download/en/dlhead.wmi 180)                 $class = 'class="active"';
download/en/dlhead.wmi 181)               } else {
download/en/dlhead.wmi 182)                 $class = '';
download/en/dlhead.wmi 183)               }
download/en/dlhead.wmi 184) 
download/en/dlhead.wmi 185) 	          $dir = '.' unless defined $dir;
download/en/dlhead.wmi 186)               # try to use a translated version
download/en/dlhead.wmi 187)               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
download/en/dlhead.wmi 188)                   printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 189)                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     190)               }
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 191)               # default to english version
download/en/dlhead.wmi 192)               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
download/en/dlhead.wmi 193)               	printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 194)                   stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $calltoaction{$key};
download/en/dlhead.wmi 195)               } else {
download/en/dlhead.wmi 196)                 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.";
download/en/dlhead.wmi 197)               }
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     198)             }