diff --git a/config/sync/core.entity_form_display.node.authors.default.yml b/config/sync/core.entity_form_display.node.authors.default.yml index 85baecff..c65e014e 100644 --- a/config/sync/core.entity_form_display.node.authors.default.yml +++ b/config/sync/core.entity_form_display.node.authors.default.yml @@ -40,7 +40,7 @@ third_party_settings: label: 'Social Media' region: content parent_name: '' - weight: 20 + weight: 19 format_type: details format_settings: classes: '' @@ -73,7 +73,7 @@ content: third_party_settings: { } field_agency_acronym: type: string_textfield - weight: 15 + weight: 14 region: content settings: size: 60 @@ -81,7 +81,7 @@ content: third_party_settings: { } field_agency_full_name: type: string_textfield - weight: 14 + weight: 13 region: content settings: size: 60 @@ -89,7 +89,7 @@ content: third_party_settings: { } field_bio: type: text_textfield - weight: 17 + weight: 16 region: content settings: size: 60 @@ -97,7 +97,7 @@ content: third_party_settings: { } field_bio_url: type: link_default - weight: 18 + weight: 17 region: content settings: placeholder_url: '' @@ -105,7 +105,7 @@ content: third_party_settings: { } field_email: type: email_default - weight: 12 + weight: 11 region: content settings: placeholder: '' @@ -121,7 +121,7 @@ content: third_party_settings: { } field_first_name: type: text_textfield - weight: 9 + weight: 8 region: content settings: size: 60 @@ -145,7 +145,7 @@ content: third_party_settings: { } field_last_name: type: text_textfield - weight: 10 + weight: 9 region: content settings: size: 60 @@ -161,7 +161,7 @@ content: third_party_settings: { } field_location: type: string_textfield - weight: 16 + weight: 15 region: content settings: size: 60 @@ -169,7 +169,15 @@ content: third_party_settings: { } field_pronouns: type: string_textfield - weight: 11 + weight: 10 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_slug: + type: string_textfield + weight: 18 region: content settings: size: 60 @@ -177,7 +185,7 @@ content: third_party_settings: { } field_summary: type: text_textfield - weight: 13 + weight: 12 region: content settings: size: 60 @@ -251,7 +259,6 @@ content: placeholder: '' third_party_settings: { } hidden: - field_slug: true publish_on: true publish_state: true unpublish_on: true diff --git a/config/sync/core.entity_form_display.node.news.default.yml b/config/sync/core.entity_form_display.node.news.default.yml index d398d02f..50e08414 100644 --- a/config/sync/core.entity_form_display.node.news.default.yml +++ b/config/sync/core.entity_form_display.node.news.default.yml @@ -95,6 +95,14 @@ content: settings: media_types: { } third_party_settings: { } + field_slug: + type: string_textfield + weight: 14 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } field_summary: type: text_textfield weight: 3 @@ -167,7 +175,6 @@ content: removed_reference: optional third_party_settings: { } hidden: - field_slug: true promote: true publish_on: true publish_state: true diff --git a/config/sync/core.entity_form_display.node.topics.default.yml b/config/sync/core.entity_form_display.node.topics.default.yml index 28bb57b0..143682c1 100644 --- a/config/sync/core.entity_form_display.node.topics.default.yml +++ b/config/sync/core.entity_form_display.node.topics.default.yml @@ -70,7 +70,7 @@ content: third_party_settings: { } field_featured_links: type: paragraphs - weight: 28 + weight: 13 region: content settings: title: Paragraph @@ -90,7 +90,7 @@ content: third_party_settings: { } field_featured_resources: type: paragraphs - weight: 26 + weight: 12 region: content settings: title: Paragraph @@ -130,6 +130,14 @@ content: settings: media_types: { } third_party_settings: { } + field_slug: + type: string_textfield + weight: 14 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } field_summary: type: text_textfield weight: 2 @@ -184,7 +192,6 @@ content: removed_reference: optional third_party_settings: { } hidden: - field_slug: true promote: true publish_on: true publish_state: true diff --git a/config/sync/core.entity_view_display.node.news.default.yml b/config/sync/core.entity_view_display.node.news.default.yml index e8e89913..5a4e2f41 100644 --- a/config/sync/core.entity_view_display.node.news.default.yml +++ b/config/sync/core.entity_view_display.node.news.default.yml @@ -30,9 +30,10 @@ content: weight: 101 region: content field_authors: - type: entity_reference_label - label: above + type: entity_reference_entity_view + label: hidden settings: + view_mode: default link: true third_party_settings: { } weight: 126 @@ -96,7 +97,7 @@ content: region: content field_topics: type: entity_reference_label - label: above + label: hidden settings: link: true third_party_settings: { } diff --git a/web/themes/custom/digital_gov/digital_gov.theme b/web/themes/custom/digital_gov/digital_gov.theme index edb0b699..3e0a2a55 100644 --- a/web/themes/custom/digital_gov/digital_gov.theme +++ b/web/themes/custom/digital_gov/digital_gov.theme @@ -7,6 +7,7 @@ declare(strict_types=1); +use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Template\Attribute; /** @@ -32,7 +33,79 @@ function digital_gov_preprocess_page(array &$variables): void { * Implements hook_preprocess_HOOK() for node.html.twig. */ function digital_gov_preprocess_node(array &$variables): void { + $variables['attributes']['class'] = 'grid-container-desktop'; + $created = DrupalDateTime::createFromTimestamp($variables['node']->getCreatedTime()); + $variables['created'] = $created->format('M j, Y'); + + switch ($variables['node']->bundle()) { + case 'news': + $before_date = new DrupalDateTime('5 years ago'); + $variables['show_archive_warning'] = $created->getPhpDateTime() <= $before_date->getPhpDateTime(); + break; + + case 'event': + $now = new DrupalDateTime(); + $startDate = $variables['node']->field_start_date->date; + $variables['start_date'] = $startDate->format('l, F j, Y', ['timezone' => date_default_timezone_get()]); + $variables['start_time'] = $startDate->format('g:i A', ['timezone' => date_default_timezone_get()]); + $variables['is_future_event'] = $startDate->getPhpDateTime() > $now->getPhpDateTime(); + + if ($variables["node"]->field_end_date->value) { + $endDate = $variables["node"]->field_end_date->date; + $variables['end_time'] = $endDate->format('g:i A T', ['timezone' => date_default_timezone_get()]); + } + break; + } +} + +/** + * Implements hook_theme(). + */ +function digital_gov_theme(): array { + return [ + 'author_image' => [ + 'variables' => [ + 'author' => NULL, + ], + ], + ]; +} +/** + * Preprocessor for author_image theme function. + */ +function digital_gov_preprocess_author_image(array &$vars): void { + $profile_source = $vars["author"]["#entity"]->field_profile_source->value ?? NULL; + $github = $vars["author"]["#entity"]->field_github->value ?? NULL; + + $slug = $vars["author"]["#entity"]->field_slug->value; + switch (TRUE) { + case $profile_source === 'github' && $github: + // Author has selected GitHub and specified a GitHub user ID. + $vars['icon_path'] = sprintf('https://github.com/%s.png?size=50', $github); + break; + + case $profile_source === 'digit-light': + case $profile_source === 'digit-dark': + case $profile_source === 'digit-pride': + $vars['icon_path'] = sprintf('img/%s.png', $profile_source); + break; + + default: + if ($github) { + // Author did not select GitHub but use a GitHUB ID if they have one. + $vars['icon_path'] = sprintf('https://github.com/%s.png?size=50', $github); + } + else { + // No source selected OR they picked GitHub without a GitHub ID + // choose between light and dark based on length of the slug. + $vars['icon_path'] = sprintf( + 'img/digit-%s.png', + strlen($slug ?? $vars['author']['#plain_text']) % 2 ? 'dark' : 'light' + ); + } + break; + } } /** diff --git a/web/themes/custom/digital_gov/templates/author-image.html.twig b/web/themes/custom/digital_gov/templates/author-image.html.twig new file mode 100644 index 00000000..e1408b47 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/author-image.html.twig @@ -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() +#} + + diff --git a/web/themes/custom/digital_gov/templates/field/field--field-topics.html.twig b/web/themes/custom/digital_gov/templates/field/field--field-topics.html.twig new file mode 100644 index 00000000..3c39a79f --- /dev/null +++ b/web/themes/custom/digital_gov/templates/field/field--field-topics.html.twig @@ -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 + */ +#} + +
+

Related Topics

+ {% for item in items %} + {% set topic = item.content['#entity'] %} + {{ item.content['#title'] }} + {% endfor %} +
diff --git a/web/themes/custom/digital_gov/templates/field/field--node--field-deck.html.twig b/web/themes/custom/digital_gov/templates/field/field--node--field-deck.html.twig new file mode 100644 index 00000000..a2f54cad --- /dev/null +++ b/web/themes/custom/digital_gov/templates/field/field--node--field-deck.html.twig @@ -0,0 +1,45 @@ +{# +/** + * @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 + */ +#} +

+ {% for item in items %} + {{ item.content }} + {% endfor %} +

diff --git a/web/themes/custom/digital_gov/templates/field/field--node--field-summary.html.twig b/web/themes/custom/digital_gov/templates/field/field--node--field-summary.html.twig new file mode 100644 index 00000000..0b45124e --- /dev/null +++ b/web/themes/custom/digital_gov/templates/field/field--node--field-summary.html.twig @@ -0,0 +1,45 @@ +{# +/** + * @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 + */ +#} +{% for item in items %} +

+ {{ item.content['#text'] }} +

+{% endfor %} diff --git a/web/themes/custom/digital_gov/templates/node/node--authors.html.twig b/web/themes/custom/digital_gov/templates/node/node--authors.html.twig new file mode 100644 index 00000000..1d45877c --- /dev/null +++ b/web/themes/custom/digital_gov/templates/node/node--authors.html.twig @@ -0,0 +1,109 @@ +{# +/** + * @file + * Default theme implementation to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: (optional) The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: (optional) Themed creation date field. + * - author_name: (optional) Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * + * @see template_preprocess_node() + * + * @ingroup themeable + */ + + // TODO - get profile source from preprocess function the list uses +#} + +
+
+
+ {% if content.field_github['#theme'] %} + Profile image for {{ displayName }} + {% else %} + Profile image for {{ displayName }} + {% endif %} + +
+

{{ displayName }}

+ +
+ {% if Params.pronoun %} +

{{ Params.pronoun }}

+ {% endif %} + + {{ dump() }} + {% if Params.agency %} +

+ {{ Params.agency }} +

+ {% endif %} +
+
+
+
+
+ + + diff --git a/web/themes/custom/digital_gov/templates/node/node--community.html.twig b/web/themes/custom/digital_gov/templates/node/node--community.html.twig new file mode 100644 index 00000000..dfaab580 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/node/node--community.html.twig @@ -0,0 +1,142 @@ +{# +/** + * @file + * Default theme implementation to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: (optional) The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: (optional) Themed creation date field. + * - author_name: (optional) Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * + * @see template_preprocess_node() + * + * @ingroup themeable + */ +#} + +{# where does community list come from? #} +{% set community_list = true %} +
+
+ + {{ drupal_entity('block', 'digital_gov_breadcrumbs') }} + +
+ {{ include("@digital_gov/partials/page-header.html.twig", { + 'title': node.title.value, + 'deck': node.field_deck.value, + 'append_title_text': 'Community' + }, with_context = false) }} +
+ +
+ +
+ {# Summary controls if the community content is shown + but is not displayed on full page #} + {% if node.field_summary.value %} + {% set community_acronym = node.field_dg_acronym.value %} + {% set subscribe_email_subject = node.field_subscribe_email_subject.value %} +
+ {% if community_list %} +
+
+ {{ content.field_dg_logo }} +

Connect with us

+
+
+

+ Federal, state, territorial, tribal, and local government + employees and contractors are eligible to join. +

+

+ Select "{{ subscribe_email_subject }}," then a form will ask + for your name and email address. The form should take most + people a minute or less to complete. +

+ {# Get the form link #} + + {{ subscribe_email_subject }} + +
+
+ {% endif %} +
+ {{ content | without('field_dg_logo') }} +
+ + {# @TODO Community Events #} + [placeholder Upcoming events] + {# NOT-MIGRATED + {{ partial '@digital_gov/partials/core/get-upcomingevents.html' }} + #} +
+

Community Conduct

+ {% include('@digital_gov/partials/community-pagefooter.html.twig') %} +
+
+ {% endif %} +
+ +
+ +
+
diff --git a/web/themes/custom/digital_gov/templates/node/node--event.html.twig b/web/themes/custom/digital_gov/templates/node/node--event.html.twig new file mode 100644 index 00000000..136a1d34 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/node/node--event.html.twig @@ -0,0 +1,195 @@ +{# +/** + * @file + * Default theme implementation to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: (optional) The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: (optional) Themed creation date field. + * - author_name: (optional) Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * + * @see template_preprocess_node() + * + * @ingroup themeable + */ +#} + +{# where does community list come from? #} +{% set community_list = true %} + +
+
+ + {{ drupal_entity('block', 'digital_gov_breadcrumbs') }} + +
+ {# @TODO kicker and deck fields can contain HTML tags but use the plain text filter... #} + {{ include("@digital_gov/partials/page-header.html.twig", { + 'title': node.title.value, + 'kicker': node.field_kicker.value, + 'deck': node.field_deck.value + }, with_context = false) }} + + +

+ + + {{ start_date }} + {{ start_time }} + {% if (end_time) %} + – {{ end_time }} + {% endif %} + +

+ {% if (node.field_host.value) %} +

Hosted by Digital.gov and the {{ node.field_host.value }}

+ {% endif %} + +
+ {# EVENT Actions — REGISTER and Add to Calendar #} + {% if is_future_event and node.field_registration_url %} +
+ {{ _self.registration_link(node) }} +
+ {% endif %} + + {# EVENT Stages — Depending on the type of event, different "event stages" appear on the page. / #} + {% if is_future_event and node.field_event_platform.value == "youtube_live" %} + {{ include('@digital_gov/partials/events/stage-youtube-live.html.twig', { + 'youtube_id': node.field_youtube_id.value, + 'youtube_title': node.label, + 'captions': node.field_captions.0.uri, + }, with_context = false) }} + {% endif %} + + {% if not is_future_event and node.field_youtube_id.value %} + {{ include('@digital_gov/partials/events/stage-youtube.html.twig', { + 'youtube_id': node.field_youtube_id.value, + 'youtube_title': node.label + }, with_context = false) }} + {% endif %} + +
+
+ {# ZOOM Stage #} + {% if is_future_event and node.field_event_platform.value == "zoom" %} + {{ include('@digital_gov/partials/events/stage-zoom.html.twig', { + 'youtube_id': node.field_youtube_id.value, + 'youtube_title': node.label, + 'captions': node.field_captions.0.uri + }, with_context = false) }} + {% endif %} + + {# Main Content #} +
+ {{ content }} +
+ + {# Touchpoints Form #} + {{ include('@digital_gov/partials/touchpoints-form.html.twig') }} +
+ +
+ {# Authors #} + {% if content.field_authors %} +

In this talk

+ {{ include('@digital_gov/partials/authors-list.html.twig', { + 'inline': false, + 'authors': content.field_authors, + }, with_context = false) }} + {% endif %} + + {% if node.field_event_platform.value == "youtube_live" %} + {% if is_future_event %} +
+ {# Register #} + {{ _self.registration_link(node) }} +
+ {% endif %} + {% endif %} + + {# Display Primary Communities #} + {{ include('@digital_gov/partials/primary-communities.html.twig') }} + + {# partial "core/primary-communities.html" . #} + + {# Topics #} + {{ content.field_topics }} + + {# Share Tools #} + {{ include('@digital_gov/partials/get-sharetools.html.twig', { + 'share_path': url, + 'mailto_subject': node.label, + }, with_context = false) }} + +
+
+
+ +
+{% macro registration_link(node) %} + Register +{% endmacro %} diff --git a/web/themes/custom/digital_gov/templates/node/node--news.html.twig b/web/themes/custom/digital_gov/templates/node/node--news.html.twig new file mode 100644 index 00000000..18a4ca37 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/node/node--news.html.twig @@ -0,0 +1,134 @@ +{# +/** + * @file + * Default theme implementation to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: (optional) The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: (optional) Themed creation date field. + * - author_name: (optional) Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * + * @see template_preprocess_node() + * + * @ingroup themeable + */ +#} +
+
+ + {{ drupal_entity('block', 'digital_gov_breadcrumbs') }} + +
+ {{ include('@digital_gov/partials/blog-date-warning.html.twig') }} + + {{ include("@digital_gov/partials/page-header.html.twig", { + 'title': node.title.value, + 'kicker': node.field_kicker.value, + 'deck': node.field_deck.value + }, with_context = false) }} + + {{ include('@digital_gov/partials/authors-list.html.twig', { + 'inline': true, + 'authors': content.field_authors, + }, with_context = false) }} + +
+
+ {{ created }} +
+
+
+ +
+
+
+
+ {{ content.body }} +
+ + {# /* Touchpoints Form #} + {{ include('@digital_gov/partials/touchpoints-form.html.twig') }} +
+ +
+ {{ include('@digital_gov/partials/authors-list.html.twig', { + 'inline': false, + 'authors': content.field_authors, + }, with_context = false) }} + +
+
+ {{ created }} +
+
+ + {{ content.field_topics }} + + {# Share Tools #} + {{ include('@digital_gov/partials/get-sharetools.html.twig', { + 'share_path': url, + 'mailto_subject': node.label, + }, with_context = false) }} + + +
+
+
+ +
+ +
diff --git a/web/themes/custom/digital_gov/templates/node/node--topics.html.twig b/web/themes/custom/digital_gov/templates/node/node--topics.html.twig new file mode 100644 index 00000000..8e61acb7 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/node/node--topics.html.twig @@ -0,0 +1,277 @@ +{# +/** + * @file + * Default theme implementation to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: (optional) The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: (optional) Themed creation date field. + * - author_name: (optional) Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * + * @see template_preprocess_node() + * + * @ingroup themeable + */ +#} + +{# NOT_MIGRATED #} +{% set is_first_page = TRUE %} + +
+
+ {{ drupal_entity('block', 'digital_gov_breadcrumbs') }} +
+ + {# Default & Collection Header #} +
+

+ {{ node.title.value }} +

+ + {{ content.field_deck }} +
+ + {# Collection — Summary & Legislation #} + {% if node.field_summary or node.field_legislation %} + {% if is_first_page %} +
+
+
+ {{ content.field_summary }} +
+
+ {% if node.field_legislation.list %} + {{ include('@digital_gov/partials/card-legislation.html.twig', { + 'title': node.field_legislation.0.title, + 'url': node.field_legislation.0.uri + }, with_context = false) }} + {% endif %} +
+
+
+ {% endif %} + {% endif %} + + [placeholder featured resources and communities] + {# Collection — Featured Resources and Communities #} + {% if or .Params.featured_resources .Params.featured_communities %} + {% if is_first_page %} + + {% endif %} + {% endif %} + + {# Collection Featured Links #} + [placeholder featured links] + {% if Params.featured_links %} + {% if is_first_page %} +
+ {% if Params.featured_links.title %} +

{{ Params.featured_links.title }}

+ {% else %} +

What you need to know

+ {% endif %} + + {# NOT-MIGRATED #} + {# $featured_links := .Params.featured_links.resources #} + {# $footer := ( dict "title" .Params.featured_links.footer.title "href" .Params.featured_links.footer.href ) #} + {# $collection_settings := ( dict "variant" "custom" "limit" 10 "list_header" 3 "footer" $footer ) #} + {# partial "partials/core/collection/collection.html" (dict "collection_data" $featured_links "settings" $collection_settings) #} +
+ {% endif %} + {% else %} + {# Only show these sections when on page 1, otherwise hide to show only More News and Events #} + {% if is_first_page %} + {# Default - Related resources, services, and communities #} +
+ {# NOT-MIGRATED #} + {# $resource_settings := ( dict "header_title" (print "Resources on " .Title) "header_size" 2 "variant" "media" "list_header" 3) #} + {# partial "partials/core/collection/collection.html" (dict "collection_data" $resources "settings" $resource_settings ) #} + + {# NOT-MIGRATED #} + {# $services_settings := ( dict "header_title" "Tools and Services" "header_size" 2 "variant" "media" "list_header" 3) #} + {# partial "partials/core/collection/collection.html" (dict "collection_data" $services "settings" $services_settings) #} + + {# NOT-MIGRATED #} + {# $community_settings := ( dict "header_title" "Join a Community of Practice" "header_size" 2 "variant" "media" "list_header" 3) #} + {# partial "partials/core/collection/collection.html" (dict "collection_data" $communities "settings" $community_settings) #} +
+ {% endif %} + {% endif %} + + {# Topic Collection will always have a legislation card, use this as flag to display first 5 events & news #} + {% if Params.legislation %} + {# Only show these sections when on page 1, otherwise hide to show only More News and Events #} + {% if is_first_page %} +
+
+ {# Display first 5 events #} + {# $featured_events_stream := first 5 $events #} + {% if featured_events_stream %} +

{{ node.title.value }} events

+ + [placeholder featured events] + {# NOT-MIGRATED #} + {# range $featured_events_stream #} + {# .Render "card-event" #} + {# end #} + {% else %} +

No Events to Display

+ {% endif %} +
+ +
+ {# Display first 5 news posts #} + {# NOT-MIGRATED #} + {# $featured_posts_stream := first 5 $posts.ByDate.Reverse #} + + [placeholder featured posts] + {% if featured_posts_stream %} +

{{ node.title.value }} news

+ + {# range $featured_posts_stream #} + {# NOT-MIGRATED #} + {# .Render "card-news" #} + {% else %} +

No News to Display

+ {% endif %} +
+
+ {% endif %} + {% else %} +
+
+ {# Display events and news in one stream with pagination for topic default #} + [placeholder featured events and news] + {% if stream_paginated %} +

+ News and Events on + {{ node.title.value }} +

+

{{ stream_count }} posts

+ + {# NOT-MIGRATED + {{ range stream_paginated }} + {% if eq .Type "events" %} + {{ .Render "card-event" }} + {% endif %} + + {% if eq .Type "news" %} + {{ .Render "card-news" }} + {% endif %} + #} + {% end %} + #} + {% endif %} + {# NOT-MIGRATED #} + {# partial "core/pagination.html" . #} +
+
+ {% endif %} + + {% if node.field_legislation.0 %} + {# Display remaining resources, events and news for topic collection #} + {% if is_first_page %} +
+ [placeholder remaining resources] + {# Only show these sections when on page 1, otherwise hide to show only More News and Events #} + {# $resource_settings := ( dict "header_title" (printf "Resources on %s" .Title) "header_size" 2 "variant" "media" "list_header" 3) #} + {# NOT-MIGRATED #} + {# partial "partials/core/collection/collection.html" (dict "collection_data" $resources "settings" $resource_settings ) #} + + {# $services_settings := ( dict "header_title" "Tools and Services" "header_size" 2 "variant" "media" "list_header" 3) #} + {# NOT-MIGRATED #} + {# partial "partials/core/collection/collection.html" (dict "collection_data" $services "settings" $services_settings) #} +
+ {% endif %} + + [placeholder more news and events] + {% if stream_paginated %} +
+
+

+ More News and Events on + {{ node.title.value }} +

+

{{ stream_count }} posts

+ + {# range $stream_paginated #} + {% if Type == "events" %} + {# NOT-MIGRATED #} + {# .Render "card-event" #} + {% endif %} + + {% if Type == "news" %} + {# NOT-MIGRATED #} + {# .Render "card-news" #} + {% endif %} + {# end #} + {# NOT-MIGRATED #} + {# partial "core/pagination.html" . #} +
+
+ {% endif %} + {% endif %} + +
diff --git a/web/themes/custom/digital_gov/templates/page--node.html.twig b/web/themes/custom/digital_gov/templates/page--node.html.twig new file mode 100644 index 00000000..c0ec1a94 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/page--node.html.twig @@ -0,0 +1,70 @@ +{# +/** + * @file + * Default theme implementation to display a single page. + * + * The doctype, html, head and body tags are not in this template. Instead they + * can be found in the html.html.twig template in this directory. + * + * Available variables: + * + * General utility variables: + * - base_path: The base URL path of the Drupal installation. Will usually be + * "/" unless you have installed Drupal in a sub-directory. + * - is_front: A flag indicating if the current page is the front page. + * - logged_in: A flag indicating if the user is registered and signed in. + * - is_admin: A flag indicating if the user has permission to access + * administration pages. + * + * Site identity: + * - front_page: The URL of the front page. Use this instead of base_path when + * linking to the front page. This includes the language domain or prefix. + * + * Page content (in order of occurrence in the default page.html.twig): + * - messages: Status and error messages. Should be displayed prominently. + * - node: Fully loaded node, if there is an automatically-loaded node + * associated with the page and the node ID is the second argument in the + * page's path (e.g. node/12345 and node/12345/revisions, but not + * comment/reply/12345). + * + * Regions: + * - page.header: Items for the header region. + * - page.primary_menu: Items for the primary menu region. + * - page.secondary_menu: Items for the secondary menu region. + * - page.highlighted: Items for the highlighted content region. + * - page.help: Dynamic help text, mostly for admin pages. + * - page.content: The main content of the current page. + * - page.sidebar_first: Items for the first sidebar. + * - page.sidebar_second: Items for the second sidebar. + * - page.footer: Items for the footer region. + * - page.breadcrumb: Items for the breadcrumb region. + * + * @see template_preprocess_page() + * @see html.html.twig + * + * @ingroup themeable + */ +#} +
+ +
+ {{ page.header }} +
+ + {{ page.primary_menu }} + {{ page.secondary_menu }} + + + {{ page.highlighted }} + + {{ page.help }} + + {{ page.content }} + + {% if page.footer %} + + {% endif %} + +
{# /.layout-container #} diff --git a/web/themes/custom/digital_gov/templates/partials/authors-list.html.twig b/web/themes/custom/digital_gov/templates/partials/authors-list.html.twig new file mode 100644 index 00000000..29ba6e73 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/authors-list.html.twig @@ -0,0 +1,31 @@ +{# + # Displays a list of authors, either inline or in a list + + EXPECTED VARIABLES: + - inline: boolean + - authors: render array of author nodes + +#} +
+ {% for author in authors | children %} +
+ {{ render_var({ '#theme': 'author_image', '#author': author }) }} + + {% if not inline and author['#entity'].field_agency_acronym.value %} +

+ {{ author['#entity'].field_agency_acronym.value }} +

+ {% endif %} +
+ {% endfor %} + +
+ diff --git a/web/themes/custom/digital_gov/templates/partials/blog-date-warning.html.twig b/web/themes/custom/digital_gov/templates/partials/blog-date-warning.html.twig new file mode 100644 index 00000000..c2635aa9 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/blog-date-warning.html.twig @@ -0,0 +1,20 @@ +{% if show_archive_warning %} + +{% endif %} diff --git a/web/themes/custom/digital_gov/templates/partials/card-legislation.html.twig b/web/themes/custom/digital_gov/templates/partials/card-legislation.html.twig new file mode 100644 index 00000000..aa6c2ac1 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/card-legislation.html.twig @@ -0,0 +1,32 @@ +
+
+ {% if title %} +
+ +

+ {{ title }} +

+
+ {% endif %} +
+
+ {{ title }} +
+
+ {% if description %} +
+

+ {{ description }} +

+
+ {% endif %} + {% if url %} + + {% endif %} +
+
diff --git a/web/themes/custom/digital_gov/templates/partials/community-pagefooter.html.twig b/web/themes/custom/digital_gov/templates/partials/community-pagefooter.html.twig new file mode 100644 index 00000000..cb2eeb63 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/community-pagefooter.html.twig @@ -0,0 +1,14 @@ +

+ The Communities of Practice are hosted by Digital.gov, a service of the + Technology Transformation Services (TTS) within the General Services + Administration (GSA). GSA is a federal agency subject to the Freedom of + Information Act (FOIA) and must comply with requests for records made under + FOIA. As a result, all communications made on this Communities of Practice + LISTSERV are subject to release under FOIA. +

+

+ When participating in this CoP, follow + Digital.gov community guidelines. +

diff --git a/web/themes/custom/digital_gov/templates/partials/events/stage-youtube-live.html.twig b/web/themes/custom/digital_gov/templates/partials/events/stage-youtube-live.html.twig new file mode 100644 index 00000000..aa877076 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/events/stage-youtube-live.html.twig @@ -0,0 +1,92 @@ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ + + + Watch on YouTube + + + + {% if captions %} + + + + View captions + + + {% endif %} +
+
+
+
+

+ + You'll need to sign in to Google to chat. All chats will be archived + alongside the video. +

+
+
+
+
+
diff --git a/web/themes/custom/digital_gov/templates/partials/events/stage-youtube.html.twig b/web/themes/custom/digital_gov/templates/partials/events/stage-youtube.html.twig new file mode 100644 index 00000000..f8624048 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/events/stage-youtube.html.twig @@ -0,0 +1,18 @@ +{% if youtube_id %} +
+
+
+
+
+ +
+
+
+
+
+{% endif %} diff --git a/web/themes/custom/digital_gov/templates/partials/events/stage-zoom.html.twig b/web/themes/custom/digital_gov/templates/partials/events/stage-zoom.html.twig new file mode 100644 index 00000000..95dbdfb9 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/events/stage-zoom.html.twig @@ -0,0 +1,69 @@ +
+
+

+ +

+
+
+

+ This event will be held and recorded over + Zoom for Government. + A link and password will be sent via email 1 hour, 1 day, and 1 week prior + to the event start time for those who register. For more info, see the + computer and device requirements + and + Frequently Asked Questions. If you have specific questions or security concerns about Zoom for + Government, please visit + ZoomGov.com. +

+

+ Before the event, visit the + Zoom Download Center to install + the Zoom web browser client. +

+

+ Please contact us directly at + digitalgov@gsa.gov if you need + accessible accommodations to be able to attend. +

+ {% if captions %} +

+ + + View captions + +

+ {% endif %} + +
+
diff --git a/web/themes/custom/digital_gov/templates/partials/get-sharetools.html.twig b/web/themes/custom/digital_gov/templates/partials/get-sharetools.html.twig new file mode 100644 index 00000000..c61771a2 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/get-sharetools.html.twig @@ -0,0 +1,98 @@ +{# Share tools #} + + +
+
+ + + +
+
+ + +
+
diff --git a/web/themes/custom/digital_gov/templates/partials/get-upcomingevents.html.twig b/web/themes/custom/digital_gov/templates/partials/get-upcomingevents.html.twig new file mode 100644 index 00000000..f82a3018 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/get-upcomingevents.html.twig @@ -0,0 +1,40 @@ +{# ===== +Display upcoming events associated with a community of practice +#} + +{# NOT-MIGRATED #} + +{{ $upcoming_events := where (where .Site.RegularPages.ByDate.Reverse "Section" "events") ".Date.Unix" ">" now.Unix }} +{{ $upcoming_events = $upcoming_events | intersect (where $upcoming_events "Date" ">" now) }} +{{ $community := .Params.event_cop }} +{{ $hasEvents := false }} +{{ $tags := "" }} + +{{ range $upcoming_events }} + {# Turn the slice of []strings into a string format for comparison #} + {{ $tags = delimit .Params.event_cop ", " " " }} + {% if strings.Contains $tags $community %} + {{ $hasEvents = true }} + {% endif %} +{% endif %} + +{% if $hasEvents %} +
+

Upcoming Event

+ +
+
+{% endif %} diff --git a/web/themes/custom/digital_gov/templates/partials/page-header.html.twig b/web/themes/custom/digital_gov/templates/partials/page-header.html.twig new file mode 100644 index 00000000..6e3d81e5 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/page-header.html.twig @@ -0,0 +1,30 @@ +{# ==== +Page header component that displays the title, deck and kicker. + +You can pass any of these params: +- title - the required page title +- deck - an optional summary text displayed below the title +- kicker - an optional short introduction text displayed above the title +- append_title_text - optional text that is appended to the title text field +#} + +
+ {% if kicker %} +

+ {{ kicker }} +

+ {% endif %} + {% if title %} +

+ {{ title }} + {% if append_title_text %} + {{ append_title_text }} + {% endif %} +

+ {% endif %} + {% if deck %} +
+ {{ deck }} +
+ {% endif %} +
diff --git a/web/themes/custom/digital_gov/templates/partials/primary-communities.html.twig b/web/themes/custom/digital_gov/templates/partials/primary-communities.html.twig new file mode 100644 index 00000000..91a68082 --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/primary-communities.html.twig @@ -0,0 +1,50 @@ +{# ====================================== +Displays a vertical list of primary CoP's on the sidebar on event pages. + ====================================== +#} +{# $mainCommunities := (where .Site.Pages "Section" "communities") #} +{# $mainCommunities = (where $mainCommunities ".Params.dg_highlight" "eq" true) #} +{# $featuredCommunity := (where $mainCommunities ".Params.weight" "eq" 2) #} +{# $mainCommunities = union $featuredCommunity $mainCommunities #} +{# $mainCommunities = first 8 ($mainCommunities.ByTitle) #} + +{# Check if there are main community pages to display #} + +{# NOT-MIGRATED #} +{% if mainCommunities %} + +{% endif %} + diff --git a/web/themes/custom/digital_gov/templates/partials/touchpoints-form.html.twig b/web/themes/custom/digital_gov/templates/partials/touchpoints-form.html.twig new file mode 100644 index 00000000..1bcc666a --- /dev/null +++ b/web/themes/custom/digital_gov/templates/partials/touchpoints-form.html.twig @@ -0,0 +1,9 @@ + +
+ +