convert include to macros

This commit is contained in:
Beverly Nguyen
2024-11-26 12:58:32 -08:00
parent 2fa9c1ed7d
commit 562f835096
11 changed files with 33 additions and 19 deletions

View File

@@ -293,6 +293,7 @@ def benchmark_performance():
@main.route("/using-notify/guidance")
@main.route("/guides/using-notify/guidance")
@user_is_logged_in
def guidance_index():
return render_template(

View File

@@ -1,8 +1,12 @@
{% macro breadcrumb(title, parent_menu_title, url) %}
<nav class="navigation-service usa-breadcrumb padding-top-0">
<ol class="usa-breadcrumb__list">
<li class="usa-breadcrumb__list-item">
<span class="usa-breadcrumb__label"><a href="{{ url_for('.best_practices') }}"
class="usa-link navigation-organization-link">{{ parent_menu_title }}</a></span>
<span class="usa-breadcrumb__label">
<a href="{{ url_for(url) }}" class="usa-link navigation-organization-link">
{{ parent_menu_title }}
</a>
</span>
</li>
{% if title %}
<li class="usa-breadcrumb__list-item">
@@ -11,3 +15,4 @@
{% endif %}
</ol>
</nav>
{% endmacro %}

View File

@@ -7,7 +7,6 @@
{% endblock %}
{% block content_column_content %}
<!-- {% with title=page_title %}{% include "components/nav_breadcrumb.html" %}{% endwith %} -->
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p>Notify.gov is a text messaging service built by and for the government. We help agencies communicate more

View File

@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% set page_title = "Security" %}
@@ -7,7 +8,8 @@
{% endblock %}
{% block content_column_content %}
<!-- {% with title=page_title %}{% include "components/nav_breadcrumb.html" %}{% endwith %} -->
{{ breadcrumbs.breadcrumb(page_title, "About", "main.about_notify") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p class="font-sans-lg text-base">Notify.gov is built for the needs of government agencies with fundamental system

View File

@@ -1,4 +1,6 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% set page_title = "Why text messaging" %}
{% block per_page_title %}
@@ -6,8 +8,7 @@
{% endblock %}
{% block content_column_content %}
<!-- {% with title=page_title, parent_title="About", url="main.why_text_messaging" %}{% include
"components/nav_breadcrumb.html" %}{% endwith %} -->
{{ breadcrumbs.breadcrumb(page_title, "About", "main.about_notify") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>

View File

@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% set page_title = "Measuring performance with benchmarking" %}
@@ -7,9 +8,8 @@
{% endblock %}
{% block content_column_content %}
{% with title=page_title, parent_menu_title="Guides" %}
{% include "components/nav_breadcrumb.html" %}
{% endwith %}
{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p class="font-sans-lg text-base">Learn how effective your texting program can be.</p>

View File

@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% set page_title = "Establish clear goals" %}
@@ -7,8 +8,8 @@
{% endblock %}
{% block content_column_content %}
{% with title=page_title, parent_menu_title="Guides" %}{% include "components/nav_breadcrumb.html" %}{% endwith
%}
{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p class="font-sans-lg text-base">Start with a singular purpose. Make explicit what you want to achieve.</p>

View File

@@ -1,4 +1,6 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% from "components/guides/circle_number.html" import circle_number %}
{% set page_title = "Establish trust" %}
@@ -8,8 +10,8 @@
{% endblock %}
{% block content_column_content %}
{% with title=page_title, parent_menu_title="Guides" %}{% include "components/nav_breadcrumb.html" %}{% endwith
%}
{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p class="font-sans-lg text-base">Help your audience anticipate and welcome your texts.</p>

View File

@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% set page_title = "Text in multiple languages" %}
@@ -7,8 +8,8 @@
{% endblock %}
{% block content_column_content %}
{% with title=page_title, parent_menu_title="Guides" %}{% include "components/nav_breadcrumb.html" %}{% endwith
%}
{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p class="font-sans-lg text-base"> What to know as you plan translated texts.</p>

View File

@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% set page_title = "Rules and regulations" %}
@@ -7,8 +8,8 @@
{% endblock %}
{% block content_column_content %}
{% with title=page_title, parent_menu_title="Guides" %}{% include "components/nav_breadcrumb.html" %}{% endwith
%}
{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p class="font-sans-lg text-base">Understand what is required when texting the public.</p>

View File

@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% import "components/nav_breadcrumb.html" as breadcrumbs %}
{% from "components/guides/circle_number.html" import circle_number %}
{% set page_title = "Write texts that provoke action" %}
@@ -8,8 +9,8 @@
{% endblock %}
{% block content_column_content %}
{% with title=page_title, parent_menu_title="Guides" %}{% include "components/nav_breadcrumb.html" %}{% endwith
%}
{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }}
<section class="usa-prose">
<h1>{{page_title}}</h1>
<p class="font-sans-lg text-base"> Help your audience know what to do with the information you send.</p>