patches to download page to fix some display issues, layout issues, and

organization issues, from jeremy
This commit is contained in:
Andrew Lewman 2011-08-29 18:50:48 +00:00
parent 18489e4b4f
commit 6e207e70f3
7 changed files with 134 additions and 324 deletions

View File

@ -331,6 +331,11 @@ select#lang {
padding-right: 0px;
}
.dbox.donate ul.amounts li {
margin-left: 0px;
margin-right: 15px;
}
#footer .about {
padding-left: 30px;
border-left: 1px solid #ddd;

View File

@ -67,97 +67,92 @@ body {
width: auto;
}
#calltoaction {
height: 30px;
float: right;
margin-top: 10px;
margin-right: 5px;
text-align: center;
}
#calltoaction {
height: 30px;
float: right;
margin-top: 10px;
margin-right: 5px;
text-align: center;
}
#calltoaction ul {
padding: 0;
margin: 0px;
height: 30px;
list-style: none;
float: right;
#calltoaction ul {
padding: 0;
margin: 0px;
height: 30px;
list-style: none;
float: right;
}
#calltoaction ul li {
list-style: none;
display: inline;
float: none;
width: 100px;
margin-left: 0px;
}
#calltoaction ul li a:link,
#calltoaction ul li a:visited {
background: url(../images/cta-buttons.jpg) top center no-repeat #885ca4;
padding: 8px 8px 0px;
color: #FFFFFF;
font-weight: bold;
text-decoration: none;
font-size: 1.067em;
line-height: 1.067em;
height: 22px;
width: 84px;
float: left;
text-shadow: 0px -1px 2px #111111, 0px 1px 2px #666666;
}
#calltoaction ul li:first-child a:link,
#calltoaction ul li:first-child a:visited {
background: url(../images/cta-buttons.jpg) top left no-repeat #885ca4;
-webkit-border-top-left-radius: 7px;
-webkit-border-bottom-left-radius: 7px;
-moz-border-radius-topleft: 7px;
-moz-border-radius-bottomleft: 7px;
border-top-left-radius: 7px;
border-bottom-left-radius: 7px;
padding-left: 7px;
width: 85px;
}
#calltoaction ul li {
list-style: none;
display: inline;
float: none;
width: 100px;
margin-left: 0px;
}
#calltoaction ul li a:link,
#calltoaction ul li a:visited {
display: block;
background: url(../images/cta-buttons.jpg) top center no-repeat #885ca4;
padding: 4px 8px;
color: #FFFFFF;
font-weight: bold;
text-decoration: none;
font-size: 13px;
line-height: 22px;
height: 22px;
width: 84px;
float: left;
text-shadow: 1px 1px 0px #111111;
}
#calltoaction ul li:last-child a:link,
#calltoaction ul li:last-child a:visited {
background: url(../images/cta-buttons.jpg) top right no-repeat #885ca4;
-webkit-border-top-right-radius: 7px;
-webkit-border-bottom-right-radius: 7px;
-moz-border-radius-topright: 7px;
-moz-border-radius-bottomright: 7px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
padding-right: 9px;
width: 83px;
color: #FFFFFF;
}
#calltoaction ul li:hover a {
background: url(../images/cta-buttons.jpg) bottom center no-repeat #ff9800;
font-weight: bold;
text-shadow: 1px 1px 4px #111111;
}
#calltoaction ul li:hover:first-child a {
background: url(../images/cta-buttons.jpg) bottom left no-repeat #ff9800;
-webkit-border-top-left-radius: 7px;
-webkit-border-bottom-left-radius: 7px;
-moz-border-radius-topleft: 7px;
-moz-border-radius-bottomleft: 7px;
border-top-left-radius: 7px;
border-bottom-left-radius: 7px;
}
#calltoaction ul li:hover a {
background: url(../images/cta-buttons.jpg) bottom center no-repeat #ff9800;
font-weight: bold;
text-shadow: 1px 1px 0px #111111;
}
#calltoaction ul li:first-child a:link,
#calltoaction ul li:first-child a:visited,
#calltoaction ul li:hover:first-child a {
-webkit-border-top-left-radius: 7px;
-webkit-border-bottom-left-radius: 7px;
-moz-border-radius-topleft: 7px;
-moz-border-radius-bottomleft: 7px;
border-top-left-radius: 7px;
border-bottom-left-radius: 7px;
}
#calltoaction ul li:hover:last-child a {
background: url(../images/cta-buttons.jpg) bottom right no-repeat #ff9800;
-webkit-border-top-right-radius: 7px;
-webkit-border-bottom-right-radius: 7px;
-moz-border-radius-topright: 7px;
-moz-border-radius-bottomright: 7px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
}
#calltoaction ul li:first-child a:link,
#calltoaction ul li:first-child a:visited {
background: url(../images/cta-buttons.jpg) top left no-repeat #885ca4;
}
#calltoaction ul li:hover:first-child a {
background: url(../images/cta-buttons.jpg) bottom left no-repeat #ff9800;
}
#calltoaction ul li:last-child a:link,
#calltoaction ul li:last-child a:visited,
#calltoaction ul li:hover:last-child a {
-webkit-border-top-right-radius: 7px;
-webkit-border-bottom-right-radius: 7px;
-moz-border-radius-topright: 7px;
-moz-border-radius-bottomright: 7px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
}
#calltoaction ul li:last-child a:link,
#calltoaction ul li:last-child a:visited {
background: url(../images/cta-buttons.jpg) top right no-repeat #885ca4;
color: #FFFFFF;
}
#calltoaction ul li:hover:last-child a {
background: url(../images/cta-buttons.jpg) bottom right no-repeat #ff9800;
}
/* BANNER ------------*/
@ -495,17 +490,18 @@ table tr img {
.smartphone24,
.sourcecode24 {
display: block;
line-height: 34px;
line-height: 32px;
padding: 0px 0 0px 33px;
}
.accordionButton {
background: url("../images/table-head.jpg") repeat-x scroll left top #885CA4;
background: url("../images/table-title.jpg") repeat-x left bottom #885CA4;
color: #FFFFFF;
margin: 0;
padding-left: 10px;
font-size: 1.1em;
font-weight: bold;
height: 32px;
width: 700px;
float: left;
_float: none; /* Float works in all browsers but IE6 */
@ -532,6 +528,10 @@ table tr img {
display: block;
}
.accordionContent .fauxhead {
width: 710px;
}
.package {
float: left;
width: 668px;
@ -1025,7 +1025,7 @@ small {
.dbox.donate ul.amounts li {
display: inline-block;
margin-left: 20px;
margin-left: 15px;
}
.dbox.donate ul.amounts li label {

View File

@ -29,7 +29,7 @@ other more sophisticated transactions</a></li>
</ul>
<p>If you want to make an anonymous donation, please do so in an anonymous way. Contact us at donations@torproject.org for more details.</p>
<!-- BEGIN PAYPAL -->
<script type="text/javascript" src="$(DOCROOT)/jquery.min.js"></script>
<script type="text/javascript" src="$(DOCROOT)/js/jquery.min.js"></script>
<script type="text/javascript">
function displayVals() {
var t3 = jQuery('#t3').val();
@ -117,8 +117,8 @@ jQuery(function(){
<input type="hidden" id="cmd" name="cmd" value="_donations">
<input type="hidden" name="business" value="donations@torproject.org">
<input type="hidden" id="item_name" name="item_name" value="Donation to the Tor Project">
<input type="hidden" name="return" value="https://www.torproject.org/donate/thankyou">
<input type="hidden" name="cancel_return" value="https://www.torproject.org/donate">
<input type="hidden" name="return" value="https://www.torproject.org/donate/thankyou.html">
<input type="hidden" name="cancel_return" value="https://www.torproject.org/donate/donate.html">
</div>
</form>
</div>
@ -142,10 +142,10 @@ jQuery(function(){
<input type="hidden" name="isDonationWidget" value="1">
<input type="hidden" name="description" value="Supporting Online Anonymity &amp; Privacy">
<input type="hidden" name="amazonPaymentsAccountId" value="XGSROLNTXRNC3N1P4TXKMNK14LN1D6SZUD8SN1">
<input type="hidden" name="returnUrl" value="https://www.torproject.org/donate/donate/thankyou">
<input type="hidden" name="returnUrl" value="https://www.torproject.org/donate/thankyou.html">
<input type="hidden" name="processImmediate" value="1">
<input type="hidden" name="cobrandingStyle" value="logo">
<input type="hidden" name="abandonUrl" value="https://www.torproject.org/donate/donate">
<input type="hidden" name="abandonUrl" value="https://www.torproject.org/donate/donate.html">
</div>
</form>
<small>Requires an Amazon Account</small>

View File

@ -36,8 +36,8 @@ type="application/rss+xml">">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="author" content="The Tor Project, Inc.">
<meta name="keywords" content="anonymity online, tor, tor project, censorship circumvention, traffic analysis, anonymous communications research">
<script type="text/javascript" src="$(DOCROOT)/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="$(DOCROOT)/jquery.infieldlabel.min.js" charset="utf-8"></script>
<script type="text/javascript" src="$(DOCROOT)/js/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="$(DOCROOT)/js/jquery.infieldlabel.min.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
/* email placeholder function */
$(function(){ $("label").replaceWith('<label class="active" for="email">Enter your email address</label>'); $("label").inFieldLabels(); });

View File

@ -1,10 +1,10 @@
## translation metadata
# Revision: $Revision$
# Translation-Priority: 3-low
#include "head.wmi" TITLE="Download Tor" CHARSET="UTF-8" ANNOUNCE_RSS="yes"
#include "dlhead.wmi" TITLE="Download Tor" CHARSET="UTF-8" ANNOUNCE_RSS="yes"
#<!-- ATTENTION TRANSLATOR -->
#<!-- You MUST copy 'head.wmi' and 'lang.wmi' along with this file! -->
#<!-- You MUST copy 'dlhead.wmi' and 'lang.wmi' along with this file! -->
#<!-- TBB DEFAULT LANGUAGE: Change 'en-US' below to your language code (if package exists)-->
#<!-- IMPORTANT: You MUST also change the default selection in 'lang.wmi' -->
@ -313,6 +313,35 @@ all the issues</a>.
<!-- START SIDECOL -->
<div id="sidecol-right">
<!-- START DONATION WIDGET -->
<script async type="text/javascript">
function displayVals() {
var t3 = $("#t3").val();
var amount = $("#amount").val();
if(t3 != 0){
$('#a3').val(amount);
$('#p3').val(1);
$('#cmd').val('_xclick-subscriptions');
$('#item_name').val('Tor Project Membership');
$('#ppinfo').replaceWith('<h6 id="ppinfo"><small>(Requires a PayPal Account)</small></h6>');
}else{
$('#a3').val(0);
$('#p3').val(0);
$('#cmd').val('_donations');
$('#item_name').val('Donation to the Tor Project');
$('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
}
if( !t3 ) {
$('#cmd').val('_donations');
$('#item_name').val('Donation to the Tor Project');
$('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
}
}
$(function(){
$("#amount").change(displayVals);
$("#t3").change(displayVals);
displayVals();
});
</script>
<form class="dbox dl" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<h2>Donate to Tor</h2>
<p>
@ -340,8 +369,8 @@ all the issues</a>.
<input type="hidden" id="cmd" name="cmd" value="_donations">
<input type="hidden" name="business" value="donations@torproject.org">
<input type="hidden" id="item_name" name="item_name" value="Donation to the Tor Project">
<input type="hidden" name="return" value="<page donate/thankyou>">
<input type="hidden" name="cancel_return" value="<page download/download>">
<input type="hidden" name="return" value="https://www.torproject.org/donate/thankyou.html">
<input type="hidden" name="cancel_return" value="https://www.torproject.org/download/download.html">
</p>
<h6 id="ppinfo" style="height:0px;"></h6>
<p>

View File

@ -1,197 +0,0 @@
#! /usr/bin/wml
<: use strict; :>
<: use warnings; :>
#use "perl-globals.wmi"
#use "links.wmi"
#use "versions.wmi"
#use "navigation.wmi"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>$(TITLE)</title>
<link rel="shortcut icon" type="image/x-icon" href="$(IMGROOT)/favicon.ico">
<ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
<ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
<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">">
# begin WML to generate css/js paths
<ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
<ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.css">">
#<link href="css/master.css" rel="stylesheet" type="text/css">
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie8-and-down.css">
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.css">
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.css">
<![endif]-->
# <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
# end WML to generate css/js paths
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="author" content="The Tor Project, Inc.">
<meta name="keywords" content="anonymity online, tor, tor project, censorship circumvention, traffic analysis, anonymous communications research">
<script type="text/javascript" src="../js/jquery.min.js">
#/* jQuery */
</script>
<script type="text/javascript" src="../js/jquery.client.min.js">
/* "jQuery Browser And OS Detection Plugin" by Stoiman
Source: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
License: Public Domain (http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/#comment-12498) */
</script>
<script type="text/javascript" src="../js/dlpage01.js">
#/* Displays detected section */
</script>
<script async type="text/javascript" src="../js/jquery.accordion.min.js">
/* Modified version of "Stupid Simple jQuery Accordian Menu" originally developed by Ryan Stemkoski
Source: http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/
License: Public Domain (http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/#comment-32882) */
</script>
<script async type="text/javascript">
#/* switches package links depending on selection */
function updateLang() {
var caller = $( this );
var pkg = caller.attr('id');
var lang = caller.val();
var wintbb = '../dist/torbrowser/tor-browser-<version-torbrowserbundle>_'+lang+'.exe';
var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx>-dev-osx-i386-'+lang+'.zip';
var lintbb32 = '../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-'+lang+'.tar.gz';
var lintbb64 = '../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-'+lang+'.tar.gz';
if(pkg == 'win-tbb'){
$('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal">Tor Browser Bundle</span></a>');
$('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
}else if(pkg == 'osx-tbb'){
$('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal">Tor Browser Bundle (Beta)</span></a>');
$('.'+pkg+'-sig').replaceWith('<a class="osx-tbb-sig" href="'+osxtbb+'.asc">sig</a>');
}else if(pkg == 'lin-tbb32'){
$('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal">i686 / 32-bit (Beta)</span></a>');
$('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
}else if(pkg == 'lin-tbb64'){
$('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal">x86_64 / 64-bit (Beta)</span></a>');
$('.'+pkg+'-sig').replaceWith('<a class="lin-tbb64-sig" href="'+lintbb64+'.asc">sig</a>');
}
}
$(function(){
$('.lang').ready(updateLang);
$('.lang').change(updateLang);
/* Only show language selector if javascript is enabled */
$('.lang').css('display', 'block');
});
</script>
<script async type="text/javascript" src="../js/ppwidget.js">
#/* Script For Donation Widget */
</script>
</head>
<body onload="resetAll()" onunload="">
<div id="wrap">
<div id="header">
<h1 id="logo"><a href="<page index>">Tor</a></h1>
# navigation menu generation
<div id="nav">
<ul>
<:{
# create a hash and maintain order of keys
my %navigation;
my @keys;
while (@navigation) {
my $key = shift @navigation;
my $val = shift @navigation;
push @keys, $key;
$navigation{$key} = $val;
}
my $page = $WML_SRC_BASENAME;
my $lang = "$(LANG)";
for my $key (@keys) {
my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
# in directory of active link, set class active
my $class;
if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
$class = 'class="active"';
} else {
$class = '';
}
$dir = '.' unless defined $dir;
# translated version
if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key};
}
# english version
elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $navigation{$key};
}
# full url
elsif ($key =~/^http/) {
printf '<li><a href="%s">%s</a></li>'."\n", $key, $navigation{$key};
} else {
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.";
}
}
}:>
</ul>
</div>
<!-- END NAV -->
# end navigation generation
<div id="calltoaction">
<ul>
<:{
my %calltoaction;
my @keys;
while (@calltoaction) {
my $key = shift @calltoaction;
my $val = shift @calltoaction;
push @keys, $key;
$calltoaction{$key} = $val;
}
my $page = $WML_SRC_BASENAME;
my $lang = "$(LANG)";
for my $key (@keys) {
my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
# in directory, set active
my $class;
if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
#if ($WML_SRC_BASENAME eq $base) {
$class = 'class="active"';
} else {
$class = '';
}
$dir = '.' unless defined $dir;
# try to use a translated version
if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
}
# default to english version
elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $calltoaction{$key};
} else {
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.";
}
}
}:>
</ul>
</div>
<!-- END CALLTOACTION -->
</div>
<!-- END HEADER -->
#<ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(DOCROOT)/$(REDIRECT)">$(DOCROOT)/$(REDIRECT)</a>.">
#<ifneq "$(REDIRECT_GLOBAL)" "" "Redirecting to <a href="$(REDIRECT_GLOBAL)">$(REDIRECT_GLOBAL)</a>.">

View File

@ -1,27 +0,0 @@
function displayVals() {
var t3 = $("#t3").val();
var amount = $("#amount").val();
if(t3 != 0){
$('#a3').val(amount);
$('#p3').val(1);
$('#cmd').val('_xclick-subscriptions');
$('#item_name').val('Tor Project Membership');
$('#ppinfo').replaceWith('<h6 id="ppinfo"><small>(Requires a PayPal Account)</small></h6>');
}else{
$('#a3').val(0);
$('#p3').val(0);
$('#cmd').val('_donations');
$('#item_name').val('Donation to the Tor Project');
$('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
}
if( !t3 ) {
$('#cmd').val('_donations');
$('#item_name').val('Donation to the Tor Project');
$('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
}
}
$(function(){
$("#amount").change(displayVals);
$("#t3").change(displayVals);
displayVals();
});