-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds template for news, authors and related field templates. - Move authors markup to re-usable partial that other templates can call. - Add community page template - Adds event template - Adds stage templates for events and share tools template - Adds stub for topics content type - Show summary and legislation card on topic page. - Add archived content warning to news page. - Add created date to news meta div - Add page header to news and events pages. - Add breadcrumb to event and news nodes - Add breadcrumb and header to community template. - Tagging not-migrated sections in topics template - Tagging not-migrated sections in communities template
- Loading branch information
Showing
29 changed files
with
1,708 additions
and
19 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
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
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
19 changes: 19 additions & 0 deletions
19
web/themes/custom/digital_gov/templates/author-image.html.twig
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,19 @@ | ||
{# | ||
# Displays profile image for an author | ||
EXPECTED VARIABLES: | ||
- author: render array of author node | ||
An author can define where they want to pull their author photo from: | ||
- github | ||
- digit-dark | ||
- digit-light | ||
- digit-pride | ||
icon_path is set in digital_gov_preprocess_author_image() | ||
#} | ||
|
||
<img | ||
class="author__photo-img usa-media-block__img" | ||
src="/{{ active_theme_path() }}/{{ icon_path }}" | ||
alt="" | ||
/> |
49 changes: 49 additions & 0 deletions
49
web/themes/custom/digital_gov/templates/field/field--field-topics.html.twig
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,49 @@ | ||
{# | ||
/** | ||
* @file | ||
* Default theme implementation for a field. | ||
* | ||
* To override output, copy the "field.html.twig" from the templates directory | ||
* to your theme's directory and customize it, just like customizing other | ||
* Drupal templates such as page.html.twig or node.html.twig. | ||
* | ||
* Instead of overriding the theming for all fields, you can also just override | ||
* theming for a subset of fields using | ||
* @link themeable Theme hook suggestions. @endlink For example, | ||
* here are some theme hook suggestions that can be used for a field_foo field | ||
* on an article node type: | ||
* - field--node--field-foo--article.html.twig | ||
* - field--node--field-foo.html.twig | ||
* - field--node--article.html.twig | ||
* - field--field-foo.html.twig | ||
* - field--text-with-summary.html.twig | ||
* - field.html.twig | ||
* | ||
* Available variables: | ||
* - attributes: HTML attributes for the containing element. | ||
* - label_hidden: Whether to show the field label or not. | ||
* - title_attributes: HTML attributes for the title. | ||
* - label: The label for the field. | ||
* - multiple: TRUE if a field can contain multiple items. | ||
* - items: List of all the field items. Each item contains: | ||
* - attributes: List of HTML attributes for each item. | ||
* - content: The field item's content. | ||
* - entity_type: The entity type to which the field belongs. | ||
* - field_name: The name of the field. | ||
* - field_type: The type of the field. | ||
* - label_display: The display settings for the label. | ||
* | ||
* @see template_preprocess_field() | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
|
||
<article class="list-topics"> | ||
<h3 class="dg-promos__heading">Related Topics</h3> | ||
{% for item in items %} | ||
{% set topic = item.content['#entity'] %} | ||
<a href="{{ item.content['#url'] }}" data-topic="{{ topic.field_slug.value }}" | ||
>{{ item.content['#title'] }}</a> | ||
{% endfor %} | ||
</article> |
Oops, something went wrong.