mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-11 04:43:52 -04:00
create main_template.html to replace template.njk
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% extends "template.njk" %}
|
||||
{% extends "main_template.html" %}
|
||||
{% from "components/banner.html" import banner %}
|
||||
{% from "components/cookie-banner.html" import cookie_banner %}
|
||||
|
||||
@@ -47,94 +47,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
{% if current_user.is_authenticated %}
|
||||
{% if current_user.platform_admin %}
|
||||
{% set navigation = [
|
||||
{
|
||||
"href": url_for('main.support'),
|
||||
"text": "Support",
|
||||
"active": header_navigation.is_selected('support')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.documentation'),
|
||||
"text": "Documentation",
|
||||
"active": header_navigation.is_selected('documentation')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.user_profile'),
|
||||
"text": current_user.name,
|
||||
"active": header_navigation.is_selected('user-profile')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.platform_admin_splash_page'),
|
||||
"text": "Platform admin",
|
||||
"active": header_navigation.is_selected('platform-admin')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.sign_out'),
|
||||
"text": "Sign out"
|
||||
}
|
||||
] %}
|
||||
{% else %}
|
||||
{% set navigation = [
|
||||
{
|
||||
"href": url_for('main.support'),
|
||||
"text": "Support",
|
||||
"active": header_navigation.is_selected('support')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.documentation'),
|
||||
"text": "Documentation",
|
||||
"active": header_navigation.is_selected('documentation')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.user_profile'),
|
||||
"text": current_user.name,
|
||||
"active": header_navigation.is_selected('user-profile')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.sign_out'),
|
||||
"text": "Sign out"
|
||||
}
|
||||
] %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set navigation = [
|
||||
{
|
||||
"href": url_for('main.support'),
|
||||
"text": "Support",
|
||||
"active": header_navigation.is_selected('support')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.features'),
|
||||
"text": "Features",
|
||||
"active": header_navigation.is_selected('features')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.pricing'),
|
||||
"text": "Pricing",
|
||||
"active": header_navigation.is_selected('pricing')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.documentation'),
|
||||
"text": "Documentation",
|
||||
"active": header_navigation.is_selected('documentation')
|
||||
},
|
||||
{
|
||||
"href": url_for('main.sign_in'),
|
||||
"text": "Sign in",
|
||||
"active": header_navigation.is_selected('sign-in')
|
||||
}
|
||||
] %}
|
||||
{% endif %}
|
||||
|
||||
{{ govukHeader({
|
||||
"homepageUrl": url_for('main.show_accounts_or_dashboard'),
|
||||
"productName": "Notify",
|
||||
"navigation": navigation,
|
||||
"navigationClasses": "govuk-header__navigation--end",
|
||||
"assetsPath": asset_path + "images"
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
|
||||
278
app/templates/main_template.html
Normal file
278
app/templates/main_template.html
Normal file
@@ -0,0 +1,278 @@
|
||||
{% from "./components/skip-link/macro.njk" import govukSkipLink -%}
|
||||
{# specify absolute url for the static assets folder e.g. http://wwww.domain.com/assets #}
|
||||
{%- set assetUrl = assetUrl | default(assetPath) -%}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ htmlLang | default('en') }}" class="govuk-template {{ htmlClasses }}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block pageTitle %}GOV.UK - The best place to find government services and information{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="theme-color" content="{{ themeColor | default('#0b0c0c') }}" /> {# Hardcoded value of $govuk-black #}
|
||||
{# Ensure that older IE versions always render with the correct rendering engine #}
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
{% block headIcons %}
|
||||
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ assetPath | default('/assets') }}/images/favicon.ico" type="image/x-icon" />
|
||||
<link rel="mask-icon" href="{{ assetPath | default('/assets') }}/images/govuk-mask-icon.svg" color="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-180x180.png">
|
||||
<link rel="apple-touch-icon" sizes="167x167" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-167x167.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon.png">
|
||||
{% endblock %}
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
{# The default og:image is added below head so that scrapers see any custom metatags first, and this is just a fallback #}
|
||||
{# image url needs to be absolute e.g. http://wwww.domain.com/.../govuk-opengraph-image.png #}
|
||||
<meta property="og:image" content="{{ assetUrl | default('/assets') }}/images/govuk-opengraph-image.png">
|
||||
</head>
|
||||
<body class="govuk-template__body {{ bodyClasses }}">
|
||||
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
||||
{% block bodyStart %}{% endblock %}
|
||||
|
||||
|
||||
<a href="#main-content" class="govuk-skip-link">Skip to main content</a>
|
||||
|
||||
<header class="govuk-header {{ params.classes if params.classes }}" role="banner" data-module="header"
|
||||
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
||||
<div class="govuk-header__container {{ params.containerClasses | default('govuk-width-container') }}">
|
||||
|
||||
<div class="govuk-header__logo">
|
||||
<a href="{{ url_for('main.show_accounts_or_dashboard') }}" class="govuk-header__link govuk-header__link--homepage">
|
||||
<span class="govuk-header__logotype">
|
||||
<span class="govuk-header__logotype-text">
|
||||
U.S.
|
||||
</span>
|
||||
</span>
|
||||
<span class="govuk-header__product-name">
|
||||
Notify
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="govuk-header__content">
|
||||
<button type="button" role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
|
||||
<nav>
|
||||
<ul id="navigation" class="govuk-header__navigation govuk-header__navigation--end" aria-label="Top Level Navigation">
|
||||
{% if current_user.is_authenticated %}
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.support') }}">
|
||||
Support
|
||||
</a>
|
||||
</li>
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.documentation') }}">
|
||||
Documentation
|
||||
</a>
|
||||
</li>
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.user_profile') }}">
|
||||
{{ current_user.name }}
|
||||
</a>
|
||||
</li>
|
||||
{% if current_user.platform_admin %}
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.platform_admin_splash_page') }}">
|
||||
Platform admin
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.sign_out') }}">
|
||||
Sign out
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.support') }}">
|
||||
Support
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.features') }}">
|
||||
Features
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.pricing') }}">
|
||||
Pricing
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.documentation') }}">
|
||||
Documentation
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="govuk-header__navigation-item">
|
||||
<a class="govuk-header__link" href="{{ url_for('main.sign_in') }}">
|
||||
Sign in
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{% block main %}
|
||||
<div class="govuk-width-container">
|
||||
{% block beforeContent %}{% endblock %}
|
||||
<main class="govuk-main-wrapper {{ mainClasses }}" id="main-content" role="main">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
<footer class="govuk-footer js-footer" role="contentinfo">
|
||||
<div class="govuk-width-container ">
|
||||
|
||||
<div class="govuk-footer__navigation">
|
||||
|
||||
<div class="govuk-footer__section">
|
||||
<h2 class="govuk-footer__heading govuk-heading-m">About Notify</h2>
|
||||
|
||||
|
||||
<ul class="govuk-footer__list govuk-footer__list--columns-1">
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="{{ url_for('main.features') }}">
|
||||
Features
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/features/roadmap">
|
||||
Roadmap
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/features/security">
|
||||
Security
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/features/terms">
|
||||
Terms of use
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="govuk-footer__section">
|
||||
<h2 class="govuk-footer__heading govuk-heading-m">Using Notify</h2>
|
||||
|
||||
|
||||
<ul class="govuk-footer__list govuk-footer__list--columns-1">
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/using-notify/get-started">
|
||||
Get started
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/pricing">
|
||||
Pricing
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/using-notify/trial-mode">
|
||||
Trial mode
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/using-notify/delivery-status">
|
||||
Delivery status
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/using-notify/guidance">
|
||||
Guidance
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/documentation">
|
||||
API documentation
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="govuk-footer__section">
|
||||
<h2 class="govuk-footer__heading govuk-heading-m">Support</h2>
|
||||
|
||||
|
||||
<ul class="govuk-footer__list govuk-footer__list--columns-1">
|
||||
|
||||
|
||||
<li class="govuk-footer__list-item">
|
||||
<a class="govuk-footer__link" href="/support">
|
||||
Contact us
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr class="govuk-footer__section-break">
|
||||
|
||||
<div class="govuk-footer__meta">
|
||||
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
|
||||
|
||||
<h2 class="govuk-visually-hidden">Support links</h2>
|
||||
|
||||
|
||||
<div class="govuk-footer__meta-custom">
|
||||
Built by the <a href="https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions" class="govuk-footer__link">Technology Transformation Service</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{% block bodyEnd %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user