* Added maintenance url when debug is enabled; Added .js file to maintenance page; updated maintenance header & links

* Ditched static .js file; only changed header links; updated TemplateView template

* Update localized links
This commit is contained in:
Kalob Taulien 2020-10-27 11:30:35 -06:00 коммит произвёл GitHub
Родитель f4196ff216
Коммит 366257f23e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 319 добавлений и 155 удалений

Просмотреть файл

@ -1,155 +1,156 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/css/main.css">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="static/images/apple-touch-icon-180x180@2x.png">
<link rel="icon" type="image/png" sizes="196x196" href="static/images/favicon-196x196@2x.png">
<link rel="shortcut icon" href="static/images/favicon.ico">
<title>Mozilla Foundation - </title>
</head>
<body id="view-404">
<div class="takeover"></div>
<div class="wrapper">
<div class="sticky-top">
<div class="wrapper-join-us">
<div class="container">
<div class="join-us" id="join-us"></div>
</div>
</div>
<div id="primary-nav-container">
<div class="wrapper-burger">
<div class="menu-container">
<div class="narrow-screen-menu hidden d-md-none">
<div class="narrow-screen-menu-background">
<div class="narrow-screen-menu-container">
<nav class="container">
<div class="row">
<div class="col">
<div class="nav-links pt-3">
<div><a class="" href="https://foundation.mozilla.org/">Home</a></div>
<div><a class="" href="https://foundation.mozilla.org/initiatives/">Initiatives</a></div>
<div><a class="" href="https://foundation.mozilla.org/participate/">Participate</a></div>
<div><a class="" href="https://foundation.mozilla.org/internet-health/">Internet&nbsp;Health</a></div>
<div><a class="" href="https://foundation.mozilla.org/about/">About&nbsp;Us</a></div>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
<nav class="container">
<div class="row">
<div class="col">
<div class="d-flex flex-row justify-content-between">
<div id="primary-nav-links">
<div class="d-flex align-items-center flex-wrap">
<button class="burger hidden-md-up">
<div class="burger-bar burger-bar-top"></div>
<div class="burger-bar burger-bar-middle"></div>
<div class="burger-bar burger-bar-bottom"></div>
</button>
<a class="logo text-hide" href="https://foundation.mozilla.org/">Mozilla Foundation</a>
<div class="wide-screen-menu">
<div class="nav-links hidden-sm-down">
<a class="" href="https://foundation.mozilla.org/initiatives/">Initiatives</a>
<a class="" href="https://foundation.mozilla.org/participate/">Participate</a>
<a class="" href="https://foundation.mozilla.org/internet-health/">Internet&nbsp;Health</a>
<a class="" href="https://foundation.mozilla.org/about/">About&nbsp;Us</a>
</div>
</div>
</div>
</div>
<div class="donate-btn-wrapper">
<a id="donate-header-btn" class="btn btn-pop"
href="https://donate.mozilla.org/"
target="_blank" rel="noopener noreferrer">Donate</a>
</div>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row py-md-5 d-flex align-items-center">
<div class="col-md-5 offset-md-1 py-5">
<div class="mb-4">
<h2 class="h3-header">We Are Undergoing Maintenance</h1>
</div>
<p class="h5-black">Sorry, we're currently undergoing maintenance. You may view the current status of the
website <a href="http://status.mozillafoundation.org/2833570">on our public status page</a></p>
</div>
</div>
</div>
<div class="donate-banner dark-theme py-5">
<div class="container">
<div class="row">
<div class="col-12">
<h3 class="h3-heading mb-0">We all love the Web. Join Mozilla in defending it.</h3>
<h4 class="h3-heading mb-4">Lets protect the worlds largest resource for future generations.</h4>
<div>
<a href="https://donate.mozilla.org/" target="_blank" rel="noopener noreferrer" c class="btn btn-secondary dark-theme">Donate now</a>
</div>
</div>
</div>
</div>
</div>
<footer class="site-footer dark-theme py-5">
<div class="container">
<div class="row">
<div class="col-md-5 col-lg-6 d-flex flex-column justify-content-between">
<a class="logo" href="https://mozilla.org"><img src="static/images/mozilla-block-white.svg" width="96"></a>
</div>
<div class="col-md-6 col-lg-5 offset-md-1 d-flex flex-column justify-content-between">
<div class="row">
<div class="col-lg-6 col-xl-5">
<h5 class="h5-heading">More about us</h5>
<ul class="d-flex">
<li class="mr-2"><a class="twitter-glyph small d-inline-block" href="https://twitter.com/mozilla"><span class="sr-only">Twitter</span></a></li>
<li class="mr-2"><a class="instagram-glyph small d-inline-block" href="https://www.instagram.com/mozilla/"><span class="sr-only">Instagram</span></a></li>
<li class="mr-2"><a class="github-glyph small d-inline-block" href="https://www.github.com/mozilla/foundation.mozilla.org/"><span class="sr-only">Github</span></a></li>
</ul>
</div>
<div class="col-lg-6 col-xl-7">
<ul class="link-list list-unstyled mb-0">
<li class="mb-2"><a id="donate-footer-btn" href="https://donate.mozilla.org/" target="_blank" rel="noopener noreferrer" class="dark-theme">Donate</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/privacy/websites/#cookies" class="dark-theme">Cookies</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/about/legal/terms/mozilla/" class="dark-theme">Legal</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/about/governance/policies/participation/" class="dark-theme">Participation Guidelines</a></li>
<li class="mb-2"><a href="https://foundation.mozilla.org/en/press-center/" class="dark-theme">Press Center</a></li>
<li class="mb-2"><a href="https://mozilla.org/en-US/privacy/websites/" class="dark-theme">Privacy</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-12">
<hr class="mt-5 mb-3" />
<p class="dark-theme body-small mb-0">Mozilla is a global non-profit dedicated to putting you in control of your online experience and shaping the future of the web for the public good. Visit us at <a href="https://foundation.mozilla.org">foundation.mozilla.org</a>. Most content available under a <a href="https://foundation.mozilla.org/about/website-licensing/">Creative Commons license</a>.</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,300,700,300i,800,900">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Zilla+Slab:300,400,600,700,300i">
<link rel="stylesheet" href="static/css/main.css">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="static/images/apple-touch-icon-180x180@2x.png">
<link rel="icon" type="image/png" sizes="196x196" href="static/images/favicon-196x196@2x.png">
<link rel="shortcut icon" href="static/images/favicon.ico">
<title>Mozilla Foundation - Under Maintenance</title>
</head>
<body id="view-404">
<div class="takeover"></div>
<div class="wrapper">
<div class="sticky-top">
<div class="wrapper-join-us">
<div class="container">
<div class="join-us" id="join-us"></div>
</div>
</div>
<div id="primary-nav-container">
<div class="wrapper-burger">
<div class="menu-container">
<div class="narrow-screen-menu hidden d-md-none">
<div class="narrow-screen-menu-background">
<div class="narrow-screen-menu-container">
<nav class="container">
<div class="row">
<div class="col">
<div class="nav-links pt-3">
<div><a class="" href="https://foundation.mozilla.org/">Home</a></div>
<div><a class="" href="https://foundation.mozilla.org/who-we-are/">Who we are</a></div>
<div><a class="" href="https://foundation.mozilla.org/what-we-do/">What we do</a></div>
<div><a class="" href="https://foundation.mozilla.org/what-you-can-do/">What you can do</a></div>
<div><a class="" href="https://foundation.mozilla.org/blog/">Blog</a></div>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
<nav class="container">
<div class="row">
<div class="col">
<div class="d-flex flex-row justify-content-between">
<div id="primary-nav-links">
<div class="d-flex align-items-center flex-wrap">
<button class="burger hidden-md-up">
<div class="burger-bar burger-bar-top"></div>
<div class="burger-bar burger-bar-middle"></div>
<div class="burger-bar burger-bar-bottom"></div>
</button>
<a class="logo text-hide" href="https://foundation.mozilla.org/">Mozilla Foundation</a>
<div class="wide-screen-menu">
<div class="nav-links hidden-sm-down">
<a class="" href="https://foundation.mozilla.org/who-we-are/">Who we are</a>
<a class="" href="https://foundation.mozilla.org/what-we-do/">What we do</a>
<a class="" href="https://foundation.mozilla.org/what-you-can-do/">What you can do</a>
<a class="" href="https://foundation.mozilla.org/blog/">Blog</a>
</div>
</div>
</div>
</div>
<div class="donate-btn-wrapper">
<a id="donate-header-btn" class="btn btn-pop"
href="https://donate.mozilla.org/"
target="_blank" rel="noopener noreferrer">Donate</a>
</div>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row py-md-5 d-flex align-items-center">
<div class="col-md-5 offset-md-1 py-5">
<div class="mb-4">
<h2 class="h3-header">We Are Undergoing Maintenance</h1>
</div>
<p class="h5-black">Sorry, we're currently undergoing maintenance.</p>
</div>
</div>
</div>
<div class="donate-banner dark-theme py-5">
<div class="container">
<div class="row">
<div class="col-12">
<h3 class="h3-heading mb-0">We all love the Web. Join Mozilla in defending it.</h3>
<h4 class="h3-heading mb-4">Lets protect the worlds largest resource for future generations.</h4>
<div>
<a href="https://donate.mozilla.org/" target="_blank" rel="noopener noreferrer" c class="btn btn-secondary dark-theme">Donate now</a>
</div>
</div>
</div>
</div>
</div>
<footer class="site-footer dark-theme py-5">
<div class="container">
<div class="row">
<div class="col-md-5 col-lg-6 d-flex flex-column justify-content-between">
<a class="logo" href="https://mozilla.org"><img src="static/images/mozilla-block-white.svg" width="96"></a>
</div>
<div class="col-md-6 col-lg-5 offset-md-1 d-flex flex-column justify-content-between">
<div class="row">
<div class="col-lg-6 col-xl-5">
<h5 class="h5-heading">More about us</h5>
<ul class="d-flex">
<li class="mr-2"><a class="twitter-glyph small d-inline-block" href="https://twitter.com/mozilla"><span class="sr-only">Twitter</span></a></li>
<li class="mr-2"><a class="instagram-glyph small d-inline-block" href="https://www.instagram.com/mozilla/"><span class="sr-only">Instagram</span></a></li>
<li class="mr-2"><a class="github-glyph small d-inline-block" href="https://www.github.com/mozilla/foundation.mozilla.org/"><span class="sr-only">Github</span></a></li>
</ul>
</div>
<div class="col-lg-6 col-xl-7">
<ul class="link-list list-unstyled mb-0">
<li class="mb-2"><a id="donate-footer-btn" href="https://donate.mozilla.org/" target="_blank" rel="noopener noreferrer" class="dark-theme">Donate</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/privacy/websites/#cookies" class="dark-theme">Cookies</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/about/legal/terms/mozilla/" class="dark-theme">Legal</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/about/governance/policies/participation/" class="dark-theme">Participation Guidelines</a></li>
<li class="mb-2"><a href="https://foundation.mozilla.org/press-center/" class="dark-theme">Press Center</a></li>
<li class="mb-2"><a href="https://mozilla.org/privacy/websites/" class="dark-theme">Privacy</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-12">
<hr class="mt-5 mb-3" />
<p class="dark-theme body-small mb-0">Mozilla is a global non-profit dedicated to putting you in control of your online experience and shaping the future of the web for the public good. Visit us at <a href="https://foundation.mozilla.org">foundation.mozilla.org</a>. Most content available under a <a href="https://foundation.mozilla.org/about/website-licensing/">Creative Commons license</a>.</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,157 @@
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,300,700,300i,800,900">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Zilla+Slab:300,400,600,700,300i">
<link rel="stylesheet" href="{% static 'css/main.css' %}">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="{% static 'images/apple-touch-icon-180x180@2x.png' %}">
<link rel="icon" type="image/png" sizes="196x196" href="{% static 'images/favicon-196x196@2x.png' %}">
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}">
<title>Mozilla Foundation - Under Maintenance</title>
</head>
<body id="view-404">
<div class="takeover"></div>
<div class="wrapper">
<div class="sticky-top">
<div class="wrapper-join-us">
<div class="container">
<div class="join-us" id="join-us"></div>
</div>
</div>
<div id="primary-nav-container">
<div class="wrapper-burger">
<div class="menu-container">
<div class="narrow-screen-menu hidden d-md-none">
<div class="narrow-screen-menu-background">
<div class="narrow-screen-menu-container">
<nav class="container">
<div class="row">
<div class="col">
<div class="nav-links pt-3">
<div><a class="" href="https://foundation.mozilla.org/">Home</a></div>
<div><a class="" href="https://foundation.mozilla.org/who-we-are/">Who we are</a></div>
<div><a class="" href="https://foundation.mozilla.org/what-we-do/">What we do</a></div>
<div><a class="" href="https://foundation.mozilla.org/what-you-can-do/">What you can do</a></div>
<div><a class="" href="https://foundation.mozilla.org/blog/">Blog</a></div>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
<nav class="container">
<div class="row">
<div class="col">
<div class="d-flex flex-row justify-content-between">
<div id="primary-nav-links">
<div class="d-flex align-items-center flex-wrap">
<button class="burger hidden-md-up">
<div class="burger-bar burger-bar-top"></div>
<div class="burger-bar burger-bar-middle"></div>
<div class="burger-bar burger-bar-bottom"></div>
</button>
<a class="logo text-hide" href="https://foundation.mozilla.org/">Mozilla Foundation</a>
<div class="wide-screen-menu">
<div class="nav-links hidden-sm-down">
<a class="" href="https://foundation.mozilla.org/who-we-are/">Who we are</a>
<a class="" href="https://foundation.mozilla.org/what-we-do/">What we do</a>
<a class="" href="https://foundation.mozilla.org/what-you-can-do/">What you can do</a>
<a class="" href="https://foundation.mozilla.org/blog/">Blog</a>
</div>
</div>
</div>
</div>
<div class="donate-btn-wrapper">
<a id="donate-header-btn" class="btn btn-pop"
href="https://donate.mozilla.org/"
target="_blank" rel="noopener noreferrer">Donate</a>
</div>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row py-md-5 d-flex align-items-center">
<div class="col-md-5 offset-md-1 py-5">
<div class="mb-4">
<h2 class="h3-header">We Are Undergoing Maintenance</h1>
</div>
<p class="h5-black">Sorry, we're currently undergoing maintenance.</p>
</div>
</div>
</div>
<div class="donate-banner dark-theme py-5">
<div class="container">
<div class="row">
<div class="col-12">
<h3 class="h3-heading mb-0">We all love the Web. Join Mozilla in defending it.</h3>
<h4 class="h3-heading mb-4">Lets protect the worlds largest resource for future generations.</h4>
<div>
<a href="https://donate.mozilla.org/" target="_blank" rel="noopener noreferrer" c class="btn btn-secondary dark-theme">Donate now</a>
</div>
</div>
</div>
</div>
</div>
<footer class="site-footer dark-theme py-5">
<div class="container">
<div class="row">
<div class="col-md-5 col-lg-6 d-flex flex-column justify-content-between">
<a class="logo" href="https://mozilla.org"><img src="{% static 'images/mozilla-block-white.svg' %}" width="96"></a>
</div>
<div class="col-md-6 col-lg-5 offset-md-1 d-flex flex-column justify-content-between">
<div class="row">
<div class="col-lg-6 col-xl-5">
<h5 class="h5-heading">More about us</h5>
<ul class="d-flex">
<li class="mr-2"><a class="twitter-glyph small d-inline-block" href="https://twitter.com/mozilla"><span class="sr-only">Twitter</span></a></li>
<li class="mr-2"><a class="instagram-glyph small d-inline-block" href="https://www.instagram.com/mozilla/"><span class="sr-only">Instagram</span></a></li>
<li class="mr-2"><a class="github-glyph small d-inline-block" href="https://www.github.com/mozilla/foundation.mozilla.org/"><span class="sr-only">Github</span></a></li>
</ul>
</div>
<div class="col-lg-6 col-xl-7">
<ul class="link-list list-unstyled mb-0">
<li class="mb-2"><a id="donate-footer-btn" href="https://donate.mozilla.org/" target="_blank" rel="noopener noreferrer" class="dark-theme">Donate</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/privacy/websites/#cookies" class="dark-theme">Cookies</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/about/legal/terms/mozilla/" class="dark-theme">Legal</a></li>
<li class="mb-2"><a href="https://www.mozilla.org/about/governance/policies/participation/" class="dark-theme">Participation Guidelines</a></li>
<li class="mb-2"><a href="https://foundation.mozilla.org/press-center/" class="dark-theme">Press Center</a></li>
<li class="mb-2"><a href="https://mozilla.org/privacy/websites/" class="dark-theme">Privacy</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-12">
<hr class="mt-5 mb-3" />
<p class="dark-theme body-small mb-0">Mozilla is a global non-profit dedicated to putting you in control of your online experience and shaping the future of the web for the public good. Visit us at <a href="https://foundation.mozilla.org">foundation.mozilla.org</a>. Most content available under a <a href="https://foundation.mozilla.org/about/website-licensing/">Creative Commons license</a>.</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
</body>
</html>

Просмотреть файл

@ -4,6 +4,7 @@ from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.http import HttpResponse
from django.views.generic import TemplateView
from django.views.generic.base import RedirectView
from django.urls import path
@ -90,6 +91,11 @@ if settings.USE_S3 is not True:
document_root=settings.MEDIA_ROOT
)
if settings.DEBUG:
urlpatterns += (
path('maintenance/', TemplateView.as_view(template_name="maintenance/maintenance.html")),
)
# Use a custom 404 handler so that we can serve distinct 404
# pages for each "site" that wagtail services.
handler404 = 'networkapi.wagtailpages.views.custom404_view'