diff --git a/config/sync/core.entity_form_display.paragraph.slider_item.default.yml b/config/sync/core.entity_form_display.paragraph.slider_item.default.yml index fa4df498ef..cb06478de4 100644 --- a/config/sync/core.entity_form_display.paragraph.slider_item.default.yml +++ b/config/sync/core.entity_form_display.paragraph.slider_item.default.yml @@ -3,14 +3,9 @@ langcode: en status: true dependencies: config: - - field.field.paragraph.slider_item.field_link - field.field.paragraph.slider_item.field_media - - field.field.paragraph.slider_item.field_subhead - - field.field.paragraph.slider_item.field_summary - - field.field.paragraph.slider_item.field_title - paragraphs.paragraphs_type.slider_item module: - - link - media_library _core: default_config_hash: FNlIGpC1xngsFl4CDnZFULys0RJuQmkcProE1Fp-SIc @@ -19,14 +14,6 @@ targetEntityType: paragraph bundle: slider_item mode: default content: - field_link: - type: link_default - weight: 4 - region: content - settings: - placeholder_url: '' - placeholder_title: '' - third_party_settings: { } field_media: type: media_library_widget weight: 2 @@ -34,30 +21,6 @@ content: settings: media_types: { } third_party_settings: { } - field_subhead: - type: string_textfield - weight: 1 - region: content - settings: - size: 60 - placeholder: '' - third_party_settings: { } - field_summary: - type: string_textarea - weight: 3 - region: content - settings: - rows: 5 - placeholder: '' - third_party_settings: { } - field_title: - type: string_textfield - weight: 0 - region: content - settings: - size: 60 - placeholder: '' - third_party_settings: { } hidden: created: true status: true diff --git a/config/sync/core.entity_view_display.block_content.slider.default.yml b/config/sync/core.entity_view_display.block_content.slider.default.yml index 7e5f3fc91a..d06ce73bf4 100644 --- a/config/sync/core.entity_view_display.block_content.slider.default.yml +++ b/config/sync/core.entity_view_display.block_content.slider.default.yml @@ -26,7 +26,7 @@ content: region: content field_title: type: string - label: above + label: hidden settings: link_to_entity: false third_party_settings: { } diff --git a/config/sync/core.entity_view_display.paragraph.slider_item.default.yml b/config/sync/core.entity_view_display.paragraph.slider_item.default.yml index 22a5e39d5a..b3f6027f96 100644 --- a/config/sync/core.entity_view_display.paragraph.slider_item.default.yml +++ b/config/sync/core.entity_view_display.paragraph.slider_item.default.yml @@ -3,14 +3,8 @@ langcode: en status: true dependencies: config: - - field.field.paragraph.slider_item.field_link - field.field.paragraph.slider_item.field_media - - field.field.paragraph.slider_item.field_subhead - - field.field.paragraph.slider_item.field_summary - - field.field.paragraph.slider_item.field_title - paragraphs.paragraphs_type.slider_item - module: - - link _core: default_config_hash: kYkCQyu6xDkZiu0L8x4ou95oWkMPIE82UqR0mFmj0d8 id: paragraph.slider_item.default @@ -18,18 +12,6 @@ targetEntityType: paragraph bundle: slider_item mode: default content: - field_link: - type: link - label: hidden - settings: - trim_length: 80 - url_only: false - url_plain: false - rel: '' - target: '' - third_party_settings: { } - weight: 2 - region: content field_media: type: entity_reference_entity_view label: hidden @@ -39,29 +21,6 @@ content: third_party_settings: { } weight: 1 region: content - field_subhead: - type: string - label: hidden - settings: - link_to_entity: false - third_party_settings: { } - weight: 3 - region: content - field_summary: - type: basic_string - label: hidden - settings: { } - third_party_settings: { } - weight: 4 - region: content - field_title: - type: string - label: hidden - settings: - link_to_entity: false - third_party_settings: { } - weight: 0 - region: content hidden: entity_print_view_epub: true entity_print_view_pdf: true diff --git a/config/sync/crop.type.main_image.yml b/config/sync/crop.type.main_image.yml index 7303268eb0..7d5b6b5890 100644 --- a/config/sync/crop.type.main_image.yml +++ b/config/sync/crop.type.main_image.yml @@ -2,7 +2,7 @@ uuid: d41ce67d-ce52-4be6-8470-9416bc360cc8 langcode: en status: true dependencies: { } -label: 'Main Image' +label: 'Main Image (or Slider images)' id: main_image description: '' aspect_ratio: '2:1' diff --git a/config/sync/field.field.paragraph.slider_item.field_link.yml b/config/sync/field.field.paragraph.slider_item.field_link.yml deleted file mode 100644 index 44c7d9864f..0000000000 --- a/config/sync/field.field.paragraph.slider_item.field_link.yml +++ /dev/null @@ -1,25 +0,0 @@ -uuid: 307cdd80-eba6-4608-b36e-2c971efee33e -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_link - - paragraphs.paragraphs_type.slider_item - module: - - link -_core: - default_config_hash: N3WhsHQ8gQKq3xNzpqNEtIQ2qCcLFO9aCETEjGb5xI8 -id: paragraph.slider_item.field_link -field_name: field_link -entity_type: paragraph -bundle: slider_item -label: Link -description: 'Optional call to action link.' -required: false -translatable: true -default_value: { } -default_value_callback: '' -settings: - title: 1 - link_type: 17 -field_type: link diff --git a/config/sync/field.field.paragraph.slider_item.field_media.yml b/config/sync/field.field.paragraph.slider_item.field_media.yml index 6e361646ad..1f0d4687db 100644 --- a/config/sync/field.field.paragraph.slider_item.field_media.yml +++ b/config/sync/field.field.paragraph.slider_item.field_media.yml @@ -5,7 +5,6 @@ dependencies: config: - field.storage.paragraph.field_media - media.type.image - - media.type.video - paragraphs.paragraphs_type.slider_item _core: default_config_hash: 07ZXXR9WkYOSLQv5TLNKFq1pPdlQJjPWm-v0FtrGXYU @@ -24,7 +23,6 @@ settings: handler_settings: target_bundles: image: image - video: video sort: field: _none direction: ASC diff --git a/config/sync/field.field.paragraph.slider_item.field_subhead.yml b/config/sync/field.field.paragraph.slider_item.field_subhead.yml deleted file mode 100644 index f0b50695fa..0000000000 --- a/config/sync/field.field.paragraph.slider_item.field_subhead.yml +++ /dev/null @@ -1,21 +0,0 @@ -uuid: 176cc93c-fd58-4964-8c1c-71b2a5871248 -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_subhead - - paragraphs.paragraphs_type.slider_item -_core: - default_config_hash: TK83SR24SunhOqv-IzZh4USw6YRjAByi7JDXMabJsFo -id: paragraph.slider_item.field_subhead -field_name: field_subhead -entity_type: paragraph -bundle: slider_item -label: Subhead -description: '' -required: false -translatable: true -default_value: { } -default_value_callback: '' -settings: { } -field_type: string diff --git a/config/sync/field.field.paragraph.slider_item.field_summary.yml b/config/sync/field.field.paragraph.slider_item.field_summary.yml deleted file mode 100644 index 37ff0e641c..0000000000 --- a/config/sync/field.field.paragraph.slider_item.field_summary.yml +++ /dev/null @@ -1,21 +0,0 @@ -uuid: 46abbee1-beb0-48a8-b745-4a3656bbb0c0 -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_summary - - paragraphs.paragraphs_type.slider_item -_core: - default_config_hash: PMsjNRyy_Q-BWcYYzqR_jx9fw-TfYYEj6BpZ-UPnDow -id: paragraph.slider_item.field_summary -field_name: field_summary -entity_type: paragraph -bundle: slider_item -label: Summary -description: 'Slider item summary.' -required: false -translatable: true -default_value: { } -default_value_callback: '' -settings: { } -field_type: string_long diff --git a/config/sync/field.field.paragraph.slider_item.field_title.yml b/config/sync/field.field.paragraph.slider_item.field_title.yml deleted file mode 100644 index 52911b585a..0000000000 --- a/config/sync/field.field.paragraph.slider_item.field_title.yml +++ /dev/null @@ -1,21 +0,0 @@ -uuid: e6d93e46-311c-4e8a-862c-0e8d0b562639 -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_title - - paragraphs.paragraphs_type.slider_item -_core: - default_config_hash: nT3SqRU39nn13AcXpkpaUV1akRhXk9_YPBxXVUNPSsY -id: paragraph.slider_item.field_title -field_name: field_title -entity_type: paragraph -bundle: slider_item -label: Title -description: '' -required: false -translatable: true -default_value: { } -default_value_callback: '' -settings: { } -field_type: string diff --git a/config/sync/field.storage.paragraph.field_media.yml b/config/sync/field.storage.paragraph.field_media.yml index 241dbd59ba..1048c3e17f 100644 --- a/config/sync/field.storage.paragraph.field_media.yml +++ b/config/sync/field.storage.paragraph.field_media.yml @@ -3,8 +3,12 @@ langcode: en status: true dependencies: module: + - field_permissions - media - paragraphs +third_party_settings: + field_permissions: + permission_type: public _core: default_config_hash: wa_nFwSP5949t2qfxB3fcBdCkaB3eFjMowkhLytP5BI id: paragraph.field_media diff --git a/web/themes/custom/nysenate_theme/nysenate_theme.theme b/web/themes/custom/nysenate_theme/nysenate_theme.theme index b9d8a31d65..dfa275e043 100644 --- a/web/themes/custom/nysenate_theme/nysenate_theme.theme +++ b/web/themes/custom/nysenate_theme/nysenate_theme.theme @@ -69,45 +69,6 @@ function nysenate_theme_preprocess_block__system_branding_block(&$variables) { ]; } -/** - * Implements hook_preprocess_block_ID(). - */ -function nysenate_theme_preprocess_block_content__how_senate_works(&$variables) { - if (!empty($variables['elements']['field_link'][0])) { - $variables['cta'] = [ - 'text' => $variables['elements']['field_link'][0]['#title'], - 'link' => $variables['elements']['field_link'][0]['#url']->toString(), - ]; - } - - $steps = []; - foreach ($variables['elements']['field_steps'] as $key => $items) { - if (!is_numeric($key)) { - continue; - } - - $title = ''; - $description = ''; - - if ($items['#paragraph']->field_title->getValue()) { - $title = $items['#paragraph']->field_title->getValue(); - $title = reset($title)['value']; - } - - if ($items['#paragraph']->field_description->getValue()) { - $description = $items['#paragraph']->field_description->getValue(); - $description = reset($description)['value']; - } - - $steps[] = [ - 'title' => $title, - 'description' => $description, - ]; - } - - $variables['steps'] = $steps; -} - /** * Implements hook_preprocess_node_TYPE(). */ diff --git a/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/_carousel-item.twig b/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/_carousel-item.twig index 9ceccb88ed..e7229172d4 100644 --- a/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/_carousel-item.twig +++ b/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/_carousel-item.twig @@ -2,7 +2,7 @@ diff --git a/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/carousel.twig b/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/carousel.twig index de7c938ec7..42de9f7c6b 100644 --- a/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/carousel.twig +++ b/web/themes/custom/nysenate_theme/src/patterns/components/nysenate-carousel/carousel.twig @@ -1,16 +1,16 @@ {{ attach_library('nysenate_theme/carousel') }} - + diff --git a/web/themes/custom/nysenate_theme/src/patterns/global/blocks/_blocks.scss b/web/themes/custom/nysenate_theme/src/patterns/global/blocks/_blocks.scss index da65d3bf6d..4675a26096 100644 --- a/web/themes/custom/nysenate_theme/src/patterns/global/blocks/_blocks.scss +++ b/web/themes/custom/nysenate_theme/src/patterns/global/blocks/_blocks.scss @@ -133,6 +133,12 @@ body { margin-top: 40px; } } + + h2.pg-subtitle { + font-family: $font-serif; + font-size: 30px; + color: #444444; + } } .c-block .c-img--caption { @@ -180,6 +186,8 @@ body { } } + + @include breakpoint($bp-sm) { .c-block-legislation .c-block--btn-toggle { height: 42px; diff --git a/web/themes/custom/nysenate_theme/src/templates/block/block-content--slider.html.twig b/web/themes/custom/nysenate_theme/src/templates/block/block-content--slider.html.twig index 018d07a341..a1418ad6ae 100644 --- a/web/themes/custom/nysenate_theme/src/templates/block/block-content--slider.html.twig +++ b/web/themes/custom/nysenate_theme/src/templates/block/block-content--slider.html.twig @@ -18,32 +18,19 @@ %} - {{ title_prefix }} - {{ title_suffix }} - {% block content %} - {% if content.field_title %} -
- {% - include '@rain_theme/heading/heading.twig' with { - "heading": { - "title": content.field_title, - "heading_level": "2", - "modifier": "heading--section", - }, - } only - %} -
- {% endif %} - {% if content.field_slider_item['#items']|length > 1 %} - {% embed '@rain_theme/carousel/carousel.twig' with { content: content } only %} - {% block carousel_items %} - {% for i in content.field_slider_item['#items'] %} - {{ content.field_slider_item[loop.index0] }} - {% endfor %} - {% endblock %} - {% endembed %} - {% else %} - {{ content.field_slider_item }} - {% endif %} - {% endblock %} + {% if content.field_title %} +

{{ content.field_title }}

+ {% endif %} + + {% if content.field_slider_item['#items']|length > 1 %} + {% embed '@nysenate_theme/nysenate-carousel/carousel.twig' with { content: content } only %} + {% block carousel_items %} + {% for i in content.field_slider_item['#items'] %} + {{ content.field_slider_item[loop.index0] }} + {% endfor %} + {% endblock %} + {% endembed %} + {% else %} + {{ content.field_slider_item }} + {% endif %} diff --git a/web/themes/custom/nysenate_theme/src/templates/paragraphs/paragraph--slider-item.html.twig b/web/themes/custom/nysenate_theme/src/templates/paragraphs/paragraph--slider-item.html.twig index 267283e9d5..9240d39df9 100644 --- a/web/themes/custom/nysenate_theme/src/templates/paragraphs/paragraph--slider-item.html.twig +++ b/web/themes/custom/nysenate_theme/src/templates/paragraphs/paragraph--slider-item.html.twig @@ -38,43 +38,9 @@ * @ingroup themeable */ #} -{% if count > 1 %} - {% include '@rain_theme/carousel/_carousel-item.twig' with { - "item": { - "image": content.field_media, - "title": content.field_title, - "button": { - "text": content.field_link[0]['#title'], - "url": content.field_link[0]['#url'] - } - } - } only %} -{% else %} - {% include '@rain_theme/hero/hero.twig' with { - "hero": { - "media": { - "image": content.field_media - }, - "eyebrow": { - "text": content.field_subhead|render|trim is not empty ? content.field_subhead, - "modifier": "hero__eyebrow" - }, - "heading": { - "title": content.field_title, - "level": "2", - "modifier": "hero__heading" - }, - "body": { - "body_text": content.field_summary|render|trim is not empty ? content.field_summary, - "modifier": "hero__body" - }, - "button": { - "text": content.field_link[0]['#title'], - "url": content.field_link[0]['#url'] - }, - "layout": { - "short_hero_layout": short_hero_layout - } - } - } only %} -{% endif %} \ No newline at end of file + + +{% include '@nysenate_theme/nysenate-carousel/_carousel-item.twig' with { + "image": content.field_media +} only %} +