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

Unified 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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « adblock-browser.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: adblock-browser-head.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/adblock-browser-head.html
@@ -0,0 +1,240 @@
+<style type="text/css">
+#content *
+{
+ box-sizing: content-box;
+}
+
+#content h1
+{
+ margin-bottom: 28px;
+}
+
+ol
+{
+ font-size: 16px;
+ padding-left: 60px;
+}
+
+ol li
+{
+ margin-bottom: 14px;
+}
+
+#content h3.subscribe-header
+{
+ font-size: 18px;
+ margin-bottom: 14px;
+}
+
+.subscribe-description
+{
+ margin: 14px 0px 20px 0px;
+}
+
+.button-community-wrapper
+{
+ display: inline-block;
+ text-align: center;
+ border: solid 1px #4CAE4C;
+ border-radius: 3px;
+ background-color: #5CB85C;
+ margin: 10px 0px 30px 0px;
+}
+
+.button-community-wrapper a
+{
+ display: block;
+ padding: 25px 20px;
+ color: #FFFFFF;
+ font-weight: bold;
+ font-size: 14px;
+ text-decoration: none;
+}
+
+#subscribe-textbox
+{
+ border: solid 1px #B5B4B0;
+ margin-right: 20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ font-size: 16px;
+ width: 276px;
+ line-height: 44px;
+ height: 44px; /* IE 8 */
+}
+
+#subscribe-textbox.placeholder
+{
+ color: #B5B4B0;
+}
+
+#subscribe-button
+{
+ border: solid 1px #357EBD;
+ border-radius: 3px;
+ background-color: #428BCA;
+ color: #FFFFFF;
+ font-size: 14px;
+ font-weight: bold;
+ min-width: 146px;
+ height: 44px;
+}
+
+#subscribe-button span
+{
+ padding-left: 30px;
+ padding-right: 30px;
+}
+
+.disclaimer
+{
+ display: none;
+ font-size: 14px;
+ color: #D00;
+ border: 1px solid #D00;
+ border-radius: 5px;
+ padding: 5px;
+ margin-top: 30px;
+}
+
+html[lang="fr"] .disclaimer.lang-fr
+{
+ display: block;
+}
+
+#subscribe-form .sucess-label, #response-error,
+#subscribe-form .invalid-label, #subscribe-form.success input,
+#subscribe-form.success button
+{
+ display: none;
+}
+
+#subscribe-form .invalid-label
+{
+ margin-top: 30px;
+}
+
+#subscribe-form.success .sucess-label,
+#subscribe-form.invalid .invalid-label,
+#subscribe-form.error #response-error
+{
+ display: block;
+}
+</style>
+
+<script type="text/javascript">
+//<![CDATA[
+function addListener(obj, type, listener, useCapture)
+{
+ if ("addEventListener" in obj)
+ {
+ obj.addEventListener(type, function(ev)
+ {
+ if (listener(ev) === false)
+ ev.preventDefault();
+ }, useCapture);
+ }
+ else
+ {
+ // IE 8
+ if (type == "DOMContentLoaded")
+ type = "readystatechange";
+
+ type = "on" + type;
+ if ("attachEvent" in obj)
+ {
+ obj.attachEvent(type, function()
+ {
+ if (document.readyState == "complete" && listener(event) === false)
+ event.returnValue = false;
+ });
+ }
+ else
+ {
+ obj[type] = listener;
+ }
+ }
+}
+
+function addPlaceholder(textbox)
+{
+ textbox.setAttribute("class", "placeholder");
+ textbox.value = getPlaceholderText();
+}
+
+function getPlaceholderText()
+{
+ return document.getElementById("subscribe-textbox").getAttribute("placeholder");
+}
+
+function contentLoad()
+{
+ var emailTextbox = document.getElementById("subscribe-textbox");
+
+ // IE9 + Safari iOS
+ if (!("placeholder" in document.createElement("input"))
+ && !emailTextbox.value)
+ {
+ addPlaceholder(emailTextbox);
+ addListener(emailTextbox, "focus", function()
+ {
+ if (emailTextbox.value == getPlaceholderText())
+ {
+ emailTextbox.value = "";
+ emailTextbox.setAttribute("class", "");
+ }
+ }, false);
+
+ addListener(emailTextbox, "blur", function()
+ {
+ if (!emailTextbox.value)
+ addPlaceholder(emailTextbox);
+ }, false);
+ }
+
+ addListener(document.getElementById("subscribe-form"), "submit", function()
+ {
+ var formElement = document.getElementById("subscribe-form");
+ if (!window.XMLHttpRequest)
+ {
+ formElement.submit();
+ return false;
+ }
+
+ var pathArray = window.location.pathname.split("/");
+ var params = emailTextbox.name + "=" + encodeURIComponent(emailTextbox.value);
+ params += "&lang=" + pathArray[1];
+ var request = new XMLHttpRequest();
+ request.open("POST", formElement.action, true);
+ request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ addListener(request, "readystatechange", function()
+ {
+ if (request.readyState == 4)
+ {
+ if (request.status >= 200 && request.status < 300)
+ {
+ formElement.setAttribute("class", "success");
+ }
+ else if (request.status == 400)
+ {
+ formElement.setAttribute("class", "invalid");
+ }
+ else
+ {
+ var errorWrapper = document.getElementById("response-error");
+ if ("textContent" in errorWrapper)
+ errorWrapper.textContent = request.statusText;
+ else // IE8
+ errorWrapper.innerText = request.statusText;
+
+ formElement.setAttribute("class", "error");
+ }
+ }
+ }, false);
+ request.send(params);
+ return false;
+ }, false);
+}
+addListener(document, "DOMContentLoaded", contentLoad, false);
+//]]>
+</script>
« 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