Runa A. Sandvik commited on 2011-03-17 14:58:21
Zeige 5 geänderte Dateien mit 384 Einfügungen und 0 Löschungen.
... | ... |
@@ -0,0 +1,116 @@ |
1 |
+#!/usr/bin/env wml |
|
2 |
+ <div id="footer"> |
|
3 |
+ <div class="onion"><img src="$(IMGROOT)/onion.jpg" alt="Tor"></div> |
|
4 |
+ <div class="about"> |
|
5 |
+ <p>"تور" و"شعار البصلة" علامتان تجاريتان مسجلتان ل<a href="<page |
|
6 |
+ docs/trademark-faq>">The Tor Project, Inc.</a> محتويات الموقع |
|
7 |
+ تخضع لرخصة <a |
|
8 |
+ href="http://creativecommons.org/licenses/by/3.0/us/">المشاع |
|
9 |
+ الإبداعي: النسبة 3.0 الولايات المحدة</a> ما لم يُشر إلى خلاف |
|
10 |
+ ذلك.</p> |
|
11 |
+<!-- |
|
12 |
+ # This will grab the date from svn info but formatting is tedious |
|
13 |
+ # REQUIRES svn for this to work |
|
14 |
+ <:{ |
|
15 |
+ my $svninfo = `svn info`; |
|
16 |
+ if ($svninfo =~ m/Last Changed Date: (\d{4}-\d{2}-\d{2})\s(\d{2}:\d{2}:\d{2})\s(.*)\s\((.*)\)/) { |
|
17 |
+ my $modifydate = "$4 $2 $3"; |
|
18 |
+ # remove commas from date |
|
19 |
+ $modifydate =~ s/,//; |
|
20 |
+ print 'Last modified: '.$modifydate."\n"; |
|
21 |
+ } |
|
22 |
+ }:> |
|
23 |
+ <:{ |
|
24 |
+ #my $compiledate = `date`; |
|
25 |
+ my $compiledate = `date +"%a %b %d %Y %k:%M:%S %z"`; |
|
26 |
+ print 'Last compiled: '.$compiledate."\n"; |
|
27 |
+ }:> |
|
28 |
+--> |
|
29 |
+ </div> |
|
30 |
+ <!-- END ABOUT --> |
|
31 |
+ <!-- WE HAVE NO NEWSLETTER SO REMOVE THIS |
|
32 |
+ <div class="newsletter"> |
|
33 |
+ <form action=""> |
|
34 |
+ <input class="textfield" type="text" name="email" value="اشترك بنشرتنا! أدخل بريدك." onClick="clearDefault(this);"> |
|
35 |
+ <input class="signup" type="submit" name="submit" value="اشترك"> |
|
36 |
+ </form> |
|
37 |
+ </div> |
|
38 |
+ END NEWSLETTER --> |
|
39 |
+ <div class="col first"> |
|
40 |
+ <h4>عن تور</h4> |
|
41 |
+ <ul> |
|
42 |
+ <li><a href="<page about/overview>">مهمة تور</a></li> |
|
43 |
+ <li><a href="<page about/torusers>">مستخدمو تور</a></li> |
|
44 |
+ <li><a href="<page about/corepeople>">أهم شخصيات تور</a></li> |
|
45 |
+ <li><a href="<page about/sponsors>">الممولون</a></li> |
|
46 |
+ <li><a href="<page about/contact>">اتصل بنا</a></li> |
|
47 |
+ </ul> |
|
48 |
+ </div> |
|
49 |
+ <!-- END COL --> |
|
50 |
+ <div class="col"> |
|
51 |
+ <h4>انضم</h4> |
|
52 |
+ <ul> |
|
53 |
+ <li><a href="<page donate/donate>">تبرع</a></li> |
|
54 |
+ <li><a href="<page docs/documentation>#MailingLists">القائمة البريدية</a></li> |
|
55 |
+ <li><a href="<page getinvolved/mirrors>">مرايا</a></li> |
|
56 |
+ <li><a href="<page docs/hidden-services>">الخدمات المخفية</a></li> |
|
57 |
+ <li><a href="<page getinvolved/translation>">ترجمات</a></li> |
|
58 |
+ <li><a href="<page getinvolved/open-positions>">وظائف</a></li> |
|
59 |
+ </ul> |
|
60 |
+ </div> |
|
61 |
+ <!-- END COL --> |
|
62 |
+ <div class="col"> |
|
63 |
+ <h4>التوثيق</h4> |
|
64 |
+ <ul> |
|
65 |
+ <li><a href="<page docs/tor-manual>">الأدلة</a></li> |
|
66 |
+ <li><a href="<page docs/documentation>">أدلة التثبيت</a></li> |
|
67 |
+ <li><a href="<wiki>">ويكي تور</a></li> |
|
68 |
+ <li><a href="<page docs/faq>">الأسئلة الشائعة عن تور</a></li> |
|
69 |
+ </ul> |
|
70 |
+ </div> |
|
71 |
+ <!-- END COL --> |
|
72 |
+<!-- LANGUAGE SWITCH CGI |
|
73 |
+ <div class="col wider"> |
|
74 |
+ <h4>لغات</h4> |
|
75 |
+ # this is a cgi trampoline to bounce us to the right page |
|
76 |
+ # alternately, if the client supports javascript we can redirect that way |
|
77 |
+ # noscript does not block onclick but clients may have disabled javascript completely |
|
78 |
+ # |
|
79 |
+ # for this to work we need to know the relative path from the document root |
|
80 |
+ # to the current directory that wml is in. |
|
81 |
+ <form action="$(DOCROOT)/cgi-bin/languageswitch.cgi"> |
|
82 |
+ <select name="Language" id="lang"> |
|
83 |
+ <:{ |
|
84 |
+ #import "perl-globals.wmi"; |
|
85 |
+ use Cwd; |
|
86 |
+ use Cwd 'abs_path'; |
|
87 |
+ use File::Spec; |
|
88 |
+ my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)")); |
|
89 |
+ my $LANGUAGES; |
|
90 |
+ my $page = $WML_SRC_FILENAME; |
|
91 |
+ opendir(DIR, getcwd()) or die $!; |
|
92 |
+ # take a look and see what language support we have |
|
93 |
+ while (my $file = readdir(DIR)) { |
|
94 |
+ if (-d $file) { |
|
95 |
+ if (-e "$file/$page") { |
|
96 |
+ my $url = $urlbase.'/'.$WML_SRC_BASENAME.'.html.'.$file; |
|
97 |
+ my $url2js = $WML_SRC_BASENAME.'.html.'.$file; |
|
98 |
+ print '<option value="'.$url.'" onclick="window.location=\''.$url2js.'\'">'.$LANGUAGES{$file}.'</option>'."\n" unless not defined $LANGUAGES{$file}; |
|
99 |
+ } |
|
100 |
+ } |
|
101 |
+ } |
|
102 |
+ closedir(DIR); |
|
103 |
+ }:> |
|
104 |
+ </select> |
|
105 |
+ <input class="go" type="submit" name="submit" value="اذهب"> |
|
106 |
+ </form> |
|
107 |
+ <p>ألديك أسئلة عن هذا؟ زُر <a href="http://www.debian.org/intro/cn#howtoset">كيفية ضبط لغة المستندات المبدئية</a>.</p> |
|
108 |
+ </div> |
|
109 |
+--> |
|
110 |
+ </div> |
|
111 |
+ <!-- END FOOTER --> |
|
112 |
+ |
|
113 |
+ </div> |
|
114 |
+ <!-- END WRAP --> |
|
115 |
+</body> |
|
116 |
+</html> |
... | ... |
@@ -0,0 +1,142 @@ |
1 |
+#! /usr/bin/wml |
|
2 |
+<: use strict; :> |
|
3 |
+<: use warnings; :> |
|
4 |
+#use "perl-globals.wmi" |
|
5 |
+#use "links.wmi" |
|
6 |
+#use "versions.wmi" |
|
7 |
+#use "navigation.wmi" |
|
8 |
+ |
|
9 |
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
10 |
+<html> |
|
11 |
+<head> |
|
12 |
+ <title>$(TITLE)</title> |
|
13 |
+ <link rel="shortcut icon" type="image/x-icon" href="$(IMGROOT)/favicon.ico"> |
|
14 |
+ <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">"> |
|
15 |
+ <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">"> |
|
16 |
+ <ifeq "$(ANNOUNCE_RSS)" "yes" "<link rel="alternate" title="Tor Project OR-announce" href="http://rss.gmane.org/gmane.network.onion-routing.announce" |
|
17 |
+type="application/rss+xml">"> |
|
18 |
+ |
|
19 |
+ # begin WML to generate css/js paths |
|
20 |
+ <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">"> |
|
21 |
+ <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.css">"> |
|
22 |
+ |
|
23 |
+ #<link href="css/master.css" rel="stylesheet" type="text/css"> |
|
24 |
+ <!--[if lte IE 7]> |
|
25 |
+ <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.css"> |
|
26 |
+ <![endif]--> |
|
27 |
+ <!--[if IE 6]> |
|
28 |
+ <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.css"> |
|
29 |
+ <![endif]--> |
|
30 |
+# <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script> |
|
31 |
+ # end WML to generate css/js paths |
|
32 |
+ |
|
33 |
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
34 |
+ <meta name="author" content="The Tor Project, Inc."> |
|
35 |
+ <meta name="keywords" content="anonymity online, tor, tor project, censorship circumvention, traffic analysis, anonymous communications research"> |
|
36 |
+</head> |
|
37 |
+<body> |
|
38 |
+<div id="wrap"> |
|
39 |
+ <div id="header"> |
|
40 |
+ <h1 id="logo"><a href="<page index>">Tor</a></h1> |
|
41 |
+ # navigation menu generation |
|
42 |
+ <div id="nav"> |
|
43 |
+ <ul> |
|
44 |
+ <:{ |
|
45 |
+ # create a hash and maintain order of keys |
|
46 |
+ my %navigation; |
|
47 |
+ my @keys; |
|
48 |
+ while (@navigation) { |
|
49 |
+ my $key = shift @navigation; |
|
50 |
+ my $val = shift @navigation; |
|
51 |
+ push @keys, $key; |
|
52 |
+ $navigation{$key} = $val; |
|
53 |
+ } |
|
54 |
+ |
|
55 |
+ my $page = $WML_SRC_BASENAME; |
|
56 |
+ my $lang = "$(LANG)"; |
|
57 |
+ |
|
58 |
+ for my $key (@keys) { |
|
59 |
+ my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,; |
|
60 |
+ |
|
61 |
+ # in directory of active link, set class active |
|
62 |
+ my $class; |
|
63 |
+ if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) { |
|
64 |
+ $class = 'class="active"'; |
|
65 |
+ } else { |
|
66 |
+ $class = ''; |
|
67 |
+ } |
|
68 |
+ |
|
69 |
+ $dir = '.' unless defined $dir; |
|
70 |
+ |
|
71 |
+ # translated version |
|
72 |
+ if (-e "$(DOCROOT)/$dir/$lang/$base.wml") { |
|
73 |
+ printf '<li><a '.$class.' href="%s">%s</a></li>'."\n", |
|
74 |
+ stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key}; |
|
75 |
+ } |
|
76 |
+ # english version |
|
77 |
+ elsif (-e "$(DOCROOT)/$dir/en/$base.wml") { |
|
78 |
+ printf '<li><a '.$class.' href="%s">%s</a></li>'."\n", |
|
79 |
+ stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $navigation{$key}; |
|
80 |
+ } |
|
81 |
+ # full url |
|
82 |
+ elsif ($key =~/^http/) { |
|
83 |
+ printf '<li><a href="%s">%s</a></li>'."\n", $key, $navigation{$key}; |
|
84 |
+ } else { |
|
85 |
+ warn "$WML_SRC_FILENAME has a [page $key] (parses to |
|
86 |
+docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist."; |
|
87 |
+ } |
|
88 |
+ } |
|
89 |
+ }:> |
|
90 |
+ </ul> |
|
91 |
+ </div> |
|
92 |
+ <!-- END NAV --> |
|
93 |
+ # end navigation generation |
|
94 |
+ <div id="calltoaction"> |
|
95 |
+ <ul> |
|
96 |
+ <:{ |
|
97 |
+ my %calltoaction; |
|
98 |
+ my @keys; |
|
99 |
+ while (@calltoaction) { |
|
100 |
+ my $key = shift @calltoaction; |
|
101 |
+ my $val = shift @calltoaction; |
|
102 |
+ push @keys, $key; |
|
103 |
+ $calltoaction{$key} = $val; |
|
104 |
+ } |
|
105 |
+ |
|
106 |
+ my $page = $WML_SRC_BASENAME; |
|
107 |
+ my $lang = "$(LANG)"; |
|
108 |
+ for my $key (@keys) { |
|
109 |
+ my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,; |
|
110 |
+ |
|
111 |
+ # in directory, set active |
|
112 |
+ my $class; |
|
113 |
+ if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) { |
|
114 |
+ #if ($WML_SRC_BASENAME eq $base) { |
|
115 |
+ $class = 'class="active"'; |
|
116 |
+ } else { |
|
117 |
+ $class = ''; |
|
118 |
+ } |
|
119 |
+ |
|
120 |
+ $dir = '.' unless defined $dir; |
|
121 |
+ # try to use a translated version |
|
122 |
+ if (-e "$(DOCROOT)/$dir/$lang/$base.wml") { |
|
123 |
+ printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n", |
|
124 |
+ stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key}; |
|
125 |
+ } |
|
126 |
+ # default to english version |
|
127 |
+ elsif (-e "$(DOCROOT)/$dir/en/$base.wml") { |
|
128 |
+ printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n", |
|
129 |
+ stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $calltoaction{$key}; |
|
130 |
+ } else { |
|
131 |
+ 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."; |
|
132 |
+ } |
|
133 |
+ } |
|
134 |
+ }:> |
|
135 |
+ </ul> |
|
136 |
+ </div> |
|
137 |
+ <!-- END CALLTOACTION --> |
|
138 |
+ </div> |
|
139 |
+ <!-- END HEADER --> |
|
140 |
+ |
|
141 |
+#<ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(DOCROOT)/$(REDIRECT)">$(DOCROOT)/$(REDIRECT)</a>."> |
|
142 |
+#<ifneq "$(REDIRECT_GLOBAL)" "" "Redirecting to <a href="$(REDIRECT_GLOBAL)">$(REDIRECT_GLOBAL)</a>."> |
... | ... |
@@ -0,0 +1,11 @@ |
1 |
+#!/usr/bin/env wml |
|
2 |
+<div class="img-shadow"> |
|
3 |
+ <div class="infoblock"> |
|
4 |
+ <h2 class="bulb">تلميحة عن تور</h2> |
|
5 |
+ <p>يكتب تور ويدعمه أناس مثلك. <a href="<page |
|
6 |
+donate/donate>">تبرع الآن</a>!</p> |
|
7 |
+ |
|
8 |
+ </div> |
|
9 |
+ <!-- END INFOBLOCK --> |
|
10 |
+</div> |
|
11 |
+<!-- END IMG-SHADOW --> |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+#!/usr/bin/wml |
|
2 |
+ |
|
3 |
+## translation metadata |
|
4 |
+# Revision: $Revision: 22069 $ |
|
5 |
+# Translation-Priority: 1-high |
|
6 |
+ |
|
7 |
+<: |
|
8 |
+ # path link text |
|
9 |
+ my @navigation = ( |
|
10 |
+ 'index' , 'الرئيسية', |
|
11 |
+ 'about/overview' , 'عن تور', |
|
12 |
+ 'docs/documentation' , 'التوثيق', |
|
13 |
+ 'projects/projects' , 'المشاريع', |
|
14 |
+ 'press/press' , 'صحافة', |
|
15 |
+ '<blog>' , 'المدونة', |
|
16 |
+ 'http://printfection.com/torprojectstore' , 'المتجر', |
|
17 |
+ ); |
|
18 |
+ my @calltoaction = ( |
|
19 |
+ 'download/download' , 'نزّل', |
|
20 |
+ 'donate/donate' , 'تبرّع', |
|
21 |
+ 'getinvolved/volunteer' , 'انضم', |
|
22 |
+ ); |
|
23 |
+ |
|
24 |
+:> |
... | ... |
@@ -0,0 +1,91 @@ |
1 |
+#! /usr/bin/wml |
|
2 |
+<: use strict; :> |
|
3 |
+<: use warnings; :> |
|
4 |
+#use "perl-globals.wmi" |
|
5 |
+#use "links.wmi" |
|
6 |
+#use "versions.wmi" |
|
7 |
+#use "sidenav.wmi" |
|
8 |
+<div class="img-shadow"> |
|
9 |
+ <div id="sidenav"> |
|
10 |
+ <: |
|
11 |
+ # recursively search menu structure to see if it contains a given page |
|
12 |
+ sub containsSub($$); |
|
13 |
+ sub containsSub($$) { |
|
14 |
+ my ($elements, $page) = @_; |
|
15 |
+ for my $ele (@{$elements}) { |
|
16 |
+ if (containsSub($ele->{'subelements'},$page)){ |
|
17 |
+ return 1; |
|
18 |
+ } elsif ($page eq $ele->{'url'}) { |
|
19 |
+ return 1; |
|
20 |
+ } |
|
21 |
+ |
|
22 |
+ } |
|
23 |
+ return 0; |
|
24 |
+ } |
|
25 |
+ |
|
26 |
+ # generate navigation menu |
|
27 |
+ sub printNavMenu($$$); |
|
28 |
+ sub printNavMenu($$$) { |
|
29 |
+ my ($navmenu, $page, $lang) = @_; |
|
30 |
+ print '<ul>'."\n"; |
|
31 |
+ for my $navmenu (@{$navmenu}) { |
|
32 |
+ # this menu entry is the current (active) page |
|
33 |
+ if ($navmenu->{'url'} eq $page) { |
|
34 |
+ |
|
35 |
+ # the current page has nested menu elements |
|
36 |
+ if ($navmenu->{'subelements'}) { # menu has dropdown |
|
37 |
+ printf '<li class="dropdown active"><a class="active" href="%s">%s</a></li>'."\n", |
|
38 |
+ pageToURL($navmenu->{'url'}, $lang), $navmenu->{'txt'}; |
|
39 |
+ |
|
40 |
+ print '<li>'."\n"; |
|
41 |
+ printNavMenu($navmenu->{'subelements'},$page,$lang); |
|
42 |
+ print '</li>'."\n"; |
|
43 |
+ |
|
44 |
+ # the current (active) page does not have sub elements |
|
45 |
+ } else { |
|
46 |
+ printf '<li class="active"><a class="active" href="%s">%s</a></li>'."\n", |
|
47 |
+ pageToURL($navmenu->{'url'}, $lang), $navmenu->{'txt'}; |
|
48 |
+ } |
|
49 |
+ |
|
50 |
+ # a subelement of this menu item is the current (active) page |
|
51 |
+ } elsif (containsSub($navmenu->{'subelements'}, $page)) { |
|
52 |
+ printf '<li class="dropdown"><a class="active" href="%s">%s</a></li>'."\n", |
|
53 |
+ pageToURL($navmenu->{'url'}, $lang), $navmenu->{'txt'}; |
|
54 |
+ |
|
55 |
+ print '<li>'."\n"; #encapsulate subelements |
|
56 |
+ # recurse to generate the expanded menu |
|
57 |
+ printNavMenu($navmenu->{'subelements'},$page,$lang); |
|
58 |
+ print '</li>'."\n"; #encapsulate subelements |
|
59 |
+ |
|
60 |
+ # the menu entry is not active and does not enclose the active page |
|
61 |
+ } else { |
|
62 |
+ |
|
63 |
+ # if there are subelements, set collapsed style |
|
64 |
+ if ($navmenu->{'subelements'}) { |
|
65 |
+ printf '<li class="dropdown"><a href="%s">%s</a></li>'."\n", |
|
66 |
+ pageToURL($navmenu->{'url'}, $lang), $navmenu->{'txt'}; |
|
67 |
+ # regular menu entry |
|
68 |
+ } else { |
|
69 |
+ printf '<li><a href="%s">%s</a></li>'."\n", |
|
70 |
+ pageToURL($navmenu->{'url'}, $lang), $navmenu->{'txt'}; |
|
71 |
+ } |
|
72 |
+ } |
|
73 |
+ } |
|
74 |
+ print '</ul>'."\n"; |
|
75 |
+ } |
|
76 |
+ |
|
77 |
+ my $lang = "$(LANG)"; |
|
78 |
+ |
|
79 |
+ use Cwd; |
|
80 |
+ use Cwd 'abs_path'; |
|
81 |
+ use File::Spec; |
|
82 |
+ |
|
83 |
+ # get document path from site root |
|
84 |
+ my $path = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)")); |
|
85 |
+ my $page = $WML_SRC_BASENAME; |
|
86 |
+ printNavMenu($sidenav, $path.'/'.$page, $lang); |
|
87 |
+ :> |
|
88 |
+ </div> |
|
89 |
+ <!-- END SIDENAV --> |
|
90 |
+</div> |
|
91 |
+<!-- END IMG-SHADOW --> |
|
0 | 92 |