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 7d25bfe64..eb23353aa 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 @@ -.district-teaser,.project-teaser{background-color:#fff;margin-bottom:16px;position:relative}@media(min-width: 768px){.district-teaser,.project-teaser{display:flex}}.district-teaser .hel-icon--arrow-right,.district-teaser .hel-icon--link-external,.project-teaser .hel-icon--arrow-right,.project-teaser .hel-icon--link-external{height:32px;width:32px;transition:transform .2s linear}@media(min-width: 768px){.district-teaser .hel-icon--arrow-right,.district-teaser .hel-icon--link-external,.project-teaser .hel-icon--arrow-right,.project-teaser .hel-icon--link-external{bottom:32px;position:absolute;right:24px}}@media(prefers-reduced-motion){.district-teaser .hel-icon--arrow-right,.district-teaser .hel-icon--link-external,.project-teaser .hel-icon--arrow-right,.project-teaser .hel-icon--link-external{transition:none}}.district-teaser:hover .hel-icon--arrow-right,.project-teaser:hover .hel-icon--arrow-right{transform:translateX(4px)}.district-teaser__data,.project-teaser__data{display:flex;flex-direction:column;padding:32px 24px 32px 24px}@media(min-width: 768px){.district-teaser__data,.project-teaser__data{padding:24px 32px 24px 32px;width:60%}}.district-teaser__data .content-tags,.project-teaser__data .content-tags{margin-bottom:8px}.district-teaser__data .content-tags__tags__tag:last-child,.project-teaser__data .content-tags__tags__tag:last-child{margin-bottom:0}.district-teaser__data .metadata__item,.project-teaser__data .metadata__item{margin-bottom:16px;margin-top:0;width:100%}@media(min-width: 768px){.district-teaser__data .metadata__item>div,.project-teaser__data .metadata__item>div{display:flex;flex-wrap:wrap}}.district-teaser__data .metadata__item .metadata__item-label::after,.project-teaser__data .metadata__item .metadata__item-label::after{content:":";margin-right:4px}.district-teaser__image,.project-teaser__image{min-width:220px;overflow:hidden}@media(min-width: 768px){.district-teaser__image,.project-teaser__image{max-width:380px;width:40%}}.district-teaser__image img,.project-teaser__image img{display:block;height:auto;width:100%}.district-teaser__image .image-placeholder,.project-teaser__image .image-placeholder{height:100%;padding-bottom:aspect-ratio-padding(1.5)}.district-teaser__link,.project-teaser__link{display:block;margin-bottom:16px;text-decoration:none}.district-teaser__link::after,.project-teaser__link::after{content:"";top:0;right:0;bottom:0;left:0;position:absolute}.district-teaser__link h3,.project-teaser__link h3{--line-height: 1.3;font-size:1.25rem;font-weight:500;line-height:var(--line-height);display:inline-block;margin-top:0}@media(min-width: 992px){.district-teaser__link h3,.project-teaser__link h3{--line-height: 1.1666666667;font-size:1.5rem;font-weight:500}}.district__content-container{display:flex;flex-direction:column-reverse;margin:auto;margin-top:64px;max-width:1296px;padding-left:16px;padding-right:16px}@media(min-width: 992px){.district__content-container{flex-direction:row}}@media(min-width: 768px){.district__content-container{max-width:1328px}}@media(min-width: 768px){.district__content-container{padding-left:32px;padding-right:32px}}.district__content{margin-bottom:32px;width:100%}@media(min-width: 992px){.district__content{margin-bottom:0;margin-bottom:initial}}@media(min-width: 992px){.district__content.has-sidebar{margin-left:64px}}.district__content.has-sidebar .table-of-contents{margin:0}.district__content .table-of-contents,.district__content .component{padding:0 !important}@media(min-width: 992px){.district__sidebar-content{width:340px}}.node--type-district .hero__arrow{display:none}.node--type-district .metadata__item-content .label:not(:last-of-type)::after{content:", "}.page-type--district .lower-content .component--list-of-links:last-of-type{background-color:#f2f2f2;margin-bottom:calc((50px + 64px)*-1);padding-bottom:96px;padding-top:96px}.page-type--project .project__image-container,.page-type--project .content-tags,.page-type--project .project__metadata-wrapper{max-width:1296px;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media(min-width: 768px){.page-type--project .project__image-container,.page-type--project .content-tags,.page-type--project .project__metadata-wrapper{max-width:1328px}}@media(min-width: 768px){.page-type--project .project__image-container,.page-type--project .content-tags,.page-type--project .project__metadata-wrapper{padding-left:32px;padding-right:32px}}.page-type--project .project__image-container picture{display:block;max-width:860px}.page-type--project .project__image-container picture img{display:block;height:auto;max-width:100%;overflow:hidden;box-shadow:inset 0 0 0 1px #e6e6e6}.node--type-project .content-tags{margin-top:32px}.node--type-project .lead-in{margin-bottom:32px}.node--type-project .lower-content .component--list-of-links{background-color:#ccc}.node--type-project .metadata-container{max-width:860px}.node--type-project .metadata__item-content .label:not(:last-of-type)::after,.node--type-project .metadata__item--schedule--plan-schedule *:last-child::after{content:", "}.node--type-project .project-metadata__schedule{display:block}.page-type--project .lower-content .component--list-of-links:last-of-type{background-color:#f2f2f2;margin-bottom:calc((50px + 64px)*-1);padding-bottom:96px;padding-top:96px}.project-teaser .content-tags{margin-top:0}.component--district-listing{background-color:#f7f7f8}.layout-main-wrapper>*:last-child .component--district-listing:last-child{margin-bottom:-115px;padding-bottom:55px}.district-listing .views-infinite-scroll-content-wrapper{margin-top:16px}@media(min-width: 768px){.district-listing .views-infinite-scroll-content-wrapper{margin-top:32px}}.district-listing__count-container{--line-height: 1.5;font-size:1.25rem;font-weight:400;line-height:var(--line-height)}@media(min-width: 992px){.district-listing__count-container{--line-height: 1.5;font-size:1.375rem;font-weight:400}}.district-listing__count-container .district-listing__count{font-weight:700}.district-listing .district-teaser .content-tags{display:none}.component--journey-planner .media-oembed-content{border:1px solid #ccc;border-radius:10px;height:252px;width:100%}@media(min-width: 768px){.component--journey-planner .media-oembed-content{width:500px}}.component--list-of-plans{padding-left:16px;padding-right:16px;background-color:#f7f7f8}@media(min-width: 768px){.component--list-of-plans{padding-left:32px;padding-right:32px}}.layout-main-wrapper>*:last-child .component--list-of-plans:last-child{margin-bottom:-115px;padding-bottom:55px}.list-of-plans__count-container{--line-height: 1.5;font-size:1.25rem;font-weight:400;line-height:var(--line-height)}@media(min-width: 992px){.list-of-plans__count-container{--line-height: 1.5;font-size:1.375rem;font-weight:400}}.list-of-plans__count-container .list-of-plans__count{font-weight:700}.list-of-plans__list{margin-top:24px}.list-of-plans__subscribe-link{--line-height: 1.5555555556;font-size:1.125rem;font-weight:400;line-height:var(--line-height);margin-top:32px}.list-of-plans__pager{margin-top:32px}@media(min-width: 768px){.list-of-plans__pager{margin-top:64px;text-align:center}}.list-of-plans__pager-button{width:100%}@media(min-width: 768px){.list-of-plans__pager-button{width:auto}}.plan{background-color:#fff;margin-top:8px;padding-left:24px;padding-top:24px;padding-right:24px;padding-bottom:calc(24px + 28px + 8px);position:relative}@media(min-width: 992px){.plan{padding-left:32px;padding-top:32px;padding-right:32px;padding-bottom:60px}}.plan:first-child{margin-top:0}.plan__title{--line-height: 1.3;font-size:1.25rem;font-weight:500;line-height:var(--line-height);margin-top:0}@media(min-width: 992px){.plan__title{--line-height: 1.1666666667;font-size:1.5rem;font-weight:500}}.plan__link{text-decoration:none}.plan__link::before{content:"";display:block;top:0;right:0;bottom:0;left:0;position:absolute}.plan__link .link__type{left:24px;bottom:24px;position:absolute}@media(min-width: 992px){.plan__link .link__type{--line-height: 2;left:auto;right:20px}}.plan__published{--line-height: 1.5;font-size:1rem;font-weight:400;line-height:var(--line-height);color:#666;margin-top:24px}.component--project-list{padding-left:16px;padding-right:16px;background-color:#f7f7f8}@media(min-width: 768px){.component--project-list{padding-left:32px;padding-right:32px}}.project-list_count{--line-height: 1.3;font-size:1.25rem;font-weight:500;line-height:var(--line-height)}@media(min-width: 992px){.project-list_count{--line-height: 1.1666666667;font-size:1.5rem;font-weight:500}}.project-list_count-text{--line-height: 1.5555555556;font-size:1.125rem;font-weight:400;line-height:var(--line-height)}.project-list__count-container{margin-bottom:24px}.views--project-list .views-row:last-child .project-teaser{margin-bottom:0}.project-list__buttons{display:flex;flex-direction:column}@media(min-width: 768px){.project-list__buttons{flex-direction:row}}.project-list__buttons .hds-pagination-container{width:100%}.project-list__list .project-teaser .content-tags{display:none} +.district-teaser{background-color:#fff;margin-bottom:16px;position:relative}@media(min-width: 768px){.district-teaser{display:flex}}.district-teaser .hel-icon--arrow-right,.district-teaser .hel-icon--link-external{height:32px;width:32px;transition:transform .2s linear}@media(min-width: 768px){.district-teaser .hel-icon--arrow-right,.district-teaser .hel-icon--link-external{bottom:32px;position:absolute;right:24px}}@media(prefers-reduced-motion){.district-teaser .hel-icon--arrow-right,.district-teaser .hel-icon--link-external{transition:none}}.district-teaser:hover .hel-icon--arrow-right{transform:translateX(4px)}.district-teaser__data{display:flex;flex-direction:column;padding:32px 24px 32px 24px}@media(min-width: 768px){.district-teaser__data{padding:24px 32px 24px 32px;width:60%}}.district-teaser__data .content-tags{margin-bottom:8px}.district-teaser__data .content-tags__tags__tag:last-child{margin-bottom:0}.district-teaser__data .metadata__item{margin-bottom:16px;margin-top:0;width:100%}@media(min-width: 768px){.district-teaser__data .metadata__item>div{display:flex;flex-wrap:wrap}}.district-teaser__data .metadata__item .metadata__item-label::after{content:":";margin-right:4px}.district-teaser__image{min-width:220px;overflow:hidden}@media(min-width: 768px){.district-teaser__image{max-width:380px;width:40%}}.district-teaser__image img{display:block;height:auto;width:100%}.district-teaser__image .image-placeholder{height:100%;padding-bottom:aspect-ratio-padding(1.5)}.district-teaser__link{display:block;margin-bottom:16px;text-decoration:none}.district-teaser__link::after{content:"";top:0;right:0;bottom:0;left:0;position:absolute}.district-teaser__link h3{--line-height: 1.3;font-size:1.25rem;font-weight:500;line-height:var(--line-height);display:inline-block;margin-top:0}@media(min-width: 992px){.district-teaser__link h3{--line-height: 1.1666666667;font-size:1.5rem;font-weight:500}}.district__content-container{display:flex;flex-direction:column-reverse;margin:auto;margin-top:64px;max-width:1296px;padding-left:16px;padding-right:16px}@media(min-width: 992px){.district__content-container{flex-direction:row}}@media(min-width: 768px){.district__content-container{max-width:1328px}}@media(min-width: 768px){.district__content-container{padding-left:32px;padding-right:32px}}.district__content{margin-bottom:32px;width:100%}@media(min-width: 992px){.district__content{margin-bottom:0;margin-bottom:initial}}@media(min-width: 992px){.district__content.has-sidebar{margin-left:64px}}.district__content.has-sidebar .table-of-contents{margin:0}.district__content .table-of-contents,.district__content .component{padding:0 !important}@media(min-width: 992px){.district__sidebar-content{width:340px}}.node--type-district .hero__arrow{display:none}.node--type-district .metadata__item-content .label:not(:last-of-type)::after{content:", "}.page-type--district .lower-content .component--list-of-links:last-of-type{background-color:#f2f2f2;margin-bottom:calc((50px + 64px)*-1);padding-bottom:96px;padding-top:96px}.page-type--project .project__image-container,.page-type--project .content-tags,.page-type--project .project__metadata-wrapper{max-width:1296px;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media(min-width: 768px){.page-type--project .project__image-container,.page-type--project .content-tags,.page-type--project .project__metadata-wrapper{max-width:1328px}}@media(min-width: 768px){.page-type--project .project__image-container,.page-type--project .content-tags,.page-type--project .project__metadata-wrapper{padding-left:32px;padding-right:32px}}.page-type--project .project__image-container picture{display:block;max-width:860px}.page-type--project .project__image-container picture img{display:block;height:auto;max-width:100%;overflow:hidden;box-shadow:inset 0 0 0 1px #e6e6e6}.node--type-project .content-tags{margin-top:32px}.node--type-project .lead-in{margin-bottom:32px}.node--type-project .lower-content .component--list-of-links{background-color:#ccc}.node--type-project .metadata-container{max-width:860px}.node--type-project .metadata__item-content .label:not(:last-of-type)::after,.node--type-project .metadata__item--schedule--plan-schedule *:last-child::after,.node--type-project .card__meta__content .label:not(:last-of-type)::after,.node--type-project .card__meta__content .label--schedule:not(:last-of-type) *:last-child::after{content:", "}.node--type-project .project-metadata__schedule{display:block}.page-type--project .lower-content .component--list-of-links:last-of-type{background-color:#f2f2f2;margin-bottom:calc((50px + 64px)*-1);padding-bottom:96px;padding-top:96px}.project-teaser .content-tags{margin-top:0}.component--district-listing{background-color:#f7f7f8}.layout-main-wrapper>*:last-child .component--district-listing:last-child{margin-bottom:-115px;padding-bottom:55px}.district-listing .views-infinite-scroll-content-wrapper{margin-top:16px}@media(min-width: 768px){.district-listing .views-infinite-scroll-content-wrapper{margin-top:32px}}.district-listing__count-container{--line-height: 1.5;font-size:1.25rem;font-weight:400;line-height:var(--line-height)}@media(min-width: 992px){.district-listing__count-container{--line-height: 1.5;font-size:1.375rem;font-weight:400}}.district-listing__count-container .district-listing__count{font-weight:700}.district-listing .district-teaser .content-tags{display:none}.component--journey-planner .media-oembed-content{border:1px solid #ccc;border-radius:10px;height:252px;width:100%}@media(min-width: 768px){.component--journey-planner .media-oembed-content{width:500px}}.component--list-of-plans{padding-left:16px;padding-right:16px;background-color:#f7f7f8}@media(min-width: 768px){.component--list-of-plans{padding-left:32px;padding-right:32px}}.layout-main-wrapper>*:last-child .component--list-of-plans:last-child{margin-bottom:-115px;padding-bottom:55px}.list-of-plans__count-container{--line-height: 1.5;font-size:1.25rem;font-weight:400;line-height:var(--line-height)}@media(min-width: 992px){.list-of-plans__count-container{--line-height: 1.5;font-size:1.375rem;font-weight:400}}.list-of-plans__count-container .list-of-plans__count{font-weight:700}.list-of-plans__list{margin-top:24px}.list-of-plans__subscribe-link{--line-height: 1.5555555556;font-size:1.125rem;font-weight:400;line-height:var(--line-height);margin-top:32px}.list-of-plans__pager{margin-top:32px}@media(min-width: 768px){.list-of-plans__pager{margin-top:64px;text-align:center}}.list-of-plans__pager-button{width:100%}@media(min-width: 768px){.list-of-plans__pager-button{width:auto}}.plan{background-color:#fff;margin-top:8px;padding-left:24px;padding-top:24px;padding-right:24px;padding-bottom:calc(24px + 28px + 8px);position:relative}@media(min-width: 992px){.plan{padding-left:32px;padding-top:32px;padding-right:32px;padding-bottom:60px}}.plan:first-child{margin-top:0}.plan__title{--line-height: 1.3;font-size:1.25rem;font-weight:500;line-height:var(--line-height);margin-top:0}@media(min-width: 992px){.plan__title{--line-height: 1.1666666667;font-size:1.5rem;font-weight:500}}.plan__link{text-decoration:none}.plan__link::before{content:"";display:block;top:0;right:0;bottom:0;left:0;position:absolute}.plan__link .link__type{left:24px;bottom:24px;position:absolute}@media(min-width: 992px){.plan__link .link__type{--line-height: 2;left:auto;right:20px}}.plan__published{--line-height: 1.5;font-size:1rem;font-weight:400;line-height:var(--line-height);color:#666;margin-top:24px}.component--project-list{padding-left:16px;padding-right:16px;background-color:#f7f7f8}@media(min-width: 768px){.component--project-list{padding-left:32px;padding-right:32px}}.project-list_count{--line-height: 1.3;font-size:1.25rem;font-weight:500;line-height:var(--line-height)}@media(min-width: 992px){.project-list_count{--line-height: 1.1666666667;font-size:1.5rem;font-weight:500}}.project-list_count-text{--line-height: 1.5555555556;font-size:1.125rem;font-weight:400;line-height:var(--line-height)}.project-list__count-container{margin-bottom:24px}.views--project-list .views-row:last-child .project-teaser{margin-bottom:0}.project-list__buttons{display:flex;flex-direction:column}@media(min-width: 768px){.project-list__buttons{flex-direction:row}}.project-list__buttons .hds-pagination-container{width:100%}.project-list__list .project-teaser .content-tags{display:none} diff --git a/public/themes/custom/hdbt_subtheme/package-lock.json b/public/themes/custom/hdbt_subtheme/package-lock.json index 17af1d13a..f21b0c11b 100644 --- a/public/themes/custom/hdbt_subtheme/package-lock.json +++ b/public/themes/custom/hdbt_subtheme/package-lock.json @@ -3340,9 +3340,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001565", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz", - "integrity": "sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==", + "version": "1.0.30001572", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz", + "integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==", "funding": [ { "type": "opencollective", @@ -13185,9 +13185,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001565", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz", - "integrity": "sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==" + "version": "1.0.30001572", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz", + "integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==" }, "chalk": { "version": "2.4.2", diff --git a/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_district_and_project.scss b/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_district_and_project.scss index 6996d60d9..cbace0b9f 100644 --- a/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_district_and_project.scss +++ b/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_district_and_project.scss @@ -1,8 +1,7 @@ @use "sass:math"; /* District and project shared teaser styles */ -.district-teaser, -.project-teaser { +.district-teaser { background-color: $color-white; margin-bottom: $spacing; position: relative; @@ -30,8 +29,7 @@ } } -.district-teaser__data, -.project-teaser__data { +.district-teaser__data { display: flex; flex-direction: column; padding: $spacing-double $spacing-and-half $spacing-double $spacing-and-half; @@ -72,8 +70,7 @@ $-image-placeholder-ratio: math.div(3, 2); $-image-size: 380px; $-image-min-size: 220px; -.district-teaser__image, -.project-teaser__image { +.district-teaser__image { min-width: $-image-min-size; overflow: hidden; @@ -94,8 +91,7 @@ $-image-min-size: 220px; } } -.district-teaser__link, -.project-teaser__link { +.district-teaser__link { display: block; margin-bottom: $spacing; text-decoration: none; diff --git a/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_project.scss b/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_project.scss index a80c20ba7..6af33e2f6 100644 --- a/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_project.scss +++ b/public/themes/custom/hdbt_subtheme/src/scss/06_components/pages/_project.scss @@ -40,7 +40,9 @@ } .metadata__item-content .label:not(:last-of-type)::after, - .metadata__item--schedule--plan-schedule *:last-child::after { + .metadata__item--schedule--plan-schedule *:last-child::after, + .card__meta__content .label:not(:last-of-type)::after, + .card__meta__content .label--schedule:not(:last-of-type) *:last-child::after { content: ', '; } diff --git a/public/themes/custom/hdbt_subtheme/templates/content/node--project--teaser.html.twig b/public/themes/custom/hdbt_subtheme/templates/content/node--project--teaser.html.twig index 1e2ba1e49..c24fffc41 100644 --- a/public/themes/custom/hdbt_subtheme/templates/content/node--project--teaser.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/content/node--project--teaser.html.twig @@ -5,21 +5,7 @@ ] %} -{% set link_title %} - {{ title_prefix }} -

- {{ label }} -

- {{ title_suffix }} -{% endset %} - -{% set link_attributes = { - 'class': [ - 'project-teaser__link', - ], - 'rel': 'bookmark', -} %} - +{% set external = false %} {% if content.field_project_external_website|render %} {% set link_url = content.field_project_external_website.0['#url'] %} {% set external = true %} @@ -27,63 +13,43 @@ {% set link_url = node_url %} {% endif %} - - -
- {% if content.field_project_image.0 %} - {{ content.field_project_image }} - {% else %} - {% include '@hdbt/media/image--card.html.twig' with {content: '' } %} - {% endif %} -
-
- {% set tag_content %} - {{ 'Project'|t }} - {% endset %} - {% embed '@hdbt/misc/tag-list.twig' with { tag_container_class: ' content-tags--card' } %} - {% block content %} - {% include '@hdbt/misc/tag.twig' with { - color: 'gold', - tag: tag_content - }%} - {% endblock content %} - {% endembed %} - {{ link(link_title, link_url, link_attributes) }} - - {% set schedule %} - {% if content.field_project_plan_schedule|render %} - - {% endif %} - {% if content.field_project_execution_schedule|render %} - - {% endif %} - {% endset %} - - {% include '@hdbt/misc/metadata-item.twig' with { - item_icon: 'calendar', - item_label: 'Estimated schedule'|t, - item_content: schedule, - }%} - {% include '@hdbt/misc/metadata-item.twig' with { - item_icon: 'location', - item_label: 'Project location'|t, - item_content: content.field_project_district, - }%} - {% include '@hdbt/misc/metadata-item.twig' with { - item_icon: 'locate', - item_label: 'Project theme'|t, - item_content: content.field_project_theme, - }%} - +{% set schedule %} + {% if content.field_project_plan_schedule|render %} + {{ 'planning'|t }}{{ content.field_project_plan_schedule }} + {% endif %} + {% if content.field_project_execution_schedule|render %} + {{ 'execution'|t }}{{ content.field_project_execution_schedule }} + {% endif %} +{% endset %} - {% if external %} - {% include "@hdbt/misc/icon.twig" with {icon: 'link-external' } only %} - {% else %} - {% include "@hdbt/misc/icon.twig" with {icon: 'arrow-right' } only %} - {% endif %} -
- +{% embed '@hdbt/component/card.twig' with { + card_modifier_class: classes|join(' '), + card_image: content.field_project_image, + card_title: label, + card_url: link_url, + card_url_external: external, + card_metas: [ + { + icon: 'calendar', + label: 'Estimated schedule'|t, + content: schedule + }, + { + icon: 'location', + label: 'Project location'|t, + content: content.field_project_district + }, + { + icon: 'locate', + label: 'Project theme'|t, + content: content.field_project_theme + }, + ], + card_tags: [ + { + tag: 'Project'|t, + color: 'gold', + }, + ], + } %} +{% endembed %} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view-unformatted--project-list.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view-unformatted--project-list.html.twig new file mode 100644 index 000000000..8dcdaaa2b --- /dev/null +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view-unformatted--project-list.html.twig @@ -0,0 +1,21 @@ +{# +/** + * @file + * Theme override to display a view of unformatted rows. + * + * Available variables: + * - title: The title of this group of rows. May be empty. + * - rows: A list of the view's row items. + * - attributes: The row's HTML attributes. + * - content: The row's content. + * - view: The view object. + * - default_row_class: A flag indicating whether default classes should be + * used on rows. + * + * @see template_preprocess_views_view_unformatted() + */ +#} + +{% for row in rows %} + {{- row.content -}} +{% endfor %}