summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--service/pixelated/resources/login_resource.py13
-rw-r--r--service/pixelated/resources/root_resource.py14
-rw-r--r--web-ui/package.json2
-rw-r--r--web-ui/public/signup.css (renamed from web-ui/signup/css/style.css)0
-rw-r--r--web-ui/public/signup.html (renamed from web-ui/signup/index.html)5
-rw-r--r--web-ui/signup/css/normalize.css461
-rw-r--r--web-ui/signup/images/pixelated-logo-orange.svg29
-rw-r--r--web-ui/signup/images/sent_email.pngbin9160 -> 0 bytes
-rw-r--r--web-ui/src/js/index.js (renamed from web-ui/signup/src/index.js)0
10 files changed, 33 insertions, 497 deletions
diff --git a/.gitignore b/.gitignore
index b53ecd20..155686f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,10 +5,8 @@
*.egg-info
web-ui/node_modules
web-ui/app/bower_components
-web-ui/target
-web-ui/signup/bundle.css
-web-ui/signup/bundle.js
-web-ui/signup/lib/
+web-ui/lib/
+web-ui/public/signup.js
.tmp
.sass-cache/
dist/
diff --git a/service/pixelated/resources/login_resource.py b/service/pixelated/resources/login_resource.py
index d5555b90..905b872c 100644
--- a/service/pixelated/resources/login_resource.py
+++ b/service/pixelated/resources/login_resource.py
@@ -39,6 +39,17 @@ def _get_startup_folder():
return os.path.join(path, '..', 'assets')
+def _get_public_folder():
+ static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "web-ui", "public"))
+ # this is a workaround for packaging
+ if not os.path.exists(static_folder):
+ static_folder = os.path.abspath(
+ os.path.join(os.path.abspath(__file__), "..", "..", "..", "..", "web-ui", "public"))
+ if not os.path.exists(static_folder):
+ static_folder = os.path.join('/', 'usr', 'share', 'pixelated-user-agent')
+ return static_folder
+
+
def _get_static_folder():
static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "web-ui", "app"))
# this is a workaround for packaging
@@ -107,6 +118,7 @@ class LoginResource(BaseResource):
def __init__(self, services_factory, provider=None, disclaimer_banner=None, authenticator=None):
BaseResource.__init__(self, services_factory)
self._static_folder = _get_static_folder()
+ self._public_folder = _get_public_folder()
self._startup_folder = _get_startup_folder()
self._disclaimer_banner = disclaimer_banner
self._provider = provider
@@ -114,6 +126,7 @@ class LoginResource(BaseResource):
self._bootstrap_user_services = BootstrapUserServices(services_factory, provider)
self.putChild('startup-assets', File(self._startup_folder))
+ self.putChild('public-assets', File(self._public_folder))
with open(os.path.join(self._startup_folder, 'Interstitial.html')) as f:
self.interstitial = f.read()
diff --git a/service/pixelated/resources/root_resource.py b/service/pixelated/resources/root_resource.py
index 8df76c70..8fa80bb2 100644
--- a/service/pixelated/resources/root_resource.py
+++ b/service/pixelated/resources/root_resource.py
@@ -51,6 +51,7 @@ class RootResource(BaseResource):
def __init__(self, services_factory):
BaseResource.__init__(self, services_factory)
self._startup_assets_folder = self._get_startup_folder()
+ self._public_assets_folder = self._get_public_folder()
self._static_folder = self._get_static_folder()
self._html_template = open(os.path.join(self._static_folder, 'index.html')).read()
self._services_factory = services_factory
@@ -61,6 +62,7 @@ class RootResource(BaseResource):
def _startup_mode(self):
self.putChild('startup-assets', File(self._startup_assets_folder))
+ self.putChild('public-assets', File(self._public_assets_folder))
self._mode = MODE_STARTUP
def getChild(self, path, request):
@@ -106,10 +108,22 @@ class RootResource(BaseResource):
self._mode = MODE_RUNNING
+ # TODO: use the public folder for this
def _get_startup_folder(self):
path = os.path.dirname(os.path.abspath(__file__))
return os.path.join(path, '..', 'assets')
+ def _get_public_folder(self):
+ public_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "web-ui", "public"))
+ # this is a workaround for packaging
+ if not os.path.exists(public_folder):
+ public_folder = os.path.abspath(
+ os.path.join(os.path.abspath(__file__), "..", "..", "..", "..", "web-ui", "public"))
+ if not os.path.exists(public_folder):
+ # TODO: how is this packaged?
+ public_folder = os.path.join('/', 'usr', 'share', 'pixelated-user-agent')
+ return public_folder
+
def _get_static_folder(self):
static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "web-ui", "app"))
# this is a workaround for packaging
diff --git a/web-ui/package.json b/web-ui/package.json
index c655c253..b937502f 100644
--- a/web-ui/package.json
+++ b/web-ui/package.json
@@ -36,7 +36,7 @@
"compass": "compass compile",
"compass-watch": "compass watch",
"build": "npm run clean && npm run handlebars && npm run add_git_version && npm run compass && npm run build-signup",
- "build-signup": "babel signup/src -d signup/lib && browserify signup/lib/index.js >signup/bundle.js",
+ "build-signup": "babel src/js -d lib/js && browserify lib/js/index.js >public/signup.js",
"jshint": "node_modules/jshint/bin/jshint --config=.jshintrc app test",
"clean": "rm -rf .tmp/ 'dist/*' app/js/generated/hbs/* app/css/*",
"buildmain": "node_modules/requirejs/bin/r.js -o config/buildoptions.js",
diff --git a/web-ui/signup/css/style.css b/web-ui/public/signup.css
index 61ac8587..61ac8587 100644
--- a/web-ui/signup/css/style.css
+++ b/web-ui/public/signup.css
diff --git a/web-ui/signup/index.html b/web-ui/public/signup.html
index a1836721..9bc6cdad 100644
--- a/web-ui/signup/index.html
+++ b/web-ui/public/signup.html
@@ -6,13 +6,14 @@
<title>Pixelated Mail</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
- <link rel="stylesheet" href="bundle.css">
+ <link rel="stylesheet" type="text/css" href="/startup-assets/normalize.min.css" />
+ <link rel="stylesheet" type="text/css" href="/public-assets/signup.css" />
</head>
<body>
<header><img src="images/pixelated-logo-orange.svg" alt="Pixelated" class="logo"/></header>
<div class="message">
<div id="app"></div>
- <script src="bundle.js"></script>
+ <script src="/public-assets/signup.js"></script>
</div>
</body>
</html>
diff --git a/web-ui/signup/css/normalize.css b/web-ui/signup/css/normalize.css
deleted file mode 100644
index 9b77e0eb..00000000
--- a/web-ui/signup/css/normalize.css
+++ /dev/null
@@ -1,461 +0,0 @@
-/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
-
-/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
- * IE on Windows Phone and in iOS.
- */
-
-/* Document
- ========================================================================== */
-
-html {
- font-family: sans-serif; /* 1 */
- line-height: 1.15; /* 2 */
- -ms-text-size-adjust: 100%; /* 3 */
- -webkit-text-size-adjust: 100%; /* 3 */
-}
-
-/* Sections
- ========================================================================== */
-
-/**
- * Remove the margin in all browsers (opinionated).
- */
-
-body {
- margin: 0;
-}
-
-/**
- * Add the correct display in IE 9-.
- */
-
-article,
-aside,
-footer,
-header,
-nav,
-section {
- display: block;
-}
-
-/**
- * Correct the font size and margin on `h1` elements within `section` and
- * `article` contexts in Chrome, Firefox, and Safari.
- */
-
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
-
-/* Grouping content
- ========================================================================== */
-
-/**
- * Add the correct display in IE 9-.
- * 1. Add the correct display in IE.
- */
-
-figcaption,
-figure,
-main { /* 1 */
- display: block;
-}
-
-/**
- * Add the correct margin in IE 8.
- */
-
-figure {
- margin: 1em 40px;
-}
-
-/**
- * 1. Add the correct box sizing in Firefox.
- * 2. Show the overflow in Edge and IE.
- */
-
-hr {
- box-sizing: content-box; /* 1 */
- height: 0; /* 1 */
- overflow: visible; /* 2 */
-}
-
-/**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
-pre {
- font-family: monospace, monospace; /* 1 */
- font-size: 1em; /* 2 */
-}
-
-/* Text-level semantics
- ========================================================================== */
-
-/**
- * 1. Remove the gray background on active links in IE 10.
- * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
- */
-
-a {
- background-color: transparent; /* 1 */
- -webkit-text-decoration-skip: objects; /* 2 */
-}
-
-/**
- * Remove the outline on focused links when they are also active or hovered
- * in all browsers (opinionated).
- */
-
-a:active,
-a:hover {
- outline-width: 0;
-}
-
-/**
- * 1. Remove the bottom border in Firefox 39-.
- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
- */
-
-abbr[title] {
- border-bottom: none; /* 1 */
- text-decoration: underline; /* 2 */
- text-decoration: underline dotted; /* 2 */
-}
-
-/**
- * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
- */
-
-b,
-strong {
- font-weight: inherit;
-}
-
-/**
- * Add the correct font weight in Chrome, Edge, and Safari.
- */
-
-b,
-strong {
- font-weight: bolder;
-}
-
-/**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
-code,
-kbd,
-samp {
- font-family: monospace, monospace; /* 1 */
- font-size: 1em; /* 2 */
-}
-
-/**
- * Add the correct font style in Android 4.3-.
- */
-
-dfn {
- font-style: italic;
-}
-
-/**
- * Add the correct background and color in IE 9-.
- */
-
-mark {
- background-color: #ff0;
- color: #000;
-}
-
-/**
- * Add the correct font size in all browsers.
- */
-
-small {
- font-size: 80%;
-}
-
-/**
- * Prevent `sub` and `sup` elements from affecting the line height in
- * all browsers.
- */
-
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}
-
-sub {
- bottom: -0.25em;
-}
-
-sup {
- top: -0.5em;
-}
-
-/* Embedded content
- ========================================================================== */
-
-/**
- * Add the correct display in IE 9-.
- */
-
-audio,
-video {
- display: inline-block;
-}
-
-/**
- * Add the correct display in iOS 4-7.
- */
-
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-
-/**
- * Remove the border on images inside links in IE 10-.
- */
-
-img {
- border-style: none;
-}
-
-/**
- * Hide the overflow in IE.
- */
-
-svg:not(:root) {
- overflow: hidden;
-}
-
-/* Forms
- ========================================================================== */
-
-/**
- * 1. Change the font styles in all browsers (opinionated).
- * 2. Remove the margin in Firefox and Safari.
- */
-
-button,
-input,
-optgroup,
-select,
-textarea {
- font-family: sans-serif; /* 1 */
- font-size: 100%; /* 1 */
- line-height: 1.15; /* 1 */
- margin: 0; /* 2 */
-}
-
-/**
- * Show the overflow in IE.
- * 1. Show the overflow in Edge.
- */
-
-button,
-input { /* 1 */
- overflow: visible;
-}
-
-/**
- * Remove the inheritance of text transform in Edge, Firefox, and IE.
- * 1. Remove the inheritance of text transform in Firefox.
- */
-
-button,
-select { /* 1 */
- text-transform: none;
-}
-
-/**
- * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
- * controls in Android 4.
- * 2. Correct the inability to style clickable types in iOS and Safari.
- */
-
-button,
-html [type="button"], /* 1 */
-[type="reset"],
-[type="submit"] {
- -webkit-appearance: button; /* 2 */
-}
-
-/**
- * Remove the inner border and padding in Firefox.
- */
-
-button::-moz-focus-inner,
-[type="button"]::-moz-focus-inner,
-[type="reset"]::-moz-focus-inner,
-[type="submit"]::-moz-focus-inner {
- border-style: none;
- padding: 0;
-}
-
-/**
- * Restore the focus styles unset by the previous rule.
- */
-
-button:-moz-focusring,
-[type="button"]:-moz-focusring,
-[type="reset"]:-moz-focusring,
-[type="submit"]:-moz-focusring {
- outline: 1px dotted ButtonText;
-}
-
-/**
- * Change the border, margin, and padding in all browsers (opinionated).
- */
-
-fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
-}
-
-/**
- * 1. Correct the text wrapping in Edge and IE.
- * 2. Correct the color inheritance from `fieldset` elements in IE.
- * 3. Remove the padding so developers are not caught out when they zero out
- * `fieldset` elements in all browsers.
- */
-
-legend {
- box-sizing: border-box; /* 1 */
- color: inherit; /* 2 */
- display: table; /* 1 */
- max-width: 100%; /* 1 */
- padding: 0; /* 3 */
- white-space: normal; /* 1 */
-}
-
-/**
- * 1. Add the correct display in IE 9-.
- * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
- */
-
-progress {
- display: inline-block; /* 1 */
- vertical-align: baseline; /* 2 */
-}
-
-/**
- * Remove the default vertical scrollbar in IE.
- */
-
-textarea {
- overflow: auto;
-}
-
-/**
- * 1. Add the correct box sizing in IE 10-.
- * 2. Remove the padding in IE 10-.
- */
-
-[type="checkbox"],
-[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
-}
-
-/**
- * Correct the cursor style of increment and decrement buttons in Chrome.
- */
-
-[type="number"]::-webkit-inner-spin-button,
-[type="number"]::-webkit-outer-spin-button {
- height: auto;
-}
-
-/**
- * 1. Correct the odd appearance in Chrome and Safari.
- * 2. Correct the outline style in Safari.
- */
-
-[type="search"] {
- -webkit-appearance: textfield; /* 1 */
- outline-offset: -2px; /* 2 */
-}
-
-/**
- * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
- */
-
-[type="search"]::-webkit-search-cancel-button,
-[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-
-/**
- * 1. Correct the inability to style clickable types in iOS and Safari.
- * 2. Change font properties to `inherit` in Safari.
- */
-
-::-webkit-file-upload-button {
- -webkit-appearance: button; /* 1 */
- font: inherit; /* 2 */
-}
-
-/* Interactive
- ========================================================================== */
-
-/*
- * Add the correct display in IE 9-.
- * 1. Add the correct display in Edge, IE, and Firefox.
- */
-
-details, /* 1 */
-menu {
- display: block;
-}
-
-/*
- * Add the correct display in all browsers.
- */
-
-summary {
- display: list-item;
-}
-
-/* Scripting
- ========================================================================== */
-
-/**
- * Add the correct display in IE 9-.
- */
-
-canvas {
- display: inline-block;
-}
-
-/**
- * Add the correct display in IE.
- */
-
-template {
- display: none;
-}
-
-/* Hidden
- ========================================================================== */
-
-/**
- * Add the correct display in IE 10-.
- */
-
-[hidden] {
- display: none;
-}
diff --git a/web-ui/signup/images/pixelated-logo-orange.svg b/web-ui/signup/images/pixelated-logo-orange.svg
deleted file mode 100644
index 7e0ef43d..00000000
--- a/web-ui/signup/images/pixelated-logo-orange.svg
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- width="509.707px" height="142.439px" viewBox="0 0 509.707 142.439" enable-background="new 0 0 509.707 142.439"
- xml:space="preserve">
-<g>
- <path fill="#F9A731" d="M0,35.469v71.365l62.837,35.605l62.833-35.605V35.469L62.813,0L0,35.469z M60.262,116.617L23.735,96.332
- V52.46l36.586,20.999L60.262,116.617z M101.936,96.332l-36.148,20.285l0.067-43.123l36.081-21.034V96.332z M101.936,46.44
- L62.951,69.553L23.733,46.44l39.218-21.131L101.936,46.44z"/>
- <path fill="#F9A731" d="M169.505,42.332h-19.968v59.328h13.52V79.655h6.448c11.579,0,20.279-6.832,20.279-19.056
- C189.784,48.302,181.084,42.332,169.505,42.332z M166.866,68.868h-3.809v-15.75h3.809c5.323,0,10.357,1.798,10.357,7.91
- C177.224,67.07,172.189,68.868,166.866,68.868z"/>
- <rect x="194.309" y="42.332" fill="#F9A731" width="13.52" height="59.328"/>
- <polygon fill="#F9A731" points="266.516,42.332 249.689,42.332 238.759,58.514 227.827,42.332 211.721,42.332 230.417,69.73
- 210.228,101.66 226.982,101.66 238.759,81.453 250.534,101.66 268.01,101.66 247.099,69.73 "/>
- <polygon fill="#F9A731" points="270.128,101.66 304.069,101.66 304.069,89.795 283.647,89.795 283.647,77.857 303.207,77.857
- 303.207,65.991 283.647,65.991 283.647,54.199 304.069,54.199 304.069,42.332 270.128,42.332 "/>
- <path fill="#F9A731" d="M354.807,42.332l-19.156,47.463H322.33V42.332h-13.52v59.328h22.053h11.888h2.636l4.386-11.865h22.578
- l4.391,11.865h14.524l-23.944-59.328H354.807z M354.377,77.928l6.614-17.257h0.145l6.615,17.257H354.377z"/>
- <polygon fill="#F9A731" points="379.939,54.199 394.073,54.199 394.073,101.66 407.592,101.66 407.592,54.199 421.687,54.199
- 421.687,42.332 379.939,42.332 "/>
- <polygon fill="#F9A731" points="426.265,101.66 460.207,101.66 460.207,89.795 439.785,89.795 439.785,77.857 459.344,77.857
- 459.344,65.991 439.785,65.991 439.785,54.199 460.207,54.199 460.207,42.332 426.265,42.332 "/>
- <path fill="#F9A731" d="M479.792,42.332h-14.94v59.328h14.94c16.324,0,29.914-12.37,29.914-29.699
- C509.707,54.701,496.044,42.332,479.792,42.332z M480.457,89.577h-2.084V54.414h2.084c10.067,0,16.9,7.695,16.9,17.619
- C497.285,81.955,490.455,89.577,480.457,89.577z"/>
-</g>
-</svg>
diff --git a/web-ui/signup/images/sent_email.png b/web-ui/signup/images/sent_email.png
deleted file mode 100644
index ddaa11d0..00000000
--- a/web-ui/signup/images/sent_email.png
+++ /dev/null
Binary files differ
diff --git a/web-ui/signup/src/index.js b/web-ui/src/js/index.js
index 35de6407..35de6407 100644
--- a/web-ui/signup/src/index.js
+++ b/web-ui/src/js/index.js