2022-12-13 16:52:08 -05:00
{% extends "main_template.html" %}
2016-01-27 15:22:47 +00:00
{% from "components/banner.html" import banner %}
2019-10-09 15:51:12 +01:00
2022-12-14 13:14:35 -05:00
{% block headIcons %}
< link rel = "shortcut icon" sizes = "16x16 32x32 48x48" href = "{{ asset_url('images/favicon.ico') }}" type = "image/x-icon" / >
2023-09-20 13:52:54 -04:00
< link rel = "mask-icon" href = "{{ asset_url('images/usa-mask-icon.svg') }}" color = "{{ themeColor | default('#F0F0F0') }}" >
< link rel = "apple-touch-icon" sizes = "180x180" href = "{{ asset_url('images/apple-touch-icon.png') }}" >
< link rel = "apple-touch-icon" href = "{{ asset_url('images/apple-touch-icon.png') }}" >
2022-12-14 13:14:35 -05:00
{% endblock %}
2015-12-10 15:57:32 +00:00
{% block head %}
2023-06-06 15:28:24 -04:00
< link rel = "stylesheet" media = "screen" href = "{{ asset_url('css/styles.css') }}" / >
2020-07-06 10:53:14 +01:00
{% block extra_stylesheets %}
{% endblock %}
2020-05-26 17:39:25 +01:00
{% if g.hide_from_search_engines %}
< meta name = "robots" content = "noindex" / >
{% endif %}
2017-10-27 11:33:10 +01:00
< meta name = "google-site-verification" content = "niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" / >
2019-12-17 11:24:57 +00:00
{% block meta_format_detection %}
< meta name = "format-detection" content = "telephone=no" >
{% endblock %}
2017-11-14 17:25:32 +00:00
{% block meta %}
2023-09-20 13:52:54 -04:00
< meta property = "og:site_name" content = "Notify.gov" >
2024-03-07 16:42:57 -05:00
< meta property = "og:image" content = "{{ asset_url('images/notify-og-image.png') }}" >
2017-11-14 17:25:32 +00:00
{% endblock %}
2023-10-17 11:13:20 -06:00
< script type = "text/javascript" src = "{{ asset_url('js/gtm_head.js') }}" > < / script >
2015-12-10 15:57:32 +00:00
{% endblock %}
2015-12-07 16:18:05 +00:00
2019-10-09 15:51:12 +01:00
{% block pageTitle %}
2023-07-28 11:12:46 -04:00
{% block per_page_title %}{% endblock %} – Notify.gov
2015-11-25 16:21:28 +00:00
{% endblock %}
2019-10-17 10:40:48 +01:00
{% block bodyStart %}
2021-05-18 12:38:05 +01:00
{% block extra_javascripts_before_body %}
2023-06-12 13:52:38 -04:00
<!-- Google Tag Manager (noscript) -->
< noscript > < iframe src = "https://www.googletagmanager.com/ns.html?id=GTM-WX5NGWF"
height="0" width="0" style="display:none;visibility:hidden">< / iframe > < / noscript >
<!-- End Google Tag Manager (noscript) -->
2021-05-13 14:52:32 +01:00
{% endblock %}
2019-11-26 12:14:09 +00:00
{% endblock %}
2019-10-09 16:00:45 +01:00
{% block header %}
2022-12-14 13:14:35 -05:00
{% if current_user.is_authenticated %}
{% if current_user.platform_admin %}
{% set navigation = [
2023-10-12 15:16:03 -04:00
{
"href": url_for("main.show_accounts_or_dashboard"),
2023-10-13 12:26:25 -04:00
"text": "Current service",
2023-10-12 15:16:03 -04:00
"active": header_navigation.is_selected('accounts-or-dashboard')
},
2023-06-26 11:25:47 -04:00
{
"href": url_for('main.get_started'),
2023-07-31 14:28:14 -04:00
"text": "Using Notify",
2023-06-26 11:25:47 -04:00
"active": header_navigation.is_selected('using_notify')
},
{
"href": url_for('main.features'),
"text": "Features",
"active": header_navigation.is_selected('features')
},
2024-01-01 10:34:59 -05:00
{
"href": url_for('main.platform_admin_splash_page'),
"text": "Platform admin",
"active": header_navigation.is_selected('platform-admin')
},
{
"href": url_for('main.support'),
"text": "Contact us",
"active": header_navigation.is_selected('support')
}
] %}
2024-01-03 13:51:11 -05:00
{% if current_service %}
{% set secondaryNavigation = [
{
2024-01-05 12:07:20 -05:00
"href": url_for('main.service_settings', service_id=current_service.id),
2024-01-03 13:51:11 -05:00
"text": "Settings",
"active": secondary_navigation.is_selected('settings')
},
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
2022-12-14 13:14:35 -05:00
] %}
2024-01-03 13:51:11 -05:00
{% else %}
{% set secondaryNavigation = [
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
] %}
{% endif %}
2022-12-14 13:14:35 -05:00
{% else %}
{% set navigation = [
2023-10-12 10:21:11 -04:00
{
"href": url_for("main.show_accounts_or_dashboard"),
2023-10-13 12:26:25 -04:00
"text": "Current service",
2023-10-12 10:21:11 -04:00
"active": header_navigation.is_selected('accounts-or-dashboard')
},
2023-06-09 10:59:01 -04:00
{
"href": url_for('main.get_started'),
2023-07-31 14:28:14 -04:00
"text": "Using Notify",
2023-06-09 10:59:01 -04:00
"active": header_navigation.is_selected('using_notify')
},
{
"href": url_for('main.features'),
"text": "Features",
"active": header_navigation.is_selected('features')
},
2022-12-14 13:14:35 -05:00
{
"href": url_for('main.support'),
2023-06-09 10:59:01 -04:00
"text": "Contact us",
2022-12-14 13:14:35 -05:00
"active": header_navigation.is_selected('support')
},
{
"href": url_for('main.user_profile'),
2023-10-13 12:26:25 -04:00
"text": "User profile",
2022-12-14 13:14:35 -05:00
"active": header_navigation.is_selected('user-profile')
2024-01-01 10:34:59 -05:00
}
] %}
2024-01-04 15:23:01 -05:00
{% if current_service %}
{% set secondaryNavigation = [
{
"href": url_for('main.service_settings', service_id=current_service.id),
"text": "Settings",
"active": secondary_navigation.is_selected('settings')
},
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
] %}
{% else %}
{% set secondaryNavigation = [
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
] %}
{% endif %}
{% endif %}
2022-12-14 13:14:35 -05:00
{% else %}
2023-07-07 11:01:19 -04:00
<!-- Add navigation back after pilot -->
{# {% set navigation = [
2022-12-14 13:14:35 -05:00
{
2023-06-09 10:59:01 -04:00
"href": url_for('main.get_started'),
2023-07-31 14:28:14 -04:00
"text": "Using Notify",
2023-06-09 10:59:01 -04:00
"active": header_navigation.is_selected('using_notify')
2022-12-14 13:14:35 -05:00
},
{
"href": url_for('main.features'),
"text": "Features",
"active": header_navigation.is_selected('features')
},
{
2023-06-09 10:59:01 -04:00
"href": url_for('main.support'),
"text": "Contact us",
"active": header_navigation.is_selected('support')
2022-12-14 13:14:35 -05:00
},
{
"href": url_for('main.sign_in'),
"text": "Sign in",
"active": header_navigation.is_selected('sign-in')
}
2023-07-07 11:01:19 -04:00
] %} #}
2022-12-14 13:14:35 -05:00
{% endif %}
2022-12-14 11:50:51 -05:00
2023-08-31 13:24:12 -04:00
{{ usaHeader({
2022-12-14 13:14:35 -05:00
"homepageUrl": url_for('main.show_accounts_or_dashboard'),
"productName": "Notify",
"navigation": navigation,
"navigationClasses": "govuk-header__navigation--end",
2024-01-01 10:34:59 -05:00
"secondaryNavigation": secondaryNavigation,
2022-12-14 13:14:35 -05:00
"assetsPath": asset_path + "images"
}) }}
2019-10-09 16:00:45 +01:00
{% endblock %}
Use a Node-based tools for handling assets
…or how to move a bunch of things from a bunch of different places into
`app/static`.
There are three main reasons not to use Flask Assets:
- It had some strange behaviour like only
- It was based on Ruby SASS, which is slower to get new features than libsass,
and meant depending on Ruby, and having the SASS Gem globally installed—so
you’re already out of being a ‘pure’ Python app
- Martyn and I have experience of doing it this way on Marketplace, and we’ve
ironed out the initial rough patches
The specific technologies this introduces, all of which are Node-based:
- Gulp – like a Makefile written in Javascript
- NPM – package management, used for managing Gulp and its related dependencies
- Bower – also package management, and the only way I can think to have
GOV.UK template as a proper dependency
…speaking of which, GOV.UK template is now a dependency. This means it can’t be
modified at all (eg to add a global `#content` wrapper), so every page now
inherits from a template that has this wrapper. But it also means that we have a
clean upgrade path when the template is modified.
Everything else (toolkit, elements) I’ve kept as submodules but moved them to a
more logical place (`app/assets` not `app/assets/stylesheets`, because they
contain more than just SASS/CSS).
2015-12-15 08:20:25 +00:00
2019-10-09 17:49:29 +01:00
{% block footer %}
2024-03-06 11:49:04 -08:00
<!-- lines 179 - 251 can all be deleted and replaced with {% include "new/components/footer/footer.html" %} -->
2019-10-09 17:49:29 +01:00
{% if current_service and current_service.research_mode %}
2023-08-08 16:19:17 -04:00
{% set meta_suffix = 'Built by the < a href = "https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions" class = "usa-link" > Technology Transformation Services< / a > < span id = "research-mode" class = "research-mode" > research mode< / span > ' %}
2019-10-09 17:49:29 +01:00
{% else %}
2024-02-26 11:07:16 -08:00
{% set commit_hash = ", Latest version: " + config['COMMIT_HASH'] %}
{% set long_link = '< a href = "https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions" class = "usa-link" > Technology Transformation Services< / a > ' %}
{% set meta_suffix = "Built by the " + long_link + commit_hash %}
2019-10-09 17:49:29 +01:00
{% endif %}
2023-08-31 13:24:12 -04:00
{{ usaFooter({
2019-11-28 11:08:27 +00:00
"classes": "js-footer",
2019-10-09 17:49:29 +01:00
"navigation": [
2019-10-30 10:35:18 +00:00
{
2019-11-11 10:06:51 +00:00
"title": "About Notify",
2019-10-30 10:35:18 +00:00
"columns": 1,
"items": [
2019-10-09 17:49:29 +01:00
{
"href": url_for("main.features"),
"text": "Features"
},
{
"href": url_for("main.roadmap"),
"text": "Roadmap"
},
{
"href": url_for("main.security"),
"text": "Security"
},
2019-10-30 10:35:18 +00:00
]
},
2019-12-31 10:02:45 +00:00
{
"title": "Using Notify",
"columns": 1,
"items": [
{
"href": url_for("main.get_started"),
"text": "Get started"
},
2022-11-01 15:27:29 -04:00
{
"href": url_for("main.pricing"),
"text": "Pricing"
},
2019-12-31 10:02:45 +00:00
{
"href": url_for("main.trial_mode_new"),
"text": "Trial mode"
},
{
"href": url_for("main.message_status"),
2020-01-24 12:01:00 +00:00
"text": "Delivery status"
},
{
2020-01-24 15:57:29 +00:00
"href": url_for("main.guidance_index"),
2020-01-24 12:01:00 +00:00
"text": "Guidance"
2019-12-31 10:02:45 +00:00
},
{
"href": url_for("main.documentation"),
"text": "API documentation"
}
]
2022-11-01 15:27:29 -04:00
},
{
"title": "Support",
"columns": 1,
"items": [
{
"href": url_for('main.support'),
"text": "Contact us"
2024-02-26 11:07:16 -08:00
}
2022-11-01 15:27:29 -04:00
]
},
2019-10-09 17:49:29 +01:00
],
"meta": {
"items": meta_items,
"html": meta_suffix
}
}) }}
2024-03-06 11:49:04 -08:00
<!-- {% include "new/components/footer/footer.html" %} -->
2023-09-12 15:17:06 -04:00
{% if current_user.is_authenticated %}
{% block sessionUserWarning %}
< dialog class = "usa-modal" id = "sessionTimer" aria-labelledby = "sessionTimerHeading" aria-describedby = "timerWarning" >
< div class = "usa-modal__content" >
< div class = "usa-modal__main" >
< h2 class = "usa-modal__heading" id = "sessionTimerHeading" >
Your session will end soon.
< span class = "usa-sr-only" > Please choose to extend your session or sign out. Your session will expire in 5 minutes or less.< / span >
< / h2 >
< div class = "usa-prose" >
2024-01-01 10:34:59 -05:00
< p > You have been inactive for too long.
2023-09-12 15:17:06 -04:00
Your session will expire in < span id = "timeLeft" role = "timer" > < / span > .
< / p >
< / div >
< div class = "usa-modal__footer" >
< ul class = "usa-button-group" >
< li class = "usa-button-group__item" >
< button type = "button" class = "usa-button" id = "extendSessionTimer" data-close-modal >
Extend Session
< / button >
< / li >
< li class = "usa-button-group__item" >
< button type = "button" class = "usa-button usa-button--unstyled padding-105 text-center" id = "logOutTimer"
data-close-modal>
Sign out
< / button >
< / li >
< / ul >
< / div >
< / div >
< / div >
< / dialog >
{% endblock %}
{% endif %}
2016-03-16 11:01:19 +00:00
{% endblock %}
2023-09-12 15:17:06 -04:00
2019-10-09 15:51:12 +01:00
{% block bodyEnd %}
2020-07-06 10:53:14 +01:00
{% block extra_javascripts %}
{% endblock %}
2019-09-05 09:51:01 +01:00
<!-- [if gt IE 8]><! -->
2017-02-13 16:43:12 +00:00
< script type = "text/javascript" src = "{{ asset_url('javascripts/all.js') }}" > < / script >
2023-06-06 15:28:24 -04:00
< script type = "text/javascript" src = "{{ asset_url('js/uswds.min.js') }}" > < / script >
2019-09-05 09:51:01 +01:00
<!-- <![endif] -->
2023-09-12 15:17:06 -04:00
Use a Node-based tools for handling assets
…or how to move a bunch of things from a bunch of different places into
`app/static`.
There are three main reasons not to use Flask Assets:
- It had some strange behaviour like only
- It was based on Ruby SASS, which is slower to get new features than libsass,
and meant depending on Ruby, and having the SASS Gem globally installed—so
you’re already out of being a ‘pure’ Python app
- Martyn and I have experience of doing it this way on Marketplace, and we’ve
ironed out the initial rough patches
The specific technologies this introduces, all of which are Node-based:
- Gulp – like a Makefile written in Javascript
- NPM – package management, used for managing Gulp and its related dependencies
- Bower – also package management, and the only way I can think to have
GOV.UK template as a proper dependency
…speaking of which, GOV.UK template is now a dependency. This means it can’t be
modified at all (eg to add a global `#content` wrapper), so every page now
inherits from a template that has this wrapper. But it also means that we have a
clean upgrade path when the template is modified.
Everything else (toolkit, elements) I’ve kept as submodules but moved them to a
more logical place (`app/assets` not `app/assets/stylesheets`, because they
contain more than just SASS/CSS).
2015-12-15 08:20:25 +00:00
{% endblock %}