From a0de084e04f02a5f09d5a14b86ece156f4f6df5f Mon Sep 17 00:00:00 2001 From: Zara Gebru Date: Fri, 2 Dec 2016 17:55:02 +0100 Subject: [refactor] use static url instead of assets url --- README.md | 2 +- service/MANIFEST.in | 2 +- service/test/unit/resources/test_root_resource.py | 2 +- web-ui/.jshintignore | 1 + web-ui/package.json | 2 +- web-ui/public/index.html | 44 +++++++++++------------ web-ui/public/js/main.js | 2 +- web-ui/public/js/page/default.js | 2 +- web-ui/public/scss/base/_fonts.scss | 22 ++++++------ 9 files changed, 40 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index eb3c44c1..158ca3af 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Here's a [podcast](https://soundcloud.com/thoughtworks/pixelated-why-secure-comm **Pixelated is still in early development state!** -![High level architecture User Agent](https://raw.githubusercontent.com/pixelated/website/master/assets/images/pixelated-user-agent.png) +![High level architecture User Agent](https://raw.githubusercontent.com/pixelated/website/master/static/images/pixelated-user-agent.png) ## Try it! diff --git a/service/MANIFEST.in b/service/MANIFEST.in index a4fb90be..81d25913 100644 --- a/service/MANIFEST.in +++ b/service/MANIFEST.in @@ -1,5 +1,5 @@ include README.md recursive-include pixelated/certificates *.* -recursive-include pixelated/assets *.* +recursive-include pixelated/static *.* recursive-include debian * diff --git a/service/test/unit/resources/test_root_resource.py b/service/test/unit/resources/test_root_resource.py index e72efe59..d42a4b38 100644 --- a/service/test/unit/resources/test_root_resource.py +++ b/service/test/unit/resources/test_root_resource.py @@ -300,7 +300,7 @@ class TestRootResource(unittest.TestCase): def test_assets_should_be_publicly_available(self, *mocks): self.root_resource.initialize(provider=mock(), authenticator=mock()) - request = DummyRequest(['assets', 'dummy.json']) + request = DummyRequest(['static', 'dummy.json']) request.addCookie = MagicMock(return_value='stubbed') d = self.web.get(request) diff --git a/web-ui/.jshintignore b/web-ui/.jshintignore index 8dfe4354..473c9c23 100644 --- a/web-ui/.jshintignore +++ b/web-ui/.jshintignore @@ -2,3 +2,4 @@ public/node_modules public/bower_components public/js/lib public/js/generated +public/signup.js diff --git a/web-ui/package.json b/web-ui/package.json index 3fa1d294..b10ff51e 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -42,7 +42,7 @@ "buildmain": "node_modules/requirejs/bin/r.js -o config/buildoptions.js", "package": "/bin/bash config/package.sh", "imagemin": "node config/imagemin.js", - "minify_html": "node_modules/.bin/html-minifier public/index.html --collapse-whitespace | sed 's|.*||' > dist/index.html", + "minify_html": "node_modules/.bin/html-minifier public/index.html --collapse-whitespace | sed 's|.*||' > dist/index.html", "minify_sandbox": "node_modules/.bin/html-minifier public/sandbox.html --collapse-whitespace | sed 's|.*||' > dist/sandbox.html", "add_git_version": "/bin/bash config/add_git_version.sh" }, diff --git a/web-ui/public/index.html b/web-ui/public/index.html index 4b6a81a0..0a6303b2 100644 --- a/web-ui/public/index.html +++ b/web-ui/public/index.html @@ -1,15 +1,15 @@ - + $account_email - Pixelated Mail - - - + + + @@ -25,15 +25,15 @@ - - - - @@ -93,20 +93,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/web-ui/public/js/main.js b/web-ui/public/js/main.js index b8836a6b..1aeb1a63 100644 --- a/web-ui/public/js/main.js +++ b/web-ui/public/js/main.js @@ -16,7 +16,7 @@ */ requirejs.config({ - baseUrl: '../assets/', + baseUrl: '../static/', paths: { 'mail_list': 'js/mail_list', 'page': 'js/page', diff --git a/web-ui/public/js/page/default.js b/web-ui/public/js/page/default.js index ecaedfd8..5d52e06c 100644 --- a/web-ui/public/js/page/default.js +++ b/web-ui/public/js/page/default.js @@ -96,7 +96,7 @@ define( 'use strict'; function initialize(path) { - viewI18n.init(path + '/assets/'); + viewI18n.init(path + '/static/'); viewI18n.loaded(function() { paneContractExpand.attachTo(document); diff --git a/web-ui/public/scss/base/_fonts.scss b/web-ui/public/scss/base/_fonts.scss index dfc56dd8..a8f2d7da 100644 --- a/web-ui/public/scss/base/_fonts.scss +++ b/web-ui/public/scss/base/_fonts.scss @@ -2,67 +2,67 @@ font-family: 'Open Sans'; font-style: normal; font-weight: 300; - src: local('Open Sans Light'), local('OpenSans-Light'), url('/assets/fonts/OpenSans-Light.woff') format('woff'); + src: local('Open Sans Light'), local('OpenSans-Light'), url('/static/fonts/OpenSans-Light.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; - src: local('Open Sans'), local('OpenSans'), url('/assets/fonts/OpenSans.woff') format('woff'); + src: local('Open Sans'), local('OpenSans'), url('/static/fonts/OpenSans.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; - src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('/assets/fonts/OpenSans-Semibold.woff') format('woff'); + src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('/static/fonts/OpenSans-Semibold.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; - src: local('Open Sans Bold'), local('OpenSans-Bold'), url('/assets/fonts/OpenSans-Bold.woff') format('woff'); + src: local('Open Sans Bold'), local('OpenSans-Bold'), url('/static/fonts/OpenSans-Bold.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 800; - src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url('/assets/fonts/OpenSans-Extrabold.woff') format('woff'); + src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url('/static/fonts/OpenSans-Extrabold.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 300; - src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url('/assets/fonts/OpenSansLight-Italic.woff') format('woff'); + src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url('/static/fonts/OpenSansLight-Italic.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; - src: local('Open Sans Italic'), local('OpenSans-Italic'), url('/assets/fonts/OpenSans-Italic.woff') format('woff'); + src: local('Open Sans Italic'), local('OpenSans-Italic'), url('/static/fonts/OpenSans-Italic.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; - src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url('/assets/fonts/OpenSans-SemiboldItalic.woff') format('woff'); + src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url('/static/fonts/OpenSans-SemiboldItalic.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 700; - src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url('/assets/fonts/OpenSans-BoldItalic.woff') format('woff'); + src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url('/static/fonts/OpenSans-BoldItalic.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 800; - src: local('Open Sans Extrabold Italic'), local('OpenSans-ExtraboldItalic'), url('/assets/fonts/OpenSans-ExtraboldItalic.woff') format('woff'); + src: local('Open Sans Extrabold Italic'), local('OpenSans-ExtraboldItalic'), url('/static/fonts/OpenSans-ExtraboldItalic.woff') format('woff'); } @font-face { font-family: 'icomoon'; font-style: normal; font-weight: 400; - src: url('/assets/fonts/icomoon.woff') format('woff'), url('/assets/fonts/icomoon.ttf') format('truetype'), ; + src: url('/static/fonts/icomoon.woff') format('woff'), url('/static/fonts/icomoon.ttf') format('truetype'), ; } -- cgit v1.2.3