diff --git a/bcl-builder.config.js b/bcl-builder.config.js index e756e2b25ca95465ac1eab95fa5cba68fc83f93b..1804eeff275fb04129bcb39ec3f4042d48e7b9c1 100644 --- a/bcl-builder.config.js +++ b/bcl-builder.config.js @@ -313,6 +313,15 @@ module.exports = { sourceMap: "file", }, }, + { + entry: path.resolve(outputFolder, `${ventuno}src/scss/pages/group.scss`), + dest: path.resolve(outputFolder, `${ventuno}assets/css/group.min.css`), + options: { + includePaths, + minify: true, + sourceMap: "file", + }, + }, // Components { entry: path.resolve( @@ -875,6 +884,18 @@ module.exports = { sourceMap: "file", }, }, + { + entry: path.resolve( + outputFolder, + `${ventuno}src/scss/components/see-more.scss` + ), + dest: path.resolve(outputFolder, `${ventuno}assets/css/see-more.min.css`), + options: { + includePaths, + minify: true, + sourceMap: "file", + }, + }, { entry: path.resolve( outputFolder, diff --git a/composer.json b/composer.json index ce2b1119331c8000179b639187b4e016bf002f34..60f51b8ee50b3252e87116bd930e38dec398b63f 100644 --- a/composer.json +++ b/composer.json @@ -55,6 +55,7 @@ "drupal/inline_entity_form": "^3.0", "drupal/json_field": "^1.0", "drupal/layout_builder_component_attributes": "^2.1", + "drupal/layout_custom_section_classes": "^1.0", "drupal/layout_paragraphs": "^2.0", "drupal/linkit": "^6.1", "drupal/memcache": "^2.5", diff --git a/composer.lock b/composer.lock index 84369b4c54f23771f3eed17561724d5ae4a6bdab..00f955e107b90bbf67396d3c889ded37c1cfeca4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "13d0384513b3a9e0b442cdafb99499c1", + "content-hash": "9500f6005007f8b74acedd21dc821c0a", "packages": [ { "name": "asm89/stack-cors", @@ -4426,6 +4426,52 @@ "issues": "https://drupal.org/project/issues/layout_builder_component_attributes" } }, + { + "name": "drupal/layout_custom_section_classes", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/layout_custom_section_classes.git", + "reference": "1.0.5" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/layout_custom_section_classes-1.0.5.zip", + "reference": "1.0.5", + "shasum": "3383d592ce2dbcab41be1c55b8801bdb10dbe192" + }, + "require": { + "drupal/core": "^8.8|^9|^10", + "neilime/php-css-lint": "^2.0|^3.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "1.0.5", + "datestamp": "1705045634", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "kaszarobert", + "homepage": "https://www.drupal.org/user/3578328" + } + ], + "description": "Allows editors to add HTML attributes to Layout Builder sections and its regions", + "homepage": "https://drupal.org/project/layout_custom_section_classes", + "support": { + "source": "https://cgit.drupalcode.org/layout_custom_section_classes", + "issues": "https://drupal.org/project/issues/layout_custom_section_classes" + } + }, { "name": "drupal/layout_paragraphs", "version": "2.0.4", diff --git a/config/sync/core.entity_view_display.rdf_entity.collection.default.yml b/config/sync/core.entity_view_display.rdf_entity.collection.default.yml index b7c79e5be79e7c2ab84f07b36455dde7aeebc641..8dacf2482d4606722bed20fd2a32fdb540df02b0 100644 --- a/config/sync/core.entity_view_display.rdf_entity.collection.default.yml +++ b/config/sync/core.entity_view_display.rdf_entity.collection.default.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - core.base_field_override.rdf_entity.collection.label - field.field.rdf_entity.collection.field_ar_abstract - field.field.rdf_entity.collection.field_ar_access_url - field.field.rdf_entity.collection.field_ar_affiliates @@ -60,7 +61,23 @@ third_party_settings: template_suggestion: template_suggestion: p_wrapper weight: 1 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: fs-4 + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' d376972e-fd7a-493d-a3b7-80ee05799cfd: uuid: d376972e-fd7a-493d-a3b7-80ee05799cfd region: left @@ -108,6 +125,38 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 0 + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' + 6a2c3e9b-443d-4793-af8c-8bfdf3d8a4b5: + uuid: 6a2c3e9b-443d-4793-af8c-8bfdf3d8a4b5 + region: content + configuration: + id: 'field_block:rdf_entity:collection:label' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 0 additional: { } f7eda7e5-fc8d-48b4-824a-e908843362fb: uuid: f7eda7e5-fc8d-48b4-824a-e908843362fb @@ -122,6 +171,38 @@ third_party_settings: level: 1 depth: 0 weight: 0 + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: mb-3 + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' + 101eacc5-7bad-4f56-b95a-2d9405ec7d6b: + uuid: 101eacc5-7bad-4f56-b95a-2d9405ec7d6b + region: content + configuration: + id: 'field_block:rdf_entity:collection:label' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 1 additional: { } third_party_settings: { } - @@ -129,6 +210,18 @@ third_party_settings: layout_settings: label: 'Description section' context_mapping: { } + custom_id: null + custom_classes: '' + custom_class_choose: null + custom_styles: null + custom_data_attributes: null + regions: + content: + region_id: null + region_class_choose: null + region_classes: joinup-group--description + region_styles: null + region_data: null components: cc1204b7-2b5c-4e96-b9b6-d726a9ea2b96: uuid: cc1204b7-2b5c-4e96-b9b6-d726a9ea2b96 @@ -147,7 +240,7 @@ third_party_settings: settings: { } third_party_settings: template_suggestion: - template_suggestion: '' + template_suggestion: description__see__more weight: 0 additional: { } third_party_settings: { } @@ -156,6 +249,18 @@ third_party_settings: layout_settings: label: 'Search section' context_mapping: { } + custom_id: '' + custom_classes: mb-5 + custom_class_choose: { } + custom_styles: '' + custom_data_attributes: '' + regions: + content: + region_id: '' + region_class_choose: { } + region_classes: '' + region_styles: '' + region_data: '' components: 2c5ec8f0-ddf7-4dc9-9ae9-8f4d758dd09e: uuid: 2c5ec8f0-ddf7-4dc9-9ae9-8f4d758dd09e @@ -234,6 +339,18 @@ third_party_settings: layout_settings: label: 'Detailed items' context_mapping: { } + custom_id: null + custom_classes: '' + custom_class_choose: null + custom_styles: null + custom_data_attributes: null + regions: + content: + region_id: null + region_class_choose: null + region_classes: 'joinup-group--detailed-items d-flex flex-wrap rounded-3 bg-light mt-4 mb-5 px-4 pt-4' + region_styles: null + region_data: null components: 504f9a8c-ab74-424a-b513-12f70ba3aef4: uuid: 504f9a8c-ab74-424a-b513-12f70ba3aef4 @@ -261,7 +378,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 1 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' f0743480-207f-440b-8300-77e9a7d58d36: uuid: f0743480-207f-440b-8300-77e9a7d58d36 region: content @@ -293,13 +426,41 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 0 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' third_party_settings: { } - layout_id: layout_onecol layout_settings: label: 'Moderation section' context_mapping: { } + custom_id: null + custom_classes: '' + custom_class_choose: null + custom_styles: null + custom_data_attributes: null + regions: + content: + region_id: null + region_class_choose: null + region_classes: 'p-4 rounded-3 bg-light' + region_styles: null + region_data: null components: d78c7b8a-3a6a-4f91-8e05-91a99cc7f72c: uuid: d78c7b8a-3a6a-4f91-8e05-91a99cc7f72c @@ -323,7 +484,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 1 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' fc1c1b18-8be1-42b1-90cb-1d7ca038db1c: uuid: fc1c1b18-8be1-42b1-90cb-1d7ca038db1c region: content @@ -346,7 +523,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 3 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' dc7639da-0089-48f6-95e5-c4b4edf7a867: uuid: dc7639da-0089-48f6-95e5-c4b4edf7a867 region: content @@ -360,7 +553,23 @@ third_party_settings: value: '<h3>Moderation</h3>' format: content_editor weight: 0 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: fw-bold + style: '' + data: '' third_party_settings: { } id: rdf_entity.collection.default targetEntityType: rdf_entity diff --git a/config/sync/core.entity_view_display.rdf_entity.collection.explore_item.yml b/config/sync/core.entity_view_display.rdf_entity.collection.explore_item.yml index 26287ba967e1163cd134e86534abc851d3ae5c15..f91af0de405bc120f569016ffdefb30b465cb789 100644 --- a/config/sync/core.entity_view_display.rdf_entity.collection.explore_item.yml +++ b/config/sync/core.entity_view_display.rdf_entity.collection.explore_item.yml @@ -27,8 +27,6 @@ dependencies: - field_group - layout_builder - layout_discovery - - smart_trim - - template_suggestion - user third_party_settings: field_group: @@ -160,66 +158,10 @@ id: rdf_entity.collection.explore_item targetEntityType: rdf_entity bundle: collection mode: explore_item -content: - created: - type: timestamp - label: hidden - settings: - date_format: medium - custom_date_format: '' - timezone: '' - tooltip: - date_format: '' - custom_date_format: '' - time_diff: - enabled: false - future_format: '@interval hence' - past_format: '@interval ago' - granularity: 2 - refresh: 60 - third_party_settings: { } - weight: 2 - region: content - field_ar_description: - type: smart_trim - label: hidden - settings: - trim_length: 500 - trim_type: chars - trim_suffix: … - wrap_output: false - wrap_class: trimmed - more: - display_link: false - target_blank: false - link_trim_only: false - class: more-link - text: More - aria_label: 'Read more about [node:title]' - summary_handler: full - trim_options: - text: true - trim_zero: false - third_party_settings: - template_suggestion: - template_suggestion: p_wrapper - weight: 1 - region: content - label: - type: string - label: hidden - settings: - link_to_entity: false - third_party_settings: { } - weight: 0 - region: content - read_more: - settings: { } - third_party_settings: { } - weight: 3 - region: content +content: { } hidden: changed: true + created: true featured: true field_ar_abstract: true field_ar_access_url: true @@ -227,6 +169,7 @@ hidden: field_ar_closed: true field_ar_contact_information: true field_ar_content_creation: true + field_ar_description: true field_ar_logo: true field_ar_moderation: true field_ar_owner: true @@ -239,12 +182,14 @@ hidden: field_spatial_coverage: true field_topic: true join_collection: true + label: true langcode: true last_update: true members: true og_group: true rdf_entity_collection_field_collection_content_inline_facets: true rdf_entity_collection_field_collection_content_top: true + read_more: true search_api_excerpt: true settings: true solutions: true diff --git a/config/sync/core.entity_view_display.rdf_entity.solution.default.yml b/config/sync/core.entity_view_display.rdf_entity.solution.default.yml index f0c95a4eb5fedf5e93f6bc51de5983a7166367b9..77c3e330a192e862f9b27b23df355e6563136514 100644 --- a/config/sync/core.entity_view_display.rdf_entity.solution.default.yml +++ b/config/sync/core.entity_view_display.rdf_entity.solution.default.yml @@ -152,7 +152,23 @@ third_party_settings: level: 1 depth: 0 weight: 0 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: mb-3 + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 5d9de396-8b5c-4b3c-9a69-ec3fb12f0c50: uuid: 5d9de396-8b5c-4b3c-9a69-ec3fb12f0c50 region: main @@ -173,13 +189,41 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 0 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: fs-4 + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' third_party_settings: { } - layout_id: layout_onecol layout_settings: label: 'Description section' context_mapping: { } + custom_id: null + custom_classes: '' + custom_class_choose: null + custom_styles: null + custom_data_attributes: null + regions: + content: + region_id: null + region_class_choose: null + region_classes: joinup-group--description + region_styles: null + region_data: null components: 0a924836-b054-4860-bf01-e4ccd8b934f8: uuid: 0a924836-b054-4860-bf01-e4ccd8b934f8 @@ -198,7 +242,7 @@ third_party_settings: settings: { } third_party_settings: template_suggestion: - template_suggestion: p_wrapper + template_suggestion: description__see__more weight: 0 additional: { } third_party_settings: { } @@ -207,6 +251,18 @@ third_party_settings: layout_settings: label: 'Search section' context_mapping: { } + custom_id: '' + custom_classes: mb-5 + custom_class_choose: { } + custom_styles: '' + custom_data_attributes: '' + regions: + content: + region_id: '' + region_class_choose: { } + region_classes: '' + region_styles: '' + region_data: '' components: 6dcfc528-443b-41bd-a7fb-cee3075e64ce: uuid: 6dcfc528-443b-41bd-a7fb-cee3075e64ce @@ -280,6 +336,18 @@ third_party_settings: layout_settings: label: 'Detailed items' context_mapping: { } + custom_id: null + custom_classes: '' + custom_class_choose: null + custom_styles: null + custom_data_attributes: null + regions: + content: + region_id: null + region_class_choose: null + region_classes: 'd-flex flex-wrap rounded-3 bg-light mt-4 mb-5 px-4 px-4 pt-4 ' + region_styles: null + region_data: null components: a6db9a21-e068-4956-bc80-546313dacf23: uuid: a6db9a21-e068-4956-bc80-546313dacf23 @@ -307,7 +375,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 2 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 3cf24ce9-8700-44c3-a663-1834b2f44c4d: uuid: 3cf24ce9-8700-44c3-a663-1834b2f44c4d region: content @@ -334,7 +418,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 3 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' bbf37e40-0a11-4edc-bbcf-1b43cae0304e: uuid: bbf37e40-0a11-4edc-bbcf-1b43cae0304e region: content @@ -355,7 +455,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 4 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 9cee878e-b949-4a83-a2c9-7235e431e320: uuid: 9cee878e-b949-4a83-a2c9-7235e431e320 region: content @@ -382,7 +498,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 5 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: 'p-4 p-lg-5' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 39d3c3ed-cfc8-49bd-8bbe-9fd93e76e8cc: uuid: 39d3c3ed-cfc8-49bd-8bbe-9fd93e76e8cc region: content @@ -403,7 +535,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 7 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' f519b608-0e9b-4859-bcd0-f8ebf8f6bc19: uuid: f519b608-0e9b-4859-bcd0-f8ebf8f6bc19 region: content @@ -424,7 +572,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 8 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 26bdb361-9338-49ce-b71a-629179d3ad4c: uuid: 26bdb361-9338-49ce-b71a-629179d3ad4c region: content @@ -445,7 +609,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 6 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 215eea21-4677-4722-a8dd-10153035c3fc: uuid: 215eea21-4677-4722-a8dd-10153035c3fc region: content @@ -477,7 +657,23 @@ third_party_settings: template_suggestion: template_suggestion: solution_last_update_date weight: 1 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 9f0cd2ee-67dc-45bd-99e7-7a84c0febd2f: uuid: 9f0cd2ee-67dc-45bd-99e7-7a84c0febd2f region: content @@ -488,13 +684,41 @@ third_party_settings: provider: solution context_mapping: { } weight: 7 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: 'pe-5 pb-4' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' third_party_settings: { } - layout_id: layout_onecol layout_settings: label: 'Related solutions section' context_mapping: { } + custom_id: '' + custom_classes: mb-5 + custom_class_choose: { } + custom_styles: '' + custom_data_attributes: '' + regions: + content: + region_id: '' + region_class_choose: { } + region_classes: '' + region_styles: '' + region_data: '' components: d3112377-46c7-4f4e-bf86-079dc90e4aa9: uuid: d3112377-46c7-4f4e-bf86-079dc90e4aa9 @@ -512,6 +736,18 @@ third_party_settings: layout_settings: label: 'Moderation section' context_mapping: { } + custom_id: null + custom_classes: mb-5 + custom_class_choose: null + custom_styles: null + custom_data_attributes: null + regions: + content: + region_id: null + region_class_choose: null + region_classes: 'p-4 rounded-3 bg-light' + region_styles: null + region_data: null components: 8add6d2e-a7d0-4b66-8c58-510135c0a62f: uuid: 8add6d2e-a7d0-4b66-8c58-510135c0a62f @@ -526,7 +762,23 @@ third_party_settings: value: '<h3>Moderation</h3>' format: content_editor weight: 0 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 5050b32b-2f43-461b-b7e3-034a81346ab5: uuid: 5050b32b-2f43-461b-b7e3-034a81346ab5 region: content @@ -549,7 +801,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 2 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' 1d91aa9a-e8aa-45fd-8021-aec98ab934b8: uuid: 1d91aa9a-e8aa-45fd-8021-aec98ab934b8 region: content @@ -569,7 +837,23 @@ third_party_settings: template_suggestion: template_suggestion: '' weight: 1 - additional: { } + additional: + component_attributes: + block_attributes: + id: '' + class: '' + style: '' + data: '' + block_title_attributes: + id: '' + class: '' + style: '' + data: '' + block_content_attributes: + id: '' + class: '' + style: '' + data: '' third_party_settings: { } - layout_id: layout_onecol diff --git a/config/sync/core.entity_view_display.rdf_entity.solution.explore_item.yml b/config/sync/core.entity_view_display.rdf_entity.solution.explore_item.yml index eff0293615c5d40fae179943bdc730a8858bbe66..bb304d26bd78c9c354e8f8f42210647c3bb11309 100644 --- a/config/sync/core.entity_view_display.rdf_entity.solution.explore_item.yml +++ b/config/sync/core.entity_view_display.rdf_entity.solution.explore_item.yml @@ -50,8 +50,6 @@ dependencies: - field_group - layout_builder - layout_discovery - - smart_trim - - template_suggestion - user third_party_settings: field_group: @@ -181,74 +179,11 @@ id: rdf_entity.solution.explore_item targetEntityType: rdf_entity bundle: solution mode: explore_item -content: - created: - type: timestamp - label: hidden - settings: - date_format: custom - custom_date_format: m/d/y - timezone: '' - tooltip: - date_format: '' - custom_date_format: '' - time_diff: - enabled: false - future_format: '@interval hence' - past_format: '@interval ago' - granularity: 2 - refresh: 60 - third_party_settings: - template_suggestion: - template_suggestion: '' - weight: 2 - region: content - field_is_description: - type: smart_trim - label: hidden - settings: - trim_length: 500 - trim_type: chars - trim_suffix: … - wrap_output: false - wrap_class: trimmed - more: - display_link: false - target_blank: false - link_trim_only: false - class: more-link - text: More - aria_label: 'Read more about [node:title]' - summary_handler: full - trim_options: - text: true - trim_zero: false - third_party_settings: - template_suggestion: - template_suggestion: p_wrapper - weight: 1 - region: content - flag_like_rdf_entity: - settings: { } - third_party_settings: { } - weight: 10 - region: content - label: - type: string - label: hidden - settings: - link_to_entity: false - third_party_settings: { } - weight: 0 - region: content - read_more: - settings: { } - third_party_settings: { } - weight: 3 - region: content +content: { } hidden: changed: true collections: true + created: true download_total: true eif_perspective: true featured: true @@ -259,6 +194,7 @@ hidden: field_is_contact_information: true field_is_content: true field_is_content_creation: true + field_is_description: true field_is_distribution: true field_is_documentation: true field_is_eif_category: true @@ -292,12 +228,15 @@ hidden: field_spatial_coverage: true field_status: true field_topic: true + flag_like_rdf_entity: true + label: true langcode: true members: true og_group: true pinned_in: true rdf_entity_solution_field_is_content_inline_facets: true rdf_entity_solution_field_is_content_top: true + read_more: true related_solution: true related_solutions: true releases_overview: true diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 2b3e298b6728b7ee70b9905d44a8f07a8fa2b23d..94c15feaa6bae3b192b189a94b20cac08960f6eb 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -126,6 +126,7 @@ module: language: 0 layout_builder: 0 layout_builder_component_attributes: 0 + layout_custom_section_classes: 0 layout_discovery: 0 layout_paragraphs: 0 link: 0 diff --git a/config/sync/layout_custom_section_classes.settings.yml b/config/sync/layout_custom_section_classes.settings.yml new file mode 100644 index 0000000000000000000000000000000000000000..c608d0138fea710b0faded8fa938f0fc37b187e2 --- /dev/null +++ b/config/sync/layout_custom_section_classes.settings.yml @@ -0,0 +1,15 @@ +_core: + default_config_hash: 4HLMWJHuwpYh3u68pZa5cIAyfLKtENbpUqwnNJ2jmNE +allowed_section_attributes: + id: false + class: true + class_list: false + style: false + data: false +allowed_section_region_attributes: + id: false + class_list: false + class: true + style: false + data: false +class_list: { } diff --git a/resources/patch/php/drupal/layout_custom_section_classes/3414002.diff b/resources/patch/php/drupal/layout_custom_section_classes/3414002.diff new file mode 100644 index 0000000000000000000000000000000000000000..3e33ae48ad261b2a0f5613163ec496be0c262da2 --- /dev/null +++ b/resources/patch/php/drupal/layout_custom_section_classes/3414002.diff @@ -0,0 +1,56 @@ +diff --git a/config/schema/layout_custom_section_classes.schema.yml b/config/schema/layout_custom_section_classes.schema.yml +index 563b326f7520b5ac39636486e8ed499e1870b789..834f30e67a41c3f1ef887727b9b67a22109973c8 100644 +--- a/config/schema/layout_custom_section_classes.schema.yml ++++ b/config/schema/layout_custom_section_classes.schema.yml +@@ -46,3 +46,51 @@ layout_custom_section_classes.settings: + sequence: + - type: string + label: 'Class' ++ ++layout_plugin.settings.*: ++ type: layout_plugin.settings ++ mapping: ++ custom_id: ++ type: string ++ label: 'ID' ++ custom_classes: ++ type: string ++ label: 'Class(es)' ++ custom_class_choose: ++ type: sequence ++ nullable: true ++ label: 'CSS classes to choose from' ++ sequence: ++ type: string ++ label: 'CSS class' ++ custom_styles: ++ type: string ++ label: 'Styles' ++ custom_data_attributes: ++ type: string ++ label: 'Data-* attributes' ++ regions: ++ type: config_entity ++ mapping: ++ content: ++ type: config_entity ++ mapping: ++ region_id: ++ type: string ++ label: 'ID' ++ region_class_choose: ++ type: sequence ++ nullable: true ++ label: 'CSS classes to choose from' ++ sequence: ++ type: string ++ label: 'CSS class' ++ region_classes: ++ type: string ++ label: 'Class(es)' ++ region_styles: ++ type: string ++ label: 'Styles' ++ region_data: ++ type: string ++ label: 'Data-* attributes' diff --git a/tests/features/taxonomy/curated_homepage_topics.feature b/tests/features/taxonomy/curated_homepage_topics.feature index e9424efd5ff70db9f525ca833569c106ce7755d5..4e2821847a34ad53384e3ad6e9f91531c63d200b 100644 --- a/tests/features/taxonomy/curated_homepage_topics.feature +++ b/tests/features/taxonomy/curated_homepage_topics.feature @@ -295,13 +295,13 @@ Feature: # Open collapse When I press "See more" - Then I should see the text "See less" + Then I wait until the page contains the text "See less" And I should not see the text "See more" Then the "See less" collapse is expanded # Close collapse again When I press "See less" - Then I should see the text "See more" + Then I wait until the page contains the text "See more" And I should not see the text "See less" Then the "See more" collapse is collapsed diff --git a/tests/features/update/update_8386.feature b/tests/features/update/update_8386.feature index 3fa7a708da5a950bc4838aad7f6fc18923a38959..d1cf2f3e005c9eef16c713e5a4bc1540c4d0f3aa 100644 --- a/tests/features/update/update_8386.feature +++ b/tests/features/update/update_8386.feature @@ -13,14 +13,8 @@ Feature: Simple deploy hook tests for ISAICP-8386. | Federation of solutions | | Glossary | | Technical documentation | - # All links must be disabled for anonymous. - And I should not see the following links in the "Quick links": - | FAQ | - | Joinup Roadmap | - | Joinup code reuse | - | How-To & video tutorials | - | Federation of solutions | - | Technical documentation | + # All links are disabled for anonymous so region is not displayed. + And I should not see the "Quick links" region When I am logged in as a moderator And I go to the homepage of the "Joinup" collection diff --git a/web/modules/custom/joinup_layout/layouts/group/joinup-layout--group-heading.html.twig b/web/modules/custom/joinup_layout/layouts/group/joinup-layout--group-heading.html.twig index e5ca0ab61354e2b902ab54fd287c0474316d9556..5610970f50f99a73c8c4861719e1e176febec91c 100644 --- a/web/modules/custom/joinup_layout/layouts/group/joinup-layout--group-heading.html.twig +++ b/web/modules/custom/joinup_layout/layouts/group/joinup-layout--group-heading.html.twig @@ -1,6 +1,6 @@ {% if content %} <div {{ attributes.addClass('layout', 'l-group-heading', 'row') }}> - <div class="l-group-heading__content col-12 col-md-7 py-5"> + <div class="l-group-heading__content col-12 col-md-7 col-lg-6 py-5"> {% if content.main %} <div class="row mb-4"> <div {{ region_attributes.second.addClass('l-group-heading__main') }}> @@ -26,8 +26,8 @@ {% endif %} </div> - {% if content.aside %} - <div {{ region_attributes.aside.addClass('l-group-heading__aside', 'col-12', 'col-md-5', 'py-5', 'ps-5') }}> + {% if content.aside|render|striptags|trim %} + <div {{ region_attributes.aside.addClass('l-group-heading__aside', 'bg-light', 'col-12', 'col-md-5', 'col-lg-4', 'offset-lg-2', 'rounded-3', 'p-4', 'p-lg-5', 'mb-5') }}> {{ content.aside }} </div> {% endif %} diff --git a/web/modules/custom/template_suggestion/template_suggestion.module b/web/modules/custom/template_suggestion/template_suggestion.module index 53603bdb4820d60dc0009ff485a039820d0753a0..45e06b15995d65f251ccbffa320fdbef01f614e9 100644 --- a/web/modules/custom/template_suggestion/template_suggestion.module +++ b/web/modules/custom/template_suggestion/template_suggestion.module @@ -7,7 +7,6 @@ declare(strict_types = 1); -use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FormatterInterface; use Drupal\Core\Form\FormStateInterface; @@ -36,39 +35,27 @@ function template_suggestion_field_formatter_third_party_settings_form(Formatter * * Add template suggestions based on the configuration added in the formatter. */ -function template_suggestion_theme_suggestions_field_alter(array &$suggestions, array &$variables) { +function template_suggestion_theme_suggestions_field_alter(array &$suggestions, array &$variables): void { $element = $variables['element']; if (!empty($element['#entity_type']) && !empty($element['#bundle']) && !empty($element['#field_name'])) { - $entity_type = $element['#entity_type']; + $entityType = $element['#entity_type']; $bundle = $element['#bundle']; - $field_name = $element['#field_name']; + $fieldName = $element['#field_name']; // View mode is not strictly required for the functionality. - $view_mode = !empty($element['#view_mode']) ? $element['#view_mode'] : 'default'; - - // Load the related display. If not found, try to load the default as - // fallback. This is needed because displays like the "full" one might not - // be enabled but still used for rendering. - // @see \Drupal\Core\Entity\Entity\EntityViewDisplay::collectRenderDisplays() - $display = EntityViewDisplay::load($entity_type . '.' . $bundle . '.' . $view_mode); - if (empty($display) && $view_mode !== 'default') { - $display = EntityViewDisplay::load($entity_type . '.' . $bundle . '.default'); - } - - if (!empty($display)) { - $component = $display->getComponent($field_name); - if (!empty($component['third_party_settings']['template_suggestion']['template_suggestion'])) { - $suggestion = 'field__' . $component['third_party_settings']['template_suggestion']['template_suggestion']; - $suggestions[] = $suggestion; - $suggestions[] = $suggestion . '__' . $entity_type; - $suggestions[] = $suggestion . '__' . $entity_type . '__' . $bundle; - $suggestions[] = $suggestion . '__' . $entity_type . '__' . $bundle . '__' . $field_name; - $suggestions[] = $suggestion . '__' . $entity_type . '__' . $bundle . '__' . $field_name . '__' . $view_mode; - - // Add the custom template suggestion back in the element to allow other - // modules to have this information. - $variables['element']['#template_suggestion_template_suggestion'] = $suggestion; - } + $viewMode = !empty($element['#view_mode']) ? $element['#view_mode'] : 'default'; + + if (!empty($variables['element']['#third_party_settings']['template_suggestion']['template_suggestion'])) { + $suggestion = 'field__' . $variables['element']['#third_party_settings']['template_suggestion']['template_suggestion']; + $suggestions[] = $suggestion; + $suggestions[] = $suggestion . '__' . $entityType; + $suggestions[] = $suggestion . '__' . $entityType . '__' . $bundle; + $suggestions[] = $suggestion . '__' . $entityType . '__' . $bundle . '__' . $fieldName; + $suggestions[] = $suggestion . '__' . $entityType . '__' . $bundle . '__' . $fieldName . '__' . $viewMode; + + // Add the custom template suggestion back in the element to allow other + // modules to have this information. + $variables['element']['#template_suggestion_template_suggestion'] = $suggestion; } } } diff --git a/web/themes/ventuno/assets/css/group.min.css b/web/themes/ventuno/assets/css/group.min.css new file mode 100644 index 0000000000000000000000000000000000000000..171865d9a09a450ad454c9c927131bab5ed1822b --- /dev/null +++ b/web/themes/ventuno/assets/css/group.min.css @@ -0,0 +1,2 @@ +.joinup-group--description{font-size:1.25rem;margin-bottom:3rem;padding-bottom:3rem;padding-top:3rem;position:relative}.joinup-group--description:before{background:#f8f9fa;bottom:0;content:"";margin-left:calc(50% - 50vw);position:absolute;top:0;width:100vw;z-index:-1}@media (min-width:768px){.joinup-group--description:before{background:linear-gradient(0deg,#f8f9fa 3rem,#f8f9fa 0)}}.joinup-group--detailed-items .field--name-field-spatial-coverage .field__items{display:flex}.joinup-group--detailed-items .field--name-field-spatial-coverage .field__items .field__item{margin-right:.25rem} +/*# sourceMappingURL=group.min.css.map */ \ No newline at end of file diff --git a/web/themes/ventuno/assets/css/header-topic.min.css b/web/themes/ventuno/assets/css/header-topic.min.css index f29e01783aff216205f949234e88976cda969fa5..078ec560b7f44adbc06c2af361cf94b0ba7620bf 100644 --- a/web/themes/ventuno/assets/css/header-topic.min.css +++ b/web/themes/ventuno/assets/css/header-topic.min.css @@ -1,2 +1,2 @@ -.header-topic{padding:1.5rem 0;position:relative}.header-topic:before{background-color:#17458f;bottom:0;content:"";margin-left:calc(50% - 50vw);position:absolute;top:0;width:100vw;z-index:-1}.header-topic__title{color:#fff}.header-topic__description{color:#fff;margin-bottom:0}.header-topic__description--long{display:-webkit-box!important;min-height:48px;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.header-topic__description--long.show{-webkit-line-clamp:unset}.header-topic__description--long p{display:inline}.header-topic__description--long p:not(:last-child):after{content:" \a\a";white-space:pre}.header-topic__description p{display:inline}.header-topic__description a{color:#fff;text-decoration:underline;text-decoration-color:#fff!important}.header-topic__see-more-btn{color:#fff}.header-topic__see-more-btn:focus-visible,.header-topic__see-more-btn:hover{color:#fff!important;text-decoration:underline!important} +.header-topic{padding:1.5rem 0;position:relative}.header-topic:before{background-color:#17458f;bottom:0;content:"";margin-left:calc(50% - 50vw);position:absolute;top:0;width:100vw;z-index:-1}.header-topic__title{color:#fff}.header-topic__description{color:#fff;margin-bottom:0}.header-topic__description--long{display:-webkit-box!important;min-height:48px;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.header-topic__description--long.show{-webkit-line-clamp:unset}.header-topic__description--long p{display:inline}.header-topic__description--long p:not(:last-child):after{content:" \a\a";white-space:pre}.header-topic__description p{display:inline}.header-topic__description a{color:#fff;text-decoration:underline;text-decoration-color:#fff!important}.header-topic__description.see-more--long{min-height:48px;-webkit-line-clamp:2}.header-topic__see-more-btn{color:#fff}.header-topic__see-more-btn:focus-visible,.header-topic__see-more-btn:hover{color:#fff!important;text-decoration:underline!important} /*# sourceMappingURL=header-topic.min.css.map */ \ No newline at end of file diff --git a/web/themes/ventuno/assets/css/see-more.min.css b/web/themes/ventuno/assets/css/see-more.min.css new file mode 100644 index 0000000000000000000000000000000000000000..9f5b50ed92ce206e9bf52f27788ced53c29d02ad --- /dev/null +++ b/web/themes/ventuno/assets/css/see-more.min.css @@ -0,0 +1,2 @@ +.see-more{display:-webkit-box!important;-webkit-box-orient:vertical;margin-bottom:0;overflow:hidden}.see-more--long{min-height:120px;overflow:hidden;-webkit-line-clamp:5}.see-more--long.show{-webkit-line-clamp:unset!important}.see-more--long p{display:inline}.see-more--long p:not(:last-child):after{content:" \a\a";white-space:pre}.see-more p{display:inline}.see-more ul{display:inline-block} +/*# sourceMappingURL=see-more.min.css.map */ \ No newline at end of file diff --git a/web/themes/ventuno/assets/css/tabledrag.min.css b/web/themes/ventuno/assets/css/tabledrag.min.css index a34688de565dd4fa24cd9603b46b62d43794f7d4..0f6f56c9b4fbf4f06c3680b13b87d33e4bf79634 100644 --- a/web/themes/ventuno/assets/css/tabledrag.min.css +++ b/web/themes/ventuno/assets/css/tabledrag.min.css @@ -1,2 +1,2 @@ -.alert,.messages{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius);color:var(--bs-alert-color);margin-bottom:var(--bs-alert-margin-bottom);padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);position:relative}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{padding:1.25rem 1rem;position:absolute;right:0;top:0;z-index:2}.alert-primary{--bs-alert-color:#0c2347;--bs-alert-bg:#e8ebf1;--bs-alert-border-color:#d0d8e4}.alert-primary .alert-link{color:#0a1c39}.alert-secondary{--bs-alert-color:#5c6064;--bs-alert-bg:#fdfeff;--bs-alert-border-color:#fafcfe}.alert-secondary .alert-link{color:#4a4d50}.alert-success,.messages--success{--bs-alert-color:#0e734d;--bs-alert-bg:#e8f9f2;--bs-alert-border-color:#d1f2e6}.alert-success .alert-link,.messages--success .alert-link{color:#0b5c3e}.alert-info{--bs-alert-color:#084753;--bs-alert-bg:#e7f1f3;--bs-alert-border-color:#cfe4e8}.alert-info .alert-link{color:#063942}.alert-warning,.messages--warning{--bs-alert-color:#8d6528;--bs-alert-bg:#fdf6ec;--bs-alert-border-color:#fbeed9}.alert-warning .alert-link,.messages--warning .alert-link{color:#715120}.alert-danger,.messages--danger{--bs-alert-color:#8d1f1f;--bs-alert-bg:#fdebeb;--bs-alert-border-color:#fbd6d6}.alert-danger .alert-link,.messages--danger .alert-link{color:#711919}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefeff;--bs-alert-border-color:#fefefe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#e9e9ea;--bs-alert-border-color:#d3d3d4}.alert-dark .alert-link{color:#101214}.alert-brand{--bs-alert-color:#0a4585;--bs-alert-bg:#e7f1fc;--bs-alert-border-color:#cfe3f8}.alert-brand .alert-link{color:#08376a}.alert-light{background:#fff;border-color:#f8f9fa}.alert-dark{background:#f5f6f7;border-color:#a2a8ab}.alert,.messages{margin-top:1rem}.alert p:last-of-type,.messages p:last-of-type{margin-bottom:0}.alert a,.messages a{color:#0f69cb}.tabledrag-toggle-weight-wrapper{display:none}.js .field--widget-paragraphs th .paragraphs-actions{margin-right:0}.js .field--widget-paragraphs td{padding:.5rem}.joinup-nodrag .field-multiple-drag,.joinup-nodrag a.tabledrag-handle{display:none}.joinup-nodrag .table td.field-multiple-drag{padding:0;width:0}.joinup-nodrag .table td.delta-order{min-width:5rem}.draggable .field-multiple-drag,.draggable .tabledrag-handle-cell{padding-right:0;position:relative;width:45px}.draggable .field-multiple-drag a.tabledrag-handle,.draggable .tabledrag-handle-cell a.tabledrag-handle{height:2rem;margin-left:0;width:2rem}.draggable .field-multiple-drag a.tabledrag-handle .handle,.draggable .tabledrag-handle-cell a.tabledrag-handle .handle{height:2rem;margin:0;padding:0;position:absolute;top:calc(50% - 1rem);width:2rem} +.alert,.messages{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius);color:var(--bs-alert-color);margin-bottom:var(--bs-alert-margin-bottom);padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);position:relative}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{padding:1.25rem 1rem;position:absolute;right:0;top:0;z-index:2}.alert-primary{--bs-alert-color:#0c2347;--bs-alert-bg:#e8ebf1;--bs-alert-border-color:#d0d8e4}.alert-primary .alert-link{color:#0a1c39}.alert-secondary{--bs-alert-color:#5c6064;--bs-alert-bg:#fdfeff;--bs-alert-border-color:#fafcfe}.alert-secondary .alert-link{color:#4a4d50}.alert-success,.messages--success{--bs-alert-color:#0e734d;--bs-alert-bg:#e8f9f2;--bs-alert-border-color:#d1f2e6}.alert-success .alert-link,.messages--success .alert-link{color:#0b5c3e}.alert-info{--bs-alert-color:#084753;--bs-alert-bg:#e7f1f3;--bs-alert-border-color:#cfe4e8}.alert-info .alert-link{color:#063942}.alert-warning,.messages--warning{--bs-alert-color:#8d6528;--bs-alert-bg:#fdf6ec;--bs-alert-border-color:#fbeed9}.alert-warning .alert-link,.messages--warning .alert-link{color:#715120}.alert-danger,.messages--danger{--bs-alert-color:#8d1f1f;--bs-alert-bg:#fdebeb;--bs-alert-border-color:#fbd6d6}.alert-danger .alert-link,.messages--danger .alert-link{color:#711919}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefeff;--bs-alert-border-color:#fefefe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#e9e9ea;--bs-alert-border-color:#d3d3d4}.alert-dark .alert-link{color:#101214}.alert-brand{--bs-alert-color:#0a4585;--bs-alert-bg:#e7f1fc;--bs-alert-border-color:#cfe3f8}.alert-brand .alert-link{color:#08376a}.alert-light{background:#fff;border-color:#f8f9fa}.alert-dark{background:#f5f6f7;border-color:#a2a8ab}.alert,.messages{margin-top:1rem}.alert p:last-of-type,.messages p:last-of-type{margin-bottom:0}.alert a,.messages a{color:#0f69cb}.tabledrag-toggle-weight-wrapper{display:none}.js .field--widget-paragraphs th .paragraphs-actions{margin-right:0}.js .field--widget-paragraphs td{padding:.5rem}.joinup-nodrag .field-multiple-drag,.joinup-nodrag a.tabledrag-handle{display:none}.joinup-nodrag .table td.field-multiple-drag{padding:0;width:0}.joinup-nodrag .table td.delta-order{min-width:5rem}.draggable a.tabledrag-handle .handle{height:22px;width:22px}.draggable .field-multiple-drag,.draggable .tabledrag-handle-cell{padding-right:0;position:relative;width:45px}.draggable .field-multiple-drag a.tabledrag-handle,.draggable .tabledrag-handle-cell a.tabledrag-handle{height:2rem;margin-left:0;width:2rem}.draggable .field-multiple-drag a.tabledrag-handle .handle,.draggable .tabledrag-handle-cell a.tabledrag-handle .handle{height:2rem;margin:0;padding:0;position:absolute;top:calc(50% - 1rem);width:2rem} /*# sourceMappingURL=tabledrag.min.css.map */ \ No newline at end of file diff --git a/web/themes/ventuno/assets/js/toggle-text-seemore-btn.min.js b/web/themes/ventuno/assets/js/toggle-text-seemore-btn.min.js index 7c95e4812f6d443e145f584139606fd108dcbd33..a617475b7c0541ce46ba5f66f0fe856ca0b38ef3 100644 --- a/web/themes/ventuno/assets/js/toggle-text-seemore-btn.min.js +++ b/web/themes/ventuno/assets/js/toggle-text-seemore-btn.min.js @@ -1,2 +1,2 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";((e,n)=>{e.behaviors.toggleTextSeemoreBtn={attach(){const t=document.getElementById("seeMoreBtn"),s=e.t("See more"),o=e.t("See less"),i=`<svg class="bi icon--s"><use xlink:href="${n.bcl_icon_path}#chevron-down"></use></svg>`,a=`<svg class="bi icon--s"><use xlink:href="${n.bcl_icon_path}#chevron-up"></use></svg>`;null!=t&&t.addEventListener("click",(e=>{e.preventDefault(),"true"===t.dataset.joinupSeemoreCollapsed?(t.innerHTML=`${o} ${a}`,t.dataset.joinupSeemoreCollapsed="false"):(t.innerHTML=`${s} ${i}`,t.dataset.joinupSeemoreCollapsed="true")}))}}})(Drupal,drupalSettings)})); +!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";((e,n)=>{e.behaviors.toggleTextSeemoreBtn={attach(){const s=document.getElementById("collapseSeeMore"),t=document.getElementById("seeMoreBtn"),o=e.t("See more"),i=e.t("See less"),c=`<svg class="bi icon--s"><use xlink:href="${n.bcl_icon_path}#chevron-down"></use></svg>`,l=`<svg class="bi icon--s"><use xlink:href="${n.bcl_icon_path}#chevron-up"></use></svg>`;t&&(s.addEventListener("hidden.bs.collapse",(()=>{t.innerHTML=`${o} ${c}`})),s.addEventListener("shown.bs.collapse",(()=>{t.innerHTML=`${i} ${l}`})))}}})(Drupal,drupalSettings)})); //# sourceMappingURL=toggle-text-seemore-btn.min.js.map diff --git a/web/themes/ventuno/includes/form.inc b/web/themes/ventuno/includes/form.inc index 54df501793f807a69a3e7ae86af9b6de0a442f9f..58db6b83e34faaaeb215dcbfe790109852ebcc7b 100644 --- a/web/themes/ventuno/includes/form.inc +++ b/web/themes/ventuno/includes/form.inc @@ -151,6 +151,10 @@ function ventuno_form_alter(array &$form, FormStateInterface $form_state, string ]; } break; + + case 'ogmenu_instance_quick_links_edit_form': + $form['#attached']['library'][] = 'ventuno/tabledrag'; + break; } } diff --git a/web/themes/ventuno/includes/menu.inc b/web/themes/ventuno/includes/menu.inc index bfc2faa50b37e1c8483da6ec892bdc9e3f99ff2e..5fcc39e49377b32f844e5aa573354a0d196db67e 100644 --- a/web/themes/ventuno/includes/menu.inc +++ b/web/themes/ventuno/includes/menu.inc @@ -7,6 +7,7 @@ declare(strict_types = 1); +use Drupal\Core\Url; use Drupal\block\Entity\Block; /** @@ -70,3 +71,30 @@ function ventuno_preprocess_links(array &$variables): void { } } } + +/** + * Implements hook_preprocess_HOOK(). + */ +function ventuno_preprocess_menu__og__quick_links(&$variables): void { + if (!isset($variables['items']) || !is_array($variables['items'])) { + return; + } + + foreach ($variables['items'] as &$item) { + $route = ($item['url'] instanceof Url) ? $item['url']->getRouteName() : NULL; + $item['icon'] = match ($route) { + // Release History. + 'asset_release.solution_asset_release.overview' => 'eye', + // Website link. + 'joinup_menu.website_link' => 'link', + // Custom page. + 'entity.node.canonical' => 'file-earmark-text', + // EIF Perspective. + 'entity.rdf_entity.eif_perspective' => 'file-earmark-text', + // Documentation link. + 'joinup_menu.documentation_file' => 'file-earmark-text', + // Fallback. + default => 'file-earmark-text', + }; + } +} diff --git a/web/themes/ventuno/src/js/toggle-text-seemore-btn.js b/web/themes/ventuno/src/js/toggle-text-seemore-btn.js index f633717fc3aaf233cca713c9797d72431d481145..a829c1d56631d36479de15f31dc2cfcce010229f 100644 --- a/web/themes/ventuno/src/js/toggle-text-seemore-btn.js +++ b/web/themes/ventuno/src/js/toggle-text-seemore-btn.js @@ -1,28 +1,26 @@ /** * @file - * Toggles text inside the "See more" button in description of topic header. + * Toggles text inside the "See more" button in topic header, Collections and Solutions description field. */ ((Drupal, drupalSettings) => { Drupal.behaviors.toggleTextSeemoreBtn = { attach() { + const collapseSeeMore = document.getElementById("collapseSeeMore"); const button = document.getElementById("seeMoreBtn"); const seeMore = Drupal.t("See more"); const seeLess = Drupal.t("See less"); const chevronDown = `<svg class="bi icon--s"><use xlink:href="${drupalSettings.bcl_icon_path}#chevron-down"></use></svg>`; const chevronUp = `<svg class="bi icon--s"><use xlink:href="${drupalSettings.bcl_icon_path}#chevron-up"></use></svg>`; - if (button === null || button === undefined) { - return; - } - button.addEventListener("click", (e) => { - e.preventDefault(); - if (button.dataset.joinupSeemoreCollapsed === "true") { - button.innerHTML = `${seeLess} ${chevronUp}`; - button.dataset.joinupSeemoreCollapsed = "false"; - } else { + + if (button) { + collapseSeeMore.addEventListener("hidden.bs.collapse", () => { button.innerHTML = `${seeMore} ${chevronDown}`; - button.dataset.joinupSeemoreCollapsed = "true"; - } - }); + }); + + collapseSeeMore.addEventListener("shown.bs.collapse", () => { + button.innerHTML = `${seeLess} ${chevronUp}`; + }); + } }, }; })(Drupal, drupalSettings); diff --git a/web/themes/ventuno/src/scss/components/header-topic.scss b/web/themes/ventuno/src/scss/components/header-topic.scss index 2ba29625709f9e5026f8a1b57a71a445663370d5..4f890b79982e15d0cb7ed3312c2a465db240b1cf 100644 --- a/web/themes/ventuno/src/scss/components/header-topic.scss +++ b/web/themes/ventuno/src/scss/components/header-topic.scss @@ -44,6 +44,10 @@ color: $white; text-decoration-color: $white!important; } + &.see-more--long { + min-height: 48px; + -webkit-line-clamp: 2; + } } &__see-more-btn { color: $white; diff --git a/web/themes/ventuno/src/scss/components/see-more.scss b/web/themes/ventuno/src/scss/components/see-more.scss new file mode 100644 index 0000000000000000000000000000000000000000..af8f50c7e4275f7ba8f52a6afb231e540900d930 --- /dev/null +++ b/web/themes/ventuno/src/scss/components/see-more.scss @@ -0,0 +1,30 @@ +@import "../partials/core"; + +.see-more { + display: -webkit-box!important; + -webkit-box-orient: vertical; + overflow: hidden; + margin-bottom: 0; + &--long { + overflow: hidden; + min-height: 120px; + -webkit-line-clamp: 5; + &.show { + -webkit-line-clamp: unset !important; + } + p { + display: inline; + &:not(:last-child)::after { + content: " \A\A"; + white-space: pre; + } + } + } + p{ + display: inline; + } + ul { + display: inline-block; + } +} + diff --git a/web/themes/ventuno/src/scss/components/tabledrag.scss b/web/themes/ventuno/src/scss/components/tabledrag.scss index 126e92c4c90b2e1b70af573500e31abf6acdc4ae..105ed5edd205347b23fcb5863915f62d977c8c95 100644 --- a/web/themes/ventuno/src/scss/components/tabledrag.scss +++ b/web/themes/ventuno/src/scss/components/tabledrag.scss @@ -31,6 +31,10 @@ } } .draggable { + a.tabledrag-handle .handle { + width: 22px; + height: 22px; + } .field-multiple-drag, .tabledrag-handle-cell { position: relative; diff --git a/web/themes/ventuno/src/scss/pages/group.scss b/web/themes/ventuno/src/scss/pages/group.scss new file mode 100644 index 0000000000000000000000000000000000000000..91ff161e62a55127c33ba14e1f9a43da565f31ab --- /dev/null +++ b/web/themes/ventuno/src/scss/pages/group.scss @@ -0,0 +1,30 @@ +@import "../partials/core"; + +// Collections and Solutions common styles. +.joinup-group { + &--description { + @include full-width-color-to-top( + $light, + $light, + 3rem, + 3rem, + $light, + 0, + 3rem + ); + + position: relative; + margin-bottom: $spacer * 3; // 48px + font-size: $h3-font-size; + } + &--detailed-items { + .field--name-field-spatial-coverage { + .field__items { + display: flex; + .field__item { + margin-right: $spacer * .25; + } + } + } + } +} diff --git a/web/themes/ventuno/templates/field/field--description--see--more.html.twig b/web/themes/ventuno/templates/field/field--description--see--more.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..f1a12f11907c24797fbdaf64b7016d98ba36723a --- /dev/null +++ b/web/themes/ventuno/templates/field/field--description--see--more.html.twig @@ -0,0 +1,43 @@ +{# +/** + * @file + * Default template for a field. + */ +#} +{{ attach_library('ventuno/see-more') }} +{% + set classes = [ + 'field--name-' ~ field_name|clean_class, + bundle|clean_class ~ '__' ~ field_name_clean|clean_class, + label_display == 'inline' ? 'd-flex', + ] +%} + +<div {{ attributes.addClass(classes) }}> + {% for item in items %} + + {% if item.content|render|striptags|split(' ')|length < 100 %} + <div class="see-more"> + {{ item.content }} + </div> + {% else %} + <div class="see-more see-more--long collapse" id="collapseSeeMore"> + {{ item.content }} + </div> + <button + class="btn btn-link p-0 mt-3" + id="seeMoreBtn" + type="button" + data-bs-toggle="collapse" + data-bs-target="#collapseSeeMore" + aria-expanded="false" + aria-controls="collapseSeeMore"> + {{ 'See more'|t }} + <svg class="bi icon--s"> + <use xlink:href="{{ bcl_icon_path }}#chevron-down"></use> + </svg> + </button> + {% endif %} + + {% endfor %} +</div> diff --git a/web/themes/ventuno/templates/joinup_search/facet-widget-links-inline.html.twig b/web/themes/ventuno/templates/joinup_search/facet-widget-links-inline.html.twig index d16a3d4d169f08dc3043a37f426e0c10e5f6f591..0d68873475f74c48f4f7390c9bdc9efbfc23cced 100644 --- a/web/themes/ventuno/templates/joinup_search/facet-widget-links-inline.html.twig +++ b/web/themes/ventuno/templates/joinup_search/facet-widget-links-inline.html.twig @@ -10,7 +10,7 @@ {% if items or active %} <div{{ attributes.addClass(['my-3', 'dropdown', 'd-flex', 'align-items-center']) }}> {%- if prefix_text -%} - <span>{{ prefix_text }}</span> + <span class="fw-bold me-2">{{ prefix_text }}</span> {% endif -%} {{ suffix_text }} <div class="filter__term d-inline"> diff --git a/web/themes/ventuno/templates/layout/page--meta-entity.html.twig b/web/themes/ventuno/templates/layout/page--meta-entity.html.twig index 7b92ede6b7e72156c80114cfa67b7303e2791ffc..1455cb0dfb54ea7d1ca0c2d3dd21cb53c535a059 100644 --- a/web/themes/ventuno/templates/layout/page--meta-entity.html.twig +++ b/web/themes/ventuno/templates/layout/page--meta-entity.html.twig @@ -44,6 +44,7 @@ {% block page_header %} {{ attach_library('ventuno/header-topic') }} + {{ attach_library('ventuno/see-more') }} <div class="container region-header"> <header class="header-topic"> {{ title_prefix }} @@ -56,7 +57,7 @@ {{ meta_description }} </div> {% else %} - <div class="header-topic__description header-topic__description--long collapse" id="collapseHeaderTopics"> + <div class="header-topic__description see-more see-more--long collapse" id="collapseSeeMore"> {{ meta_description }} </div> <div class="d-flex justify-content-end mt-3{{ logged_in ? ' mb-3' }}"> @@ -66,9 +67,9 @@ type="button" data-joinup-seemore-collapsed="true" data-bs-toggle="collapse" - data-bs-target="#collapseHeaderTopics" + data-bs-target="#collapseSeeMore" aria-expanded="false" - aria-controls="collapseHeaderTopics"> + aria-controls="collapseSeeMore"> {{ 'See more'|t }} <svg class="bi icon--s"> <use xlink:href="{{ bcl_icon_path }}#chevron-down"></use> diff --git a/web/themes/ventuno/templates/menu/menu--og--quick-links.html.twig b/web/themes/ventuno/templates/menu/menu--og--quick-links.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..7b1846ece08458157cd7995938e5cf9ffba2d224 --- /dev/null +++ b/web/themes/ventuno/templates/menu/menu--og--quick-links.html.twig @@ -0,0 +1,21 @@ +{# +/** + * Template for a menu. + */ +#} + +<nav class="nav"> + <ul class="list-unstyled mb-0"> + {% for item in items %} + <li class="mt-3"> + {{ pattern('link', { + label: item.label, + path: item.path, + variant: 'link', + icon_position: 'before', + icon: item.icon + }) }} + </li> + {% endfor %} + </ul> +</nav> diff --git a/web/themes/ventuno/templates/rdf-entity/rdf-entity--collection--group-header.html.twig b/web/themes/ventuno/templates/rdf-entity/rdf-entity--collection--group-header.html.twig index e457f821161dbebd6221de6b1c6a7a0b4c43f0fb..d059ab4c98085213a551053af509b8c462a41a18 100644 --- a/web/themes/ventuno/templates/rdf-entity/rdf-entity--collection--group-header.html.twig +++ b/web/themes/ventuno/templates/rdf-entity/rdf-entity--collection--group-header.html.twig @@ -5,6 +5,7 @@ */ #} {{ attach_library('ventuno/group-banner') }} +{{ attach_library('ventuno/group') }} <header{{ attributes.addClass(['group-banner', 'bg-light', 'py-2']) }}> <div class="container py-2 d-flex flex-column flex-lg-row align-items-center align-items-lg-start"> <div data-drupal-group-logo class="group-banner__logo me-lg-2"> diff --git a/web/themes/ventuno/templates/rdf-entity/rdf-entity--solution--group-header.html.twig b/web/themes/ventuno/templates/rdf-entity/rdf-entity--solution--group-header.html.twig index 5b8938610a713c12894017de095ea49efabfd4b5..8753b79aba0832e50cf07367ebd92a635d6d983e 100644 --- a/web/themes/ventuno/templates/rdf-entity/rdf-entity--solution--group-header.html.twig +++ b/web/themes/ventuno/templates/rdf-entity/rdf-entity--solution--group-header.html.twig @@ -5,6 +5,7 @@ */ #} {{ attach_library('ventuno/group-banner') }} +{{ attach_library('ventuno/group') }} <header{{ attributes.addClass(['group-banner', 'bg-light', 'py-2']) }}> <div class="container py-2 d-flex flex-column flex-lg-row align-items-center align-items-lg-start"> <div data-drupal-group-logo class="group-banner__logo me-lg-2"> diff --git a/web/themes/ventuno/ventuno.libraries.yml b/web/themes/ventuno/ventuno.libraries.yml index 3cef346461ae3c7e89419099438f45fe72f6d295..5caeb4d95a9e04524d7a1140c372ac63d72d091e 100644 --- a/web/themes/ventuno/ventuno.libraries.yml +++ b/web/themes/ventuno/ventuno.libraries.yml @@ -57,6 +57,11 @@ searchpage: dependencies: - ventuno/close +group: + css: + theme: + assets/css/group.min.css: { minified: true } + # Components abstract: css: @@ -180,8 +185,6 @@ group-banner: assets/css/group-banner.min.css: { minified: true } header-topic: - js: - assets/js/toggle-text-seemore-btn.min.js: { minified: true } css: theme: assets/css/header-topic.min.css: { minified: true } @@ -333,6 +336,13 @@ releases: theme: assets/css/releases.min.css: { minified: true } +see-more: + css: + theme: + assets/css/see-more.min.css: { minified: true } + js: + assets/js/toggle-text-seemore-btn.min.js: { minified: true } + share-content-form: css: theme: