Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
226 additions
and 0 deletions.
- +158 −0 css/layout.css
- +32 −0 en/index.wml
- BIN images/onion-heart.png
- BIN images/tor-roots-only.png
- +36 −0 js/donation_banner.js
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| @@ -0,0 +1,36 @@ | ||
| /* jshint esnext:true */ | ||
|
|
||
| var kTaglines = [ | ||
| "Millions of People Depend on Tor for Online Security & Privacy", | ||
| "A Network of People Protecting People", | ||
| "Surveillance = Oppression", | ||
| "Protecting Journalists, Activists & Whistleblowers Since 2006", | ||
| ]; | ||
|
|
||
| var kTaglineSizes = [ | ||
| 26, | ||
| 32, | ||
| 32, | ||
| 26, | ||
| ]; | ||
|
|
||
| var sel = function (selector) { | ||
| return document.querySelector(selector) | ||
| }; | ||
|
|
||
| // Returns a random integer x, such that 0 <= x < max | ||
| var randomInteger = function (max) { | ||
| return Math.floor(max * Math.random()); | ||
| }; | ||
|
|
||
| // The main donation banner function. | ||
| var runDonationBanner = function () { | ||
| // Load random tag line once page is loaded | ||
| var index = randomInteger(4); | ||
| var taglineElement = sel("#banner-tagline span"); | ||
| taglineElement.innerText = kTaglines[index]; | ||
| taglineElement.style.fontSize = kTaglineSizes[index]; | ||
| }; | ||
|
|
||
| // Run banner code on load. | ||
| window.addEventListener("load", runDonationBanner); |