Index: .hgignore
===================================================================
new file mode 100644
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,2 @@
+node_modules
+dist
\ No newline at end of file
Index: README.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# eyeomail.com
+
+Source code for eyeo newsletter
Index: gulpfile.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,102 @@
+/*!
+ * This file is part of eyeomail.com.
+ * Copyright (C) 2017-present eyeo GmbH
+ *
+ * eyeomail.com is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * eyeomail.com is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with eyeomail.com. If not, see .
+ */
+
+const gulp = require("gulp");
+const gutil = require("gulp-util");
+const rename = require("gulp-rename");
+const sass = require("gulp-sass");
+const postcss = require("gulp-postcss");
+const scss = require("postcss-scss");
+const autoprefixer = require("autoprefixer");
+const replace = require("replace");
+const fs = require("fs");
+const readFilePromise = require("fs-readfile-promise");
+
+/******************************************************************************
+ * CSS
+ ******************************************************************************/
+
+gulp.task("compileCss", function() {
+ return gulp.src("./src/scss/main.scss")
+ .pipe(postcss([autoprefixer()], {syntax: scss}).on("error", gutil.log))
+ .pipe(sass({outputStyle: "compact"}).on("error", gutil.log))
+ .pipe(gulp.dest("./dist"));
+});
+
+gulp.task("inlineCss", ["compileCss", "moveTemplates"], function() {
+ return fs.readFile("./dist/main.css", "utf8", function (err, styles) {
+ if (err) throw err;
+
+ const replacement = `
+
+`;
+
+ replace({
+ regex: /([\s\S]*?)/,
+ replacement: replacement,
+ paths: ["dist/signup.html"],
+ recursive: true,
+ silent: true,
+ });
+ });
+});
+
+gulp.task("css", ["inlineCss"]);
+
+/******************************************************************************
+ * Template
+ ******************************************************************************/
+
+gulp.task("moveTemplates", function() {
+ const templateFiles = ["./src/templates/signup.html",
+ "./src/templates/confirm-email.html",
+ "./src/templates/subscription-confirmed-email.html"];
+
+ return gulp.src(templateFiles).pipe(gulp.dest("./dist"));
+});
+
+gulp.task("backclick", function() {
+ const templateFiles = ["./dist/signup.html",
+ "./dist/confirm-email.html",
+ "./dist/subscription-confirmed-email.html"];
+
+ return Promise.all(templateFiles.map((file) => readFilePromise(file)))
+ .then((buffers) => Promise.all(buffers.map((buffer) => buffer.toString())))
+ .then((contents) => {
+ fs.writeFile("./dist/backclick.html", contents.join(""));
+ });
+});
+
+gulp.task("template", ["css"]);
+
+/******************************************************************************
+ * Watch
+ ******************************************************************************/
+
+gulp.task("watch", function() {
+ gulp.watch("./src/scss/**/*.scss", ["css"]);
+ gulp.watch("./src/templates/*.html", ["template", "backclick"]);
+});
+
+/******************************************************************************
+ * Default
+ ******************************************************************************/
+
+gulp.task("default", ["template", "css", "watch"]);
Index: package.json
===================================================================
new file mode 100644
--- /dev/null
+++ b/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "eyeomail",
+ "private": true,
+ "licence": "GPL-3.0",
+ "browserslist": [
+ "last 2 versions",
+ "ie >= 9"
+ ],
+ "devDependencies": {
+ "autoprefixer": "^7.1.1",
+ "fs-readfile-promise": "^3.0.1",
+ "gulp": "^3.9.1",
+ "gulp-postcss": "^7.0.0",
+ "gulp-rename": "^1.2.2",
+ "gulp-sass": "^3.1.0",
+ "gulp-sourcemaps": "^2.6.1",
+ "gulp-util": "^3.0.8",
+ "postcss-scss": "^1.0.2",
+ "replace": "^0.3.0",
+ "website-defaults": "https://hg.adblockplus.org/website-defaults/archive/tip.tar.gz"
+ }
+}
Index: src/scss/_content.scss
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/scss/_content.scss
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Content
+ ******************************************************************************/
+
+.content
+{
+ p { margin: 1em 0em; }
+
+ a,
+ a:visited
+ {
+ color: $secondary;
+ text-decoration: underline;
+ }
+
+ abbr { text-decoration: none; }
+
+ .color-secondary { color: $secondary; }
+}
Index: src/scss/_form.scss
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/scss/_form.scss
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Form
+ ******************************************************************************/
+
+input,
+button
+{
+ width: 100%;
+ height: 2.6em;
+}
+
+/* Input field
+ ******************************************************************************/
+
+input
+{
+ margin-bottom: $medium-space;
+ padding: 0 $x-small-space;
+ border: 2px solid #CDCDCD;
+}
+
+/* Error state
+ ******************************************************************************/
+
+.invalid
+{
+ border-color: $error;
+}
+
+.error-message
+{
+ display: none;
+}
+
+.invalid + .error-message
+{
+ display: block;
+ margin-top: -$x-small-space;
+ margin-bottom: $small-space;
+ color: $error;
+}
+
+/* Buttons
+ ******************************************************************************/
+
+button
+{
+ border: 0;
+ text-transform: uppercase;
+}
+
+.secondary
+{
+ color: #fff;
+ background-color: $secondary;
+}
Index: src/scss/_layout.scss
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/scss/_layout.scss
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Layout
+ ******************************************************************************/
+
+html
+{
+ background-color: #f3f3f3;
+}
+
+body
+{
+ @media (min-width: $phablet-breakpoint)
+ {
+ display: table;
+ width: 100%;
+ min-height: 100vh;
+ }
+}
+
+/* .outer-container
+ ******************************************************************************/
+
+.outer-container
+{
+ @media (min-width: $phablet-breakpoint)
+ {
+ display: table-cell;
+ vertical-align: middle;
+ }
+}
+
+/* #page-header
+ ******************************************************************************/
+
+#page-header
+{
+ margin-top: $medium-space;
+ margin-bottom: $small-space;
+
+ @media (min-width: $phablet-breakpoint)
+ {
+ margin-top: 0;
+ margin-bottom: $medium-space;
+ }
+}
+
+#page-header figure
+{
+ display: inline-table;
+ font-size: 1.5em;
+ font-weight: 300;
+
+ @media (min-width: $phablet-breakpoint)
+ {
+ font-size: 2em;
+ }
+
+ img,
+ figcaption
+ {
+ display: table-cell;
+ vertical-align: middle;
+ }
+
+ img
+ {
+ height: 1.5em;
+
+ @media (min-width: $phablet-breakpoint)
+ {
+ height: 2em;
+ }
+ }
+
+ figcaption
+ {
+ padding: 0 $x-small-space;
+ }
+
+ strong { font-weight: 700; }
+}
+
+#page-header h1
+{
+ margin: $small-space auto $x-small-space;
+ font-weight: 700;
+}
+
+/* #sign-up, #page-footer
+ ******************************************************************************/
+
+#sign-up,
+#page-footer
+{
+ width: 100%;
+}
+
+#page-footer
+{
+ margin-top: $small-space;
+ text-align: center;
+
+ @media (min-width: $phablet-breakpoint)
+ {
+ text-align: left;
+ }
+}
Index: src/scss/_vars.scss
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/scss/_vars.scss
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+// Variables
+////////////////////////////////////////////////////////////////////////////////
+
+// Brand colors
+////////////////////////////////////////////////////////////////////////////////
+
+$secondary: #C70D2B;
+
+// Fonts
+////////////////////////////////////////////////////////////////////////////////
+
+$primary-font: "Source Sans Pro", sans-serif;
+
+// Spacing
+////////////////////////////////////////////////////////////////////////////////
+
+$x-small-space: 0.5em;
+
+// Device widths
+////////////////////////////////////////////////////////////////////////////////
+
+$phone-width: 320px;
Index: src/scss/main.scss
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/scss/main.scss
@@ -0,0 +1,13 @@
+
+@import "vars";
+@import "../../node_modules/website-defaults/static/scss/variables";
+@import "../../node_modules/website-defaults/static/scss/utilities/overrides.scss";
+@import "../../node_modules/website-defaults/static/scss/utilities/layout.scss";
+@import "../../node_modules/website-defaults/static/scss/utilities/widths.scss";
+@import "../../node_modules/website-defaults/static/scss/reset";
+@import "../../node_modules/website-defaults/static/scss/base";
+@import "../../node_modules/website-defaults/static/scss/forms/basic";
+@import "../../node_modules/website-defaults/static/scss/forms/buttons";
+@import "content";
+@import "layout";
+@import "form";
Index: src/templates/confirm-email.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/templates/confirm-email.html
@@ -0,0 +1,76 @@
+
+
+confirm@eyeomail.com
+Marsha at Adblock Plus
+1
+$$FULLNAME$$
+Confirm your email address
+
+
+
+Confirm Email
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ Hey $$FULLNAME$$,
+
+ We take ad blocking seriously across all channels, so we want to make sure that you actually signed up for our new monthly Adblock Plus update.
+
+ Please confirm your email address by clicking on the link below:
+
+ $$DOI-LINK$$
+
+ Thanks for subscribing. We promise not to use your email address for anything evil!
+
+ The Adblock Plus Team
+
+ If you were not expecting this email, please disregard it.
+ |
+
+
+ |
+
+
+
+
+
+
+
+Hey $$FULLNAME$$,
+
+We take ad blocking seriously across all channels, so we want to make sure that you actually signed up for our new monthly Adblock Plus update.
+
+Please confirm your email address by clicking on the link below:
+
+$$DOI-LINK$$
+
+Thanks for subscribing. We promise not to use your email address for anything evil!
+
+The Adblock Plus Team
+
+If you were not expecting this email, please disregard it.
+
+
Index: src/templates/signup.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/templates/signup.html
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+ Newsletter Signup
+
+
+
+
+
+
+
+
+
+
+
Index: src/templates/subscription-confirmed-email.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/templates/subscription-confirmed-email.html
@@ -0,0 +1,54 @@
+
+
+Marsha at Adblock Plus
+3
+$$FULLNAME$$
+Adblock Plus Newsletter Subscription Successful
+
+
+
+test
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ Hey $$FULLNAME$$,
+
+ Success email body here.
+ |
+
+
+ |
+
+
+
+
+
+
+
+Hey $$FULLNAME$$,
+
+Success email body here.
+
+