-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8484 from cfpb/legacy-page-template
Create new template for legacy blog/newsroom items
- Loading branch information
Showing
6 changed files
with
85 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends 'v1/blog/blog_page.html' %} | ||
|
||
{% block content_intro scoped -%} | ||
{% import 'v1/includes/molecules/banner.html' as banner %} | ||
{% set canonical_archive_url = 'https://wayback.archive-it.org/23462/20241001120000/' ~ request.build_absolute_uri(request.path) | lower %} | ||
{{- banner.render( | ||
true, | ||
'Archived content', | ||
'This content has been archived, and its original formatting has been removed.', | ||
[ { | ||
'text': 'View this page as it was originally published', | ||
'url': canonical_archive_url | ||
} ] | ||
) }} | ||
{%- endblock %} | ||
|
||
{% block content_main %} | ||
|
||
{% include 'v1/includes/article.html' %} | ||
{% block post_article_content %} | ||
|
||
{% endblock %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{# ========================================================================== | ||
|
||
banner.render() | ||
|
||
========================================================================== | ||
|
||
Description: | ||
|
||
Builds banner markup when given: | ||
|
||
is_dark: Whether the banner is dark or not. Default is false. | ||
|
||
message: Text to display within the banner's notification markup. | ||
|
||
explanation: Text to display as an explanation | ||
within the banner's notification markup. | ||
Defaults to none. | ||
|
||
links: Array of link objects, which each contain: | ||
- text (required): text of link. | ||
- url: link url. | ||
- is_link_boldface: sets bold formatting. | ||
- open_link_in_new_window: opens the link in a new window | ||
Defaults to an empty array. | ||
|
||
========================================================================== #} | ||
|
||
{% macro render(is_dark, message, explanation, links) %} | ||
<div class="o-banner{{ ' o-banner--dark' if is_dark else '' }}"> | ||
<div class="wrapper wrapper--match-content"> | ||
{% import 'v1/includes/molecules/notification.html' as notification %} | ||
{{ notification.render( | ||
'warning', | ||
true, | ||
message, | ||
explanation, | ||
links | ||
) }} | ||
</div> | ||
</div> | ||
{% endmacro %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters