Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: adblock-browser-head.html

Issue 4814987935612928: Issue 2213 - landing page for mobile beta launch (Closed)
Patch Set: Make meta tags translatable Created April 29, 2015, 1:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « adblock-browser.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <style type="text/css">
2 #content *
3 {
4 box-sizing: content-box;
5 }
6
7 #content h1
8 {
9 margin-bottom: 28px;
10 }
11
12 ol
13 {
14 font-size: 16px;
15 padding-left: 60px;
16 }
17
18 ol li
19 {
20 margin-bottom: 14px;
21 }
22
23 #content h3.subscribe-header
24 {
25 font-size: 18px;
26 margin-bottom: 14px;
27 }
28
29 .subscribe-description
30 {
31 margin: 14px 0px 20px 0px;
32 }
33
34 .button-community-wrapper
35 {
36 display: inline-block;
37 text-align: center;
38 border: solid 1px #4CAE4C;
39 border-radius: 3px;
40 background-color: #5CB85C;
41 margin: 10px 0px 30px 0px;
42 }
43
44 .button-community-wrapper a
45 {
46 display: block;
47 padding: 25px 20px;
48 color: #FFFFFF;
49 font-weight: bold;
50 font-size: 14px;
51 text-decoration: none;
52 }
53
54 #subscribe-textbox
55 {
56 border: solid 1px #B5B4B0;
57 margin-right: 20px;
58 padding-left: 10px;
59 padding-right: 10px;
60 font-size: 16px;
61 width: 276px;
62 line-height: 44px;
63 height: 44px; /* IE 8 */
64 }
65
66 #subscribe-textbox.placeholder
67 {
68 color: #B5B4B0;
69 }
70
71 #subscribe-button
72 {
73 border: solid 1px #357EBD;
74 border-radius: 3px;
75 background-color: #428BCA;
76 color: #FFFFFF;
77 font-size: 14px;
78 font-weight: bold;
79 min-width: 146px;
80 height: 44px;
81 }
82
83 #subscribe-button span
84 {
85 padding-left: 30px;
86 padding-right: 30px;
87 }
88
89 .disclaimer
90 {
91 display: none;
92 font-size: 14px;
93 color: #D00;
94 border: 1px solid #D00;
95 border-radius: 5px;
96 padding: 5px;
97 margin-top: 30px;
98 }
99
100 html[lang="fr"] .disclaimer.lang-fr
101 {
102 display: block;
103 }
104
105 #subscribe-form .sucess-label, #response-error,
106 #subscribe-form .invalid-label, #subscribe-form.success input,
107 #subscribe-form.success button
108 {
109 display: none;
110 }
111
112 #subscribe-form .invalid-label
113 {
114 margin-top: 30px;
115 }
116
117 #subscribe-form.success .sucess-label,
118 #subscribe-form.invalid .invalid-label,
119 #subscribe-form.error #response-error
120 {
121 display: block;
122 }
123 </style>
124
125 <script type="text/javascript">
126 //<![CDATA[
127 function addListener(obj, type, listener, useCapture)
128 {
129 if ("addEventListener" in obj)
130 {
131 obj.addEventListener(type, function(ev)
132 {
133 if (listener(ev) === false)
134 ev.preventDefault();
135 }, useCapture);
136 }
137 else
138 {
139 // IE 8
140 if (type == "DOMContentLoaded")
141 type = "readystatechange";
142
143 type = "on" + type;
144 if ("attachEvent" in obj)
145 {
146 obj.attachEvent(type, function()
147 {
148 if (document.readyState == "complete" && listener(event) === false)
149 event.returnValue = false;
150 });
151 }
152 else
153 {
154 obj[type] = listener;
155 }
156 }
157 }
158
159 function addPlaceholder(textbox)
160 {
161 textbox.setAttribute("class", "placeholder");
162 textbox.value = getPlaceholderText();
163 }
164
165 function getPlaceholderText()
166 {
167 return document.getElementById("subscribe-textbox").getAttribute("placeholder" );
168 }
169
170 function contentLoad()
171 {
172 var emailTextbox = document.getElementById("subscribe-textbox");
173
174 // IE9 + Safari iOS
175 if (!("placeholder" in document.createElement("input"))
176 && !emailTextbox.value)
177 {
178 addPlaceholder(emailTextbox);
179 addListener(emailTextbox, "focus", function()
180 {
181 if (emailTextbox.value == getPlaceholderText())
182 {
183 emailTextbox.value = "";
184 emailTextbox.setAttribute("class", "");
185 }
186 }, false);
187
188 addListener(emailTextbox, "blur", function()
189 {
190 if (!emailTextbox.value)
191 addPlaceholder(emailTextbox);
192 }, false);
193 }
194
195 addListener(document.getElementById("subscribe-form"), "submit", function()
196 {
197 var formElement = document.getElementById("subscribe-form");
198 if (!window.XMLHttpRequest)
199 {
200 formElement.submit();
201 return false;
202 }
203
204 var pathArray = window.location.pathname.split("/");
205 var params = emailTextbox.name + "=" + encodeURIComponent(emailTextbox.value );
206 params += "&lang=" + pathArray[1];
207 var request = new XMLHttpRequest();
208 request.open("POST", formElement.action, true);
209 request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded" );
210 addListener(request, "readystatechange", function()
211 {
212 if (request.readyState == 4)
213 {
214 if (request.status >= 200 && request.status < 300)
215 {
216 formElement.setAttribute("class", "success");
217 }
218 else if (request.status == 400)
219 {
220 formElement.setAttribute("class", "invalid");
221 }
222 else
223 {
224 var errorWrapper = document.getElementById("response-error");
225 if ("textContent" in errorWrapper)
226 errorWrapper.textContent = request.statusText;
227 else // IE8
228 errorWrapper.innerText = request.statusText;
229
230 formElement.setAttribute("class", "error");
231 }
232 }
233 }, false);
234 request.send(params);
235 return false;
236 }, false);
237 }
238 addListener(document, "DOMContentLoaded", contentLoad, false);
239 //]]>
240 </script>
OLDNEW
« no previous file with comments | « adblock-browser.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld