diff --git a/Makefile b/Makefile index 44c8ff7b36..07fb799aeb 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ DC_CI = "bin/docker-compose.sh" DC = $(shell which docker-compose) DOCKER = $(shell which docker) TEST_DOMAIN = www.mozilla.org +POCKET_MODE = Pocket all: help @@ -57,12 +58,20 @@ pull: .env rebuild: clean build +# Run in Mozorg-only mode, using Bedrock to serve ONLY Mozorg pages run: .docker-build-pull ${DC} up assets app run-prod: .docker-build-pull ${DC} up release-local +# Run in Pocket-only mode, using Bedrock to serve ONLY Pocket pages _at the root path_ +run-pocket: .docker-build-pull + -SITE_MODE=${POCKET_MODE} ${DC} up assets app + +run-pocket-prod: .docker-build-pull + -SITE_MODE=${POCKET_MODE} ${DC} up release-local + stop: ${DC} stop @@ -159,4 +168,4 @@ install-local-python-deps: # Dev requirements are a superset of prod requirements pip install -r requirements/dev.txt -.PHONY: all clean build pull docs livedocs build-docs lint run stop kill run-shell shell test test-image rebuild build-ci test-ci fresh-data djshell run-prod build-prod test-cdn compile-requirements check-requirements install-local-python-deps +.PHONY: all clean build pull docs livedocs build-docs lint run stop kill run-shell shell test test-image rebuild build-ci test-ci fresh-data djshell run-prod run-pocket run-pocket-prod build-prod test-cdn compile-requirements check-requirements install-local-python-deps diff --git a/bedrock/externalpages/urls.py b/bedrock/externalpages/urls.py deleted file mode 100644 index 738bd934ba..0000000000 --- a/bedrock/externalpages/urls.py +++ /dev/null @@ -1,25 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at https://mozilla.org/MPL/2.0/. - -from bedrock.mozorg.util import page - -urlpatterns = ( - page("pocket/about/", "externalpages/pocket/about.html"), - page("pocket/add/", "externalpages/pocket/add.html"), - page("pocket/android/", "externalpages/pocket/android.html"), - page("pocket/ios/", "externalpages/pocket/ios.html"), - page("pocket/chrome/", "externalpages/pocket/chrome.html"), - page("pocket/safari/", "externalpages/pocket/safari.html"), - page("pocket/opera/", "externalpages/pocket/opera.html"), - page("pocket/edge/", "externalpages/pocket/edge.html"), - page("pocket/welcome/", "externalpages/pocket/welcome.html"), - page("pocket/contact-info/", "externalpages/pocket/contact-info.html"), - page("pocket/firefox/new_tab_learn_more/", "externalpages/pocket/firefox/new-tab-learn-more.html"), - page("pocket/pocket-and-firefox/", "externalpages/pocket/pocket-and-firefox.html"), - page("pocket/get-inspired/", "externalpages/pocket/get-inspired.html"), - page("pocket/jobs/", "externalpages/pocket/jobs.html"), - page("pocket/privacy/", "externalpages/pocket/privacy.html"), - page("pocket/tos/", "externalpages/pocket/tos.html"), - page("pocket/save-to-pocket/", "externalpages/pocket/save-to-pocket.html"), -) diff --git a/bedrock/mozorg/templates/mozorg/robots.txt b/bedrock/mozorg/templates/mozorg/robots.txt index 79401708d7..7003d75015 100644 --- a/bedrock/mozorg/templates/mozorg/robots.txt +++ b/bedrock/mozorg/templates/mozorg/robots.txt @@ -6,6 +6,5 @@ disallow: /*/firstrun/ disallow: /*/newsletter/existing/ disallow: /*/whatsnew/ disallow: /*/etc/ -disallow: /*/external/ {% endif -%} Sitemap: {{ request.scheme }}://{{ request.get_host() }}/sitemap.xml diff --git a/bedrock/externalpages/__init__.py b/bedrock/pocket/__init__.py similarity index 100% rename from bedrock/externalpages/__init__.py rename to bedrock/pocket/__init__.py diff --git a/bedrock/externalpages/templates/externalpages/pocket/about.html b/bedrock/pocket/templates/pocket/about.html similarity index 96% rename from bedrock/externalpages/templates/externalpages/pocket/about.html rename to bedrock/pocket/templates/pocket/about.html index d2f838c2c1..0eefa0d1d5 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/about.html +++ b/bedrock/pocket/templates/pocket/about.html @@ -4,7 +4,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/base.html" %} +{% extends "pocket/base.html" %} {% block page_title %}About Us{% endblock %} @@ -15,7 +15,7 @@ {% endblock %} {% block content %} -{% include 'externalpages/pocket/includes/nav.html' %} +{% include 'pocket/includes/nav.html' %}
@@ -61,7 +61,7 @@

Download our images and press kit here.

- {% include 'externalpages/pocket/includes/footer.html' %} + {% include 'pocket/includes/footer.html' %} {% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/add.html b/bedrock/pocket/templates/pocket/add.html similarity index 81% rename from bedrock/externalpages/templates/externalpages/pocket/add.html rename to bedrock/pocket/templates/pocket/add.html index 87908d179c..8404eebca2 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/add.html +++ b/bedrock/pocket/templates/pocket/add.html @@ -4,7 +4,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/base.html" %} +{% extends "pocket/base.html" %} {% from "macros-protocol.html" import split with context %} @@ -17,14 +17,14 @@ {% block content %} -{% include 'externalpages/pocket/includes/platform-nav.html' %} +{% include 'pocket/includes/platform-nav.html' %}
{% call split( block_class='mzp-l-split-center-on-sm-md mzp-t-content-xl mzp-l-split-reversed mzp-l-split-body-narrow', media_class='mzp-l-split-h-center', - image_url='img/externalpages/pocket/add-pocket-header.jpg', + image_url='img/pocket/add-pocket-header.jpg', )%}

Save to Pocket from Firefox

Click the Pocket button in your Firefox toolbar to save articles, videos, pages, and more.

@@ -41,15 +41,15 @@

View from any Device

- Different devices displaying Pocket articles + Different devices displaying Pocket articles

Get Pocket for:

    -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
@@ -81,22 +81,22 @@ @@ -112,6 +112,6 @@
-{% include 'externalpages/pocket/includes/platform-footer.html' %} +{% include 'pocket/includes/platform-footer.html' %} {% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/android.html b/bedrock/pocket/templates/pocket/android.html similarity index 80% rename from bedrock/externalpages/templates/externalpages/pocket/android.html rename to bedrock/pocket/templates/pocket/android.html index 25e277e6f2..6dc03fd640 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/android.html +++ b/bedrock/pocket/templates/pocket/android.html @@ -4,9 +4,9 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/platform-pages.html" %} +{% extends "pocket/platform-pages.html" %} -{% set platform_image = 'img/externalpages/pocket/welcome-android.jpg' %} +{% set platform_image = 'img/pocket/welcome-android.jpg' %} {% block page_title %}Pocket for Android{% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/base.html b/bedrock/pocket/templates/pocket/base.html similarity index 100% rename from bedrock/externalpages/templates/externalpages/pocket/base.html rename to bedrock/pocket/templates/pocket/base.html diff --git a/bedrock/externalpages/templates/externalpages/pocket/chrome.html b/bedrock/pocket/templates/pocket/chrome.html similarity index 81% rename from bedrock/externalpages/templates/externalpages/pocket/chrome.html rename to bedrock/pocket/templates/pocket/chrome.html index 580e2a069e..184fde27a6 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/chrome.html +++ b/bedrock/pocket/templates/pocket/chrome.html @@ -4,9 +4,9 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/platform-pages.html" %} +{% extends "pocket/platform-pages.html" %} -{% set platform_image = 'img/externalpages/pocket/welcome-chrome.jpg' %} +{% set platform_image = 'img/pocket/welcome-chrome.jpg' %} {% block page_title %}Pocket for Chrome{% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/contact-info.html b/bedrock/pocket/templates/pocket/contact-info.html similarity index 90% rename from bedrock/externalpages/templates/externalpages/pocket/contact-info.html rename to bedrock/pocket/templates/pocket/contact-info.html index 3d40ae9cae..8292be7f77 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/contact-info.html +++ b/bedrock/pocket/templates/pocket/contact-info.html @@ -4,7 +4,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/base.html" %} +{% extends "pocket/base.html" %} {% block page_title %}Contact Info{% endblock %} @@ -13,7 +13,7 @@ {% endblock %} {% block content %} -{% include 'externalpages/pocket/includes/nav.html' %} +{% include 'pocket/includes/nav.html' %}

Contact info

@@ -34,7 +34,7 @@

To view all open positions at Pocket, please visit our Jobs Page.

Security

-

If you believe you have discovered a security vulnerability in Pocket, please follow Mozilla’s bug reporting process documented on Mozilla’s Security page.

+

If you believe you have discovered a security vulnerability in Pocket, please follow Mozilla’s bug reporting process documented on Mozilla’s Security page.

For questions related to security, please contact us at security@getpocket.com.

Follow Us

@@ -51,5 +51,5 @@ 415-692-6111
-{% include 'externalpages/pocket/includes/footer.html' %} +{% include 'pocket/includes/footer.html' %} {% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/edge.html b/bedrock/pocket/templates/pocket/edge.html similarity index 81% rename from bedrock/externalpages/templates/externalpages/pocket/edge.html rename to bedrock/pocket/templates/pocket/edge.html index 36af1f697e..3016957b20 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/edge.html +++ b/bedrock/pocket/templates/pocket/edge.html @@ -4,9 +4,9 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/platform-pages.html" %} +{% extends "pocket/platform-pages.html" %} -{% set platform_image = 'img/externalpages/pocket/welcome-edge.jpg' %} +{% set platform_image = 'img/pocket/welcome-edge.jpg' %} {% block page_title %}Pocket for Edge{% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/firefox/new-tab-learn-more.html b/bedrock/pocket/templates/pocket/firefox/new-tab-learn-more.html similarity index 88% rename from bedrock/externalpages/templates/externalpages/pocket/firefox/new-tab-learn-more.html rename to bedrock/pocket/templates/pocket/firefox/new-tab-learn-more.html index 4c664fb0b8..283cead999 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/firefox/new-tab-learn-more.html +++ b/bedrock/pocket/templates/pocket/firefox/new-tab-learn-more.html @@ -4,7 +4,7 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/base.html" %} +{% extends "pocket/base.html" %} {% from "macros-protocol.html" import split with context %} @@ -25,7 +25,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. {% call split( block_class='mzp-l-split-center-on-sm-md new-tab-section top', media_class='mzp-l-split-h-center', - image_url='img/externalpages/pocket/new-tab/pocket-list.png', + image_url='img/pocket/new-tab/pocket-list.png', )%}

POCKET FOR FIREFOX

Build your personal library of fascinating reads.

@@ -40,7 +40,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. class="mzp-c-split mzp-l-split-center-on-sm-md mzp-t-content-xl mzp-l-split-reversed mzp-t-split-nospace new-tab-section">
- +

Finding the hidden gems. Respecting your privacy.

@@ -51,7 +51,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. {% call split( block_class='mzp-l-split-center-on-sm-md mzp-t-content-xl mzp-t-split-nospace new-tab-section', media_class='mzp-l-split-h-center', - image_url='img/externalpages/pocket/new-tab/fortress.svg', + image_url='img/pocket/new-tab/fortress.svg', )%}

Your data stays private. Always.

In addition to dishing up captivating stories, we also show you relevant, highly-vetted content from select sponsors. Rest assured, your browsing data never leaves your personal copy of Firefox—we don’t see it, and our sponsors don’t either. Want more details? Here’s the full scoop on how privacy works in Pocket.

@@ -60,7 +60,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. block_class='mzp-l-split-center-on-sm-md mzp-t-content-lg mzp-l-split-reversed mzp-t-split-nospace new-tab-section', media_class='mzp-l-split-h-center', body_class="new-tab-books-body", - image_url='img/externalpages/pocket/new-tab/books.svg', + image_url='img/pocket/new-tab/books.svg', )%}

Fuel your mind with even more fascinating stories.

Check out Pocket’s Must Reads for some of the best articles on the web. And get thought-provoking stories delivered to you daily by subscribing to Pocket’s newsletter.

@@ -68,7 +68,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. {% call split( block_class='mzp-l-split-center-on-sm-md mzp-t-content-xl mzp-t-split-nospace new-tab-section', media_class='mzp-l-split-h-center', - image_url='img/externalpages/pocket/new-tab/lounge.svg', + image_url='img/pocket/new-tab/lounge.svg', )%}

Save in Pocket & read on your own time.

Built right into Firefox, Pocket also lets you save stories and come back to them when you’re ready.

@@ -76,7 +76,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. {% endcall %}
- +

You make the call.

- - + +
Pocket diff --git a/bedrock/externalpages/templates/externalpages/pocket/get-inspired.html b/bedrock/pocket/templates/pocket/get-inspired.html similarity index 74% rename from bedrock/externalpages/templates/externalpages/pocket/get-inspired.html rename to bedrock/pocket/templates/pocket/get-inspired.html index a26d1d12c8..5b4c5856a2 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/get-inspired.html +++ b/bedrock/pocket/templates/pocket/get-inspired.html @@ -4,7 +4,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/base.html" %} +{% extends "pocket/base.html" %} {% from "macros-protocol.html" import split with context %} @@ -17,19 +17,19 @@ {% block content %} -{% include 'externalpages/pocket/includes/nav.html' %} +{% include 'pocket/includes/nav.html' %}
{% call split( block_class='mzp-l-split-center-on-sm-md pocket-feature-page-split', media_class='mzp-l-split-h-center', - image_url='img/externalpages/pocket/save-inspirations.png', + image_url='img/pocket/save-inspirations.png', )%}

Save what inspires you

Pocket is your save button for the internet. When a story catches your eye anywhere online, save it to Pocket and it’ll go straight to your list, ready for you to dig into when you’re free.

- Get it from the Apple Store - Get it from Google Play Store + Get it from the Apple Store + Get it from Google Play Store
{% endcall %}
@@ -38,7 +38,7 @@ {% call split( block_class='mzp-l-split-center-on-sm-md mzp-l-split-reversed pocket-feature-page-split', media_class='mzp-l-split-h-center', - image_url='img/externalpages/pocket/focused-reading.png', + image_url='img/pocket/focused-reading.png', )%}

Special features for focused reading

Use the Pocket app to listen to stories with our audio playback option. Customize how you see stories in Pocket with dark mode and font options. Keep track of your saves with tags, and preserve important passages with highlights. You can even read offline.

@@ -49,7 +49,7 @@ {% call split( block_class='mzp-l-split-center-on-sm-md pocket-feature-page-split', media_class='mzp-l-split-h-center', - image_url='img/externalpages/pocket/reading-nook.png', + image_url='img/pocket/reading-nook.png', )%}

Your private reading nook

When you’re ready to dig into what you’ve saved, Pocket provides a quiet, calm space that’s perfect for reading. It strips away all the distractions of the internet — like flashing banners and pop-ups — so you can really focus.

@@ -61,13 +61,13 @@ Start building your personal library now
- Get it from the Apple Store - Get it from Google Play Store + Get it from the Apple Store + Get it from Google Play Store
-{% include 'externalpages/pocket/includes/pocket-premium.html' %} +{% include 'pocket/includes/pocket-premium.html' %} -{% include 'externalpages/pocket/includes/footer.html' %} +{% include 'pocket/includes/footer.html' %} {% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/includes/footer.html b/bedrock/pocket/templates/pocket/includes/footer.html similarity index 94% rename from bedrock/externalpages/templates/externalpages/pocket/includes/footer.html rename to bedrock/pocket/templates/pocket/includes/footer.html index 1b46bcbd1e..fb0c52e3ce 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/includes/footer.html +++ b/bedrock/pocket/templates/pocket/includes/footer.html @@ -66,14 +66,14 @@ - Download On the Apple App Store + Download On the Apple App Store
  • - Get It On Google Play + Get It On Google Play
  • diff --git a/bedrock/externalpages/templates/externalpages/pocket/includes/mobile-nav.html b/bedrock/pocket/templates/pocket/includes/mobile-nav.html similarity index 100% rename from bedrock/externalpages/templates/externalpages/pocket/includes/mobile-nav.html rename to bedrock/pocket/templates/pocket/includes/mobile-nav.html diff --git a/bedrock/externalpages/templates/externalpages/pocket/includes/nav.html b/bedrock/pocket/templates/pocket/includes/nav.html similarity index 98% rename from bedrock/externalpages/templates/externalpages/pocket/includes/nav.html rename to bedrock/pocket/templates/pocket/includes/nav.html index e3da67f1f9..14518f9c5f 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/includes/nav.html +++ b/bedrock/pocket/templates/pocket/includes/nav.html @@ -4,7 +4,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% include 'externalpages/pocket/includes/mobile-nav.html' %} +{% include 'pocket/includes/mobile-nav.html' %}
    -{% include 'externalpages/pocket/includes/pocket-premium.html' %} +{% include 'pocket/includes/pocket-premium.html' %} -{% include 'externalpages/pocket/includes/footer.html' %} +{% include 'pocket/includes/footer.html' %} {% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/tos.html b/bedrock/pocket/templates/pocket/tos.html similarity index 99% rename from bedrock/externalpages/templates/externalpages/pocket/tos.html rename to bedrock/pocket/templates/pocket/tos.html index e78719e22d..56272c5839 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/tos.html +++ b/bedrock/pocket/templates/pocket/tos.html @@ -4,7 +4,7 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/base.html" %} +{% extends "pocket/base.html" %} {% from "macros-protocol.html" import split with context %} @@ -15,7 +15,7 @@ {% block page_title %}Terms of Service{% endblock page_title %} {% block content %} - {% include 'externalpages/pocket/includes/nav.html' %} + {% include 'pocket/includes/nav.html' %}

    Terms of Service

    @@ -92,7 +92,7 @@

    Copyright infringement

    The videos, articles and other content made available on third-party websites may be protected by copyright and other applicable laws. Some content may not be reproduced, used to prepare derivative works, distributed, performed publicly or displayed publicly without the written permission of the copyright holder, except to the extent allowed under the "fair use" provisions of the U.S. copyright laws, other limitations on exclusive copyrights in the U.S. copyright laws, or comparable provisions of foreign laws. Other content may have re-use permissions attached. Please refer to the website you were visiting when you saved such content for information that may be applicable to such content.

    You represent and agree that the Pocket application will be used solely for your personal-noncommercial use with respect to content of websites that you have the lawful right to access, and that the Pocket application will not be used in violation of the restrictions posted on the website where such content was published. Some websites include security measures designed to prevent access, and you agree not to take any steps to defeat any such security measures. We do not necessarily monitor any materials posted, transmitted, or saved to or with the Pocket Technologies. By posting, sharing or saving any videos, articles or content, you represent that doing so does not infringe any third party’s copyrights, trademarks, privacy rights or other intellectual property or legal rights of any kind. If notified that any user has posted, shared or saved any information or materials which allegedly do not conform to this Agreement, we may in our sole discretion investigate the allegation and determine whether to take any other actions, including, but not limited to, whether to remove or request the removal of the information or materials posted, shared or saved by a user. We also reserve the right to terminate the account of any user who transfers or saves content in violation of this Agreement. We shall have no liability or responsibility to users for performance or nonperformance of such activities. You may be subject to civil and criminal penalties, including without limitation monetary damages, if you violate the terms of this Agreement or infringe any third party’s legal rights.

    -

    If you believe that your copyrighted work or trademark has been infringed, please contact us and provide all information relevant to any claim of copyright or trademark infringement. Please contact us as described on Mozilla's Report Copyright or Trademark Infringement page.

    +

    If you believe that your copyrighted work or trademark has been infringed, please contact us and provide all information relevant to any claim of copyright or trademark infringement. Please contact us as described on Mozilla's Report Copyright or Trademark Infringement page.

    @@ -209,5 +209,5 @@

    Copyright © 2012-2021 Mozilla Corporation All rights reserved.

    - {% include 'externalpages/pocket/includes/footer.html' %} + {% include 'pocket/includes/footer.html' %} {% endblock %} diff --git a/bedrock/externalpages/templates/externalpages/pocket/welcome.html b/bedrock/pocket/templates/pocket/welcome.html similarity index 79% rename from bedrock/externalpages/templates/externalpages/pocket/welcome.html rename to bedrock/pocket/templates/pocket/welcome.html index 266345d3f7..1784e7d823 100644 --- a/bedrock/externalpages/templates/externalpages/pocket/welcome.html +++ b/bedrock/pocket/templates/pocket/welcome.html @@ -4,9 +4,9 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} -{% extends "externalpages/pocket/platform-pages.html" %} +{% extends "pocket/platform-pages.html" %} -{% set platform_image = 'img/externalpages/pocket/welcome-bookmarklet.jpg' %} +{% set platform_image = 'img/pocket/welcome-bookmarklet.jpg' %} {% block page_title %}Pocket for Your Browser{% endblock %} diff --git a/bedrock/pocket/urls.py b/bedrock/pocket/urls.py new file mode 100644 index 0000000000..3ecc15f3cc --- /dev/null +++ b/bedrock/pocket/urls.py @@ -0,0 +1,25 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +from bedrock.mozorg.util import page + +urlpatterns = ( + page("about/", "pocket/about.html"), + page("add/", "pocket/add.html"), + page("android/", "pocket/android.html"), + page("ios/", "pocket/ios.html"), + page("chrome/", "pocket/chrome.html"), + page("safari/", "pocket/safari.html"), + page("opera/", "pocket/opera.html"), + page("edge/", "pocket/edge.html"), + page("welcome/", "pocket/welcome.html"), + page("contact-info/", "pocket/contact-info.html"), + page("firefox/new_tab_learn_more/", "pocket/firefox/new-tab-learn-more.html"), + page("pocket-and-firefox/", "pocket/pocket-and-firefox.html"), + page("get-inspired/", "pocket/get-inspired.html"), + page("jobs/", "pocket/jobs.html"), + page("privacy/", "pocket/privacy.html"), + page("tos/", "pocket/tos.html"), + page("save-to-pocket/", "pocket/save-to-pocket.html"), +) diff --git a/bedrock/settings/__init__.py b/bedrock/settings/__init__.py index 1e2f43acfb..1393e8905a 100644 --- a/bedrock/settings/__init__.py +++ b/bedrock/settings/__init__.py @@ -7,12 +7,6 @@ import sys from .base import * # noqa -try: - from .local import * # noqa -except ImportError: - "local.py is supported, but no longer necessary" - - if DEV: ALLOWED_HOSTS = ["*"] else: @@ -94,7 +88,34 @@ MEDIA_URL = CDN_BASE_URL + MEDIA_URL STATIC_URL = CDN_BASE_URL + STATIC_URL logging.config.dictConfig(LOGGING) +# OPERATION MODE SELECTION +# Which site do we want Bedrock to serve? +POCKET_SITE_MODE = "Pocket" +MOZORG_SITE_MODE = "Mozorg" + +site_mode = config("SITE_MODE", default=MOZORG_SITE_MODE) + +if site_mode == POCKET_SITE_MODE: + ROOT_URLCONF = "bedrock.urls.pocket_mode" + + # DROP the redirects app and middleware, because it's contains Mozorg-specific rules that + # clash with some Pocket URL paths (eg /jobs/) + INSTALLED_APPS.pop(INSTALLED_APPS.index("bedrock.redirects")) + MIDDLEWARE.pop(MIDDLEWARE.index("bedrock.redirects.middleware.RedirectsMiddleware")) + + # TODO: define in Pocket-appropriate versions of + # DEV_LANGUAGES, PROD_LANGUAGES, CANONICAL_LOCALES, + # FLUENT_* overrides for Pocket L10N, etc +else: + ROOT_URLCONF = "bedrock.urls.mozorg_mode" + # TODO: move Mozorg-appropriate versions of + # DEV_LANGUAGES, PROD_LANGUAGES, CANONICAL_LOCALES, + # FLUENT_* overrides for Pocket L10N into this file + +# TEST-SPECIFIC SETTINGS +# TODO: make this selectable by an env var, like the other modes if (len(sys.argv) > 1 and sys.argv[1] == "test") or "pytest" in sys.modules: + # Using the CachedStaticFilesStorage for tests breaks all the things. STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage" # TEMPLATE_DEBUG has to be True for Jinja to call the template_rendered @@ -105,3 +126,5 @@ if (len(sys.argv) > 1 and sys.argv[1] == "test") or "pytest" in sys.modules: PROD_DETAILS_STORAGE = "product_details.storage.PDFileStorage" DATABASES["default"] = {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"} + +sys.stdout.write(f"Using SITE_MODE of '{site_mode}' and ROOT_URLCONF of '{ROOT_URLCONF}'\n") diff --git a/bedrock/settings/base.py b/bedrock/settings/base.py index a53ad5d629..468cd5a616 100644 --- a/bedrock/settings/base.py +++ b/bedrock/settings/base.py @@ -2,6 +2,10 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. +"""IMPORTANT: bedrock/settings/__init__.py contains important logic that determines +which site will be served. +""" + import json import platform import socket @@ -235,6 +239,8 @@ PROD_LANGUAGES = ( GITHUB_REPO = "https://github.com/mozilla/bedrock" +# Default l10n config is for mozorg. See settings/__init__.py for where we [will] plug in +# an alternative Pocket-appropriate l10n setup. # Global L10n files. FLUENT_DEFAULT_FILES = [ "banners/firefox-app-store", @@ -455,7 +461,6 @@ NOINDEX_URLS = [ r"^foundation/annualreport/$" r"^firefox/notes/$" r"^teach/$" r"^about/legal/impressum/$", r"^security/announce/", r"^exp/", - r"^external/", ] # Pages we do want indexed but don't show up in automated URL discovery @@ -511,8 +516,6 @@ WHITENOISE_MAX_AGE = 6 * 60 * 60 # 6 hours PROJECT_MODULE = "bedrock" -ROOT_URLCONF = "bedrock.urls" - def get_app_name(hostname): """ @@ -561,7 +564,7 @@ ENABLE_CSP_MIDDLEWARE = config("ENABLE_CSP_MIDDLEWARE", default="true", parser=b if ENABLE_CSP_MIDDLEWARE: MIDDLEWARE.append("csp.middleware.CSPMiddleware") -INSTALLED_APPS = ( +INSTALLED_APPS = [ # Django contrib apps "django.contrib.auth", "django.contrib.contenttypes", @@ -587,7 +590,7 @@ INSTALLED_APPS = ( "bedrock.privacy", "bedrock.products", "bedrock.externalfiles", - "bedrock.externalpages", + "bedrock.pocket", "bedrock.security", "bedrock.releasenotes", "bedrock.contentcards", @@ -603,7 +606,7 @@ INSTALLED_APPS = ( # libs "django_extensions", "lib.l10n_utils", -) +] # Must match the list at CloudFlare if the # VaryNoCacheMiddleware is enabled. The home diff --git a/tests/functional/externalpages/pocket/__init__.py b/bedrock/urls/__init__.py similarity index 100% rename from tests/functional/externalpages/pocket/__init__.py rename to bedrock/urls/__init__.py diff --git a/bedrock/urls.py b/bedrock/urls/mozorg_mode.py similarity index 96% rename from bedrock/urls.py rename to bedrock/urls/mozorg_mode.py index 87dcd47fc6..a3b17e9888 100644 --- a/bedrock/urls.py +++ b/bedrock/urls/mozorg_mode.py @@ -30,7 +30,6 @@ urlpatterns = ( path("", include("bedrock.sitemaps.urls")), path("careers/", include("bedrock.careers.urls")), path("exp/", include("bedrock.exp.urls")), - path("external/", include("bedrock.externalpages.urls")), path("healthz/", watchman_views.ping, name="watchman.ping"), path("readiness/", watchman_views.status, name="watchman.status"), path("healthz-cron/", base_views.cron_health_check), diff --git a/bedrock/urls/pocket_mode.py b/bedrock/urls/pocket_mode.py new file mode 100644 index 0000000000..7bef679a9a --- /dev/null +++ b/bedrock/urls/pocket_mode.py @@ -0,0 +1,31 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +from django.conf import settings +from django.urls import include, path +from django.utils.module_loading import import_string + +from watchman import views as watchman_views + +from bedrock.base import views as base_views + +# The default django 404 and 500 handler doesn't run the ContextProcessors, +# which breaks the base template page. So we replace them with views that do! +handler500 = "bedrock.base.views.server_error_view" +handler404 = "bedrock.base.views.page_not_found_view" + + +urlpatterns = ( + path("", include("bedrock.pocket.urls")), + path("healthz/", watchman_views.ping, name="watchman.ping"), + path("readiness/", watchman_views.status, name="watchman.status"), + path("healthz-cron/", base_views.cron_health_check), +) + +if settings.DEBUG: + + urlpatterns += ( + path("404/", import_string(handler404)), + path("500/", import_string(handler500)), + ) diff --git a/docker-compose.yml b/docker-compose.yml index 9db8eeb0b1..18ab667218 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,6 +30,9 @@ services: platform: linux/amd64 command: python manage.py runserver 0.0.0.0:8080 env_file: .env + environment: + SITE_MODE: "${SITE_MODE:-Mozorg}" + ports: - "8080:8080" volumes: @@ -85,6 +88,7 @@ services: env_file: .env environment: RUN_SUPERVISOR: "true" + SITE_MODE: "${SITE_MODE:-Mozorg}" ports: - "8000:8000" volumes: diff --git a/docs/install.rst b/docs/install.rst index 6e42499bd5..b91b7cc36f 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -336,6 +336,22 @@ image first: $ make build-prod run-prod + +Pocket Mode +----------- + +By default, Bedrock will serve the content of ``www.mozilla.org``. However, it is also possible to +make Bedrock serve the content pages for Pocket (``getpocket.com``). This is done, ultimately, by +setting a ``SITE_MODE`` env var to the value of ``Pocket``. + +For local development, setting this env var is already supported in the standard ways to run the site: + +* Docker: ``make run-pocket`` and ``make run-pocket prod`` +* Node/webpack and Django runserver: ``npm run in-pocket-mode`` +* ``SITE_MODE=Pocket ./manage.py runserver`` for plain ol' Django runserver, in Pocket mode + +For demos on servers, remember to set the SITE_MODE env var to be the value you need (``Pocket`` or ``Mozorg`` – or nothing, which is the same as setting ``Mozorg``) + Documentation ------------- diff --git a/media/css/externalpages/pocket/components/about.scss b/media/css/pocket/components/about.scss similarity index 99% rename from media/css/externalpages/pocket/components/about.scss rename to media/css/pocket/components/about.scss index 07c75760a3..c9c8e2981e 100644 --- a/media/css/externalpages/pocket/components/about.scss +++ b/media/css/pocket/components/about.scss @@ -6,7 +6,7 @@ @import '../includes/nav'; @import '../includes/footer'; -$image-path: '/media/img/externalpages/pocket'; +$image-path: '/media/img/pocket'; .intro-wrapper { background-color: #95d5d2; diff --git a/media/css/externalpages/pocket/components/add.scss b/media/css/pocket/components/add.scss similarity index 98% rename from media/css/externalpages/pocket/components/add.scss rename to media/css/pocket/components/add.scss index 77407313e8..e03fe09634 100644 --- a/media/css/externalpages/pocket/components/add.scss +++ b/media/css/pocket/components/add.scss @@ -6,7 +6,7 @@ @import '../includes/platform-nav'; @import '../includes/platform-footer'; -$image-path: '/media/img/externalpages/pocket'; +$image-path: '/media/img/pocket'; @import '~@mozilla-protocol/core/protocol/css/includes/lib'; @import '~@mozilla-protocol/core/protocol/css/components/button'; diff --git a/media/css/externalpages/pocket/components/contact-info.scss b/media/css/pocket/components/contact-info.scss similarity index 100% rename from media/css/externalpages/pocket/components/contact-info.scss rename to media/css/pocket/components/contact-info.scss diff --git a/media/css/externalpages/pocket/components/jobs.scss b/media/css/pocket/components/jobs.scss similarity index 100% rename from media/css/externalpages/pocket/components/jobs.scss rename to media/css/pocket/components/jobs.scss diff --git a/media/css/externalpages/pocket/components/new-tab-learn-more.scss b/media/css/pocket/components/new-tab-learn-more.scss similarity index 98% rename from media/css/externalpages/pocket/components/new-tab-learn-more.scss rename to media/css/pocket/components/new-tab-learn-more.scss index 09f120e96d..8fbc8faf0a 100644 --- a/media/css/externalpages/pocket/components/new-tab-learn-more.scss +++ b/media/css/pocket/components/new-tab-learn-more.scss @@ -116,7 +116,7 @@ $image-path: '/media/protocol/img'; .pocket-logo-inline { @include image-replaced; - background: url('/media/img/externalpages/pocket/new-tab/pocket-logo-inline.svg') no-repeat; + background: url('/media/img/pocket/new-tab/pocket-logo-inline.svg') no-repeat; display: inline-block; height: 20px; vertical-align: middle; diff --git a/media/css/externalpages/pocket/components/platforms.scss b/media/css/pocket/components/platforms.scss similarity index 96% rename from media/css/externalpages/pocket/components/platforms.scss rename to media/css/pocket/components/platforms.scss index bf6593d3f3..9314a9b20c 100644 --- a/media/css/externalpages/pocket/components/platforms.scss +++ b/media/css/pocket/components/platforms.scss @@ -6,7 +6,7 @@ @import '../includes/platform-footer'; @import '../includes/platform-nav'; -$image-path: '/media/img/externalpages/pocket'; +$image-path: '/media/img/pocket'; @import '~@mozilla-protocol/core/protocol/css/includes/lib'; @import '~@mozilla-protocol/core/protocol/css/components/button'; diff --git a/media/css/externalpages/pocket/components/pocket-features.scss b/media/css/pocket/components/pocket-features.scss similarity index 93% rename from media/css/externalpages/pocket/components/pocket-features.scss rename to media/css/pocket/components/pocket-features.scss index 4bc3bb76d2..890bc6b5e1 100644 --- a/media/css/externalpages/pocket/components/pocket-features.scss +++ b/media/css/pocket/components/pocket-features.scss @@ -20,7 +20,7 @@ $image-path: '/media/protocol/img'; .pocket-logo-inline { @include image-replaced; - background: url('/media/img/externalpages/pocket/new-tab/pocket-logo-inline.svg') no-repeat; + background: url('/media/img/pocket/new-tab/pocket-logo-inline.svg') no-repeat; display: inline-block; height: 20px; vertical-align: middle; @@ -167,7 +167,7 @@ $image-path: '/media/protocol/img'; .explore-stories { @media #{$mq-xl} { - background: no-repeat url('/media/img/externalpages/pocket/articles-grid-right.png') right, url('/media/img/externalpages/pocket/articles-grid-left.png') left, linear-gradient(180deg, hsla(0deg, 0%, 90.2%, 0.3), hsla(0deg, 0%, 90.2%, 0) 17%), linear-gradient(0deg, hsla(0deg, 0%, 90.2%, 0.3), hsla(0deg, 0%, 90.2%, 0) 17%); + background: no-repeat url('/media/img/pocket/articles-grid-right.png') right, url('/media/img/pocket/articles-grid-left.png') left, linear-gradient(180deg, hsla(0deg, 0%, 90.2%, 0.3), hsla(0deg, 0%, 90.2%, 0) 17%), linear-gradient(0deg, hsla(0deg, 0%, 90.2%, 0.3), hsla(0deg, 0%, 90.2%, 0) 17%); background-size: contain; background-repeat: no-repeat; margin: $layout-lg; diff --git a/media/css/externalpages/pocket/components/privacy-tos.scss b/media/css/pocket/components/privacy-tos.scss similarity index 100% rename from media/css/externalpages/pocket/components/privacy-tos.scss rename to media/css/pocket/components/privacy-tos.scss diff --git a/media/css/externalpages/pocket/includes/_footer.scss b/media/css/pocket/includes/_footer.scss similarity index 95% rename from media/css/externalpages/pocket/includes/_footer.scss rename to media/css/pocket/includes/_footer.scss index 4d6e1337a6..264cc197f9 100644 --- a/media/css/externalpages/pocket/includes/_footer.scss +++ b/media/css/pocket/includes/_footer.scss @@ -7,7 +7,7 @@ @import '~@mozilla-protocol/core/protocol/css/includes/lib'; $image-path: '/media/protocol/img'; -$pocket-image-path: '/media/img/externalpages/pocket'; +$pocket-image-path: '/media/img/pocket'; .pocket-footer-container { border-top: 1px solid transparent; @@ -207,7 +207,7 @@ $pocket-image-path: '/media/img/externalpages/pocket'; width: 20px; &.twitter { - background-image: url('/media/img/externalpages/pocket/platform-footer/twitter-logo.svg'); + background-image: url('/media/img/pocket/platform-footer/twitter-logo.svg'); &:hover, &:focus, @@ -217,7 +217,7 @@ $pocket-image-path: '/media/img/externalpages/pocket'; } &.facebook { - background-image: url('/media/img/externalpages/pocket/platform-footer/facebook-logo.svg'); + background-image: url('/media/img/pocket/platform-footer/facebook-logo.svg'); &:hover, &:focus, diff --git a/media/css/externalpages/pocket/includes/_mobile-nav.scss b/media/css/pocket/includes/_mobile-nav.scss similarity index 99% rename from media/css/externalpages/pocket/includes/_mobile-nav.scss rename to media/css/pocket/includes/_mobile-nav.scss index b4416b2497..103c3690ac 100644 --- a/media/css/externalpages/pocket/includes/_mobile-nav.scss +++ b/media/css/pocket/includes/_mobile-nav.scss @@ -5,7 +5,7 @@ @import '~@mozilla-protocol/core/protocol/css/includes/lib'; @import '../utils/variables'; -$icon-path: '/media/img/externalpages/pocket/mobile-nav/'; +$icon-path: '/media/img/pocket/mobile-nav/'; // variables from pocket $easing-accelerate: cubic-bezier(0.4, 0, 1, 1); diff --git a/media/css/externalpages/pocket/includes/_nav.scss b/media/css/pocket/includes/_nav.scss similarity index 99% rename from media/css/externalpages/pocket/includes/_nav.scss rename to media/css/pocket/includes/_nav.scss index 412c05f39e..81c5fd4036 100644 --- a/media/css/externalpages/pocket/includes/_nav.scss +++ b/media/css/pocket/includes/_nav.scss @@ -5,7 +5,7 @@ @import '../utils/variables'; @import './mobile-nav'; -$image-path: '/media/img/externalpages/pocket'; +$image-path: '/media/img/pocket'; .pocket-header { width: 100%; diff --git a/media/css/externalpages/pocket/includes/_platform-footer.scss b/media/css/pocket/includes/_platform-footer.scss similarity index 93% rename from media/css/externalpages/pocket/includes/_platform-footer.scss rename to media/css/pocket/includes/_platform-footer.scss index 9d2c2a3d22..3c339342a3 100644 --- a/media/css/externalpages/pocket/includes/_platform-footer.scss +++ b/media/css/pocket/includes/_platform-footer.scss @@ -93,7 +93,7 @@ $image-path: '/media/protocol/img'; width: 20px; &.twitter { - background-image: url('/media/img/externalpages/pocket/platform-footer/twitter-logo.svg'); + background-image: url('/media/img/pocket/platform-footer/twitter-logo.svg'); &:hover, &:focus, @@ -103,7 +103,7 @@ $image-path: '/media/protocol/img'; } &.facebook { - background-image: url('/media/img/externalpages/pocket/platform-footer/facebook-logo.svg'); + background-image: url('/media/img/pocket/platform-footer/facebook-logo.svg'); &:hover, &:focus, diff --git a/media/css/externalpages/pocket/includes/_platform-nav.scss b/media/css/pocket/includes/_platform-nav.scss similarity index 91% rename from media/css/externalpages/pocket/includes/_platform-nav.scss rename to media/css/pocket/includes/_platform-nav.scss index 042ecc90ae..736e3ea73b 100644 --- a/media/css/externalpages/pocket/includes/_platform-nav.scss +++ b/media/css/pocket/includes/_platform-nav.scss @@ -21,14 +21,14 @@ margin-left: 0; .pocket-logo-svg { - background-image: url('/media/img/externalpages/pocket/pocket-logo-grey.png'); + background-image: url('/media/img/pocket/pocket-logo-grey.png'); background-repeat: no-repeat; background-size: contain; height: 38px; width: 151px; @media #{$mq-md} { - background-image: url('/media/img/externalpages/pocket/pocket-logo-grey-high-res.png'); + background-image: url('/media/img/pocket/pocket-logo-grey-high-res.png'); height: 47px; width: 189px; } diff --git a/media/css/externalpages/pocket/includes/_pocket-premium.scss b/media/css/pocket/includes/_pocket-premium.scss similarity index 100% rename from media/css/externalpages/pocket/includes/_pocket-premium.scss rename to media/css/pocket/includes/_pocket-premium.scss diff --git a/media/css/externalpages/pocket/style.scss b/media/css/pocket/style.scss similarity index 100% rename from media/css/externalpages/pocket/style.scss rename to media/css/pocket/style.scss diff --git a/media/css/externalpages/pocket/utils/_fonts.scss b/media/css/pocket/utils/_fonts.scss similarity index 100% rename from media/css/externalpages/pocket/utils/_fonts.scss rename to media/css/pocket/utils/_fonts.scss diff --git a/media/css/externalpages/pocket/utils/_tokens.scss b/media/css/pocket/utils/_tokens.scss similarity index 100% rename from media/css/externalpages/pocket/utils/_tokens.scss rename to media/css/pocket/utils/_tokens.scss diff --git a/media/css/externalpages/pocket/utils/_variables.scss b/media/css/pocket/utils/_variables.scss similarity index 100% rename from media/css/externalpages/pocket/utils/_variables.scss rename to media/css/pocket/utils/_variables.scss diff --git a/media/img/externalpages/pocket/add-any-device.jpg b/media/img/pocket/add-any-device.jpg similarity index 100% rename from media/img/externalpages/pocket/add-any-device.jpg rename to media/img/pocket/add-any-device.jpg diff --git a/media/img/externalpages/pocket/add-pocket-header.jpg b/media/img/pocket/add-pocket-header.jpg similarity index 100% rename from media/img/externalpages/pocket/add-pocket-header.jpg rename to media/img/pocket/add-pocket-header.jpg diff --git a/media/img/externalpages/pocket/app-button-amazon.png b/media/img/pocket/app-button-amazon.png similarity index 100% rename from media/img/externalpages/pocket/app-button-amazon.png rename to media/img/pocket/app-button-amazon.png diff --git a/media/img/externalpages/pocket/app-button-apple.png b/media/img/pocket/app-button-apple.png similarity index 100% rename from media/img/externalpages/pocket/app-button-apple.png rename to media/img/pocket/app-button-apple.png diff --git a/media/img/externalpages/pocket/app-button-google.png b/media/img/pocket/app-button-google.png similarity index 100% rename from media/img/externalpages/pocket/app-button-google.png rename to media/img/pocket/app-button-google.png diff --git a/media/img/externalpages/pocket/app-button-mac.png b/media/img/pocket/app-button-mac.png similarity index 100% rename from media/img/externalpages/pocket/app-button-mac.png rename to media/img/pocket/app-button-mac.png diff --git a/media/img/externalpages/pocket/apple-app-store-badge.svg b/media/img/pocket/apple-app-store-badge.svg similarity index 100% rename from media/img/externalpages/pocket/apple-app-store-badge.svg rename to media/img/pocket/apple-app-store-badge.svg diff --git a/media/img/externalpages/pocket/apple-mac-store-badge.svg b/media/img/pocket/apple-mac-store-badge.svg similarity index 100% rename from media/img/externalpages/pocket/apple-mac-store-badge.svg rename to media/img/pocket/apple-mac-store-badge.svg diff --git a/media/img/externalpages/pocket/articles-grid-left.png b/media/img/pocket/articles-grid-left.png similarity index 100% rename from media/img/externalpages/pocket/articles-grid-left.png rename to media/img/pocket/articles-grid-left.png diff --git a/media/img/externalpages/pocket/articles-grid-right.png b/media/img/pocket/articles-grid-right.png similarity index 100% rename from media/img/externalpages/pocket/articles-grid-right.png rename to media/img/pocket/articles-grid-right.png diff --git a/media/img/externalpages/pocket/colorful-diamond.gif b/media/img/pocket/colorful-diamond.gif similarity index 100% rename from media/img/externalpages/pocket/colorful-diamond.gif rename to media/img/pocket/colorful-diamond.gif diff --git a/media/img/externalpages/pocket/facebook-logo.svg b/media/img/pocket/facebook-logo.svg similarity index 100% rename from media/img/externalpages/pocket/facebook-logo.svg rename to media/img/pocket/facebook-logo.svg diff --git a/media/img/externalpages/pocket/floating-content-lg-dark-mode.svg b/media/img/pocket/floating-content-lg-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/floating-content-lg-dark-mode.svg rename to media/img/pocket/floating-content-lg-dark-mode.svg diff --git a/media/img/externalpages/pocket/floating-content-lg.svg b/media/img/pocket/floating-content-lg.svg similarity index 100% rename from media/img/externalpages/pocket/floating-content-lg.svg rename to media/img/pocket/floating-content-lg.svg diff --git a/media/img/externalpages/pocket/floating-content-md-dark-mode.svg b/media/img/pocket/floating-content-md-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/floating-content-md-dark-mode.svg rename to media/img/pocket/floating-content-md-dark-mode.svg diff --git a/media/img/externalpages/pocket/floating-content-md.svg b/media/img/pocket/floating-content-md.svg similarity index 100% rename from media/img/externalpages/pocket/floating-content-md.svg rename to media/img/pocket/floating-content-md.svg diff --git a/media/img/externalpages/pocket/focused-reading.png b/media/img/pocket/focused-reading.png similarity index 100% rename from media/img/externalpages/pocket/focused-reading.png rename to media/img/pocket/focused-reading.png diff --git a/media/img/externalpages/pocket/footer-border.svg b/media/img/pocket/footer-border.svg similarity index 100% rename from media/img/externalpages/pocket/footer-border.svg rename to media/img/pocket/footer-border.svg diff --git a/media/img/externalpages/pocket/google-play-badge.png b/media/img/pocket/google-play-badge.png similarity index 100% rename from media/img/externalpages/pocket/google-play-badge.png rename to media/img/pocket/google-play-badge.png diff --git a/media/img/externalpages/pocket/jobs/jobs-chat-high-res.jpg b/media/img/pocket/jobs/jobs-chat-high-res.jpg similarity index 100% rename from media/img/externalpages/pocket/jobs/jobs-chat-high-res.jpg rename to media/img/pocket/jobs/jobs-chat-high-res.jpg diff --git a/media/img/externalpages/pocket/jobs/jobs-chat.jpg b/media/img/pocket/jobs/jobs-chat.jpg similarity index 100% rename from media/img/externalpages/pocket/jobs/jobs-chat.jpg rename to media/img/pocket/jobs/jobs-chat.jpg diff --git a/media/img/externalpages/pocket/jobs/jobs-planning-high-res.jpg b/media/img/pocket/jobs/jobs-planning-high-res.jpg similarity index 100% rename from media/img/externalpages/pocket/jobs/jobs-planning-high-res.jpg rename to media/img/pocket/jobs/jobs-planning-high-res.jpg diff --git a/media/img/externalpages/pocket/jobs/jobs-planning.jpg b/media/img/pocket/jobs/jobs-planning.jpg similarity index 100% rename from media/img/externalpages/pocket/jobs/jobs-planning.jpg rename to media/img/pocket/jobs/jobs-planning.jpg diff --git a/media/img/externalpages/pocket/jobs/jobs-team-high-res.jpg b/media/img/pocket/jobs/jobs-team-high-res.jpg similarity index 100% rename from media/img/externalpages/pocket/jobs/jobs-team-high-res.jpg rename to media/img/pocket/jobs/jobs-team-high-res.jpg diff --git a/media/img/externalpages/pocket/jobs/jobs-team.jpg b/media/img/pocket/jobs/jobs-team.jpg similarity index 100% rename from media/img/externalpages/pocket/jobs/jobs-team.jpg rename to media/img/pocket/jobs/jobs-team.jpg diff --git a/media/img/externalpages/pocket/mobile-nav/archive-icon-active.svg b/media/img/pocket/mobile-nav/archive-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/archive-icon-active.svg rename to media/img/pocket/mobile-nav/archive-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/archive-icon.svg b/media/img/pocket/mobile-nav/archive-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/archive-icon.svg rename to media/img/pocket/mobile-nav/archive-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/articles-icon-active.svg b/media/img/pocket/mobile-nav/articles-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/articles-icon-active.svg rename to media/img/pocket/mobile-nav/articles-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/articles-icon.svg b/media/img/pocket/mobile-nav/articles-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/articles-icon.svg rename to media/img/pocket/mobile-nav/articles-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/back-btn.svg b/media/img/pocket/mobile-nav/back-btn.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/back-btn.svg rename to media/img/pocket/mobile-nav/back-btn.svg diff --git a/media/img/externalpages/pocket/mobile-nav/collections-icon-active.svg b/media/img/pocket/mobile-nav/collections-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/collections-icon-active.svg rename to media/img/pocket/mobile-nav/collections-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/collections-icon.svg b/media/img/pocket/mobile-nav/collections-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/collections-icon.svg rename to media/img/pocket/mobile-nav/collections-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/discover-icon-active.svg b/media/img/pocket/mobile-nav/discover-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/discover-icon-active.svg rename to media/img/pocket/mobile-nav/discover-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/discover-icon.svg b/media/img/pocket/mobile-nav/discover-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/discover-icon.svg rename to media/img/pocket/mobile-nav/discover-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/favorites-icon-active.svg b/media/img/pocket/mobile-nav/favorites-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/favorites-icon-active.svg rename to media/img/pocket/mobile-nav/favorites-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/favorites-icon.svg b/media/img/pocket/mobile-nav/favorites-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/favorites-icon.svg rename to media/img/pocket/mobile-nav/favorites-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/highlights-icon-active.svg b/media/img/pocket/mobile-nav/highlights-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/highlights-icon-active.svg rename to media/img/pocket/mobile-nav/highlights-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/highlights-icon.svg b/media/img/pocket/mobile-nav/highlights-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/highlights-icon.svg rename to media/img/pocket/mobile-nav/highlights-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/home-icon-active.svg b/media/img/pocket/mobile-nav/home-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/home-icon-active.svg rename to media/img/pocket/mobile-nav/home-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/home-icon.svg b/media/img/pocket/mobile-nav/home-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/home-icon.svg rename to media/img/pocket/mobile-nav/home-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/my-list-icon-active.svg b/media/img/pocket/mobile-nav/my-list-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/my-list-icon-active.svg rename to media/img/pocket/mobile-nav/my-list-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/my-list-icon.svg b/media/img/pocket/mobile-nav/my-list-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/my-list-icon.svg rename to media/img/pocket/mobile-nav/my-list-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/tags-icon-active.svg b/media/img/pocket/mobile-nav/tags-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/tags-icon-active.svg rename to media/img/pocket/mobile-nav/tags-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/tags-icon.svg b/media/img/pocket/mobile-nav/tags-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/tags-icon.svg rename to media/img/pocket/mobile-nav/tags-icon.svg diff --git a/media/img/externalpages/pocket/mobile-nav/videos-icon-active.svg b/media/img/pocket/mobile-nav/videos-icon-active.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/videos-icon-active.svg rename to media/img/pocket/mobile-nav/videos-icon-active.svg diff --git a/media/img/externalpages/pocket/mobile-nav/videos-icon.svg b/media/img/pocket/mobile-nav/videos-icon.svg similarity index 100% rename from media/img/externalpages/pocket/mobile-nav/videos-icon.svg rename to media/img/pocket/mobile-nav/videos-icon.svg diff --git a/media/img/externalpages/pocket/new-tab/books.svg b/media/img/pocket/new-tab/books.svg similarity index 100% rename from media/img/externalpages/pocket/new-tab/books.svg rename to media/img/pocket/new-tab/books.svg diff --git a/media/img/externalpages/pocket/new-tab/fortress.svg b/media/img/pocket/new-tab/fortress.svg similarity index 100% rename from media/img/externalpages/pocket/new-tab/fortress.svg rename to media/img/pocket/new-tab/fortress.svg diff --git a/media/img/externalpages/pocket/new-tab/grass-footer-left.png b/media/img/pocket/new-tab/grass-footer-left.png similarity index 100% rename from media/img/externalpages/pocket/new-tab/grass-footer-left.png rename to media/img/pocket/new-tab/grass-footer-left.png diff --git a/media/img/externalpages/pocket/new-tab/grass-footer-right.png b/media/img/pocket/new-tab/grass-footer-right.png similarity index 100% rename from media/img/externalpages/pocket/new-tab/grass-footer-right.png rename to media/img/pocket/new-tab/grass-footer-right.png diff --git a/media/img/externalpages/pocket/new-tab/hidden-gem.svg b/media/img/pocket/new-tab/hidden-gem.svg similarity index 100% rename from media/img/externalpages/pocket/new-tab/hidden-gem.svg rename to media/img/pocket/new-tab/hidden-gem.svg diff --git a/media/img/externalpages/pocket/new-tab/lounge.svg b/media/img/pocket/new-tab/lounge.svg similarity index 100% rename from media/img/externalpages/pocket/new-tab/lounge.svg rename to media/img/pocket/new-tab/lounge.svg diff --git a/media/img/externalpages/pocket/new-tab/pocket-list.png b/media/img/pocket/new-tab/pocket-list.png similarity index 100% rename from media/img/externalpages/pocket/new-tab/pocket-list.png rename to media/img/pocket/new-tab/pocket-list.png diff --git a/media/img/externalpages/pocket/new-tab/pocket-logo-inline.svg b/media/img/pocket/new-tab/pocket-logo-inline.svg similarity index 100% rename from media/img/externalpages/pocket/new-tab/pocket-logo-inline.svg rename to media/img/pocket/new-tab/pocket-logo-inline.svg diff --git a/media/img/externalpages/pocket/new-tab/sign.svg b/media/img/pocket/new-tab/sign.svg similarity index 100% rename from media/img/externalpages/pocket/new-tab/sign.svg rename to media/img/pocket/new-tab/sign.svg diff --git a/media/img/externalpages/pocket/people-enjoying-content-lg.svg b/media/img/pocket/people-enjoying-content-lg.svg similarity index 100% rename from media/img/externalpages/pocket/people-enjoying-content-lg.svg rename to media/img/pocket/people-enjoying-content-lg.svg diff --git a/media/img/externalpages/pocket/people-enjoying-content-md.svg b/media/img/pocket/people-enjoying-content-md.svg similarity index 100% rename from media/img/externalpages/pocket/people-enjoying-content-md.svg rename to media/img/pocket/people-enjoying-content-md.svg diff --git a/media/img/externalpages/pocket/platform-footer/facebook-logo.svg b/media/img/pocket/platform-footer/facebook-logo.svg similarity index 100% rename from media/img/externalpages/pocket/platform-footer/facebook-logo.svg rename to media/img/pocket/platform-footer/facebook-logo.svg diff --git a/media/img/externalpages/pocket/platform-footer/twitter-logo.svg b/media/img/pocket/platform-footer/twitter-logo.svg similarity index 100% rename from media/img/externalpages/pocket/platform-footer/twitter-logo.svg rename to media/img/pocket/platform-footer/twitter-logo.svg diff --git a/media/img/externalpages/pocket/pocket-feedly.svg b/media/img/pocket/pocket-feedly.svg similarity index 100% rename from media/img/externalpages/pocket/pocket-feedly.svg rename to media/img/pocket/pocket-feedly.svg diff --git a/media/img/externalpages/pocket/pocket-flipboard.svg b/media/img/pocket/pocket-flipboard.svg similarity index 100% rename from media/img/externalpages/pocket/pocket-flipboard.svg rename to media/img/pocket/pocket-flipboard.svg diff --git a/media/img/externalpages/pocket/pocket-logo-dark-mode.svg b/media/img/pocket/pocket-logo-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/pocket-logo-dark-mode.svg rename to media/img/pocket/pocket-logo-dark-mode.svg diff --git a/media/img/externalpages/pocket/pocket-logo-grey-high-res.png b/media/img/pocket/pocket-logo-grey-high-res.png similarity index 100% rename from media/img/externalpages/pocket/pocket-logo-grey-high-res.png rename to media/img/pocket/pocket-logo-grey-high-res.png diff --git a/media/img/externalpages/pocket/pocket-logo-grey.png b/media/img/pocket/pocket-logo-grey.png similarity index 100% rename from media/img/externalpages/pocket/pocket-logo-grey.png rename to media/img/pocket/pocket-logo-grey.png diff --git a/media/img/externalpages/pocket/pocket-logo-light-mode.svg b/media/img/pocket/pocket-logo-light-mode.svg similarity index 100% rename from media/img/externalpages/pocket/pocket-logo-light-mode.svg rename to media/img/pocket/pocket-logo-light-mode.svg diff --git a/media/img/externalpages/pocket/pocket-logo-mark.svg b/media/img/pocket/pocket-logo-mark.svg similarity index 100% rename from media/img/externalpages/pocket/pocket-logo-mark.svg rename to media/img/pocket/pocket-logo-mark.svg diff --git a/media/img/externalpages/pocket/pocket-tweetbot.svg b/media/img/pocket/pocket-tweetbot.svg similarity index 100% rename from media/img/externalpages/pocket/pocket-tweetbot.svg rename to media/img/pocket/pocket-tweetbot.svg diff --git a/media/img/externalpages/pocket/pocket-twitter.svg b/media/img/pocket/pocket-twitter.svg similarity index 100% rename from media/img/externalpages/pocket/pocket-twitter.svg rename to media/img/pocket/pocket-twitter.svg diff --git a/media/img/externalpages/pocket/rainbow-hand-gem-lg-dark-mode.svg b/media/img/pocket/rainbow-hand-gem-lg-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/rainbow-hand-gem-lg-dark-mode.svg rename to media/img/pocket/rainbow-hand-gem-lg-dark-mode.svg diff --git a/media/img/externalpages/pocket/rainbow-hand-gem-lg.svg b/media/img/pocket/rainbow-hand-gem-lg.svg similarity index 100% rename from media/img/externalpages/pocket/rainbow-hand-gem-lg.svg rename to media/img/pocket/rainbow-hand-gem-lg.svg diff --git a/media/img/externalpages/pocket/rainbow-hand-gem-sm-dark-mode.svg b/media/img/pocket/rainbow-hand-gem-sm-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/rainbow-hand-gem-sm-dark-mode.svg rename to media/img/pocket/rainbow-hand-gem-sm-dark-mode.svg diff --git a/media/img/externalpages/pocket/rainbow-hand-gem-sm.svg b/media/img/pocket/rainbow-hand-gem-sm.svg similarity index 100% rename from media/img/externalpages/pocket/rainbow-hand-gem-sm.svg rename to media/img/pocket/rainbow-hand-gem-sm.svg diff --git a/media/img/externalpages/pocket/reading-nook.png b/media/img/pocket/reading-nook.png similarity index 100% rename from media/img/externalpages/pocket/reading-nook.png rename to media/img/pocket/reading-nook.png diff --git a/media/img/externalpages/pocket/save-button-doodle.svg b/media/img/pocket/save-button-doodle.svg similarity index 100% rename from media/img/externalpages/pocket/save-button-doodle.svg rename to media/img/pocket/save-button-doodle.svg diff --git a/media/img/externalpages/pocket/save-inspirations.png b/media/img/pocket/save-inspirations.png similarity index 100% rename from media/img/externalpages/pocket/save-inspirations.png rename to media/img/pocket/save-inspirations.png diff --git a/media/img/externalpages/pocket/save-via-email.png b/media/img/pocket/save-via-email.png similarity index 100% rename from media/img/externalpages/pocket/save-via-email.png rename to media/img/pocket/save-via-email.png diff --git a/media/img/externalpages/pocket/sunny-content-lg-dark-mode.svg b/media/img/pocket/sunny-content-lg-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/sunny-content-lg-dark-mode.svg rename to media/img/pocket/sunny-content-lg-dark-mode.svg diff --git a/media/img/externalpages/pocket/sunny-content-lg.svg b/media/img/pocket/sunny-content-lg.svg similarity index 100% rename from media/img/externalpages/pocket/sunny-content-lg.svg rename to media/img/pocket/sunny-content-lg.svg diff --git a/media/img/externalpages/pocket/sunny-content-md-dark-mode.svg b/media/img/pocket/sunny-content-md-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/sunny-content-md-dark-mode.svg rename to media/img/pocket/sunny-content-md-dark-mode.svg diff --git a/media/img/externalpages/pocket/sunny-content-md.svg b/media/img/pocket/sunny-content-md.svg similarity index 100% rename from media/img/externalpages/pocket/sunny-content-md.svg rename to media/img/pocket/sunny-content-md.svg diff --git a/media/img/externalpages/pocket/swirly-saving-lg-dark-mode.svg b/media/img/pocket/swirly-saving-lg-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-lg-dark-mode.svg rename to media/img/pocket/swirly-saving-lg-dark-mode.svg diff --git a/media/img/externalpages/pocket/swirly-saving-lg.svg b/media/img/pocket/swirly-saving-lg.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-lg.svg rename to media/img/pocket/swirly-saving-lg.svg diff --git a/media/img/externalpages/pocket/swirly-saving-md-dark-mode.svg b/media/img/pocket/swirly-saving-md-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-md-dark-mode.svg rename to media/img/pocket/swirly-saving-md-dark-mode.svg diff --git a/media/img/externalpages/pocket/swirly-saving-md.svg b/media/img/pocket/swirly-saving-md.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-md.svg rename to media/img/pocket/swirly-saving-md.svg diff --git a/media/img/externalpages/pocket/swirly-saving-sm-dark-mode.svg b/media/img/pocket/swirly-saving-sm-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-sm-dark-mode.svg rename to media/img/pocket/swirly-saving-sm-dark-mode.svg diff --git a/media/img/externalpages/pocket/swirly-saving-sm.svg b/media/img/pocket/swirly-saving-sm.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-sm.svg rename to media/img/pocket/swirly-saving-sm.svg diff --git a/media/img/externalpages/pocket/swirly-saving-xs-dark-mode.svg b/media/img/pocket/swirly-saving-xs-dark-mode.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-xs-dark-mode.svg rename to media/img/pocket/swirly-saving-xs-dark-mode.svg diff --git a/media/img/externalpages/pocket/swirly-saving-xs.svg b/media/img/pocket/swirly-saving-xs.svg similarity index 100% rename from media/img/externalpages/pocket/swirly-saving-xs.svg rename to media/img/pocket/swirly-saving-xs.svg diff --git a/media/img/externalpages/pocket/welcome-android.jpg b/media/img/pocket/welcome-android.jpg similarity index 100% rename from media/img/externalpages/pocket/welcome-android.jpg rename to media/img/pocket/welcome-android.jpg diff --git a/media/img/externalpages/pocket/welcome-bookmarklet.jpg b/media/img/pocket/welcome-bookmarklet.jpg similarity index 100% rename from media/img/externalpages/pocket/welcome-bookmarklet.jpg rename to media/img/pocket/welcome-bookmarklet.jpg diff --git a/media/img/externalpages/pocket/welcome-chrome.jpg b/media/img/pocket/welcome-chrome.jpg similarity index 100% rename from media/img/externalpages/pocket/welcome-chrome.jpg rename to media/img/pocket/welcome-chrome.jpg diff --git a/media/img/externalpages/pocket/welcome-edge.jpg b/media/img/pocket/welcome-edge.jpg similarity index 100% rename from media/img/externalpages/pocket/welcome-edge.jpg rename to media/img/pocket/welcome-edge.jpg diff --git a/media/img/externalpages/pocket/welcome-ios.jpg b/media/img/pocket/welcome-ios.jpg similarity index 100% rename from media/img/externalpages/pocket/welcome-ios.jpg rename to media/img/pocket/welcome-ios.jpg diff --git a/media/img/externalpages/pocket/welcome-opera.jpg b/media/img/pocket/welcome-opera.jpg similarity index 100% rename from media/img/externalpages/pocket/welcome-opera.jpg rename to media/img/pocket/welcome-opera.jpg diff --git a/media/img/externalpages/pocket/welcome-safari.jpg b/media/img/pocket/welcome-safari.jpg similarity index 100% rename from media/img/externalpages/pocket/welcome-safari.jpg rename to media/img/pocket/welcome-safari.jpg diff --git a/media/js/externalpages/pocket/base.js b/media/js/pocket/base.js similarity index 100% rename from media/js/externalpages/pocket/base.js rename to media/js/pocket/base.js diff --git a/media/js/externalpages/pocket/mobile-nav-init.es6.js b/media/js/pocket/mobile-nav-init.es6.js similarity index 100% rename from media/js/externalpages/pocket/mobile-nav-init.es6.js rename to media/js/pocket/mobile-nav-init.es6.js diff --git a/media/js/externalpages/pocket/mobile-nav.es6.js b/media/js/pocket/mobile-nav.es6.js similarity index 100% rename from media/js/externalpages/pocket/mobile-nav.es6.js rename to media/js/pocket/mobile-nav.es6.js diff --git a/media/js/externalpages/pocket/snowplow.es6.js b/media/js/pocket/snowplow.es6.js similarity index 100% rename from media/js/externalpages/pocket/snowplow.es6.js rename to media/js/pocket/snowplow.es6.js diff --git a/media/static-bundles.json b/media/static-bundles.json index 1a08d2f2f5..2a6f76bd85 100644 --- a/media/static-bundles.json +++ b/media/static-bundles.json @@ -1018,57 +1018,57 @@ }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/platforms.scss" + "css/pocket/style.scss", + "css/pocket/components/platforms.scss" ], "name": "pocket-platforms" }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/about.scss" + "css/pocket/style.scss", + "css/pocket/components/about.scss" ], "name": "pocket-about" }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/pocket-features.scss" + "css/pocket/style.scss", + "css/pocket/components/pocket-features.scss" ], "name": "pocket-features" }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/add.scss" + "css/pocket/style.scss", + "css/pocket/components/add.scss" ], "name": "pocket-add" }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/contact-info.scss" + "css/pocket/style.scss", + "css/pocket/components/contact-info.scss" ], "name": "pocket-contact-info" }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/new-tab-learn-more.scss" + "css/pocket/style.scss", + "css/pocket/components/new-tab-learn-more.scss" ], "name": "pocket-new-tab" }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/jobs.scss" + "css/pocket/style.scss", + "css/pocket/components/jobs.scss" ], "name": "pocket-jobs" }, { "files": [ - "css/externalpages/pocket/style.scss", - "css/externalpages/pocket/components/privacy-tos.scss" + "css/pocket/style.scss", + "css/pocket/components/privacy-tos.scss" ], "name": "pocket-privacy-tos" }, @@ -1590,16 +1590,16 @@ }, { "files": [ - "js/externalpages/pocket/mobile-nav.es6.js", - "js/externalpages/pocket/mobile-nav-init.es6.js" + "js/pocket/mobile-nav.es6.js", + "js/pocket/mobile-nav-init.es6.js" ], "name": "pocket-nav" }, { "files": [ - "js/externalpages/pocket/base.js", + "js/pocket/base.js", "js/base/mozilla-cookie-helper.js", - "js/externalpages/pocket/snowplow.es6.js" + "js/pocket/snowplow.es6.js" ], "name": "pocket-site" }, diff --git a/package.json b/package.json index 0f78fcad26..5586d5744d 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ }, "scripts": { "start": "concurrently --kill-others \"python manage.py runserver 0.0.0.0:8080\" \"npm run watch\"", + "in-pocket-mode": "SITE_MODE=Pocket npm start", "lint-js": "./node_modules/.bin/eslint \"media/js/**/*.js\" \"tests/unit/spec/**/*.js\" webpack.config.js webpack.static.config.js", "lint-css": "./node_modules/.bin/stylelint \"media/css/**/*.{css,scss}\"", "lint-json": "./node_modules/.bin/eslint \"bedrock/base/templates/includes/structured-data/**/*.json\"", diff --git a/tests/pages/externalpages/pocket/__init__.py b/tests/functional/pocket/__init__.py similarity index 100% rename from tests/pages/externalpages/pocket/__init__.py rename to tests/functional/pocket/__init__.py diff --git a/tests/functional/externalpages/pocket/test_navigation.py b/tests/functional/pocket/test_navigation.py similarity index 81% rename from tests/functional/externalpages/pocket/test_navigation.py rename to tests/functional/pocket/test_navigation.py index 4ad167ba57..ec12a965ac 100644 --- a/tests/functional/externalpages/pocket/test_navigation.py +++ b/tests/functional/pocket/test_navigation.py @@ -5,9 +5,10 @@ import pytest from selenium.webdriver.common.by import By -from pages.externalpages.pocket.about import AboutPage +from pages.pocket.about import AboutPage +@pytest.mark.skip(reason="Disabled until we have a Pocket-mode server to test against - see #11509") @pytest.mark.nondestructive def test_mobile_menu(base_url, selenium_mobile): page = AboutPage(selenium_mobile, base_url).open() @@ -22,6 +23,7 @@ def test_mobile_menu(base_url, selenium_mobile): assert not page.navigation.is_mobile_menu_my_list_link_displayed +@pytest.mark.skip(reason="Disabled until we have a Pocket-mode server to test against - see #11509") def test_accessible_mobile_menu_open_name(base_url, selenium_mobile): page = AboutPage(selenium_mobile, base_url).open() button_label_reference = page.navigation.mobile_menu_open_button.get_attribute("aria-labelledby") @@ -29,6 +31,7 @@ def test_accessible_mobile_menu_open_name(base_url, selenium_mobile): assert len(string) > 0 +@pytest.mark.skip(reason="Disabled until we have a Pocket-mode server to test against - see #11509") def test_accessible_mobile_menu_close_name(base_url, selenium_mobile): page = AboutPage(selenium_mobile, base_url).open() page.navigation.open_mobile_menu() diff --git a/tests/pages/pocket/__init__.py b/tests/pages/pocket/__init__.py new file mode 100644 index 0000000000..448bb8652d --- /dev/null +++ b/tests/pages/pocket/__init__.py @@ -0,0 +1,3 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. diff --git a/tests/pages/externalpages/pocket/about.py b/tests/pages/pocket/about.py similarity index 68% rename from tests/pages/externalpages/pocket/about.py rename to tests/pages/pocket/about.py index 829cebc450..6c3c82ab09 100644 --- a/tests/pages/externalpages/pocket/about.py +++ b/tests/pages/pocket/about.py @@ -2,9 +2,9 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -from pages.externalpages.pocket.base import BasePage +from pages.pocket.base import BasePage class AboutPage(BasePage): - _URL_TEMPLATE = "/{locale}/external/pocket/about/" + _URL_TEMPLATE = "/{locale}/about/" diff --git a/tests/pages/externalpages/pocket/base.py b/tests/pages/pocket/base.py similarity index 100% rename from tests/pages/externalpages/pocket/base.py rename to tests/pages/pocket/base.py diff --git a/tests/unit/karma.conf.js b/tests/unit/karma.conf.js index c5cdb0ddd3..ad884c033f 100644 --- a/tests/unit/karma.conf.js +++ b/tests/unit/karma.conf.js @@ -20,7 +20,7 @@ module.exports = function (config) { 'media/js/base/mozilla-utils.js', 'media/js/base/mozilla-client.js', 'media/js/base/search-params.js', - 'media/js/externalpages/pocket/base.js', + 'media/js/pocket/base.js', 'media/js/base/mozilla-cookie-helper.js', // end common dependencies. 'media/js/base/banners/mozilla-banner.js', @@ -37,7 +37,7 @@ module.exports = function (config) { 'media/js/base/stub-attribution.js', 'media/js/firefox/all/all-downloads-unified.js', 'media/js/firefox/new/common/thanks.js', - 'media/js/externalpages/pocket/mobile-nav.es6.js', + 'media/js/pocket/mobile-nav.es6.js', 'media/js/products/vpn/affiliate-attribution.es6.js', 'tests/unit/spec/base/core-datalayer-page-id.js', 'tests/unit/spec/base/core-datalayer.js', @@ -64,7 +64,7 @@ module.exports = function (config) { 'tests/unit/spec/careers/params.js', 'tests/unit/spec/firefox/all/all-downloads-unified.js', 'tests/unit/spec/firefox/new/common/thanks.js', - 'tests/unit/spec/externalpages/pocket/mobile-nav.js', + 'tests/unit/spec/pocket/mobile-nav.js', 'tests/unit/spec/products/vpn/affiliate-attribution.js', { pattern: 'node_modules/sinon/pkg/sinon.js', diff --git a/tests/unit/spec/externalpages/pocket/mobile-nav.js b/tests/unit/spec/pocket/mobile-nav.js similarity index 98% rename from tests/unit/spec/externalpages/pocket/mobile-nav.js rename to tests/unit/spec/pocket/mobile-nav.js index 26f42be1d4..e48bc0b3ea 100644 --- a/tests/unit/spec/externalpages/pocket/mobile-nav.js +++ b/tests/unit/spec/pocket/mobile-nav.js @@ -4,7 +4,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import init from '../../../../../media/js/externalpages/pocket/mobile-nav.es6'; +import init from '../../../../media/js/pocket/mobile-nav.es6'; describe('mobile-nav.js', () => { const mobileNav = `