Browse code

Bug #17880: Donation banner on home page

Arthur Edelstein authored on18/12/2015 22:17:23
Showing7 changed files
... ...
@@ -1310,3 +1310,36 @@ p.blogDate {
1310 1310
 }
1311 1311
 /* End hide from IE-mac */
1312 1312
 
1313
+#donation-banner {
1314
+  display: block;
1315
+  height: 200px;
1316
+  margin: auto;
1317
+  margin-bottom: 5px;
1318
+  position: relative;
1319
+  width: 700px;
1320
+}
1321
+
1322
+#donation-banner > a {
1323
+  display: block;
1324
+}
1325
+
1326
+#donation-banner > img {
1327
+  display: block;
1328
+}
1329
+
1330
+#donate-button {
1331
+  background-color: green;
1332
+  border-radius: 5px;
1333
+  bottom: 15px;
1334
+  color: white;
1335
+  font-family: sans-serif;
1336
+  font-size: 20px;
1337
+  padding: 14px 14px;
1338
+  position: absolute;
1339
+  right: 15px;
1340
+  text-align: center;
1341
+}
1342
+
1343
+#donate-button:hover {
1344
+  filter: brightness(1.2);
1345
+}
... ...
@@ -2,6 +2,30 @@
2 2
 # Revision: $Revision$
3 3
 # Translation-Priority: 1-high
4 4
 
5
+<!-- Donation banner for fundraising campaign. -->
6
+<div id="donation-banner">
7
+  <a href="donate/donate-hpbanner.html.en">
8
+    <noscript>
9
+      <!-- We don't have JavaScript, so show our default champion. -->
10
+      <img id="donation-banner-image-noscript" src="images/homepage-banner-ss.jpg" />
11
+    </noscript>
12
+    <!-- Placeholder for the champion banner image that will be added
13
+         by JavaScript. -->
14
+    <img id="donation-banner-image"" />
15
+   </a>
16
+  <a href="donate/donate-hpbanner.html.en">
17
+     <div id="donate-button">Please Donate!</div>
18
+  </a>
19
+</div>
20
+
21
+<script>
22
+  <!-- Show a different champion at random. -->
23
+  var alternates = ["cd", "lp", "rd", "rr", "ss"];
24
+  var alternate = alternates[Math.floor(Math.random() * alternates.length)];
25
+  var image = document.getElementById("donation-banner-image");
26
+  image.src = "images/homepage-banner-" + alternate + ".jpg";
27
+</script>
28
+
5 29
 #include "head.wmi" TITLE="Tor Project: Anonymity Online" CHARSET="UTF-8"
6 30
 
7 31
 <div id="home">
8 32
new file mode 100755
9 33
Binary files /dev/null and b/images/homepage-banner-cd.jpg differ
10 34
new file mode 100755
11 35
Binary files /dev/null and b/images/homepage-banner-lp.jpg differ
12 36
new file mode 100755
13 37
Binary files /dev/null and b/images/homepage-banner-rd.jpg differ
14 38
new file mode 100755
15 39
Binary files /dev/null and b/images/homepage-banner-rr.jpg differ
16 40
new file mode 100755
17 41
Binary files /dev/null and b/images/homepage-banner-ss.jpg differ