3ed2fdbe037f3ceed3c76676a43de41a2718d4c6
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

1) #!/usr/bin/env wml
Runa A. Sandvik list available languages /...

Runa A. Sandvik authored 13 years ago

2) #use "functions.wmi"
3) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

4)     <div id="footer">
Sebastian Hahn de-xhtmlify more stuff

Sebastian Hahn authored 13 years ago

5)     	<div class="onion"><img src="$(IMGROOT)/onion.jpg" alt="Tor"></div>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

6)       <div class="about">
Andrew Lewman fix the trademark-faq link

Andrew Lewman authored 13 years ago

7) 	<p>"Tor" and the "Onion Logo" are registered trademarks of
8) 	<a href="<page docs/trademark-faq>">The Tor Project, Inc.</a>
Andrew Lewman add the cc-by link in the f...

Andrew Lewman authored 13 years ago

9) 	Content on this site is licensed under a <a
10) 	href="http://creativecommons.org/licenses/by/3.0/us/">Creative
Andrew Lewman fix the trademark-faq link

Andrew Lewman authored 13 years ago

11) 	Commons Attribution 3.0 United States License</a>, unless
12) 	otherwise noted.</p>
Andrew Lewman move the svn-based info int...

Andrew Lewman authored 13 years ago

13) <!--
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

14)         # This will grab the date from svn info but formatting is tedious
15)        	# REQUIRES svn for this to work
16)         <:{
17)           my $svninfo = `svn info`;
18)           if ($svninfo =~ m/Last Changed Date: (\d{4}-\d{2}-\d{2})\s(\d{2}:\d{2}:\d{2})\s(.*)\s\((.*)\)/) {
19)             my $modifydate = "$4 $2 $3";
20)             # remove commas from date
21)             $modifydate =~ s/,//;
22)             print 'Last modified: '.$modifydate."\n";
23)           }
24)         }:>
25)         <:{
26)           #my $compiledate = `date`;
27)           my $compiledate = `date +"%a %b %d %Y %k:%M:%S %z"`;
28)           print 'Last compiled: '.$compiledate."\n";
29)         }:>
Andrew Lewman move the svn-based info int...

Andrew Lewman authored 13 years ago

30) -->
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

31)       </div>
32)       <!-- END ABOUT -->
Andrew Lewman comment out the newsletter...

Andrew Lewman authored 13 years ago

33)       <!-- WE HAVE NO NEWSLETTER SO REMOVE THIS
34)       <div class="newsletter">
35)         <form action="">
Sebastian Hahn de-xhtmlify more stuff

Sebastian Hahn authored 13 years ago

36)           <input class="textfield" type="text" name="email" value="Sign up for our newsletter! Enter email." onClick="clearDefault(this);">
37)           <input class="signup" type="submit" name="submit" value="Sign Up">
Andrew Lewman comment out the newsletter...

Andrew Lewman authored 13 years ago

38)         </form>
39)       </div>
40)       END NEWSLETTER -->
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

41)       <div class="col first">
42)       	<h4>About Tor</h4>
43)         <ul>
Andrew Lewman fix up the info blurb, upda...

Andrew Lewman authored 13 years ago

44)           <li><a href="<page about/overview>">What Tor Does</a></li>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

45)           <li><a href="<page about/torusers>">Users of Tor</a></li>
46)           <li><a href="<page about/corepeople>">Core Tor People</a></li>
47)           <li><a href="<page about/sponsors>">Sponsors</a></li>
48)           <li><a href="<page about/contact>">Contact Us</a></li>
49)         </ul>
50)       </div>
51)       <!-- END COL -->
52)       <div class="col">
53)       	<h4>Get Involved</h4>
54)         <ul>
55)           <li><a href="<page donate/donate>">Donate</a></li>
Sebastian Hahn Fix the mailing list link....

Sebastian Hahn authored 13 years ago

56)           <li><a href="<page docs/documentation>#MailingLists">Mailing List</a></li>
Andrew Lewman link to the right mirror page

Andrew Lewman authored 13 years ago

57)           <li><a href="<page getinvolved/mirrors>">Mirrors</a></li>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

58)           <li><a href="<page docs/hidden-services>">Hidden Services</a></li>
59)           <li><a href="<page getinvolved/translation>">Translations</a></li>
60)           <li><a href="<page getinvolved/open-positions>">Careers</a></li>
61)         </ul>
62)       </div>
63)       <!-- END COL -->
64)       <div class="col">
65)       	<h4>Documentation</h4>
66)         <ul>
67)           <li><a href="<page docs/tor-manual>">Manuals</a></li>
68)           <li><a href="<page docs/documentation>">Installation Guides</a></li>
Andrew Lewman remove the glossary. fix up...

Andrew Lewman authored 13 years ago

69)           <li><a href="<wiki>">Tor Wiki</a></li>
Andrew Lewman link the static faq page in...

Andrew Lewman authored 13 years ago

70)           <li><a href="<page docs/faq>">General Tor FAQ</a></li>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

71)         </ul>
72)       </div>
73)       <!-- END COL -->
Runa A. Sandvik list available languages /...

Runa A. Sandvik authored 13 years ago

74) 
75) 	<!-- List available languages -->
76) 	<div class="col wider">
77) 	<h4>Languages</h4>
78) 	<: if (has_translations()) {  :>
79) 		<p>
80) 		This page is also available in the following languages:
81) 		<: print list_translations() :>.<br />
82) 		How to set <a href="http://www.debian.org/intro/cn#howtoset">the default document language</a>.
83) 		</p>
84) 	<: }; :>
85) 	</div>
86) 
Andrew Lewman fix the trademark-faq link

Andrew Lewman authored 13 years ago

87) <!-- LANGUAGE SWITCH CGI 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

88)       <div class="col wider">
89)       	<h4>Languages</h4>
90)         # this is a cgi trampoline to bounce us to the right page
91)         # alternately, if the client supports javascript we can redirect that way
92)         # noscript does not block onclick but clients may have disabled javascript completely
93)         #
94)         # for this to work we need to know the relative path from the document root
95)         # to the current directory that wml is in. 
96)         <form action="$(DOCROOT)/cgi-bin/languageswitch.cgi">
97)           <select name="Language" id="lang">
98)           <:{
99)             #import "perl-globals.wmi";
100)             use Cwd;
101)             use Cwd 'abs_path';
102)             use File::Spec;
103)             my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
104)             my $LANGUAGES;
105)             my $page = $WML_SRC_FILENAME;
106)             opendir(DIR, getcwd()) or die $!;
107)             # take a look and see what language support we have
108)             while (my $file = readdir(DIR)) {
109)                 if (-d $file) {
110)                     if (-e "$file/$page") {
111)                         my $url = $urlbase.'/'.$WML_SRC_BASENAME.'.html.'.$file;
112)                         my $url2js = $WML_SRC_BASENAME.'.html.'.$file;
113)                         print '<option value="'.$url.'" onclick="window.location=\''.$url2js.'\'">'.$LANGUAGES{$file}.'</option>'."\n" unless not defined $LANGUAGES{$file};
114)                     }
115)                 }
116)             }
117)             closedir(DIR);
118)           }:>
119)           </select>
Sebastian Hahn de-xhtmlify more stuff

Sebastian Hahn authored 13 years ago

120)           <input class="go" type="submit" name="submit" value="Go">
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

121)         </form>
122)         <p>Questions on this? Visit <a href="http://www.debian.org/intro/cn#howtoset">how to set the default document language</a>.</p>
123)       </div>
Andrew Lewman fix the trademark-faq link

Andrew Lewman authored 13 years ago

124) -->