2024-04-24 13:43:17 -07:00
{% extends "base.html" %}
2015-12-14 16:37:15 +00:00
2017-02-13 10:45:15 +00:00
{% block per_page_title %}
2024-04-24 16:12:54 -07:00
{% if current_org.name %}
{% block org_page_title %}{% endblock %} – {{ current_org.name }}
{% else %}
{% block service_page_title %}{% endblock %} – {{ current_service.name }}
{% endif %}
2017-02-13 10:45:15 +00:00
{% endblock %}
2019-10-11 16:44:17 +01:00
{% block main %}
2023-06-08 13:12:00 -04:00
< div class = "grid-container" >
2024-04-24 13:43:17 -07:00
{% block serviceNavigation %}
{% if current_org.name %}
2017-04-27 15:20:25 +01:00
{% else %}
2024-04-24 13:43:17 -07:00
{% include "new/components/service_nav.html" %}
2017-04-27 15:20:25 +01:00
{% endif %}
2024-04-24 13:43:17 -07:00
{% endblock %}
{#
The withnav_template can serve as a replacement for both settings_template and org_template.html.
The file service_navigation.html is included only in withnav_template. It's not used in settings_template. That is one out of the two differences between settings template and withnav template. As a result, when other templates extend settings_template, they include the serviceNavigation block but keep it empty. The settings_template.html is specifically used for these pages in the app: manage-users.html, service-settings.html, and user-profile.html.
In addition, serviceNavigation should be empty on templates that previously extended org_template. For templates that previously extended org_template.html, there's an addition of the orgNavBreadcrumb block.
{% block orgNavBreadcrumb %}
{% include "/new/components/org_nav_breadcrumb.html" %}
{% endblock %}
#}
{% if current_org.name %}
{% block orgNavBreadcrumb %}{% include "/new/components/org_nav_breadcrumb.html" %}{% endblock %}
{% endif %}
< div class = "grid-row margin-top-5" >
2024-07-25 15:36:31 -04:00
< div class = "tablet:grid-col-2" >
2024-04-24 13:43:17 -07:00
{% block sideNavigation %}
{% if current_org.name %}
{% include "/new/components/org_nav.html" %}
{% else %}
{% include "/new/components/main_nav.html" %}
{% endif %}
{#
Include settings_nav.html for child templates that previously extended settings_template.
Include "org_nav.html" for child templates that previously extended org_template html
#}
{% endblock %}
< / div >
2024-07-25 15:36:31 -04:00
< div class = "tablet:grid-col-10 tablet:padding-left-4" >
2021-07-30 14:24:35 +01:00
{% block beforeContent %}
{% block backLink %}{% endblock %}
{% endblock %}
2023-08-14 10:35:11 -04:00
< main id = "main-content" role = "main" class = "usa-prose site-prose margin-bottom-10" >
2019-10-11 16:44:17 +01:00
{% block content %}
2024-05-17 15:17:25 -07:00
{% include 'new/components/flash_messages.html' %}
2019-10-11 16:44:17 +01:00
{% block maincolumn_content %}{% endblock %}
{% endblock %}
< / main >
< / div >
2016-01-22 10:57:49 +00:00
< / div >
< / div >
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 %}