Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
Beverly Nguyen authored and Beverly Nguyen committed Nov 21, 2024
2 parents 942489d + daabee6 commit 637457c
Show file tree
Hide file tree
Showing 15 changed files with 440 additions and 198 deletions.
1 change: 1 addition & 0 deletions app/assets/images/alarm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/alert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions app/assets/sass/uswds/_uswds-theme-custom-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ li.linked-card:hover svg,
display: block;
}

.about-icon-list {
.icon-list {
display: flex;
width: 24px;
height: 24px;
Expand All @@ -908,10 +908,6 @@ li.linked-card:hover svg,
margin-right: 4px;
}

.usa-icon-list__content{
padding-left: 0;
}

.indented-paragraph {
margin-left: calc(24px + 4px);
margin-top: 4px;
Expand Down
30 changes: 29 additions & 1 deletion app/main/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
import secrets
from urllib.parse import unquote

from flask import abort, current_app, redirect, render_template, request, url_for
from flask import (
abort,
current_app,
jsonify,
redirect,
render_template,
request,
url_for,
)
from flask_login import current_user

from app import redis_client, status_api_client
Expand Down Expand Up @@ -35,6 +43,17 @@ def check_feature_flags():
abort(404)


@main.route("/test/feature-flags")
def test_feature_flags():
return jsonify(
{
"FEATURE_BEST_PRACTICES_ENABLED": current_app.config[
"FEATURE_BEST_PRACTICES_ENABLED"
]
}
)


@main.route("/")
def index():
if current_user and current_user.is_authenticated:
Expand Down Expand Up @@ -275,6 +294,7 @@ def benchmark_performance():
)


@main.route("/using-notify/guidance")
@main.route("/guides/using-notify/guidance")
@user_is_logged_in
def guidance_index():
Expand Down Expand Up @@ -303,6 +323,14 @@ def about_security():
)


@main.route("/about/why-text-messaging")
def why_text_messaging():
return render_template(
"views/about/why-text-messaging.html",
navigation_links=about_notify_nav(),
)


@main.route("/using-notify/guidance/create-and-send-messages")
@user_is_logged_in
def create_and_send_messages():
Expand Down
20 changes: 19 additions & 1 deletion app/main/views/sub_navigation_dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,27 @@ def best_practices_nav():
def about_notify_nav():
return [
{
"name": "About notify",
"name": "About Notify",
"link": "main.about_notify",
"sub_navigation_items": [
{
"name": "Why text messaging",
"link": "main.why_text_messaging",
"sub_sub_navigation_items": [
{
"name": "Reach people using a common method",
"link": "main.why_text_messaging#reach-people-using-a-common-method",
},
{
"name": "Improve customer experience",
"link": "main.why_text_messaging#improve-customer-experience",
},
{
"name": "What texting is best for",
"link": "main.why_text_messaging#what-texting-is-best-for",
},
],
},
{
"name": "Security",
"link": "main.about_security",
Expand Down
15 changes: 14 additions & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,20 @@
<ul class="usa-sidenav__sublist" role="menu">
{% for sub_item in item.sub_navigation_items %}
<li role="menuitem">
<a href="{{ url_for(sub_item.link.split('#')[0]) }}#{{ sub_item.link.split('#')[1] }}">{{ sub_item.name }}</a>
<a href="{{ url_for(sub_item.link.split('#')[0]) }}#{{ sub_item.link.split('#')[1] }}">
{{ sub_item.name }}
</a>
{% if sub_item.sub_sub_navigation_items %}
<ul class="usa-sidenav__sublist usa-sidenav__sub-sublist" role="menu">
{% for sub_sub_item in sub_item.sub_sub_navigation_items %}
<li role="menuitem">
<a href="{{ url_for(sub_sub_item.link.split('#')[0]) }}#{{ sub_sub_item.link.split('#')[1] }}">
{{ sub_sub_item.name }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/folder-path.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<span class="folder-heading-folder">{{ folder.name }}</span>
{% endif %}
{% else %}
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type) }}" title="Templates" class="usa-link {% if loop.length > 2 %}folder-heading-folder-root-truncated{% endif %}">Templates</a>
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type) }}" class="usa-link {% if loop.length > 2 %}folder-heading-folder-root-truncated{% endif %}">Templates</a>
{% endif %}
{% if not loop.last %}{{ folder_path_separator() }}{% endif %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/partials/jobs/notifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}

<div class="ajax-block-container" aria-labelledby='pill-selected-item' role="region">
<div class="ajax-block-container" role="region">
{% if job.scheduled %}

<p class="usa-body">
Expand Down
Loading

0 comments on commit 637457c

Please sign in to comment.