Nima Fatemi commited on 2015-12-08 19:54:31
Zeige 1 geänderte Dateien mit 146 Einfügungen und 50 Löschungen.
introducing donation page two-point-O'h-fancy
... | ... |
@@ -5,59 +5,96 @@ |
5 | 5 |
#include "donatehead.wmi" TITLE="Donate to keep Tor alive!" CHARSET="UTF-8" |
6 | 6 |
|
7 | 7 |
<div class="donation"> |
8 |
+ |
|
9 |
+ <div class="quote-section"> |
|
8 | 10 |
<div class="container"> |
9 | 11 |
<div class="row"> |
10 |
- <div class="col-md-6"> |
|
11 |
- |
|
12 |
- <h2 style="padding:2px; margin-bottom:10px;" class="text-justify">This is what a Tor supporter looks like:</h2> |
|
13 |
- <div class="row col-md-offset-0"> |
|
14 |
- <div class="col-md-4" style="padding:10px;"> |
|
15 |
- <img src="$(IMGROOT)/laura_poitras.jpg" class="class=img-rounded img-responsive" alt="Laura Poitras"> |
|
12 |
+ <div class="col-sm-3 img-section"> |
|
13 |
+ <img src="$(IMGROOT)/roger.png" class="img-thumbnail img-responsive champion" alt="Roger Dingledine"> |
|
16 | 14 |
</div> |
17 |
- <div class="col-md-8 col-md-offset-0"> |
|
18 |
- <h1><small>Laura Poitras</small></h1> |
|
19 |
- <blockquote style="padding:5px;">"Edward Snowden would not have been able to contact me without Tor and other free software encryption projects. Journalists need Tor to protect their sources and to research freely. It is an essential tool, and it needs our support."</blockquote> |
|
15 |
+ |
|
16 |
+ <div class="col-sm-9 col-xs-offset-0"> |
|
17 |
+ <blockquote> |
|
18 |
+ Tor has millions of users around the globe, and many people making donations can create a sustainable Tor. |
|
19 |
+ Your contributions in our first ever fundraising campaign will form a strong foundation and inspire others to give to Tor. |
|
20 |
+ <footer class="pull-right source-quote"><cite title="Source Title">Roger Dingledine</cite></footer> |
|
21 |
+ </blockquote> |
|
20 | 22 |
</div> |
23 |
+ |
|
21 | 24 |
</div> |
22 | 25 |
</div> |
23 |
- <div class="col-md-6"> |
|
24 |
- <div style="margin-left:20px;"> |
|
25 |
- <h2 class="text-justify">Donate!</h2> |
|
26 | 26 |
</div> |
27 | 27 |
|
28 |
+ |
|
29 |
+ <div class="container"> |
|
30 |
+ |
|
31 |
+ <div class="row"> |
|
32 |
+ <div class="col-sm-7"> |
|
33 |
+ <h2 class="main-text">Your support is critical to our success</h2> |
|
34 |
+ <hr> |
|
35 |
+ <p style="text-align:left;">Donate $23+, get one of this swags, take a picture with it and share it with us via <code><a href="https://twitter.com/search?q=%23SupportTor" target="_blank">#supportTor</a></code> hashtag.</p> |
|
36 |
+ |
|
37 |
+ <noscript class="perks"> |
|
38 |
+ <h4 style="text-align:left; padding-top:10px;"><b>Perks</b></h4> |
|
39 |
+ <p style="text-align:left;">Donate $23+ to get a <b>pack of stickers</b></p> |
|
40 |
+ <p style="text-align:left;">Donate $100+ to get a <b>Tor supporter tshirt</b></p> |
|
41 |
+ <p style="text-align:left;">Donate $500+ to get a <b>hoodie</b></p> |
|
42 |
+ </noscript> |
|
43 |
+ |
|
44 |
+ <h4 style="text-align:left; padding-top:10px;"><b>Perks</b></h4> |
|
45 |
+ <div class="col-sm-4 no-padding"><img id="stickers" class="img-responsive half-opacity" src="$(IMGROOT)/swag-stickers-lg.png" alt="stickers"></div> |
|
46 |
+ <div class="col-sm-4 no-padding"><img id="tshirt" class="img-responsive half-opacity" src="$(IMGROOT)/swag-tees-lg.png" alt="tshirt"></div> |
|
47 |
+ <div class="col-sm-4 no-padding"><img id="hoody" class="img-responsive half-opacity" src="$(IMGROOT)/swag-hoody-lg.png" alt="hoody"></div> |
|
48 |
+ |
|
49 |
+ </div> |
|
50 |
+ <div class="donate-section col-sm-5"> |
|
28 | 51 |
<form id="donate" action="https://www.paypal.com/cgi-bin/webscr" method="post"> |
52 |
+ <div class="row col-md-offset-0 combined-input"> |
|
53 |
+ <div class="left col-xs-6 btn btn-default btn-lg active"> |
|
54 |
+ <label class="choiceLabel"> |
|
55 |
+ <input class="sr-only" name="cmd" id="blankRadio1" type="radio" value="_donations" aria-label="one_time"checked > |
|
56 |
+ <span>One-time</span> |
|
57 |
+ </label> |
|
58 |
+ </div> |
|
59 |
+ <div class="right col-xs-6 btn btn-default btn-lg "> |
|
60 |
+ <label class="choiceLabel"> |
|
61 |
+ <input class="sr-only" name="cmd" id="blankRadio2" type="radio" value="_xclick-subscriptions" aria-label="monthly"> |
|
62 |
+ <span>Monthly</span> |
|
63 |
+ </label> |
|
64 |
+ </div> |
|
65 |
+ </div> |
|
29 | 66 |
|
30 |
- <div style="margin-top:20px;" class="btn-group btn-group-lg" role="group"> |
|
31 |
- <div style="padding-bottom:5px;" class="col-md-4"><button id="amount1" name="amnt" type="button" class="btn btn-default btn-lg btn-block">10</button></div> |
|
32 |
- <div style="padding-bottom:5px;" class="col-md-4"><button id="amount2" name="amnt" type="button" class="btn btn-default btn-lg btn-block active" data-toggle="tooltip" data-placement="bottom" title="You get a tshirt!">100</button></div> |
|
33 |
- <div style="padding-bottom:5px;" class="col-md-4" ><button id="amount3" name="amnt" type="button" class="btn btn-default btn-lg btn-block" data-toggle="tooltip" data-placement="bottom" title="You get a tshirt!">256</button></div> |
|
34 |
- <div style="padding-bottom:5px;" class="col-md-4"><button id="amount4" name="amnt" type="button" class="btn btn-default btn-lg btn-block" title="You get a sticker!">23</button></div> |
|
35 |
- <div style="padding-bottom:5px;" class="col-md-4"><button id="amount5" name="amnt" type="button" class="btn btn-default btn-lg btn-block" data-toggle="tooltip" data-placement="bottom" title="You get a hoody!">500</button></div> |
|
36 |
- <div class="row form-group-lg"> |
|
67 |
+ <div class="btn-group btn-group-lg" role="group" style="margin-bottom: 30px;"> |
|
68 |
+ <div style="padding-bottom:5px;" class="col-xs-6"> |
|
69 |
+ <button value="10" id="amount10" name="amnt" type="button" class="btn btn-default btn-lg btn-block amnt-btn">$10</button> |
|
70 |
+ </div> |
|
71 |
+ <div style="padding-bottom:5px;" class="col-xs-6"> |
|
72 |
+ <button value="23" id="amount23" name="amnt" type="button" class="btn btn-default btn-lg btn-block amnt-btn" title="You get a sticker!">$23</button> |
|
73 |
+ </div> |
|
74 |
+ <div style="padding-bottom:5px;" class="col-xs-6"> |
|
75 |
+ <button value="100" id="amount100" name="amnt" type="button" class="btn btn-default btn-lg btn-block amnt-btn" title="You get a tshirt!">$100</button> |
|
76 |
+ </div> |
|
77 |
+ <div style="padding-bottom:5px;" class="col-xs-6"> |
|
78 |
+ <button value="256" id="amount256" name="amnt" type="button" class="btn btn-default btn-lg btn-block amnt-btn" title="You get a tshirt!">$256</button> |
|
79 |
+ </div> |
|
80 |
+ <div style="padding-bottom:5px;" class="col-xs-6"> |
|
81 |
+ <button value="500" id="amount500" name="amnt" type="button" class="btn btn-default btn-lg btn-block amnt-btn" title="You get a hoody!">$500</button> |
|
82 |
+ </div> |
|
83 |
+ <div class="col-xs-6 form-group-lg"> |
|
37 | 84 |
<label class="sr-only" for="exampleInputAmount">1</label> |
38 | 85 |
<div class="input-group"> |
39 | 86 |
<div class="input-group-addon">$</div> |
40 |
- <input type="text" name="custom_amnt" class="form-control" id="exampleInputAmount"> |
|
87 |
+ <input type="number" min="5" step="1" name="custom_amnt" class="form-control" id="exampleInputAmount" placeholder="other (minimum $5)"> |
|
41 | 88 |
</div> |
42 | 89 |
</div> |
43 | 90 |
</div> |
44 |
- <div style="padding:10px;" class="row col-md-offset-0"> |
|
45 |
- <label> |
|
46 |
- <input type="radio" name="cmd" id="blankRadio1" value="_donations" aria-label="one_time"> One-time Donation |
|
47 |
- </label> |
|
48 |
- |
|
49 |
- <label> |
|
50 |
- <input type="radio" name="cmd" id="blankRadio2" value="_xclick-subscriptions" aria-label="monthly" checked> Monthly Donation |
|
51 |
- </label> |
|
52 |
- </div> |
|
53 |
- <div class="row col-md-offset-0"> |
|
54 |
- <button class="btn btn-primary btn-lg btn-block" style="padding:10px; margin:5px;">Donate</button> |
|
55 |
- <h4><a href="<page donate/donate-options>">other ways to donate</a></h4> |
|
91 |
+ <div style="padding: 0 15px;"> |
|
92 |
+ <button id="donate-btn" class="btn btn-primary btn-lg btn-block" style="padding:10px;">Donate</button> |
|
93 |
+ <h5 class="error-msg">Please enter an amount above $5</h5> |
|
94 |
+ <h5>via PayPal (doesn't require an account)</h5> |
|
95 |
+ <h4><a href="../donate/donate-options.html.en">Other Ways to Donate</a></h4> |
|
56 | 96 |
</div> |
57 |
- <!-- Add the extra clearfix for only the required viewport --> |
|
58 |
- <div class="clearfix visible-xs-block"></div> |
|
59 |
- </div> |
|
60 |
- <input type="hidden" id="amount" name="amount" value="100"> |
|
97 |
+ <input type="hidden" id="amount" name="amount" value=""> |
|
61 | 98 |
<input type="hidden" id="a3" name="a3" value="0"> |
62 | 99 |
<input type="hidden" id="p3" name="p3" value="1"> |
63 | 100 |
<input type="hidden" id="t3" name="t3" value="M"> |
... | ... |
@@ -72,35 +111,94 @@ |
72 | 111 |
</form> |
73 | 112 |
</div> |
74 | 113 |
</div> |
114 |
+ </div> |
|
115 |
+ |
|
75 | 116 |
|
76 |
-<!-- BEGIN PAYPAL --> |
|
117 |
+ |
|
118 |
+ </div> |
|
119 |
+ |
|
120 |
+ |
|
121 |
+ <!-- PAYPAL --> |
|
77 | 122 |
<script type="text/javascript" src="$(DOCROOT)/js/jquery.min.js"></script> |
78 | 123 |
<script type="text/javascript"> |
79 | 124 |
function displayVals() { |
80 |
- var amount = $( this ).filter(":button").html(); |
|
81 |
- if (amount == null) { |
|
82 |
- amount = $( this ).filter("input").val(); |
|
125 |
+ var amount = $( this ).filter(".amnt-btn").val(); |
|
83 | 126 |
if (amount == null) { |
84 |
- amount = 100; |
|
127 |
+ amount = $("#exampleInputAmount").val(); |
|
128 |
+ if ($('#amount').val() == "") { |
|
129 |
+ amount = 23 |
|
130 |
+ $( "#amount23" ).addClass('active'); |
|
85 | 131 |
} else if (this.id == "exampleInputAmount") { |
86 | 132 |
$( "button" ).removeClass('active'); |
87 | 133 |
$( this ).addClass('active'); |
88 | 134 |
} |
89 | 135 |
} else { |
90 |
- $( "button" ).removeClass('active'); |
|
136 |
+ $( ".amnt-btn" ).removeClass('active'); |
|
91 | 137 |
$( this ).addClass('active'); |
92 |
- jQuery('#amount').val(amount); |
|
138 |
+ $('#amount').val(amount); |
|
93 | 139 |
} |
94 |
- jQuery('#amount').val(amount); |
|
95 |
- jQuery('#a3').val(amount); |
|
140 |
+ $('#amount').val(amount); |
|
141 |
+ $('#a3').val(amount); |
|
142 |
+ |
|
143 |
+ $("button[name='amnt']").click(function () { |
|
144 |
+ $(".form-control").val(null); |
|
145 |
+ $(".error-msg").css("display","none"); |
|
146 |
+ }); |
|
147 |
+ |
|
148 |
+ if (23 <= parseInt($("#amount").val()) && parseInt($("#amount").val()) < 100) { |
|
149 |
+ $("#stickers").css("opacity","1"); |
|
150 |
+ $("#tshirt").css("opacity","0.5"); |
|
151 |
+ $("#hoody").css("opacity","0.5"); |
|
152 |
+ }else if (100 <= parseInt($("#amount").val()) && parseInt($("#amount").val()) < 500) { |
|
153 |
+ $("#tshirt").css("opacity","1"); |
|
154 |
+ $("#stickers").css("opacity","0.5"); |
|
155 |
+ $("#hoody").css("opacity","0.5"); |
|
156 |
+ }else if (500 <= parseInt($("#amount").val())) { |
|
157 |
+ $("#hoody").css("opacity","1"); |
|
158 |
+ $("#stickers").css("opacity","0.5"); |
|
159 |
+ $("#tshirt").css("opacity","0.5"); |
|
160 |
+ }else{ |
|
161 |
+ $("#hoody").css("opacity","0.5"); |
|
162 |
+ $("#stickers").css("opacity","0.5"); |
|
163 |
+ $("#tshirt").css("opacity","0.5"); |
|
96 | 164 |
} |
97 | 165 |
|
98 |
-jQuery(function(){ |
|
99 |
- jQuery("button[name='amnt']").click(displayVals); |
|
100 |
- //jQuery("input[name='cmd']").click(displayVals); |
|
101 |
- jQuery("#exampleInputAmount").click(displayVals); |
|
102 |
- jQuery("#exampleInputAmount").change(displayVals); |
|
166 |
+ } |
|
167 |
+ $( document ).ready(function() { |
|
168 |
+ $("button[name='amnt']").click(displayVals); |
|
169 |
+ $("#exampleInputAmount").click(displayVals); |
|
170 |
+ $("#exampleInputAmount").change(displayVals); |
|
103 | 171 |
displayVals(); |
172 |
+ |
|
173 |
+ $("#exampleInputAmount").change(function(){ |
|
174 |
+ if ($("#amount").val() == "" || parseInt($("#amount").val()) < 5) { |
|
175 |
+ $(".error-msg").css("display","block"); |
|
176 |
+ } else{ |
|
177 |
+ $(".error-msg").css("display","none"); |
|
178 |
+ } |
|
179 |
+ }); |
|
180 |
+ |
|
181 |
+ $("#donate-btn").click(function(event){ |
|
182 |
+ if ($("#amount").val() == "" || parseInt($("#amount").val()) < 5) { |
|
183 |
+ event.preventDefault(); |
|
184 |
+ $(".error-msg").css("display","block"); |
|
185 |
+ } else{ |
|
186 |
+ $(".error-msg").css("display","none"); |
|
187 |
+ } |
|
188 |
+ }); |
|
189 |
+ |
|
190 |
+ $(".left").click(function(){ |
|
191 |
+ $(".left").addClass('active'); |
|
192 |
+ $(".right").removeClass('active'); |
|
193 |
+ }); |
|
194 |
+ $(".right").click(function(){ |
|
195 |
+ $(".right").addClass('active'); |
|
196 |
+ $(".left").removeClass('active'); |
|
197 |
+ }); |
|
198 |
+ |
|
104 | 199 |
}); |
200 |
+ |
|
201 |
+ |
|
105 | 202 |
</script> |
203 |
+ |
|
106 | 204 |
#include <donatefoot.wmi> |
107 | 205 |