diff --git a/public/themes/custom/hdbt_subtheme/dist/css/styles.min.css b/public/themes/custom/hdbt_subtheme/dist/css/styles.min.css index 982ad5af9..750e90062 100644 --- a/public/themes/custom/hdbt_subtheme/dist/css/styles.min.css +++ b/public/themes/custom/hdbt_subtheme/dist/css/styles.min.css @@ -1 +1 @@ -@media(min-width: 768px){.unit-search--high-school .views--unit-search .views-exposed-form,.unit-search--vocational-school .views--unit-search .views-exposed-form{align-items:flex-end;grid-column-gap:24px;-moz-column-gap:24px;column-gap:24px;display:grid;grid-template-columns:1fr 1fr;grid-row-gap:32px;row-gap:32px}}.unit-search--high-school .views--unit-search .views-exposed-form .form-item,.unit-search--vocational-school .views--unit-search .views-exposed-form .form-item{margin-bottom:32px}@media(min-width: 768px){.unit-search--high-school .views--unit-search .views-exposed-form .form-item,.unit-search--vocational-school .views--unit-search .views-exposed-form .form-item{margin-bottom:0;width:100%}}.unit-search--high-school .views--unit-search .views-exposed-form .form-actions,.unit-search--vocational-school .views--unit-search .views-exposed-form .form-actions{grid-area:submit;width:100%}.unit-search--high-school .views--unit-search .views-exposed-form .form-submit,.unit-search--vocational-school .views--unit-search .views-exposed-form .form-submit{max-width:280px;min-width:44px;width:100%}.unit-search--high-school .views--unit-search .views-exposed-form label,.unit-search--vocational-school .views--unit-search .views-exposed-form label{display:block;font-weight:500;margin-bottom:4px}@media(min-width: 768px){.unit-search--high-school .views--unit-search .views-exposed-form{grid-template-areas:"filter filter" "filter filter" "submit .";grid-template-rows:auto auto auto}}@media(min-width: 768px){.unit-search--vocational-school .views--unit-search .views-exposed-form{grid-template-areas:"filter ." "submit .";grid-template-rows:auto auto}}@media(min-width: 768px){.unit-search--daycare-search .bef-exposed-form,.unit-search--playground-search .bef-exposed-form,.unit-search--after-school-activity-search .bef-exposed-form{align-items:flex-start;gap:24px;position:relative}}.unit-search--daycare-search .bef-exposed-form>.form-item,.unit-search--playground-search .bef-exposed-form>.form-item,.unit-search--after-school-activity-search .bef-exposed-form>.form-item{margin-bottom:0;margin-top:24px}@media(min-width: 768px){.unit-search--daycare-search .bef-exposed-form>.form-item,.unit-search--playground-search .bef-exposed-form>.form-item,.unit-search--after-school-activity-search .bef-exposed-form>.form-item{margin-top:0;width:auto}}.unit-search--daycare-search .bef-exposed-form>.form-item:first-child,.unit-search--playground-search .bef-exposed-form>.form-item:first-child,.unit-search--after-school-activity-search .bef-exposed-form>.form-item:first-child{margin-top:0;width:100%}.unit-search--daycare-search .fieldgroup,.unit-search--playground-search .fieldgroup,.unit-search--after-school-activity-search .fieldgroup{margin-bottom:0;margin-left:0;margin-right:0}.unit-search--daycare-search .fieldgroup .fieldset-legend,.unit-search--playground-search .fieldgroup .fieldset-legend,.unit-search--after-school-activity-search .fieldgroup .fieldset-legend{color:var(--label-color-default);display:block;font-size:var(--fontsize-body-m);font-weight:500;margin-bottom:var(--spacing-3-xs)}.unit-search--daycare-search .bef-checkboxes,.unit-search--playground-search .bef-checkboxes,.unit-search--after-school-activity-search .bef-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:flex-start}@media(min-width: 768px){.unit-search--daycare-search .bef-checkboxes,.unit-search--playground-search .bef-checkboxes,.unit-search--after-school-activity-search .bef-checkboxes{flex-direction:row;margin-bottom:16px}}.unit-search--daycare-search .bef-checkboxes .form-item,.unit-search--playground-search .bef-checkboxes .form-item,.unit-search--after-school-activity-search .bef-checkboxes .form-item{margin-bottom:0;margin-right:24px;margin-top:16px;width:auto}.unit-search--daycare-search .form-actions,.unit-search--playground-search .form-actions,.unit-search--after-school-activity-search .form-actions{margin-top:16px;width:100%}.unit-search--daycare-search .form-actions .form-submit,.unit-search--playground-search .form-actions .form-submit,.unit-search--after-school-activity-search .form-actions .form-submit{display:inline-flex;margin-top:16px;max-width:280px;min-width:44px;width:100%}.has-navigation .component--unit-search{margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px}@media(min-width: 992px){.has-navigation .component--unit-search{margin-left:0;margin-right:0}}@media(min-width: 992px){.has-sidebar .components--upper .unit-search--high-school .views--unit-search .views-exposed-form{margin-left:0}}@media(min-width: 1248px){.has-sidebar .components--upper .unit-search--high-school .views--unit-search .views-exposed-form{margin-left:-24px}}@media(min-width: 992px){.has-sidebar .components--upper .unit-search--high-school .views--unit-search .views-exposed-form .form-item,.has-sidebar .components--upper .unit-search--high-school .views--unit-search .views-exposed-form .form-actions{margin-bottom:32px;padding-left:0;width:100%}}@media(min-width: 1248px){.has-sidebar .components--upper .unit-search--high-school .views--unit-search .views-exposed-form .form-item,.has-sidebar .components--upper .unit-search--high-school .views--unit-search .views-exposed-form .form-actions{margin-bottom:0;padding-left:24px;width:25%}}.comprehensive-school__instruction-language::after{content:", "}.comprehensive-school__instruction-language:last-child::after{content:""}.hero-wrapper.has-first-gray-bg-block--desktop{background-color:#f2f2f2;margin-bottom:-64px;padding-bottom:48px}@media(min-width: 768px){.hero-wrapper.has-first-gray-bg-block--desktop{background-color:rgba(0,0,0,0);margin-bottom:0;padding-bottom:0}}.group-news__links{display:flex;justify-content:flex-start}@media(min-width: 768px){.group-news__links{justify-content:flex-end}}.news-archive--group-news{max-width:860px}.news-archive--group-news .news-listing__item{border-bottom:1px solid #f2f2f2}.unit__ontologyword-details h5{margin-bottom:16px}.unit__ontologyword-details__schoolyear{-webkit-hyphens:auto;hyphens:auto;word-wrap:break-word;--line-height: 1.5;font-size:1.25rem;font-weight:500;line-height:1.5;line-height:var(--line-height);display:block;margin-top:16px;padding-top:16px}@media(min-width: 992px){.unit__ontologyword-details__schoolyear{--line-height: 1.25;font-size:1.5rem;font-weight:500}}.unit__ontologyword-details__detail-group{--line-height: 1.5555555556;font-size:1.125rem;font-weight:700;line-height:1.5555555556;line-height:var(--line-height);margin-bottom:8px;margin-top:24px}@media(min-width: 992px){.unit__ontologyword-details__detail-group{--line-height: 1.5;font-size:1.25rem;font-weight:700}}.unit__ontologyword-details-row{--line-height: 1.5555555556;font-size:1.125rem;font-weight:400;line-height:1.5555555556;line-height:var(--line-height);margin-bottom:16px}.unit__ontologyword-details-row .unit__ontologyword-details-row__label{--line-height: 1.5;font-size:1rem;font-weight:700;line-height:1.5;line-height:var(--line-height);letter-spacing:.0125rem;align-items:flex-start;display:flex}@media(min-width: 992px){.unit__ontologyword-details-row .unit__ontologyword-details-row__label{--line-height: 1.5555555556;font-size:1.125rem;font-weight:700}} +@media(min-width: 768px){.unit-search--high-school .unit-search__content .views-exposed-form,.unit-search--vocational-school .unit-search__content .views-exposed-form{align-items:flex-end;grid-column-gap:24px;-moz-column-gap:24px;column-gap:24px;display:grid;grid-template-columns:1fr 1fr;grid-row-gap:32px;row-gap:32px}}.unit-search--high-school .unit-search__content .views-exposed-form .form-item,.unit-search--vocational-school .unit-search__content .views-exposed-form .form-item{margin-bottom:32px}@media(min-width: 768px){.unit-search--high-school .unit-search__content .views-exposed-form .form-item,.unit-search--vocational-school .unit-search__content .views-exposed-form .form-item{margin-bottom:0;width:100%}}.unit-search--high-school .unit-search__content .views-exposed-form .form-actions,.unit-search--vocational-school .unit-search__content .views-exposed-form .form-actions{grid-area:submit;width:100%}.unit-search--high-school .unit-search__content .views-exposed-form .form-submit,.unit-search--vocational-school .unit-search__content .views-exposed-form .form-submit{max-width:280px;min-width:44px;width:100%}.unit-search--high-school .unit-search__content .views-exposed-form label,.unit-search--vocational-school .unit-search__content .views-exposed-form label{display:block;font-weight:500;margin-bottom:4px}@media(min-width: 768px){.unit-search--high-school .unit-search__content .views-exposed-form{grid-template-areas:"filter filter" "filter filter" "submit .";grid-template-rows:auto auto auto}}@media(min-width: 768px){.unit-search--vocational-school .unit-search__content .views-exposed-form{grid-template-areas:"filter ." "submit .";grid-template-rows:auto auto}}@media(min-width: 768px){.unit-search--daycare-search .bef-exposed-form,.unit-search--playground-search .bef-exposed-form,.unit-search--after-school-activity-search .bef-exposed-form{align-items:flex-start;gap:24px;position:relative}}.unit-search--daycare-search .bef-exposed-form>.form-item,.unit-search--playground-search .bef-exposed-form>.form-item,.unit-search--after-school-activity-search .bef-exposed-form>.form-item{margin-bottom:0;margin-top:24px}@media(min-width: 768px){.unit-search--daycare-search .bef-exposed-form>.form-item,.unit-search--playground-search .bef-exposed-form>.form-item,.unit-search--after-school-activity-search .bef-exposed-form>.form-item{margin-top:0;width:auto}}.unit-search--daycare-search .bef-exposed-form>.form-item:first-child,.unit-search--playground-search .bef-exposed-form>.form-item:first-child,.unit-search--after-school-activity-search .bef-exposed-form>.form-item:first-child{margin-top:0;width:100%}.unit-search--daycare-search .fieldgroup,.unit-search--playground-search .fieldgroup,.unit-search--after-school-activity-search .fieldgroup{margin-bottom:0;margin-left:0;margin-right:0}.unit-search--daycare-search .fieldgroup .fieldset-legend,.unit-search--playground-search .fieldgroup .fieldset-legend,.unit-search--after-school-activity-search .fieldgroup .fieldset-legend{color:var(--label-color-default);display:block;font-size:var(--fontsize-body-m);font-weight:500;margin-bottom:var(--spacing-3-xs)}.unit-search--daycare-search .bef-checkboxes,.unit-search--playground-search .bef-checkboxes,.unit-search--after-school-activity-search .bef-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:flex-start}@media(min-width: 768px){.unit-search--daycare-search .bef-checkboxes,.unit-search--playground-search .bef-checkboxes,.unit-search--after-school-activity-search .bef-checkboxes{flex-direction:row;margin-bottom:16px}}.unit-search--daycare-search .bef-checkboxes .form-item,.unit-search--playground-search .bef-checkboxes .form-item,.unit-search--after-school-activity-search .bef-checkboxes .form-item{margin-bottom:0;margin-right:24px;margin-top:16px;width:auto}.unit-search--daycare-search .form-actions,.unit-search--playground-search .form-actions,.unit-search--after-school-activity-search .form-actions{margin-top:16px;width:100%}.unit-search--daycare-search .form-actions .form-submit,.unit-search--playground-search .form-actions .form-submit,.unit-search--after-school-activity-search .form-actions .form-submit{display:inline-flex;margin-top:16px;max-width:280px;min-width:44px;width:100%}.has-navigation .component--unit-search{margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px}@media(min-width: 992px){.has-navigation .component--unit-search{margin-left:0;margin-right:0}}@media(min-width: 992px){.has-sidebar .components--upper .unit-search--high-school .unit-search__content .views-exposed-form{margin-left:0}}@media(min-width: 1248px){.has-sidebar .components--upper .unit-search--high-school .unit-search__content .views-exposed-form{margin-left:-24px}}@media(min-width: 992px){.has-sidebar .components--upper .unit-search--high-school .unit-search__content .views-exposed-form .form-item,.has-sidebar .components--upper .unit-search--high-school .unit-search__content .views-exposed-form .form-actions{margin-bottom:32px;padding-left:0;width:100%}}@media(min-width: 1248px){.has-sidebar .components--upper .unit-search--high-school .unit-search__content .views-exposed-form .form-item,.has-sidebar .components--upper .unit-search--high-school .unit-search__content .views-exposed-form .form-actions{margin-bottom:0;padding-left:24px;width:25%}}.comprehensive-school__instruction-language::after{content:", "}.comprehensive-school__instruction-language:last-child::after{content:""}.hero-wrapper.has-first-gray-bg-block--desktop{background-color:#f2f2f2;margin-bottom:-64px;padding-bottom:48px}@media(min-width: 768px){.hero-wrapper.has-first-gray-bg-block--desktop{background-color:rgba(0,0,0,0);margin-bottom:0;padding-bottom:0}}.group-news__links{display:flex;justify-content:flex-start}@media(min-width: 768px){.group-news__links{justify-content:flex-end}}.news-archive--group-news{max-width:860px}.news-archive--group-news .news-listing__item{border-bottom:1px solid #f2f2f2}.unit__ontologyword-details h5{margin-bottom:16px}.unit__ontologyword-details__schoolyear{-webkit-hyphens:auto;hyphens:auto;word-wrap:break-word;--line-height: 1.5;font-size:1.25rem;font-weight:500;line-height:1.5;line-height:var(--line-height);display:block;margin-top:16px;padding-top:16px}@media(min-width: 992px){.unit__ontologyword-details__schoolyear{--line-height: 1.25;font-size:1.5rem;font-weight:500}}.unit__ontologyword-details__detail-group{--line-height: 1.5555555556;font-size:1.125rem;font-weight:700;line-height:1.5555555556;line-height:var(--line-height);margin-bottom:8px;margin-top:24px}@media(min-width: 992px){.unit__ontologyword-details__detail-group{--line-height: 1.5;font-size:1.25rem;font-weight:700}}.unit__ontologyword-details-row{--line-height: 1.5555555556;font-size:1.125rem;font-weight:400;line-height:1.5555555556;line-height:var(--line-height);margin-bottom:16px}.unit__ontologyword-details-row .unit__ontologyword-details-row__label{--line-height: 1.5;font-size:1rem;font-weight:700;line-height:1.5;line-height:var(--line-height);letter-spacing:.0125rem;align-items:flex-start;display:flex}@media(min-width: 992px){.unit__ontologyword-details-row .unit__ontologyword-details-row__label{--line-height: 1.5555555556;font-size:1.125rem;font-weight:700}} diff --git a/public/themes/custom/hdbt_subtheme/src/scss/06_components/paragraphs/_unit-search-variants.scss b/public/themes/custom/hdbt_subtheme/src/scss/06_components/paragraphs/_unit-search-variants.scss index eef67435f..108b8208c 100644 --- a/public/themes/custom/hdbt_subtheme/src/scss/06_components/paragraphs/_unit-search-variants.scss +++ b/public/themes/custom/hdbt_subtheme/src/scss/06_components/paragraphs/_unit-search-variants.scss @@ -1,5 +1,5 @@ -.unit-search--high-school .views--unit-search .views-exposed-form, -.unit-search--vocational-school .views--unit-search .views-exposed-form { +.unit-search--high-school .unit-search__content .views-exposed-form, +.unit-search--vocational-school .unit-search__content .views-exposed-form { @include breakpoint($breakpoint-m) { align-items: flex-end; column-gap: $spacing-and-half; @@ -35,7 +35,7 @@ } } -.unit-search--high-school .views--unit-search .views-exposed-form { +.unit-search--high-school .unit-search__content .views-exposed-form { @include breakpoint($breakpoint-m) { grid-template-areas: 'filter filter' @@ -45,7 +45,7 @@ } } -.unit-search--vocational-school .views--unit-search .views-exposed-form { +.unit-search--vocational-school .unit-search__content .views-exposed-form { @include breakpoint($breakpoint-m) { grid-template-areas: 'filter .' @@ -147,7 +147,7 @@ // If there is sidebar on the basic page and the high school search is on the // upper content of the site the filters can't fit so they need to be adjusted. -.has-sidebar .components--upper .unit-search--high-school .views--unit-search .views-exposed-form { +.has-sidebar .components--upper .unit-search--high-school .unit-search__content .views-exposed-form { @include breakpoint($breakpoint-l) { margin-left: 0; } diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig index 8f8b3608d..4b9590664 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig @@ -2,82 +2,19 @@ /** * @file * Theme override for main view template. - * - * Available variables: - * - attributes: Remaining HTML attributes for the element. - * - css_name: A css-safe version of the view name. - * - css_class: The user-specified classes names, if any. - * - header: The optional header. - * - footer: The optional footer. - * - rows: The results of the view query, if any. - * - empty: The content to display if there are no rows. - * - pager: The optional pager next/prev links to display. - * - exposed: Exposed widget form/info to display. - * - feed_icons: Optional feed icons to display. - * - more: An optional link to the next page of results. - * - title: Title of the view, only used when displaying in the admin preview. - * - title_prefix: Additional output populated by modules, intended to be - * displayed in front of the view title. - * - title_suffix: Additional output populated by modules, intended to be - * displayed after the view title. - * - attachment_before: An optional attachment view to be displayed before the - * view content. - * - attachment_after: An optional attachment view to be displayed after the - * view content. - * - dom_id: Unique id for every view being printed to give unique class for - * Javascript. - * - * @see template_preprocess_views_view() */ #} -{% - set classes = [ - 'views', - 'views--unit-search', - 'views--unit-search--large-volume', - 'views--unit-search--after-school-activity-search', - dom_id ? 'js-view-dom-id-' ~ dom_id, - 'unit-search__content' -] -%} - - {{ title_prefix }} - {{ title }} - {{ title_suffix }} - {{ exposed }} - {{ attachment_before }} - -
-

- {%- if total_rows -%} - {{ total_rows }} {% trans with {'context': 'After-school activity search count'}%}activity location{% plural total_rows %}activity locations{% endtrans %} - {%- else -%} - {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} - {%- endif -%} -

- - {% if header %} - {{ header }} - {% endif %} - - {{ rows }} - - {%- if empty -%} -

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+{% embed '@hdbt/component/unit-search.twig' with { + modifier_class: [ + 'views--unit-search--large-volume', + ] +}%} + {% block count_container%} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'After-school activity search count'}%}activity location{% plural total_rows %}activity locations{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} {%- endif -%} - - {{ pager }} -
- - {{ attachment_after }} - {{ more }} - - {% if footer %} - - {% endif %} - - {{ feed_icons }} - + {% endblock count_container %} +{% endembed %} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig index 96313c33b..9d64b1227 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig @@ -2,81 +2,19 @@ /** * @file * Theme override for main view template. - * - * Available variables: - * - attributes: Remaining HTML attributes for the element. - * - css_name: A css-safe version of the view name. - * - css_class: The user-specified classes names, if any. - * - header: The optional header. - * - footer: The optional footer. - * - rows: The results of the view query, if any. - * - empty: The content to display if there are no rows. - * - pager: The optional pager next/prev links to display. - * - exposed: Exposed widget form/info to display. - * - feed_icons: Optional feed icons to display. - * - more: An optional link to the next page of results. - * - title: Title of the view, only used when displaying in the admin preview. - * - title_prefix: Additional output populated by modules, intended to be - * displayed in front of the view title. - * - title_suffix: Additional output populated by modules, intended to be - * displayed after the view title. - * - attachment_before: An optional attachment view to be displayed before the - * view content. - * - attachment_after: An optional attachment view to be displayed after the - * view content. - * - dom_id: Unique id for every view being printed to give unique class for - * Javascript. - * - * @see template_preprocess_views_view() */ #} -{% - set classes = [ - 'views', - 'views--unit-search', - 'views--unit-search--large-volume', - 'views--unit-search--comprehensivce-school-search', - dom_id ? 'js-view-dom-id-' ~ dom_id, - 'unit-search__content' -] -%} - - {{ title_prefix }} - {{ title }} - {{ title_suffix }} - {{ exposed }} - {{ attachment_before }} - -
-

- {%- if total_rows -%} - {{ total_rows }} {% trans with {'context': 'Comprehensive school search count'}%}school{% plural total_rows %}schools{% endtrans %} - {%- else -%} - {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} - {%- endif -%} -

- - {% if header %} - {{ header }} - {% endif %} - - {{ rows }} - - {%- if empty -%} -

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+{% embed '@hdbt/component/unit-search.twig' with { + modifier_class: [ + 'views--unit-search--large-volume', + ] +}%} + {% block count_container%} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'Comprehensive school search count'}%}school{% plural total_rows %}schools{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} {%- endif -%} - {{ pager }} -
- - {{ attachment_after }} - {{ more }} - - {% if footer %} -
- {{ footer }} -
- {% endif %} - - {{ feed_icons }} - + {% endblock count_container %} +{% endembed %} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig index c96ec61ed..f8e9cdaef 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig @@ -2,82 +2,19 @@ /** * @file * Theme override for main view template. - * - * Available variables: - * - attributes: Remaining HTML attributes for the element. - * - css_name: A css-safe version of the view name. - * - css_class: The user-specified classes names, if any. - * - header: The optional header. - * - footer: The optional footer. - * - rows: The results of the view query, if any. - * - empty: The content to display if there are no rows. - * - pager: The optional pager next/prev links to display. - * - exposed: Exposed widget form/info to display. - * - feed_icons: Optional feed icons to display. - * - more: An optional link to the next page of results. - * - title: Title of the view, only used when displaying in the admin preview. - * - title_prefix: Additional output populated by modules, intended to be - * displayed in front of the view title. - * - title_suffix: Additional output populated by modules, intended to be - * displayed after the view title. - * - attachment_before: An optional attachment view to be displayed before the - * view content. - * - attachment_after: An optional attachment view to be displayed after the - * view content. - * - dom_id: Unique id for every view being printed to give unique class for - * Javascript. - * - * @see template_preprocess_views_view() */ #} -{% - set classes = [ - 'views', - 'views--unit-search', - 'views--unit-search--large-volume', - 'views--unit-search--daycare-search', - dom_id ? 'js-view-dom-id-' ~ dom_id, - 'unit-search__content' -] -%} - - {{ title_prefix }} - {{ title }} - {{ title_suffix }} - {{ exposed }} - {{ attachment_before }} - -
-

- {%- if total_rows -%} - {{ total_rows }} {% trans with {'context': 'Daycare search count'}%}daycare centre{% plural total_rows %}daycare centres{% endtrans %} - {%- else -%} - {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} - {%- endif -%} -

- - {% if header and not empty %} - {{ header }} - {% endif %} - - {{ rows }} - - {%- if empty -%} -

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+{% embed '@hdbt/component/unit-search.twig' with { + modifier_class: [ + 'views--unit-search--large-volume', + ] +}%} + {% block count_container%} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'Daycare search count'}%}daycare centre{% plural total_rows %}daycare centres{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} {%- endif -%} - - {{ pager }} -
- - {{ attachment_after }} - {{ more }} - - {% if footer %} -
- {{ footer }} -
- {% endif %} - - {{ feed_icons }} - + {% endblock count_container %} +{% endembed %} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig index d823e3a6a..0360fa5bf 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig @@ -35,7 +35,6 @@ {% set classes = [ 'views', - 'views--unit-search', 'views--unit-search--high-school-search', dom_id ? 'js-view-dom-id-' ~ dom_id, 'unit-search__content' diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--playground-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--playground-search.html.twig index ff605886b..bf1631424 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--playground-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--playground-search.html.twig @@ -2,81 +2,19 @@ /** * @file * Theme override for main view template. - * - * Available variables: - * - attributes: Remaining HTML attributes for the element. - * - css_name: A css-safe version of the view name. - * - css_class: The user-specified classes names, if any. - * - header: The optional header. - * - footer: The optional footer. - * - rows: The results of the view query, if any. - * - empty: The content to display if there are no rows. - * - pager: The optional pager next/prev links to display. - * - exposed: Exposed widget form/info to display. - * - feed_icons: Optional feed icons to display. - * - more: An optional link to the next page of results. - * - title: Title of the view, only used when displaying in the admin preview. - * - title_prefix: Additional output populated by modules, intended to be - * displayed in front of the view title. - * - title_suffix: Additional output populated by modules, intended to be - * displayed after the view title. - * - attachment_before: An optional attachment view to be displayed before the - * view content. - * - attachment_after: An optional attachment view to be displayed after the - * view content. - * - dom_id: Unique id for every view being printed to give unique class for - * Javascript. - * - * @see template_preprocess_views_view() */ #} -{% - set classes = [ - 'views', - 'views--unit-search', - 'views--unit-search--large-volume', - 'views--unit-search--playground-search', - dom_id ? 'js-view-dom-id-' ~ dom_id, - 'unit-search__content' -] -%} - - {{ title_prefix }} - {{ title }} - {{ title_suffix }} - {{ exposed }} - {{ attachment_before }} - -
-

- {%- if total_rows -%} - {{ total_rows }} {% trans with {'context': 'Playground search count'}%}playground or family house{% plural total_rows %}playgrounds or family houses{% endtrans %} - {%- else -%} - {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} - {%- endif -%} -

- - {% if header %} - {{ header }} - {% endif %} - - {{ rows }} - - {%- if empty -%} -

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+{% embed '@hdbt/component/unit-search.twig' with { + modifier_class: [ + 'views--unit-search--large-volume', + ] +}%} + {% block count_container%} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'Playground search count'}%}playground or family house{% plural total_rows %}playgrounds or family houses{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} {%- endif -%} - {{ pager }} -
- - {{ attachment_after }} - {{ more }} - - {% if footer %} -
- {{ footer }} -
- {% endif %} - - {{ feed_icons }} - + {% endblock count_container %} +{% endembed %} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig index 01609b1a4..cebd1293e 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig @@ -2,84 +2,15 @@ /** * @file * Theme override for main view template. - * - * Available variables: - * - attributes: Remaining HTML attributes for the element. - * - css_name: A css-safe version of the view name. - * - css_class: The user-specified classes names, if any. - * - header: The optional header. - * - footer: The optional footer. - * - rows: The results of the view query, if any. - * - empty: The content to display if there are no rows. - * - pager: The optional pager next/prev links to display. - * - exposed: Exposed widget form/info to display. - * - feed_icons: Optional feed icons to display. - * - more: An optional link to the next page of results. - * - title: Title of the view, only used when displaying in the admin preview. - * - title_prefix: Additional output populated by modules, intended to be - * displayed in front of the view title. - * - title_suffix: Additional output populated by modules, intended to be - * displayed after the view title. - * - attachment_before: An optional attachment view to be displayed before the - * view content. - * - attachment_after: An optional attachment view to be displayed after the - * view content. - * - dom_id: Unique id for every view being printed to give unique class for - * Javascript. - * - * @see template_preprocess_views_view() */ #} -{% - set classes = [ - 'views', - 'views--unit-search', - dom_id ? 'js-view-dom-id-' ~ dom_id, - 'unit-search__content' -] -%} - - {{ title_prefix }} - {{ title }} - {{ title_suffix }} - - {% if header %} -
- {{ header }} -
- {% endif %} - - {{ exposed }} - {{ attachment_before }} - -
-

- {%- if total_rows -%} - {{ total_rows }} {% trans with {'context': 'Vocational school search count'}%}unit{% plural total_rows %}units{% endtrans %} - {%- else -%} - {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} - {%- endif -%} -

- -
- {{ rows }} -
- - {%- if empty -%} -

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+{% embed '@hdbt/component/unit-search.twig' %} + {% block count_container%} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'Vocational school search count'}%}unit{% plural total_rows %}units{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} {%- endif -%} - - {{ pager }} -
- {{ attachment_after }} - {{ more }} - - {% if footer %} - - {% endif %} - - {{ feed_icons }} - + {% endblock count_container %} +{% endembed %}