diff --git a/.github/workflows/composer-update.yml b/.github/workflows/composer-update.yml index 8d6968d1..9bd9b5b8 100644 --- a/.github/workflows/composer-update.yml +++ b/.github/workflows/composer-update.yml @@ -17,6 +17,5 @@ jobs: patch_branch: 'develop' patch_packages: 'drupal/*' patch_maintainers: ${{ secrets.DRUPAL_MAINTAINERS }} - php_version: '8.2' slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }} slack_channel_name: ${{ vars.SLACK_CHANNEL }} diff --git a/PATCHES/core-ckeditor5-dialog-fix-3351600.patch b/PATCHES/core-ckeditor5-dialog-fix-3351600.patch new file mode 100644 index 00000000..b7a4385e --- /dev/null +++ b/PATCHES/core-ckeditor5-dialog-fix-3351600.patch @@ -0,0 +1,17 @@ +diff --git a/core/modules/ckeditor5/js/ckeditor5.dialog.fix.js b/core/modules/ckeditor5/js/ckeditor5.dialog.fix.js +index 1f4ed1d7feb523cffee35f245b7dab06da4f38fa..41449dcf693fab7ff15220fd4b57bd89a71cab8d 100644 +--- a/core/modules/ckeditor5/js/ckeditor5.dialog.fix.js ++++ b/core/modules/ckeditor5/js/ckeditor5.dialog.fix.js +@@ -12,6 +12,12 @@ + // CKEditor 5 in modals can work as expected. + // @see https://api.jqueryui.com/dialog/#method-_allowInteraction + _allowInteraction(event) { ++ // Fixes "Uncaught TypeError: event.target.classList is undefined" ++ // in Firefox (only). ++ // @see https://www.drupal.org/project/drupal/issues/3351600 ++ if (event.target.classList === undefined) { ++ return this._super(event); ++ } + return event.target.classList.contains('ck') || this._super(event); + }, + }); diff --git a/composer.json b/composer.json index 20781e5d..43e4cf58 100644 --- a/composer.json +++ b/composer.json @@ -60,6 +60,7 @@ "drupal/pathauto": "^1.8", "drupal/redirect": "^1.8", "drupal/samlauth": "^3.8", + "drupal/simple_menu_permissions": "^2.0", "drupal/social_auth_hid": "^3.2", "drupal/stable": "^2.0", "drupal/stage_file_proxy": "^2.1", diff --git a/composer.lock b/composer.lock index 79738183..ef990c15 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": "9aee3d2088f0f789287f45bc6168260c", + "content-hash": "ebe1745bf88f26724ded3ec12d21a52a", "packages": [ { "name": "asm89/stack-cors", @@ -4126,7 +4126,7 @@ "extra": { "drupal": { "version": "2.0.0", - "datestamp": "1690247240", + "datestamp": "1691239950", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -4635,6 +4635,10 @@ "name": "Dave Reid", "homepage": "https://www.drupal.org/user/53892" }, + { + "name": "Kristen Pol", + "homepage": "https://www.drupal.org/user/8389" + }, { "name": "pifagor", "homepage": "https://www.drupal.org/user/2375692" @@ -4708,6 +4712,50 @@ "issues": "http://drupal.org/project/samlauth" } }, + { + "name": "drupal/simple_menu_permissions", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/simple_menu_permissions.git", + "reference": "2.0.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/simple_menu_permissions-2.0.0.zip", + "reference": "2.0.0", + "shasum": "75796f4cd15a4661c146904796c738de8b4c5918" + }, + "require": { + "drupal/core": "^8 || ^9 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0", + "datestamp": "1675522195", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Ewout Goosmann", + "homepage": "https://www.drupal.org/user/3138239" + } + ], + "description": "Defines permissions for each menu. Such as the edit and delete permission. Also defines a permission to create new menus.", + "homepage": "https://www.drupal.org/project/simple_menu_permissions", + "support": { + "source": "https://git.drupalcode.org/project/simple_menu_permissions" + } + }, { "name": "drupal/social_api", "version": "3.1.0", @@ -5015,17 +5063,17 @@ }, { "name": "drupal/stage_file_proxy", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/stage_file_proxy.git", - "reference": "2.1.0" + "reference": "2.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/stage_file_proxy-2.1.0.zip", - "reference": "2.1.0", - "shasum": "7a9011aef604bb2d071b3dbdf6b3d98bd3c55625" + "url": "https://ftp.drupal.org/files/projects/stage_file_proxy-2.1.1.zip", + "reference": "2.1.1", + "shasum": "0a4d6cb83c4f5da20542e4c9f5fed32dbf490154" }, "require": { "drupal/core": "^9 || ^10", @@ -5038,8 +5086,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.1.0", - "datestamp": "1688746220", + "version": "2.1.1", + "datestamp": "1691507193", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -5373,17 +5421,17 @@ }, { "name": "drupal/viewsreference", - "version": "2.0.0-beta4", + "version": "2.0.0-beta6", "source": { "type": "git", "url": "https://git.drupalcode.org/project/viewsreference.git", - "reference": "8.x-2.0-beta4" + "reference": "8.x-2.0-beta6" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/viewsreference-8.x-2.0-beta4.zip", - "reference": "8.x-2.0-beta4", - "shasum": "913d6c77d73a9aa475b695a069ec5258569ddb07" + "url": "https://ftp.drupal.org/files/projects/viewsreference-8.x-2.0-beta6.zip", + "reference": "8.x-2.0-beta6", + "shasum": "1b094ccb10f4adc0b968a51650c0e2612ee184dd" }, "require": { "drupal/core": "^9.3 || ^10" @@ -5394,8 +5442,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.0-beta4", - "datestamp": "1664821610", + "version": "8.x-2.0-beta6", + "datestamp": "1691400463", "security-coverage": { "status": "not-covered", "message": "Beta releases are not covered by Drupal security advisories." @@ -5436,17 +5484,17 @@ }, { "name": "drupal/xmlsitemap", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/xmlsitemap.git", - "reference": "8.x-1.4" + "reference": "8.x-1.5" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/xmlsitemap-8.x-1.4.zip", - "reference": "8.x-1.4", - "shasum": "cd010ebdfbdb5b4d51d9fa96bbebd3b310021a1f" + "url": "https://ftp.drupal.org/files/projects/xmlsitemap-8.x-1.5.zip", + "reference": "8.x-1.5", + "shasum": "ee53bf4d1c23ab41548021d9948925ecf76719d3" }, "require": { "drupal/core": "^9.3 || ^10", @@ -5463,8 +5511,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.4", - "datestamp": "1663795747", + "version": "8.x-1.5", + "datestamp": "1691341085", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -5510,7 +5558,7 @@ "homepage": "https://www.drupal.org/user/272316" }, { - "name": "RenatoG", + "name": "renatog", "homepage": "https://www.drupal.org/user/3326031" }, { @@ -8298,16 +8346,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.26", + "version": "1.10.28", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "5d660cbb7e1b89253a47147ae44044f49832351f" + "reference": "e4545b55904ebef470423d3ddddb74fa7325497a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5d660cbb7e1b89253a47147ae44044f49832351f", - "reference": "5d660cbb7e1b89253a47147ae44044f49832351f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e4545b55904ebef470423d3ddddb74fa7325497a", + "reference": "e4545b55904ebef470423d3ddddb74fa7325497a", "shasum": "" }, "require": { @@ -8356,7 +8404,7 @@ "type": "tidelift" } ], - "time": "2023-07-19T12:44:37+00:00" + "time": "2023-08-08T12:33:42+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -10615,16 +10663,16 @@ }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.11.16", + "version": "v2.11.17", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88" + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/dc5582dc5a93a235557af73e523c389aac9a8e88", - "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/3b71162a6bf0cde2bff1752e40a1788d8273d049", + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049", "shasum": "" }, "require": { @@ -10669,7 +10717,7 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2023-03-31T16:46:32+00:00" + "time": "2023-08-05T23:46:11+00:00" }, { "name": "slevomat/coding-standard", diff --git a/composer.patches.json b/composer.patches.json index ca7843f2..9bb952d6 100644 --- a/composer.patches.json +++ b/composer.patches.json @@ -1,7 +1,8 @@ { "patches": { "drupal/core": { - "https://www.drupal.org/project/drupal/issues/3376927": "PATCHES/core-css-js-aggregation-3376927.patch" + "https://www.drupal.org/project/drupal/issues/3376927": "PATCHES/core-css-js-aggregation-3376927.patch", + "https://www.drupal.org/project/drupal/issues/3351600": "PATCHES/core-ckeditor5-dialog-fix-3351600.patch" }, "drupal/csp": { "Simplify log format": "PATCHES/csp-log-format.patch" @@ -28,9 +29,6 @@ }, "drupal/username_enumeration_prevention": { "Avoid leaking the path via Drupal.settings json": "PATCHES/username_enumeration_prevention-user-login-block-form-3312288.patch" - }, - "drupal/xmlsitemap": { - "https://www.drupal.org/project/xmlsitemap/issues/3323148": "PATCHES/xmlsitemap-d10-compatibility-admin-page.patch" } } } diff --git a/config/core.entity_form_display.paragraph.news_and_stories.default.yml b/config/core.entity_form_display.paragraph.news_and_stories.default.yml index ca442db8..4a06c850 100644 --- a/config/core.entity_form_display.paragraph.news_and_stories.default.yml +++ b/config/core.entity_form_display.paragraph.news_and_stories.default.yml @@ -13,14 +13,15 @@ bundle: news_and_stories mode: default content: field_news_and_stories_list: - type: viewsreference_autocomplete + type: viewsreference_select weight: 0 region: content - settings: - match_operator: CONTAINS - match_limit: 10 - size: 60 - placeholder: '' + settings: { } + third_party_settings: { } + translation: + weight: 10 + region: content + settings: { } third_party_settings: { } hidden: created: true diff --git a/config/core.extension.yml b/config/core.extension.yml index b9ac5671..13e4030e 100644 --- a/config/core.extension.yml +++ b/config/core.extension.yml @@ -70,6 +70,7 @@ module: responsive_image: 0 samlauth: 0 serialization: 0 + simple_menu_permissions: 0 social_api: 0 social_auth: 0 social_auth_hid: 0 diff --git a/config/system.menu.events.yml b/config/system.menu.events.yml index a2eb332b..76b30fea 100644 --- a/config/system.menu.events.yml +++ b/config/system.menu.events.yml @@ -4,5 +4,5 @@ status: true dependencies: { } id: events label: Events -description: '' +description: 'Footer menu: Events' locked: false diff --git a/config/system.menu.latest.yml b/config/system.menu.latest.yml index adb5a48c..ca0ea0cd 100644 --- a/config/system.menu.latest.yml +++ b/config/system.menu.latest.yml @@ -4,5 +4,5 @@ status: true dependencies: { } id: latest label: Latest -description: '' +description: 'Footer menu: Latest menu' locked: false diff --git a/config/system.menu.main.yml b/config/system.menu.main.yml index b6e90d2c..37d0cb48 100644 --- a/config/system.menu.main.yml +++ b/config/system.menu.main.yml @@ -6,5 +6,5 @@ _core: default_config_hash: Q2Ra3jfoIVk0f3SjxJX61byRQFVBAbpzYDQOiY-kno8 id: main label: 'Main menu' -description: 'Main menu with mega menu' +description: 'Main navigation menu' locked: true diff --git a/config/system.menu.our-priorities.yml b/config/system.menu.our-priorities.yml index f3edf9ce..2f2fa38c 100644 --- a/config/system.menu.our-priorities.yml +++ b/config/system.menu.our-priorities.yml @@ -4,5 +4,5 @@ status: true dependencies: { } id: our-priorities label: 'Our priorities' -description: '' +description: 'Footer menu: Our priorities' locked: false diff --git a/config/system.menu.take-action.yml b/config/system.menu.take-action.yml index 4b557005..73bf4295 100644 --- a/config/system.menu.take-action.yml +++ b/config/system.menu.take-action.yml @@ -4,5 +4,5 @@ status: true dependencies: { } id: take-action label: 'Take action' -description: '' +description: 'Footer menu: Take action' locked: false diff --git a/config/system.menu.what-we-do.yml b/config/system.menu.what-we-do.yml index 51e83594..1bd34a64 100644 --- a/config/system.menu.what-we-do.yml +++ b/config/system.menu.what-we-do.yml @@ -4,5 +4,5 @@ status: true dependencies: { } id: what-we-do label: 'What we do' -description: '' +description: 'Footer menu: What we do' locked: false diff --git a/config/system.menu.where-we-work.yml b/config/system.menu.where-we-work.yml index 5e15ec08..6ca06a54 100644 --- a/config/system.menu.where-we-work.yml +++ b/config/system.menu.where-we-work.yml @@ -4,5 +4,5 @@ status: true dependencies: { } id: where-we-work label: 'Where we work' -description: '' +description: 'Footer menu: Where we work' locked: false diff --git a/config/user.role.editor.yml b/config/user.role.editor.yml index ae4d3162..28254e98 100644 --- a/config/user.role.editor.yml +++ b/config/user.role.editor.yml @@ -31,6 +31,7 @@ dependencies: - paragraphs - path - redirect + - simple_menu_permissions - system - taxonomy - toolbar @@ -48,6 +49,13 @@ permissions: - 'access media overview' - 'access taxonomy overview' - 'access toolbar' + - 'add new links to events menu' + - 'add new links to latest menu' + - 'add new links to main menu' + - 'add new links to our-priorities menu' + - 'add new links to take-action menu' + - 'add new links to what-we-do menu' + - 'add new links to where-we-work menu' - 'administer menu' - 'administer nodes' - 'administer redirects' @@ -72,43 +80,6 @@ permissions: - 'create terms in theme' - 'create url aliases' - 'create video media' - - 'delete any basic content' - - 'delete any event content' - - 'delete any image media' - - 'delete any leader content' - - 'delete any media' - - 'delete any media_collection content' - - 'delete any region content' - - 'delete any resource content' - - 'delete any response content' - - 'delete any story content' - - 'delete any video media' - - 'delete basic revisions' - - 'delete content translations' - - 'delete event revisions' - - 'delete leader revisions' - - 'delete media' - - 'delete media_collection revisions' - - 'delete own basic content' - - 'delete own event content' - - 'delete own image media' - - 'delete own leader content' - - 'delete own media_collection content' - - 'delete own region content' - - 'delete own resource content' - - 'delete own response content' - - 'delete own story content' - - 'delete own video media' - - 'delete region revisions' - - 'delete resource revisions' - - 'delete response revisions' - - 'delete story revisions' - - 'delete terms in contacts' - - 'delete terms in country' - - 'delete terms in event_type' - - 'delete terms in office_type' - - 'delete terms in story_type' - - 'delete terms in theme' - 'edit any basic content' - 'edit any event content' - 'edit any image media' @@ -119,6 +90,17 @@ permissions: - 'edit any response content' - 'edit any story content' - 'edit any video media' + - 'edit events menu' + - 'edit latest menu' + - 'edit links in events menu' + - 'edit links in latest menu' + - 'edit links in main menu' + - 'edit links in our-priorities menu' + - 'edit links in take-action menu' + - 'edit links in what-we-do menu' + - 'edit links in where-we-work menu' + - 'edit main menu' + - 'edit our-priorities menu' - 'edit own basic content' - 'edit own event content' - 'edit own image media' @@ -129,12 +111,15 @@ permissions: - 'edit own response content' - 'edit own story content' - 'edit own video media' + - 'edit take-action menu' - 'edit terms in contacts' - 'edit terms in country' - 'edit terms in event_type' - 'edit terms in office_type' - 'edit terms in story_type' - 'edit terms in theme' + - 'edit what-we-do menu' + - 'edit where-we-work menu' - 'revert all revisions' - 'revert basic revisions' - 'revert event revisions' @@ -173,13 +158,20 @@ permissions: - 'view all revisions' - 'view basic revisions' - 'view event revisions' + - 'view events menu in menu list' + - 'view latest menu in menu list' - 'view leader revisions' + - 'view main menu in menu list' - 'view media_collection revisions' + - 'view our-priorities menu in menu list' - 'view own unpublished content' - 'view own unpublished media' - 'view region revisions' - 'view resource revisions' - 'view response revisions' - 'view story revisions' + - 'view take-action menu in menu list' - 'view the administration theme' - 'view unpublished paragraphs' + - 'view what-we-do menu in menu list' + - 'view where-we-work menu in menu list' diff --git a/config/views.view.content.yml b/config/views.view.content.yml index 1e11ae72..557ed94d 100644 --- a/config/views.view.content.yml +++ b/config/views.view.content.yml @@ -27,18 +27,61 @@ display: id: node_bulk_form table: node field: node_bulk_form + relationship: none + group_type: group + admin_label: '' entity_type: node plugin_id: node_bulk_form label: '' exclude: false alter: alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' element_default_classes: true empty: '' hide_empty: false empty_zero: false hide_alter_empty: true + action_title: Action + include_exclude: include + selected_actions: + - node_make_sticky_action + - node_make_unsticky_action + - node_promote_action + - node_publish_action + - node_unpromote_action + - node_unpublish_action view_node: id: view_node table: node diff --git a/config/views.view.stories.yml b/config/views.view.stories.yml index e5cb6b25..93c02b8d 100644 --- a/config/views.view.stories.yml +++ b/config/views.view.stories.yml @@ -239,7 +239,7 @@ display: operator: field_country_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: country + identifier: countries required: false remember: false multiple: false @@ -263,9 +263,9 @@ display: group_items: { } verf_target_bundles: country: country + contacts: '0' event_type: '0' - regional_offices: '0' - response_type: '0' + office_type: '0' story_type: '0' theme: '0' show_unpublished: 0 @@ -289,7 +289,7 @@ display: operator: field_responses_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: response + identifier: responses required: false remember: false multiple: false @@ -341,7 +341,7 @@ display: operator: field_regions_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: region + identifier: regions required: false remember: false multiple: false @@ -534,7 +534,7 @@ display: operator: field_country_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: country + identifier: countries required: false remember: false multiple: false @@ -558,9 +558,9 @@ display: group_items: { } verf_target_bundles: country: country + contacts: '0' event_type: '0' - regional_offices: '0' - response_type: '0' + office_type: '0' story_type: '0' theme: '0' show_unpublished: 0 @@ -584,7 +584,7 @@ display: operator: field_responses_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: response + identifier: responses required: false remember: false multiple: false @@ -636,7 +636,7 @@ display: operator: field_regions_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: region + identifier: regions required: false remember: false multiple: false @@ -829,7 +829,7 @@ display: operator: field_country_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: country + identifier: countries required: false remember: false multiple: false @@ -853,9 +853,9 @@ display: group_items: { } verf_target_bundles: country: country + contacts: '0' event_type: '0' - regional_offices: '0' - response_type: '0' + office_type: '0' story_type: '0' theme: '0' show_unpublished: 0 @@ -879,7 +879,7 @@ display: operator: field_responses_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: response + identifier: responses required: false remember: false multiple: false @@ -931,7 +931,7 @@ display: operator: field_regions_target_id_verf_op operator_limit_selection: false operator_list: { } - identifier: region + identifier: regions required: false remember: false multiple: false diff --git a/docker/etc/nginx/custom/01_attachment_redirections.conf b/docker/etc/nginx/custom/01_attachment_redirections.conf index 5865da0d..a2a4cd47 100644 --- a/docker/etc/nginx/custom/01_attachment_redirections.conf +++ b/docker/etc/nginx/custom/01_attachment_redirections.conf @@ -30,8 +30,12 @@ location @reliefweb-file { ## Make sure we can catch the 404 error to be able to use our handler. proxy_intercept_errors on; - ## Pass the request to ReleifWeb. - proxy_pass https://reliefweb.int; + ## Ensure the proxy host is in a variable, so nginx will not cache the IP + ## indefinitely and cause 502 errors if the load balancer IPs change. + set $reliefweb_host "reliefweb.int"; + + ## Pass the request to ReliefWeb. + proxy_pass https://$reliefweb_host; ## Override connection and buffer vars: do not attempt to buffer, just throw ## the data out right away and close the docstore connection when done. diff --git a/docker/etc/nginx/custom/03_mapbox.conf b/docker/etc/nginx/custom/03_mapbox.conf index 1a160dfd..e7107eba 100644 --- a/docker/etc/nginx/custom/03_mapbox.conf +++ b/docker/etc/nginx/custom/03_mapbox.conf @@ -20,10 +20,14 @@ location /mapbox/ { ## Remove cookies. more_clear_input_headers Cookie; + ## Ensure the proxy host is in a variable, so nginx will not cache the IP + ## indefinitely and cause 502 errors if the IPs change. + set $mapbox_host "api.mapbox.com"; + ## Proxy the request to the mapbox API. proxy_ssl_server_name on; - proxy_set_header Host "api.mapbox.com"; - proxy_pass https://api.mapbox.com$mapbox_request_uri; + proxy_set_header Host $mapbox_host; + proxy_pass https://$mapbox_host$mapbox_request_uri; proxy_http_version 1.1; proxy_redirect off; proxy_intercept_errors on; diff --git a/docker/etc/nginx/custom/04_legacy_files.conf b/docker/etc/nginx/custom/04_legacy_files.conf index 4658e11b..6dac940a 100644 --- a/docker/etc/nginx/custom/04_legacy_files.conf +++ b/docker/etc/nginx/custom/04_legacy_files.conf @@ -1,8 +1,10 @@ # Allow legacy files (and ECOSOC files) to be available on their old URL. +# +# If not found, pass the request to Drupal, so redirect module may handle it if required. location /sites/unocha/files { location ~ ^/sites/unocha/files/(?.*)$ { - try_files /sites/default/files/legacy/$file_path /sites/default/files/ecosoc/$file_path =404; + try_files /sites/default/files/legacy/$file_path /sites/default/files/ecosoc/$file_path @drupal; } return 404 "404 Not Found"; } diff --git a/html/modules/custom/unocha_paragraphs/unocha_paragraphs.module b/html/modules/custom/unocha_paragraphs/unocha_paragraphs.module index eafd5dc9..467f2f89 100644 --- a/html/modules/custom/unocha_paragraphs/unocha_paragraphs.module +++ b/html/modules/custom/unocha_paragraphs/unocha_paragraphs.module @@ -39,7 +39,7 @@ function unocha_paragraphs_preprocess_paragraph__stories(array &$variables) { ], $limit); // Filter the News and Stories page by the response. - $view_all_query['response'] = $parent->id(); + $view_all_query['responses'] = $parent->id(); // If we don't have enough stories for the response, complete with // stories from the region. @@ -52,7 +52,7 @@ function unocha_paragraphs_preprocess_paragraph__stories(array &$variables) { // Also add the region as filter to have consistent results in the // News and Stories landing page. - $view_all_query['region'] = $region->id(); + $view_all_query['regions'] = $region->id(); } } } @@ -63,7 +63,7 @@ function unocha_paragraphs_preprocess_paragraph__stories(array &$variables) { ], $limit); // Filter the News and Stories page by the region. - $view_all_query['region'] = $parent->id(); + $view_all_query['regions'] = $parent->id(); } else { // Exclude the current story so we can show related ones only. @@ -72,9 +72,9 @@ function unocha_paragraphs_preprocess_paragraph__stories(array &$variables) { // Add conditions on the referenced entities. $conditions = []; $fields = [ - 'field_responses' => 'response', - 'field_regions' => 'region', - 'field_country' => 'country', + 'field_responses' => 'responses', + 'field_regions' => 'regions', + 'field_country' => 'countries', ]; foreach ($fields as $field => $filter) { if ($parent->hasField($field)) { @@ -97,13 +97,6 @@ function unocha_paragraphs_preprocess_paragraph__stories(array &$variables) { $stories = unocha_paragraphs_get_stories($conditions, $limit, $exclude); } } - // If there are no valid parent, we just show the latest stories, - // for example when adding a stories paragraph type to a response as the - // paragraph doesn't yet have a parent as it's not yet saved. - // @todo add disclaimer in the preview in the form? - else { - $stories = unocha_paragraphs_get_stories([], $limit); - } // Filter out stories that cannot be accessed by the current user. if (!empty($stories)) { diff --git a/html/themes/custom/common_design_claro/css/styles.css b/html/themes/custom/common_design_claro/css/styles.css index 82d4526c..786740df 100644 --- a/html/themes/custom/common_design_claro/css/styles.css +++ b/html/themes/custom/common_design_claro/css/styles.css @@ -176,12 +176,33 @@ form .paragraph--view-mode--preview.paragraph--type--news-and-stories .uno-stori flex-wrap: wrap; gap: var(--uno-card-list-gap-size); } -form .paragraph--view-mode--preview.paragraph--type--content-list .uno-stories__header { +form .paragraph--view-mode--preview.paragraph--type--stories .uno-stories__header { margin-bottom: 1rem; } -form .paragraph--view-mode--preview.paragraph--type--content-list article.node--type-story.node--sticky.node--view-mode-card .node__content { +form .paragraph--view-mode--preview.paragraph--type--stories .uno-stories__view_all { + display: none; +} +form .paragraph--view-mode--preview.paragraph--type--stories article.node--type-story.node--view-mode-card .node__content { min-width: 220px; } +form .paragraph--view-mode--preview.paragraph--type--stories article.node--type-story.node--view-mode-card:first-child .uno-card__image { + max-width: 220px; +} +form .paragraph--view-mode--preview.paragraph--type--stories article.node--type-story.node--view-mode-card:first-child .cd-card__container { + display: block; +} +form .paragraph--view-mode--preview.paragraph--type--stories article.node--type-story .cd-card__container { + padding: 0; +} +form .paragraph--view-mode--preview.paragraph--type--news-and-stories article.node--type-story .cd-card__footer, +form .paragraph--view-mode--preview.paragraph--type--stories article.node--type-story .cd-card__footer { + padding: 0; + font-size: var(--font-size-h5); +} +form .paragraph--view-mode--preview.paragraph--type--news-and-stories article.node--type-story .cd-read-more, +form .paragraph--view-mode--preview.paragraph--type--stories article.node--type-story .cd-read-more { + display: none; +} /* Events. */ form .paragraph--view-mode--preview.paragraph--type--events .viewsreference--view-title { @@ -272,3 +293,6 @@ form .paragraph--view-mode--preview.paragraph--type--media-centre article.node-- order: -1; margin-right: 1rem; } +form .paragraph--view-mode--preview.paragraph--type--media-centre .uno-media-centre__view_all { + display: none; +} diff --git a/html/themes/custom/common_design_claro/templates/content/node--story--card.html.twig b/html/themes/custom/common_design_claro/templates/content/node--story--card.html.twig new file mode 100644 index 00000000..094fd657 --- /dev/null +++ b/html/themes/custom/common_design_claro/templates/content/node--story--card.html.twig @@ -0,0 +1 @@ +{% include '@common_design_subtheme/content/node--story--card.html.twig' %} diff --git a/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--figures--preview.html.twig b/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--figures--preview.html.twig index 900dd9f9..3ca7c57f 100644 --- a/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--figures--preview.html.twig +++ b/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--figures--preview.html.twig @@ -1 +1 @@ -{% include '@common_design_subtheme/paragraphs/paragraph--figures--preview.html.twig' %} +{% include '@common_design_subtheme/paragraphs/paragraph--figures.html.twig' %} diff --git a/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--figures.html.twig b/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--figures.html.twig deleted file mode 100644 index 9d1b3dc1..00000000 --- a/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--figures.html.twig +++ /dev/null @@ -1 +0,0 @@ -{% include '@common_design_subtheme/paragraphs/paragraph--events.html.twig' %} diff --git a/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--stories.html.twig b/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--stories.html.twig index becf9546..c55b8ac3 100644 --- a/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--stories.html.twig +++ b/html/themes/custom/common_design_claro/templates/paragraphs/paragraph--stories.html.twig @@ -1 +1,11 @@ -{% include '@common_design_subtheme/paragraphs/paragraph--stories.html.twig' %} +{% + include '@common_design_subtheme/paragraphs/paragraph--stories.html.twig' with { + 'content': content|merge({ + 'stories': content.stories ? content.stories : [ + { + '#markup': 'No stories currently for this page.'|t + } + ] + }) + } +%} diff --git a/html/themes/custom/common_design_claro/templates/views/views-view.html.twig b/html/themes/custom/common_design_claro/templates/views/views-view.html.twig index cd228184..ff3cb57a 100644 --- a/html/themes/custom/common_design_claro/templates/views/views-view.html.twig +++ b/html/themes/custom/common_design_claro/templates/views/views-view.html.twig @@ -1 +1,90 @@ -{% include '@common_design_subtheme/views/views-view.html.twig' %} +{# +/** + * @file + * Theme override for a 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 = [ + 'view', + 'view-' ~ id|clean_class, + 'view-id-' ~ id, + 'view-display-id-' ~ display_id, + dom_id ? 'js-view-dom-id-' ~ dom_id + ] +%} + + {{ title_prefix }} + {% if title %} + {{ title }} + {% endif %} + {{ title_suffix }} + {% if header %} +
+ {{ header }} +
+ {% endif %} + {% if exposed %} +
+ {{ exposed }} +
+ {% endif %} + {% if attachment_before %} +
+ {{ attachment_before }} +
+ {% endif %} + + {% if rows %} +
+ {{ rows }} +
+ {% elseif empty %} +
+ {{ empty }} +
+ {% endif %} + + {% if pager %} + {{ pager }} + {% endif %} + {% if attachment_after %} +
+ {{ attachment_after }} +
+ {% endif %} + {% if more %} + {{ more }} + {% endif %} + {% if footer %} + + {% endif %} + diff --git a/html/themes/custom/common_design_subtheme/common_design_subtheme.info.yml b/html/themes/custom/common_design_subtheme/common_design_subtheme.info.yml index 424ca4fc..24df6533 100644 --- a/html/themes/custom/common_design_subtheme/common_design_subtheme.info.yml +++ b/html/themes/custom/common_design_subtheme/common_design_subtheme.info.yml @@ -41,29 +41,26 @@ libraries: # libraries-extend: common_design/cd-article: - - common_design_subtheme/cd-article + - common_design_subtheme/uno-article common_design/cd-block-title: - - common_design_subtheme/cd-block-title - common_design/cd-button: - - common_design_subtheme/cd-button + - common_design_subtheme/uno-block-title common_design/cd-caption: - - common_design_subtheme/cd-caption + - common_design_subtheme/uno-caption common_design/cd-card: - - common_design_subtheme/cd-card + - common_design_subtheme/uno-card common_design/cd-header: - common_design_subtheme/cd-header common_design/cd-page-title: - - common_design_subtheme/cd-page-title + - common_design_subtheme/uno-page-title common_design/cd-read-more: - - common_design_subtheme/cd-read-more - common_design/cd-social-links: - - common_design_subtheme/cd-social-links + - common_design_subtheme/uno-read-more common_design/cd-tabs: - - common_design_subtheme/cd-tabs + - common_design_subtheme/uno-tabs common_design/cd-teaser: - - common_design_subtheme/cd-teaser + - common_design_subtheme/uno-teaser common_design/cd-typography: - - common_design_subtheme/cd-typography + - common_design_subtheme/uno-typography + ### # Override libraries to replace specific base-theme components. Now, when the # base-theme component would have been used, instead ONLY yours will apply. diff --git a/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml b/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml index b246e528..1d9742d4 100644 --- a/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml +++ b/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml @@ -9,9 +9,14 @@ global-styling: css/styles.css: {} css/brand.css: {} dependencies: - - common_design_subtheme/uno-card-list - - common_design_subtheme/cd + - common_design/cd-article + - common_design/cd-block-title - common_design/cd-read-more + - common_design/cd-typography + - common_design_subtheme/cd + - common_design_subtheme/rw-icons + - common_design_subtheme/uno-card-list + - common_design_subtheme/uno-node ### # Define Drupal libraries for your custom components. @@ -29,76 +34,11 @@ cd: components/cd/cd-typography.css: {} components/cd/cd-print.css: {} -cd-article: - css: - component: - components/cd-article/cd-article.css: {} - -cd-block-title: - css: - component: - components/cd-block-title/cd-block-title.css: {} - -cd-button: - css: - component: - components/cd-button/cd-button.css: {} - -cd-caption: - css: - component: - components/cd-caption/cd-caption.css: {} - -cd-card: - css: - component: - components/cd-card/cd-card.css: {} - cd-header: css: component: components/cd/cd-header/cd-logo.css: {} -cd-hero: - css: - component: - components/cd-hero/cd-hero.css: {} - -cd-hero--style-three: - css: - component: - components/cd-hero/cd-hero--style-three.css: {} - -cd-page-title: - css: - component: - components/cd-page-title/cd-page-title.css: {} - -cd-read-more: - css: - component: - components/cd-read-more/cd-read-more.css: {} - -cd-social-links: - css: - component: - components/cd-social-links/cd-social-links.css: {} - -cd-tabs: - css: - component: - components/cd-tabs/cd-tabs.css: {} - -cd-teaser: - css: - component: - components/cd-teaser/cd-teaser.css: {} - -cd-typography: - css: - component: - components/cd-typography/cd-typography.css: {} - rw-brand: css: theme: @@ -130,6 +70,16 @@ rw-river: - common_design_subtheme/rw-brand - common_design_subtheme/rw-icons +uno-article: + css: + component: + components/uno-article/uno-article.css: {} + +uno-block-title: + css: + component: + components/uno-block-title/uno-block-title.css: {} + uno-breadcrumb: css: theme: @@ -140,6 +90,11 @@ uno-campaign: theme: components/uno-campaign/uno-campaign.css: {} +uno-caption: + css: + component: + components/uno-caption/uno-caption.css: {} + uno-card: css: theme: @@ -168,13 +123,6 @@ uno-donors: theme: components/uno-donors/uno-donors.css: {} -uno-embed: - css: - component: - components/uno-embed/uno-embed.css: {} - js: - components/uno-embed/uno-embed.js: {} - uno-event-date: css: theme: @@ -185,10 +133,10 @@ uno-figures: theme: components/uno-figures/uno-figures.css: {} -uno-gho: +uno-hero: css: - theme: - components/uno-gho/uno-gho.css: {} + component: + components/uno-hero/uno-hero.css: {} uno-layout: css: @@ -215,6 +163,31 @@ uno-nav: theme: components/uno-nav/uno-nav.css: {} +uno-node: + css: + theme: + components/uno-node/uno-node.css: {} + +uno-page-title: + css: + component: + components/uno-page-title/uno-page-title.css: {} + +uno-pager: + css: + component: + components/uno-pager/uno-pager.css: {} + +uno-paragraphs: + css: + theme: + components/uno-paragraphs/uno-paragraphs.css: {} + +uno-read-more: + css: + component: + components/uno-read-more/uno-read-more.css: {} + uno-response-map: css: theme: @@ -226,16 +199,27 @@ uno-river: css: theme: components/uno-river/uno-river.css: {} + dependencies: + - common_design_subtheme/uno-pager -uno-rss-feed: +uno-section-tabs: css: theme: - components/uno-rss-feed/uno-rss-feed.css: {} + components/uno-section-tabs/uno-section-tabs.css: {} + js: + components/uno-section-tabs/uno-section-tabs.js: {} + +uno-social-links: + css: + component: + components/uno-social-links/uno-social-links.css: {} uno-stories: css: theme: components/uno-stories/uno-stories.css: {} + dependencies: + - common_design_subtheme/uno-view-all uno-subscribe: css: @@ -244,15 +228,44 @@ uno-subscribe: uno-tabs: css: - theme: + component: components/uno-tabs/uno-tabs.css: {} - js: - components/uno-tabs/uno-tabs.js: {} + +uno-teaser: + css: + component: + components/uno-teaser/uno-teaser.css: {} uno-text-image: css: theme: components/uno-text-image/uno-text-image.css: {} + +uno-typography: + css: + component: + components/uno-typography/uno-typography.css: {} + +uno-video: + css: + theme: + components/uno-video/uno-video.css: {} + +uno-view-all: + css: + theme: + components/uno-view-all/uno-view-all.css: {} + dependencies: + - common_design_subtheme/rw-icons + +uno-views: + css: + theme: + components/uno-views/uno-views.css: {} + dependencies: + - common_design_subtheme/uno-view-all + - common_design_subtheme/uno-pager + ### # Define Drupal libraries for additional webfonts. # diff --git a/html/themes/custom/common_design_subtheme/components/cd-article/README.md b/html/themes/custom/common_design_subtheme/components/cd-article/README.md deleted file mode 100644 index bf21ce40..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-article/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Article - -## Purpose and Usage -Width-restricted long form text and media content. - -Also includes an aside element for creating a "faux" column. - -## Caveats -`cd-max-width` class controls the width of the relevant elements, for best -readability. Depending on the context, this class may be added to individual -elements or the wrapper div. - -The layout rules for `cd-layout-two-col` and the aside come from the base -theme. The parent container div requires class `cd-layout-with-sidebar` - -### Variants - -``` -.cd-content--compact /* On the aside element for a compact sidebar */ - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-article/cd-article.css b/html/themes/custom/common_design_subtheme/components/cd-article/cd-article.css deleted file mode 100644 index 01f144c2..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-article/cd-article.css +++ /dev/null @@ -1,19 +0,0 @@ -/** - * CD Article component - */ - -.cd-article p { - max-width: var(--cd-max-content-width); - margin-right: auto; - margin-left: auto; -} - -.cd-article p:first-child { - margin-top: 0; -} - -.cd-article__page-title { - margin-bottom: 2rem; - padding-bottom: 1rem; - border-bottom: 1px solid var(--brand-grey); -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-article/cd-article.html.twig b/html/themes/custom/common_design_subtheme/components/cd-article/cd-article.html.twig deleted file mode 100644 index 8dc6b3b4..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-article/cd-article.html.twig +++ /dev/null @@ -1,129 +0,0 @@ -{{ attach_library('common_design/cd-typography') }} -{{ attach_library('common_design/cd-flow') }} -{{ attach_library('common_design/cd-author') }} -{{ attach_library('common_design/cd-article') }} -{{ attach_library('common_design/cd-block-title') }} - -
-

This is an example article with a sidebar

- -
- -
-
- Submitted by - - username - - on - 19 August 2009 -
-
- -
- -
- -

This is an example article. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas congue a arcu sed aliquet. Vestibulum pretium lacus dolor, vitae luctus magna rhoncus eget. Fusce suscipit porttitor euismod. Vivamus turpis augue, sagittis ac risus in, dignissim posuere velit. Duis vestibulum dui non tellus luctus dignissim. Cras semper vitae magna vitae egestas. Aliquam erat volutpat. Ut neque arcu, euismod nec laoreet et, scelerisque vel tortor. Integer ut ligula eros. Sed in enim bibendum, dictum metus et, vehicula ante. Aliquam vitae vulputate odio, vel pretium mi. Integer dapibus pharetra eros, at placerat ante bibendum in.

- -

Etiam fermentum sit amet metus sed hendrerit. Aenean quis hendrerit augue, in congue enim. Aenean at nisi nec tortor mollis vehicula et at nulla. Pellentesque sodales, sapien a congue placerat, enim purus blandit neque, non mattis ex magna eu enim. Maecenas sed lobortis tortor, ut tristique libero. Fusce laoreet eros et tristique hendrerit. Fusce non augue ac libero consequat molestie ac sed diam. Ut sed sodales orci. In hac habitasse platea dictumst. Ut ut justo eget lectus bibendum viverra eu sit amet velit. Vivamus non diam nec lorem pulvinar tempor. Cras non ante libero.

- -
    -
  • This is a list item in the main content
  • -
  • This is another list item
  • -
  • This is the third list item in the main content
  • -
- -

In hac habitasse platea dictumst. Sed semper metus erat, vel consectetur nisi fermentum sed. Nulla vulputate, ipsum in auctor ullamcorper, sapien erat sollicitudin purus, quis pellentesque magna tortor ac magna. Vivamus massa diam, sollicitudin id fermentum ut, pretium eu tortor. Praesent in tortor velit. Ut a leo quis tortor dignissim ultricies ut vel lorem. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin auctor, mauris eu ultrices porttitor, enim ex ultricies quam, sed lobortis dolor ligula vel lectus. Duis commodo neque a molestie aliquam.

- -
- - - -
- -
- -
- -
- -
-

This is an example article with a compact sidebar

- -
- -
-
- Submitted by - - username - - on - 19 August 2009 -
-
- -
- -
- -

This is an example article. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas congue a arcu sed aliquet. Vestibulum pretium lacus dolor, vitae luctus magna rhoncus eget. Fusce suscipit porttitor euismod. Vivamus turpis augue, sagittis ac risus in, dignissim posuere velit. Duis vestibulum dui non tellus luctus dignissim. Cras semper vitae magna vitae egestas. Aliquam erat volutpat. Ut neque arcu, euismod nec laoreet et, scelerisque vel tortor. Integer ut ligula eros. Sed in enim bibendum, dictum metus et, vehicula ante. Aliquam vitae vulputate odio, vel pretium mi. Integer dapibus pharetra eros, at placerat ante bibendum in.

- -

Etiam fermentum sit amet metus sed hendrerit. Aenean quis hendrerit augue, in congue enim. Aenean at nisi nec tortor mollis vehicula et at nulla. Pellentesque sodales, sapien a congue placerat, enim purus blandit neque, non mattis ex magna eu enim. Maecenas sed lobortis tortor, ut tristique libero. Fusce laoreet eros et tristique hendrerit. Fusce non augue ac libero consequat molestie ac sed diam. Ut sed sodales orci. In hac habitasse platea dictumst. Ut ut justo eget lectus bibendum viverra eu sit amet velit. Vivamus non diam nec lorem pulvinar tempor. Cras non ante libero.

- -
    -
  • This is a list item in the main content
  • -
  • This is another list item
  • -
  • This is the third list item in the main content
  • -
- -

In hac habitasse platea dictumst. Sed semper metus erat, vel consectetur nisi fermentum sed. Nulla vulputate, ipsum in auctor ullamcorper, sapien erat sollicitudin purus, quis pellentesque magna tortor ac magna. Vivamus massa diam, sollicitudin id fermentum ut, pretium eu tortor. Praesent in tortor velit. Ut a leo quis tortor dignissim ultricies ut vel lorem. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin auctor, mauris eu ultrices porttitor, enim ex ultricies quam, sed lobortis dolor ligula vel lectus. Duis commodo neque a molestie aliquam.

- -
- - - -
- -
- -
diff --git a/html/themes/custom/common_design_subtheme/components/cd-banner/README.md b/html/themes/custom/common_design_subtheme/components/cd-banner/README.md deleted file mode 100644 index c04dcb0e..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-banner/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Banner - -## Purpose and Usage -Provides a letterbox image to visually augment pages or separate sections. - -- image - -Use with cd-caption component for image caption and/or image credits. - -Use with cd-bleed component for full viewport width option. - -@TODO use srcset with good defaults, and add note about Responsive image module in Drupal and its config. - -## Caveats -Image uses object-fit and object-position when supported, otherwise a fallback -technique using absolute positioning and transform is used. - -### Variants - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-banner/cd-banner.css b/html/themes/custom/common_design_subtheme/components/cd-banner/cd-banner.css deleted file mode 100644 index 81fc13c0..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-banner/cd-banner.css +++ /dev/null @@ -1,85 +0,0 @@ -/** - * CD Banner - */ - -.cd-banner { - position: relative; - overflow: hidden; - height: 24rem; /* 384px */ - text-align: center; -} - -.cd-banner__image { - display: block; - width: 100%; - max-width: 100%; - height: 24rem; /* 384px */ -} - -@supports (object-fit: cover) { - .cd-banner__image { - object-fit: cover; - object-position: 50% 50%; - } -} - -@media screen and (min-width: 1024px) { - .cd-banner__image { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - - @supports (object-fit: cover) { - .cd-banner__image { - top: 0; - left: 0; - transform: none; - } - } -} - -/* For IE11 */ -@media all and (-ms-high-contrast: none) { - .cd-banner__image { - height: auto; - } - - .cd-bleed--background-only .cd-banner__image { - width: auto; - } -} - -/* Microsoft Edge Browser 15+ - @supports method */ -@supports (-ms-ime-align:auto) and (-webkit-text-stroke:initial) { - .cd-banner__image { - height: auto; - } - - .cd-bleed--background-only .cd-banner__image { - width: auto; - } - /* Exclude for Edge 16+ */ - @supports (object-fit: cover) { - .cd-banner__image { - height: inherit; - } - } -} - -@media screen and (min-width: 1200px) { - @supports (object-fit: cover) { - .cd-banner__image { - object-fit: none; - } - - .cd-bleed .cd-banner__image { - object-fit: cover; - } - - .cd-bleed--background-only .cd-banner__image { - object-fit: none; - } - } -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-banner/cd-banner.html.twig b/html/themes/custom/common_design_subtheme/components/cd-banner/cd-banner.html.twig deleted file mode 100644 index 406236e8..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-banner/cd-banner.html.twig +++ /dev/null @@ -1,28 +0,0 @@ -{{ attach_library('common_design/cd-banner') }} -{{ attach_library('common_design/cd-caption') }} -{{ attach_library('common_design/cd-bleed') }} - -
- banner placeholder -
-
- Cras molestie risus a enim convallis vitae luctus libero lacinia -
- -
-
- banner placeholder -
-
- Cras molestie risus a enim convallis vitae luctus libero lacinia -
- -
- -
- banner placeholder -
-
- Cras molestie risus a enim convallis vitae luctus libero lacinia -
- diff --git a/html/themes/custom/common_design_subtheme/components/cd-block-title/README.md b/html/themes/custom/common_design_subtheme/components/cd-block-title/README.md deleted file mode 100644 index bf0c1ba9..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-block-title/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Block title - -## Purpose and Usage -Title for content sections or to precede other components like lists and grids. - -## Caveats -Note the font size is set so the Heading level has no effect on font size. - -### Variants - -``` -.cd-block-title--underline - -/* uses brand--primary for underline */ -.path-frontpage .cd-block-title--underline - -.cd-content--compact .cd-block-title - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-block-title/cd-block-title.css b/html/themes/custom/common_design_subtheme/components/cd-block-title/cd-block-title.css deleted file mode 100644 index e2c979e7..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-block-title/cd-block-title.css +++ /dev/null @@ -1,36 +0,0 @@ -/** - * CD Block Title - */ - -.cd-block-title { - margin: 0 0 2.5rem 0; - letter-spacing: 0.5px; - font-size: var(--cd-font-size--2xbase); - font-weight: 700; - line-height: 1.3; -} - -.cd-block-title--underline { - padding-bottom: 0.5rem; - border-bottom: 1px solid var(--brand-grey); -} - -.cd-layout__sidebar--first .cd-block-title--underline, -.cd-layout__sidebar--second .cd-block-title--underline { - border-bottom: 1px solid var(--brand-primary); -} - -/** - * Optional rules for Frontpage block titles using brand colours. - * Copy into sub theme. - */ -/* -.path-frontpage .cd-block-title--underline { - border-bottom: 1px solid var(--brand-highlight); -} - -.path-frontpage .cd-layout__sidebar--first .cd-block-title--underline, -.path-frontpage .cd-layout__sidebar--second .cd-block-title--underline { - border-bottom: 1px solid var(--brand-primary); -} -*/ diff --git a/html/themes/custom/common_design_subtheme/components/cd-button/README.md b/html/themes/custom/common_design_subtheme/components/cd-button/README.md deleted file mode 100644 index 19382be6..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-button/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Button - -## Purpose and Usage -Button or anchor elements for forms and card components. - -## Caveats -Buttons or anchors with SVG elements require a span `.cd-button__text` wrapping the text for best icon alignment. - -We use a HSL system and CSS custom properties so extra care is needed for IE11 support. - -### Variants - -``` -.cd-button // default - -/* For buttons on a dark background */ -.cd-button--light - -/* For an outline style */ -.cd-button--outline - -/* For export style */ -@TODO review -.cd-button--export - -/* For a destructive action */ -.cd-button--danger - -/* Utility classes */ -.cd-button--small -.cd-button--bold -.cd-button--uppercase -.cd-button--wide -.cd-button--icon - -/* For disabled buttons */ -.cd-button[disabled] - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-button/cd-button.css b/html/themes/custom/common_design_subtheme/components/cd-button/cd-button.css deleted file mode 100755 index eae145c2..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-button/cd-button.css +++ /dev/null @@ -1,234 +0,0 @@ -/** - * CD Button - * - * Defines default button styles plus many variants to suit different use-cases. - */ - -/* Default button */ -.cd-button { - width: auto; - padding: 0.5rem 1rem; - cursor: pointer; - transition: - background-color 0.6s ease-out, - color 0.6s ease-out; - text-align: center; - color: var(--cd-white); - border: 2px solid transparent; - border-radius: 0; - background-color: var(--brand-primary); - box-shadow: none; - font-size: 1rem; - line-height: 1.15; - -webkit-appearance: none; -} - -.cd-button:hover, -.cd-button:focus { - text-decoration: none; - color: var(--cd-white); - background-color: var(--brand-primary--light); -} - -.cd-button:focus { - border: 2px solid var(--brand-primary--dark); - /* We remove the outline because we are adding a border. */ - /* so the rounded corners look nicer on hover */ - outline: 0 solid var(--brand-primary--light); -} - -/* For buttons on dark backgrounds */ -.cd-button--light { - color: var(--brand-primary--dark); - background-color: var(--brand-primary--light); -} - -.cd-button--light:hover, -.cd-button--light:focus { - color: var(--brand-primary--dark); - background-color: var(--brand-primary--light); -} - -/* When it's an anchor styled as a button */ -a.cd-button { - display: inline-flex; - justify-content: center; - cursor: pointer; - text-decoration: none; -} - -.cd-button--outline { - color: var(--brand-primary); - border-color: var(--brand-primary); - background-color: var(--cd-white); - fill: currentColor; -} - -.cd-button--outline:hover, -.cd-button--outline:focus { - color: var(--cd-white); - border-color: var(--brand-primary--dark); - background-color: var(--brand-primary); -} - -/* Utility classes */ -.cd-button--small { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - font-weight: 400; -} - -.cd-button--bold { - font-weight: bold; -} - -.cd-button--uppercase { - text-transform: uppercase; -} - -.cd-button--wide { - padding-right: 3rem; - padding-left: 3rem; -} - -.cd-button--wide.cd-button--small { - padding-right: 1.5rem; - padding-left: 1.5rem; -} - -/* Some buttons have SVG icons */ -.cd-button--icon { - display: inline-flex; - align-items: center; - justify-content: space-between; - text-align: left; -} - -[dir="rtl"] .cd-button--icon { - text-align: right; -} - -[dir="rtl"] .cd-icon--arrow-right { - transform: scale(-1, 1); -} - -/* For IE11 */ -@media all and (-ms-high-contrast: none) { - .cd-button--icon { - display: inline-block; - } -} - -/* button--icon text needs to be inside span */ -.cd-button--icon .cd-button__text { - display: inline-block; - flex: 1 1 0%; -} - -.cd-button--icon svg { - fill: currentColor; - width: 1rem; - height: 1rem; - transition: fill 0.3s ease-in; -} - -[dir="ltr"] .cd-button--icon svg { - /* Icon before */ - margin-right: 0.25rem; -} - -[dir="rtl"] .cd-button--icon svg { - /* Icon before */ - margin-left: 0.25rem; -} - -.cd-button--icon span + svg { - /* Icon after */ - margin-right: 0; - margin-left: 2rem; -} - -[dir="rtl"] .cd-button--icon span + svg { - margin-right: 2rem; - /* Icon after */ - margin-left: 0; -} - -.cd-button--icon.cd-button--small svg { - width: 0.75rem; - height: 0.75rem; -} - -.cd-button--icon.cd-button--small span + svg { - /* Icon after */ - margin-left: 1rem; -} - -[dir="rtl"] .cd-button--icon.cd-button--small span + svg { - margin-right: 1rem; - /* Icon after */ - margin-left: 0; -} - -.cd-button--icon:hover svg, -.cd-button--icon:focus svg { - fill: var(--cd-white); -} - -.cd-button--light:hover svg, -.cd-button--light:focus svg { - fill: currentColor; -} - -.cd-button[disabled] { - opacity: 0.6; -} - -.cd-button[disabled], -.cd-button[disabled]:hover, -.cd-button[disabled]:focus, -.cd-button[disabled]:hover *, -.cd-button[disabled]:focus * { - cursor: not-allowed; - /* Prevents hover and focus */ - pointer-events: none; -} - -/* For IE11 */ -@media all and (-ms-high-contrast: none) { - .cd-button[disabled] { - position: relative; - } -} - -.cd-button--export { - color: var(--cd-white); - background: var(--cd-grey--mid); - fill: var(--cd-white); -} - -.cd-button--export svg, -.cd-button--export:hover svg, -.cd-button--export:focus svg { - fill: var(--cd-white); -} - -.cd-button--export:hover, -.cd-button--export:focus { - color: var(--cd-white); - background: var(--cd-grey--dark); - fill: var(--cd-white); -} - -.cd-button--danger { - background-color: var(--cd-highlight-red); -} - -.cd-button + .cd-button { - margin-inline-start: 0.5rem; -} - -/* Drupal entity delete confirmation Delete button followed by anchor */ -.cd-button + #edit-cancel { - margin-inline-start: 0.5rem; -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-button/cd-button.html.twig b/html/themes/custom/common_design_subtheme/components/cd-button/cd-button.html.twig deleted file mode 100644 index 7a5d0221..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-button/cd-button.html.twig +++ /dev/null @@ -1,274 +0,0 @@ -{{ attach_library('common_design/cd-button') }} - - - -
- -

These are button styles on a white background

- - - -

- - - -

- - - -

- - - -

- - - -

- - - Anchor styled as a button - - -

- - - - Anchor with icon - - -

- - - -

- - - -

- - - - -

- - - - -

- - - - -

- - - - -

- - - - -

- - - - -

- -
- - -
- -

These are buttons on a darker background

- - - -

- - - -

- - - -

- - - -

- - - -

- - - Anchor styled as a button - - -

- - - - Anchor with icon - - -

- - - -

- - - -

- - - - -

- - - - -

- - - - -

- - - - -

- - - -

- - - - -

- -
- diff --git a/html/themes/custom/common_design_subtheme/components/cd-byline/README.md b/html/themes/custom/common_design_subtheme/components/cd-byline/README.md deleted file mode 100644 index 6db09ba8..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-byline/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Author byline - -## Purpose and Usage -Author information to accompany articles. - -- image -- name -- byline - -## Caveats -- Image needs to be square for `image--rounded` to work well -- Image has fixed width and height, currently 4rem - -### Variants - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-byline/cd-byline.css b/html/themes/custom/common_design_subtheme/components/cd-byline/cd-byline.css deleted file mode 100644 index 22c194c8..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-byline/cd-byline.css +++ /dev/null @@ -1,47 +0,0 @@ -/** - * CD Byline - */ - -.cd-byline { - --cd-byline-spacing: 2rem; - - margin-top: var(--cd-byline-spacing); -} - -/** - * The border is not on the container itself due to potential left/right padding - * values that can interfere. Ex: when it has the `content-width` class. - */ -.cd-byline::after { - display: block; - padding-bottom: var(--cd-byline-spacing); - content: ""; - border-bottom: 1px solid var(--brand-grey); -} - -.cd-byline__wrapper { - display: flex; -} - -.cd-byline__image { - flex: 0 0 4rem; - width: 4rem; - height: 4rem; - margin: 0; -} - -.cd-byline__image img { - width: 100%; - height: 4rem; -} - -@supports (object-fit: cover) { - .cd-byline__image img { - object-fit: cover; - object-position: 50% 50%; - } -} - -.cd-byline__name { - font-weight: 700; -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-byline/cd-byline.html.twig b/html/themes/custom/common_design_subtheme/components/cd-byline/cd-byline.html.twig deleted file mode 100644 index 9fb77dd1..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-byline/cd-byline.html.twig +++ /dev/null @@ -1,19 +0,0 @@ -{{ attach_library('common_design/cd-utilities') }} -{{ attach_library('common_design/cd-flow') }} -{{ attach_library('common_design/cd-typography') }} -{{ attach_library('common_design/cd-byline') }} - - diff --git a/html/themes/custom/common_design_subtheme/components/cd-card/README.md b/html/themes/custom/common_design_subtheme/components/cd-card/README.md deleted file mode 100644 index 09d7574c..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-card/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Card - -## Purpose and Usage -Displays concise information in a clear and visually striking manner, with -optional images and call-to-action elements. - -Replace the title heading tag with the semantic level based on the other headings on the page. - -## Caveats -Requires cd-grid component or alternative grid system for layout. - -Image uses `object-fit` and `object-position` where supported. An IE11 JS -solution is in place to set the image as a background image when CSS properties -are not supported. - -The images have a fixed height of 13rem. - -### Variants -Use utility classes, cd-button or cd-read-more component for varied content. - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-card/cd-card.css b/html/themes/custom/common_design_subtheme/components/cd-card/cd-card.css deleted file mode 100755 index 4599f4f4..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-card/cd-card.css +++ /dev/null @@ -1,187 +0,0 @@ -/** - * CD Card - * - * Is capable of several variants: - * - Optional image - * - Image can be rectangular or rounded - * - Optional footer - */ - -/** - * Card container - */ -.cd-card { - display: flex; - flex-flow: column nowrap; - border: 0 solid var(--brand-grey); - background-color: var(--cd-white); -} - -/** - * Card image - */ -.cd-card__image img { - width: 100%; - height: 13rem; -} - -@supports (object-fit: cover) { - .cd-card__image img { - object-fit: cover; - object-position: 50% 50%; - } -} - -.cd-card__image--rounded { - min-width: 7rem; - max-width: 13rem; - min-height: 7rem; - max-height: 13rem; - margin-top: 1rem; - margin-right: auto; - margin-left: auto; -} - -.cd-card__image + .cd-card__container { - padding: 1rem 2rem; -} - -/** - * Card contents - */ -.cd-card__container { - flex-grow: 1; - padding: 0; -} - -.cd-card__title, -.cd-card__title a { - display: block; - color: black; - font-size: 1.25rem; - font-weight: 500; -} -.cd-card__title { - margin-bottom: 0.5rem; -} - -.cd-card__title a:hover, -.cd-card__title a:focus { - color: var(--brand-default-text-color); -} - -.cd-card__title:first-child, -.cd-card__title { - margin-top: 1rem; -} - -.cd-card__description p:last-child { - margin-bottom: 0; -} - -/** - * Card footer - */ -.cd-card__footer { - position: relative; - display: flex; - flex-wrap: nowrap; - flex-shrink: 0; - justify-content: flex-end; - margin-top: 0; - padding: 0; - padding-inline-end: 2rem; - content: ""; -} -.cd-card__footer::before { - position: absolute; - top: 0; - left: 0; - width: 6rem; - height: 3px; - background-color: var(--brand-primary); -} - -@media screen and (min-width: 480px) { - /* Story always has a date before the read more in the footer. */ - article:not(.node--type-story, .node--type-media-collection).cd-card .cd-card__footer { - display: block; - } -} - -.cd-card__date { - display: inline-block; - flex: 1 auto; - font-size: 0.875rem; -} - -.cd-card__link { - padding: 0; - text-decoration: none; - border-top: 0 solid var(--brand-grey); -} - -/** - * Variant: Clickable - * - * This card's entire surface is clickable. - * - * The hyperlink within the title of each card uses an invisible pseudo-element - * that stretches over the top of each card so that the entire surface is - * clickable/tappable. It ensures fewer redundant elements, and by using the - * hyperlinked Card Title instead of a generic "read more" link, we gain a11y - * and UX benefits associated with descriptive inner-text, e.g. screen readers, - * or when the mouse pointer is used to hover or drag the card. - * - * Therefore we will unset the properties of the title link and make it look - * like plain text. We even do this for hover/focus because the card itself will - * sport those styles. - */ -.cd-card--clickable { - position: relative; -} - -.cd-card--clickable .cd-card__title a { - text-decoration: none; - color: inherit; -} - -.cd-card--clickable .cd-card__title a:hover { - color: inherit; -} - -.cd-card--clickable .cd-card__title a:focus { - color: inherit; - outline: none; -} - -/* Create and style the clickable pseudo-element. */ -.cd-card--clickable .cd-card__title a::after { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - content: ""; -} - -/* Provide hover/focus styles on clickable pseudo-element. */ -.cd-card--clickable .cd-card__title a:hover::after { - outline: 3px solid var(--brand-grey); -} - -.cd-card--clickable .cd-card__title a:focus::after, -.cd-card--clickable .cd-card__title a:active::after { - outline: 3px solid var(--brand-grey); -} - -/* -Restore interactivity to any elements inside the card who come AFTER the -title link in HTML source using relative positioning. This can be a more generic -rule but our stock card only has one link so we keep the rule specific. - -@see https://inclusive-components.design/cards/#theauthorlink -*/ -.cd-card--clickable .cd-card__link { - position: relative; -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-event/README.md b/html/themes/custom/common_design_subtheme/components/cd-event/README.md deleted file mode 100644 index a5533c5b..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-event/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Event - -## Purpose and Usage -Use with the cd-date and cd-grid components for a visually appealing Event -teaser. - -Replace the title heading tag with the semantic level based on the other headings on the page. - -@TODO add time and location icons. - -## Caveats -Add `cd-card__date--event` class on the `cd-card__date` element to use the date -in card layout. - -### Variants - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-event/cd-event.css b/html/themes/custom/common_design_subtheme/components/cd-event/cd-event.css deleted file mode 100644 index 508ca765..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-event/cd-event.css +++ /dev/null @@ -1,19 +0,0 @@ -/** - * CD Event - */ - -*[class*="--event"] { - margin: 1rem auto 0; -} - -/* IE11 fix width to align center */ -@media all and (-ms-high-contrast: none) { - *[class*="--event"] { - width: 5.5rem; - } -} - -*[class*="__location"], -*[class*="__time"] { - font-weight: 700; -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-event/cd-event.html.twig b/html/themes/custom/common_design_subtheme/components/cd-event/cd-event.html.twig deleted file mode 100644 index 22365c45..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-event/cd-event.html.twig +++ /dev/null @@ -1,171 +0,0 @@ -{{ attach_library('common_design/cd-grid') }} -{{ attach_library('common_design/cd-flow') }} -{{ attach_library('common_design/cd-utilities') }} -{{ attach_library('common_design/cd-typography') }} -{{ attach_library('common_design/cd-button') }} -{{ attach_library('common_design/cd-read-more') }} -{{ attach_library('common_design/cd-card') }} -{{ attach_library('common_design/cd-date') }} -{{ attach_library('common_design/cd-event') }} - -
- - - - -
- -
-
-
- 30 -
-
- Jul - 2020 -
-
-
- -
- - - -
- Location -
- -
- Time: 16:00 to 17:00 -
- -
-

Sed dapibus, lectus sit amet adipiscing egestas, mauris est viverra nibh (iaculis pretium sem orci aliquet mauris). Nulla auctor eleifend turpis consequat pharetra. Nulla vel magna sit amet dui lobortis commodo vitae vel nulla sit amet ante hendrerit tempus. Donec a congue leo?

-
- -
- - - -
- - -
- -
-
-
- 18-20 -
-
- Jun - 2020 -
-
-
- -
- - - -
-

Sed dapibus, lectus sit amet adipiscing egestas, mauris est viverra nibh (iaculis pretium sem orci aliquet mauris). Nulla auctor eleifend turpis consequat pharetra. Nulla vel magna sit amet dui lobortis commodo vitae vel nulla sit amet ante hendrerit tempus. Donec a congue leo?

-
- -
- - - -
- - - - - - -
diff --git a/html/themes/custom/common_design_subtheme/components/cd-hero/README.md b/html/themes/custom/common_design_subtheme/components/cd-hero/README.md deleted file mode 100644 index 69aaccc5..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-hero/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Hero - -## Purpose and Usage -Provides a prominent image feature to visually augment homepages or landing pages. - -- image -- title -- text -- date -- CTA - -Use with cd-caption component for image caption and/or image credits. - -Use with cd-bleed component for full viewport width option. - -Use with cd-button component for CTA options. - -Replace the title heading tag with the semantic level based on the other headings on the page. - -@TODO use srcset with good defaults, and add note about Responsive image module in Drupal and its config. - -## Caveats -Image uses object-fit and object-position when supported, otherwise a fallback technique using absolute positioning and transform is used. - -### Variants - -``` -.cd-hero--style-one -.cd-hero--style-two -.cd-hero--style-three - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero--style-three.css b/html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero--style-three.css deleted file mode 100644 index 55934843..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero--style-three.css +++ /dev/null @@ -1,60 +0,0 @@ -/** - * CD Hero: Style three - */ - -.cd-hero--style-three .cd-container { - position: relative; - width: 100%; - max-width: var(--cd-max-width); - margin: 0 auto; - padding: 0; -} - -.cd-hero--style-three .cd-hero__title { - margin: 0 0 0.5rem; - font-size: 1.125rem; /* 18px */ -} - -.cd-hero--style-three .cd-hero__container { - padding: 1rem; - text-align: left; -} - -[dir="rtl"] .cd-hero--style-three .cd-hero__container { - text-align: right; -} - -/* -.cd-hero--style-three .cd-hero__date { - padding-left: 0.5rem; - margin-left: 0.5rem; - border-left: 1px solid var(--cd-grey--dark); -} -*/ - -@media screen and (min-width: 1024px) { - .cd-hero--style-three .cd-hero__container { - /* position: absolute; - bottom: 2rem; */ - max-width: 40%; - background-color: rgba(255, 255, 255, 0.85); - } - - /* [dir="ltr"] .cd-hero--style-three .cd-hero__container { - left: 2rem; - } - - [dir="rtl"] .cd-hero--style-three .cd-hero__container { - right: 2rem; - } */ -} - -/* @media screen and (min-width: 1200px) { - [dir="ltr"] .cd-hero--style-three .cd-hero__container { - left: 0; - } - - [dir="rtl"] .cd-hero--style-three .cd-hero__container { - right: 0; - } -} */ diff --git a/html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero.html.twig b/html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero.html.twig deleted file mode 100644 index 72f6ab23..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero.html.twig +++ /dev/null @@ -1,10 +0,0 @@ -{{ attach_library('common_design_subtheme/cd-hero') }} -{{ attach_library('common_design_subtheme/cd-hero--style-three') }} -{{ attach_library('common_design/cd-bleed') }} -
-
- {% block hero_image %} - {{ content.field_image }} - {% endblock %} -
-
diff --git a/html/themes/custom/common_design_subtheme/components/cd-language-switcher/README.md b/html/themes/custom/common_design_subtheme/components/cd-language-switcher/README.md deleted file mode 100644 index 482cd71d..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-language-switcher/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# CD Language Switcher overrides - -Directly modify this sub-theme component to adjust when the CD Language Switcher expands from a dropdown to a list with all options visible. diff --git a/html/themes/custom/common_design_subtheme/components/cd-language-switcher/cd-language-switcher.css b/html/themes/custom/common_design_subtheme/components/cd-language-switcher/cd-language-switcher.css deleted file mode 100644 index ecf40a0a..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-language-switcher/cd-language-switcher.css +++ /dev/null @@ -1,36 +0,0 @@ -/** - * CD Language Switcher sub-theme override. - * - * - Breakpoint when the Language Switcher becomes a dropdown. - * - If overriding this to use a smaller breakpoint, all breakpoints in between - * also need to be defined. - */ - -@media screen and (min-width: 800px) { - /* Language Switcher list. */ - .cd-language-switcher__dropdown { - /* Unset the dropdown styles */ - position: relative; - right: unset; - left: unset; - display: flex; - flex-wrap: wrap; - padding: 0 1rem; - background: transparent; - box-shadow: none; - } - - /** - * Expand the Language Switcher from a dropdown to a list. - * - * If overriding this to use a smaller breakpoint, all breakpoints in between - * also need to be defined. - */ - .cd-language-switcher { - --dropdown: false; - } - - .cd-language-switcher.cd-dropdown { - display: block; - } -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-page-title/README.md b/html/themes/custom/common_design_subtheme/components/cd-page-title/README.md deleted file mode 100644 index f2830532..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-page-title/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Title list - -## Purpose and Usage -A page title for landing pages and article pages, intended for h1 heading. - -Use `cd-utilities` component alignment classes to center landing page title if title is short. - -## Caveats -Due to Drupal's page rendering order, we use a preprocess function to better control page title rendering. Refer to `common_design.theme`. - -### Variants - -``` -.cd-page-title--landing - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-read-more/README.md b/html/themes/custom/common_design_subtheme/components/cd-read-more/README.md deleted file mode 100644 index 8e454e6c..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-read-more/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Read more - -## Purpose and Usage -Hyperlink to full article - -## Caveats -Uses an SVG element as icon. - -### Variants -Alignment options with `cd-utility` classes - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-social-links/README.md b/html/themes/custom/common_design_subtheme/components/cd-social-links/README.md deleted file mode 100644 index 17006153..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-social-links/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Social links - -## Purpose and Usage - -Social links for social sharing. - -## Caveats - -This also includes a download article icon that needs a preprocess node function and specific site building. - -```php -function common_design_preprocess_node(&$variables) { - // Add a link to download the PDF version of an article if any. - if ($node->bundle() === 'article' && $node->hasField('field_pdf')) { - $fid = $node->field_pdf->target_id; - if (!empty($fid)) { - $variables['pdf_download_url'] = '/node/' . $node->id() . '/download'; - } - } -} -``` - -### Variants - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-tabs/README.md b/html/themes/custom/common_design_subtheme/components/cd-tabs/README.md deleted file mode 100644 index 6f9ce9cc..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-tabs/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Tabs - -## Purpose and Usage -These tabs are for the Drupal logged-in user actions on Nodes (View, Edit, -Delete) and came from the Classy theme, with some adjustments. -This component might be suitable for other tabs or could grow to accommodate -different scenarios. There are tabs on HID too which could helps us align this. - -@TODO prefix properly with BEM selectors. - -## Caveats - - -### Variants - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-tabs/cd-tabs.css b/html/themes/custom/common_design_subtheme/components/cd-tabs/cd-tabs.css deleted file mode 100755 index b6fcc963..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-tabs/cd-tabs.css +++ /dev/null @@ -1,89 +0,0 @@ -/** - * CD Tabs - */ - -ul.tabs { - display: block; - margin: 1rem 0 3rem; - padding: 0; - list-style: none; - border-bottom: 3px solid var(--brand-grey); -} - -/* Clearfix */ -ul.tabs::after { - display: block; - visibility: hidden; - clear: both; - height: 0; - content: "."; -} - -ul.tabs > li { - display: block; - margin: 0; -} - -ul.tabs > li > a { - position: relative; - display: block; - margin: 0; - padding: 0.25rem 1rem; - text-align: center; - text-decoration: none; - text-transform: unset; - color: var(--brand-primary--dark); - border: 0 none; - border-bottom: 3px solid var(--brand-grey); - border-radius: 0; - background: none; - font-weight: 500; -} - -ul.tabs > li > a:focus { - color: var(--brand-primary--dark); - outline: 3px solid var(--brand-highlight); - background: transparent; -} - -@media (min-width: 576px) { - ul.tabs > li { - position: relative; - /* Height of border bottom. */ - margin-bottom: -3px; - } - - [dir="ltr"] ul.tabs > li { - float: left; - margin-right: 0.5rem; - } - - [dir="rtl"] ul.tabs > li { - float: right; - margin-left: 0.5rem; - } -} - -@media (min-width: 768px) { - ul.tabs > li > a { - min-width: 7rem; /* 112px */ - } -} - -ul.tabs > li > a.is-active, -ul.tabs > li > a:hover { - color: var(--brand-primary); - border-bottom: 3px solid var(--brand-grey) !important; - background-color: transparent; -} - -ul.tabs > li > a.is-active { - border-bottom: 3px solid var(--brand-primary) !important; - background-color: transparent; -} - -ul.tabs > li > a:focus { - color: var(--brand-primary--dark); - outline: 3px solid var(--brand-primary--light); - background-color: transparent; -} diff --git a/html/themes/custom/common_design_subtheme/components/cd-teaser/README.md b/html/themes/custom/common_design_subtheme/components/cd-teaser/README.md deleted file mode 100644 index e0475501..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-teaser/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Teaser - -## Purpose and Usage -Display multiple articles. Each item is a teaser with a title, optional image, -summary text and a link to the full article. - -The teaser title and/ or image can be linked, and the read more is optional. - -Replace the title heading tag with the semantic level based on the other headings on the page. - -@TODO If needed, combine with cd-grid for column layout and make appropriate adjustments. - -## Caveats -The image wrapper expands to accommodate the image width, and the content div -width adjusts accordingly. -The max-width of the image container is 24rem. -We can use image styles during implementation so all the images and content -widths will be consistent. - -### Variants -Use utility classes, cd-button or cd-read-more component for varied content. - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-typography/README.md b/html/themes/custom/common_design_subtheme/components/cd-typography/README.md deleted file mode 100644 index 22ecac2b..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-typography/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Typography - -## Purpose and Usage -Establishes the basic typographic rules for HTML elements used in content -creation. The markup provides a good sample of various HTML elements and how -they are styled. - -## Caveats -@TODO Unsure if this should exist. Maybe it's better to have each element (eg. -blockquote) as its own component? Or include element styles in CD typography? - -@TODO The rules for the dl assume a single definition per term. They don't work -well for dt followed by several dd which is a legitimate use case (ex: list of -themes for an article). Use classes instead of generic dl rule with variants -like cd-definition-list--inline-single - -### Variants - -``` -none - -``` diff --git a/html/themes/custom/common_design_subtheme/components/cd-typography/cd-typography.css b/html/themes/custom/common_design_subtheme/components/cd-typography/cd-typography.css deleted file mode 100644 index bc2d415d..00000000 --- a/html/themes/custom/common_design_subtheme/components/cd-typography/cd-typography.css +++ /dev/null @@ -1,37 +0,0 @@ -/** - * CD Typography - */ -hr { - margin: 3.5rem auto; - border-top: 3px solid var(--brand-grey); -} - -blockquote { - margin: 3rem 0; - padding: 1rem 2rem; - border-inline-start: 3px solid var(--brand-grey); -} - -blockquote p:last-child { - margin-bottom: 0; -} - -p.title { - margin: 6rem 0; - text-align: center; - font-size: var(--cd-font-size--2xmedium); -} - -p.headline { - color: var(--brand-primary); - font-size: var(--cd-font-size--2xmedium); - font-weight: bold; - line-height: 1.2; -} - -@media screen and (min-width: 1024px) { - p.headline { - font-size: 50px; - line-height: 1.2; - } -} diff --git a/html/themes/custom/common_design_subtheme/components/rw-brand/README.md b/html/themes/custom/common_design_subtheme/components/rw-brand/README.md new file mode 100644 index 00000000..65927bc4 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/rw-brand/README.md @@ -0,0 +1,5 @@ +ReliefWeb Brand +=============== + +This component provides colour variables and a spritesheet for use with RW +components. diff --git a/html/themes/custom/common_design_subtheme/components/rw-brand/rw-brand.css b/html/themes/custom/common_design_subtheme/components/rw-brand/rw-brand.css index 392e4524..22a993c5 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-brand/rw-brand.css +++ b/html/themes/custom/common_design_subtheme/components/rw-brand/rw-brand.css @@ -1,84 +1,11 @@ -/* stylelint-disable max-line-length */ /** * RW Brand Colors - * - * Recompile the Sass source files to get a new list. - * - * @see https://github.com/UN-OCHA/rwint9-site/blob/38e66da1b0fa4d6f316aaa7c961db859e2ef5d4b/html/themes/custom/common_design_subtheme/sass/cd/_cd-variables.scss */ - :root { - --cd-reliefweb-brand-blue: #0988bb; --cd-reliefweb-brand-red: #f65c51; - --cd-reliefweb-brand-blue--dark: #055372; --cd-reliefweb-brand-red--dark: #eb1405; --cd-reliefweb-brand-grey--dark: #2e3436; --cd-reliefweb-brand-grey--mid: #4d5254; --cd-reliefweb-brand-grey--light: #e6ecef; - --cd-rgb-reliefweb-brand-blue: 9, 136, 187; - --cd-rgb-reliefweb-brand-red: 246, 92, 81; - --cd-rgb-reliefweb-brand-blue--dark: 4, 82, 112; - --cd-rgb-reliefweb-brand-red--dark: 235, 20, 5; - --cd-rgb-reliefweb-brand-grey--dark: 46, 52, 54; - --cd-rgb-reliefweb-brand-grey--light: 230, 236, 239; - --cd-reliefweb-grey--light: #d9d9d9; - --cd-reliefweb-grey--light--bg: rgba(217, 217, 217, 0.2); - --cd-reliefweb-orange: #f49e2c; - --cd-reliefweb-orange--bg: rgba(244, 158, 44, 0.2); - --cd-reliefweb-blue: #076d96; - --cd-reliefweb-blue--bg: rgba(7, 109, 150, 0.2); - --cd-reliefweb-green: #88bb09; - --cd-reliefweb-green--bg: rgba(136, 187, 9, 0.2); - --cd-reliefweb-red: #da190b; - --cd-reliefweb-red--bg: rgba(218, 25, 11, 0.2); - --cd-reliefweb-purple: #9509bb; - --cd-reliefweb-purple--bg: rgba(149, 9, 187, 0.2); - --cd-reliefweb-grey: #4b4b4b; - --cd-reliefweb-grey--bg: rgba(75, 75, 75, 0.2); - --cd-reliefweb-brown: #8f5507; - --cd-reliefweb-brown--bg: rgba(143, 85, 7, 0.2); - --cd-reliefweb-yellow: #f5cb2f; - --cd-reliefweb-yellow--bg: rgba(245, 203, 47, 0.2); - --cd-reliefweb-cyan: #56c9f7; - --cd-reliefweb-cyan--bg: rgba(86, 201, 247, 0.2); --cd-reliefweb-orange--alert: #eb8705; - --cd-reliefweb-pink: rgba(246, 92, 81, 0.2); - --cd-reliefweb-grey--disable: rgba(230, 236, 239, 0.5); -} - -/** - * External URLs - */ -.hri__external-url { - position: relative; - top: 1px; - display: inline-block; - width: 12px; - height: 12px; - background: transparent url("../components/rw-brand/rw-icons-sprite.svg") -84px -108px no-repeat; -} - -/** - * View more - */ -.view-more { - width: 100%; - text-align: center; -} - -.view-more a { - font-size: var(--cd-font-size--small); - font-style: italic; -} - -.view-more a[href^="https://"]:after, -.view-more a:after { - display: inline-block; - overflow: hidden; - width: 12px; - height: 12px; - margin: 0 0 0 6px; - content: ""; - vertical-align: middle; - background: transparent url("../../components/rw-brand/rw-icons-sprite.svg") -84px -108px no-repeat; } diff --git a/html/themes/custom/common_design_subtheme/components/rw-document/rw-document.css b/html/themes/custom/common_design_subtheme/components/rw-document/rw-document.css index f46c92e6..33c90c75 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-document/rw-document.css +++ b/html/themes/custom/common_design_subtheme/components/rw-document/rw-document.css @@ -2,12 +2,6 @@ * ReliefWeb document page. */ -/* Date. */ -/* .unocha-reliefweb-document__date { - font-weight: bold; - font-style: italic; -} */ - /* Lists in content. */ .unocha-reliefweb-document li { margin: 8px 0 0; @@ -70,11 +64,9 @@ margin-top: 0; } -/* .unocha-reliefweb-document .cd-page-title { - font-size: var(--cd-font-size--large); -} -@media screen and (min-width: 1024px) { - .unocha-reliefweb-document .cd-page-title { - font-size: var(--cd-font-size--2xbase); +/* Additional spacing above page title */ + @media screen and (min-width: 768px) { + .unocha-reliefweb-document .cd-page-title { + margin-top: 3rem; + } } -} */ diff --git a/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/README.md b/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/README.md index 2ff77780..f269a3af 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/README.md +++ b/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/README.md @@ -1,8 +1,9 @@ ReliefWeb Entity Country Slug ============================= -This component provides rules for the "country slug" displayed before the title of reports, jobs and training. +This component provides rules for the "country slug" displayed before the title +of reports, jobs and training. ## Notes -This is a copy of https://github.com/UN-OCHA/rwint9-site/tree/develop/html/themes/custom/common_design_subtheme/components/rw-country-slug +This is a copy of https://github.com/UN-OCHA/rwint9-site/tree/develop/html/themes/custom/common_design_subtheme/components/rw-country-slug with adjustments for UNOCHA. diff --git a/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/rw-entity-country-slug.css b/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/rw-entity-country-slug.css index cb5e21fc..4723b350 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/rw-entity-country-slug.css +++ b/html/themes/custom/common_design_subtheme/components/rw-entity-country-slug/rw-entity-country-slug.css @@ -8,8 +8,6 @@ overflow: hidden; max-width: 100%; padding-inline-end: 1rem; - /* margin: 4px 8px 0 0; */ - /* padding: 0 12px; */ vertical-align: top; white-space: nowrap; letter-spacing: 1px; @@ -17,10 +15,6 @@ text-overflow: ellipsis; color: var(--brand-primary--dark); font-size: 1.0625rem; /* 17px */ - /* color: var(--cd-reliefweb-brand-grey--dark); */ - /* background: var(--cd-reliefweb-brand-grey--light); */ - /* font-size: 18px; */ - /* font-weight: bold; */ line-height: 30px; } p.rw-entity-country-slug { diff --git a/html/themes/custom/common_design_subtheme/components/rw-entity-meta/README.md b/html/themes/custom/common_design_subtheme/components/rw-entity-meta/README.md index 36175328..2058e427 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-entity-meta/README.md +++ b/html/themes/custom/common_design_subtheme/components/rw-entity-meta/README.md @@ -3,10 +3,12 @@ ReliefWeb Meta This component provides rules for the "meta" information of articles. -For example the "organization", "posted", "origin" etc. information below the title of a report article on the `/updates` page. +For example the "organization", "posted", "origin" etc. information below the +title of a report article on the `/updates` page. -This also provides the rules for the display of all the "tags" in the sidebar on article pages. +This also provides the rules for the display of all the "tags" in the sidebar on +article pages. ## Notes -This is a copy of https://github.com/UN-OCHA/rwint9-site/tree/develop/html/themes/custom/common_design_subtheme/components/rw-entity-meta +This is a copy of https://github.com/UN-OCHA/rwint9-site/tree/develop/html/themes/custom/common_design_subtheme/components/rw-entity-meta with adjustments for UNOCHA. diff --git a/html/themes/custom/common_design_subtheme/components/rw-river/README.md b/html/themes/custom/common_design_subtheme/components/rw-river/README.md index e9961b15..0eeeed41 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-river/README.md +++ b/html/themes/custom/common_design_subtheme/components/rw-river/README.md @@ -1,10 +1,13 @@ ReliefWeb Rivers ================ -This component provides styling for the ReliefWen "rivers" (list of documents). +This component provides styling for the ReliefWeb "rivers" (list of documents). -The [rw-river-article](rw-river-article.css) contains rules for the articles inside the list. +The [rw-river-article](rw-river-article.css) contains rules for the articles +inside the list. -The [rw-river-results](rw-river-results.css) contains rules for "pagination results" above the list of articles. +The [rw-river-results](rw-river-results.css) contains rules for "pagination +results" above the list of articles. -The [rw-river-views](rw-river-views.css) contains rules for the "views" (pre-filtered rivers) at the top of the river pages. +The [rw-river-views](rw-river-views.css) contains rules for the "views" +(pre-filtered rivers) at the top of the river pages. diff --git a/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-article.css b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-article.css index 9d707c06..9d484426 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-article.css +++ b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-article.css @@ -25,20 +25,11 @@ .rw-river-article:only-child { padding-bottom: 0; } -/* .rw-river-article .rw-river-article__header p.rw-entity-country-slug { - margin: 2px 6px 0 0; - padding: 1px 8px; - font-size: 14px; - line-height: 22px; -} */ .rw-river-article .rw-river-article__title { - /* display: inline; */ margin-top: 0; color: black; - /* font-size: 17px; */ font-size: 1.25rem; font-weight: 500; - /* line-height: 1.5; */ } .rw-river-article .rw-river-article__title a { color: inherit; @@ -48,10 +39,6 @@ color: var(--brand-default-text-color); } .rw-river-article .rw-river-article__content { - /* display: flex; */ - /* flex: 1 0 auto; */ - /* align-items: center; */ - /* padding-top: 16px; */ color: var(--cd-reliefweb-brand-grey--mid); } @@ -73,12 +60,6 @@ .rw-river-article .rw-river-article__content img + p { margin-top: 0; } - -/* @media all and (max-width: 479px) { - .rw-river-article .rw-river-article__content img { - display: none; - } -} */ .rw-river-article .rw-river-article__footer { /* Clear any floating from the content. */ clear: both; diff --git a/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-views.css b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-views.css index 30686ce6..deb91c0d 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-views.css +++ b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-views.css @@ -1,8 +1,7 @@ -/* stylelint-disable max-line-length */ /** * RW River Views * - * Taken directly from RW9. Any cusotmizations will appear in a separate file. + * Taken directly from RW9. * * @see https://raw.githubusercontent.com/UN-OCHA/rwint9-site/38e66da1b0fa4d6f316aaa7c961db859e2ef5d4b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river-views.css */ @@ -10,7 +9,6 @@ /* View selector */ .rw-river-page .rw-river-views { width: 100%; - /* margin: 8px 0; */ padding: 0; list-style: none; } diff --git a/html/themes/custom/common_design_subtheme/components/rw-river/rw-river.css b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river.css index 72b459de..885082b0 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-river/rw-river.css +++ b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river.css @@ -2,7 +2,7 @@ /** * RW River * - * Taken directly from RW9. Any cusotmizations will appear in a separate file. + * Taken directly from RW9. * * @see https://raw.githubusercontent.com/UN-OCHA/rwint9-site/38e66da1b0fa4d6f316aaa7c961db859e2ef5d4b/html/themes/custom/common_design_subtheme/components/rw-river/rw-river.css */ diff --git a/html/themes/custom/common_design_subtheme/components/uno-article/README.md b/html/themes/custom/common_design_subtheme/components/uno-article/README.md new file mode 100644 index 00000000..8c1a2e38 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-article/README.md @@ -0,0 +1,4 @@ +UNOCHA Article +============== + +This component provides styling for cd-article overrides. diff --git a/html/themes/custom/common_design_subtheme/components/uno-article/uno-article.css b/html/themes/custom/common_design_subtheme/components/uno-article/uno-article.css new file mode 100644 index 00000000..4e2255f9 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-article/uno-article.css @@ -0,0 +1,16 @@ +/** + * CD Article component + */ + +.cd-article p { + max-width: var(--cd-max-content-width); +} + +.cd-article p:first-child { + margin-top: 0; +} + +/* Restrict width for lists in articles */ +.cd-article ol { + max-width: var(--cd-max-content-width); +} diff --git a/html/themes/custom/common_design_subtheme/components/uno-block-title/README.md b/html/themes/custom/common_design_subtheme/components/uno-block-title/README.md new file mode 100644 index 00000000..ad4af3a9 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-block-title/README.md @@ -0,0 +1,4 @@ +UNOCHA Block title +================== + +This component provides styling for cd-block-title overrides. diff --git a/html/themes/custom/common_design_subtheme/components/uno-block-title/uno-block-title.css b/html/themes/custom/common_design_subtheme/components/uno-block-title/uno-block-title.css new file mode 100644 index 00000000..a467fb04 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-block-title/uno-block-title.css @@ -0,0 +1,11 @@ +/** + * CD Block Title + */ + +.cd-block-title { + margin: 0 0 2.5rem 0; + letter-spacing: 0.5px; + font-size: var(--cd-font-size--2xbase); + font-weight: 700; + line-height: 1.3; +} diff --git a/html/themes/custom/common_design_subtheme/components/uno-breadcrumb/README.md b/html/themes/custom/common_design_subtheme/components/uno-breadcrumb/README.md new file mode 100644 index 00000000..f292a431 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-breadcrumb/README.md @@ -0,0 +1,4 @@ +UNOCHA Breadcrumbs +================== + +This component provides styling for Breadcrumbs. diff --git a/html/themes/custom/common_design_subtheme/components/uno-breadcrumb/uno-breadcrumb.css b/html/themes/custom/common_design_subtheme/components/uno-breadcrumb/uno-breadcrumb.css index 78783f08..d3f84eae 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-breadcrumb/uno-breadcrumb.css +++ b/html/themes/custom/common_design_subtheme/components/uno-breadcrumb/uno-breadcrumb.css @@ -45,8 +45,8 @@ content: none; } -/* Hide the current page title in breadcrumbs for - Stories, Events, Publications */ +/* Hide the current page title in breadcrumbs for Stories, Events, + Publications */ .path-publications .uno-breadcrumb ol li:last-child, .page-node-type-event .uno-breadcrumb ol li:last-child, .page-node-type-story .uno-breadcrumb ol li:last-child { diff --git a/html/themes/custom/common_design_subtheme/components/uno-campaign/README.md b/html/themes/custom/common_design_subtheme/components/uno-campaign/README.md new file mode 100644 index 00000000..6929eab5 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-campaign/README.md @@ -0,0 +1,4 @@ +UNOCHA Campaign +=============== + +This component provides styling the Campaign paragraph type. diff --git a/html/themes/custom/common_design_subtheme/components/uno-caption/README.md b/html/themes/custom/common_design_subtheme/components/uno-caption/README.md new file mode 100644 index 00000000..8260e34d --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-caption/README.md @@ -0,0 +1,4 @@ +UNOCHA Caption +============== + +This component provides styling for cd-caption overrides. diff --git a/html/themes/custom/common_design_subtheme/components/cd-caption/cd-caption.css b/html/themes/custom/common_design_subtheme/components/uno-caption/uno-caption.css similarity index 95% rename from html/themes/custom/common_design_subtheme/components/cd-caption/cd-caption.css rename to html/themes/custom/common_design_subtheme/components/uno-caption/uno-caption.css index cbd93470..aa4dc8fb 100644 --- a/html/themes/custom/common_design_subtheme/components/cd-caption/cd-caption.css +++ b/html/themes/custom/common_design_subtheme/components/uno-caption/uno-caption.css @@ -40,7 +40,3 @@ padding: 0 var(--cd-container-padding-xlarge); } } - -[dir="rtl"] .cd-caption { - text-align: right; -} diff --git a/html/themes/custom/common_design_subtheme/components/uno-card-list/README.md b/html/themes/custom/common_design_subtheme/components/uno-card-list/README.md new file mode 100644 index 00000000..d5c8a76b --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-card-list/README.md @@ -0,0 +1,5 @@ +UNOCHA Card List +================ + +This component provides styling for Card Lists. +Card Lists can be paragraph types or Views Lists. diff --git a/html/themes/custom/common_design_subtheme/components/uno-card-list/uno-card-list.css b/html/themes/custom/common_design_subtheme/components/uno-card-list/uno-card-list.css index f506c718..bc0448a2 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-card-list/uno-card-list.css +++ b/html/themes/custom/common_design_subtheme/components/uno-card-list/uno-card-list.css @@ -1,5 +1,5 @@ /** - * Card List + * UNO Card List * */ @@ -9,7 +9,6 @@ } .paragraph--type--node.paragraph--view-mode--cards .field--name-field-node, -.paragraph--type--content-list.paragraph--view-mode--cards .view .view-content, .view-stories .view-content, .uno-stories .uno-stories__content, .view-events .view-content, @@ -26,7 +25,6 @@ gap: 0 var(--uno-card-list-gap-size); } .paragraph--type--node.paragraph--view-mode--cards .field--name-field-node article, -.paragraph--type--content-list.paragraph--view-mode--cards article, .view-stories .view-content article, .uno-stories .uno-stories__content article, .view-events .view-content article, @@ -41,7 +39,6 @@ @media screen and (min-width: 480px) { .paragraph--type--node.paragraph--view-mode--cards .field--name-field-node, - .paragraph--type--content-list.paragraph--view-mode--cards .view .view-content, .view-stories .view-content, .uno-stories .uno-stories__content, .view-events .view-content, @@ -56,7 +53,6 @@ @media screen and (min-width: 750px) { .paragraph--type--node.paragraph--view-mode--cards .field--name-field-node, - .paragraph--type--content-list.paragraph--view-mode--cards .view .view-content, .view-stories .view-content, .uno-stories .uno-stories__content, .view-events .view-content, diff --git a/html/themes/custom/common_design_subtheme/components/uno-card/README.md b/html/themes/custom/common_design_subtheme/components/uno-card/README.md new file mode 100644 index 00000000..d30ff89a --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-card/README.md @@ -0,0 +1,4 @@ +UNOCHA Card +=========== + +This component provides styling for cd-card overrides. diff --git a/html/themes/custom/common_design_subtheme/components/uno-card/uno-card.css b/html/themes/custom/common_design_subtheme/components/uno-card/uno-card.css index 5fdcad27..fc04662a 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-card/uno-card.css +++ b/html/themes/custom/common_design_subtheme/components/uno-card/uno-card.css @@ -1,89 +1,99 @@ /** - * HR.info Card - * - * There isn't a corresponding Paragraph Type for this component. Instead, the - * Featured Highlight uses it as an alternate display mode. - * - * @see html/themes/custom/common_design_subtheme/templates/paragraph--landing-page--featured-highlight.html.twig + * Card container */ -.uno-card { - --uno-card-border-color: #ddd; - --uno-card-padding: 1.5rem; + .cd-card { + display: flex; + flex-flow: column nowrap; + border: 0 solid var(--brand-grey); + background-color: var(--cd-white); +} + +/** + * Card image + */ +.cd-card__image img { + width: 100%; + height: 13rem; +} - height: 100%; - border: 1px solid var(--uno-card-border-color); +@supports (object-fit: cover) { + .cd-card__image img { + object-fit: cover; + object-position: 50% 50%; + } } /** - * Have our card contents stretch to fill the flex item, and set its position - * for the read-more link defined below. + * Card contents */ -.uno-card__content { - position: relative; - height: 100%; +.cd-card__container { + flex-grow: 1; + padding: 0; } -/* Image */ -.uno-card .field--type-image { - position: relative; - margin-bottom: var(--uno-card-padding); - aspect-ratio: 2 / 1; +.cd-card__title, +.cd-card__title a { + display: block; + color: black; + font-size: 1.25rem; + font-weight: 500; } -.uno-card img::before { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - content: ""; - border-bottom: 1px solid #ddd; - background: var(--cd-grey--light); +.cd-card__title { + margin-bottom: 0.5rem; } -.uno-card img::after { - position: absolute; - z-index: 10; - top: 50%; - left: 50%; - content: "Broken image: " attr(alt); - transform: translate(-50%, -50%); - text-align: center; - color: #888; + +.cd-card__title a:hover, +.cd-card__title a:focus { + color: var(--brand-default-text-color); } -/* Article title */ -.uno-card .uno-card__title { - margin: 1.25rem 0 1.5rem; - padding: 0 var(--uno-card-padding); - color: var(--cd-black); - font-size: var(--cd-font-size--base); - font-weight: 700; +.cd-card__title:first-child, +.cd-card__title { + margin-top: 1rem; } -/* Text summary */ -.uno-card__summary { - margin: 0 0 2.25rem; - padding: 0 var(--uno-card-padding); - font-size: 1rem; +.cd-card__description p:last-child { + margin-bottom: 0; } /** - * We're using an invisible hyperlink that stretches over the top of each card - * so that the entire surface is clickable/tappable. + * Card footer */ -.uno-card__link { +.cd-card__footer { + position: relative; + display: flex; + flex-wrap: nowrap; + flex-shrink: 0; + justify-content: flex-end; + margin-top: 0; + padding: 0; + padding-inline-end: 2rem; + content: ""; +} +.cd-card__footer::before { position: absolute; top: 0; - right: 0; - bottom: 0; left: 0; - color: transparent; + width: 6rem; + height: 3px; + background-color: var(--brand-primary); } -.uno-card__link:hover { - color: transparent; - outline: 3px solid var(--uno-card-border-color); + +@media screen and (min-width: 480px) { + /* Story always has a date before the read more in the footer. */ + article:not(.node--type-story, .node--type-media-collection).cd-card .cd-card__footer { + display: block; + } } -.uno-card__link:focus, -.uno-card__link:active { - color: transparent; - outline: 3px solid black; + +.cd-card__date { + display: inline-block; + flex: 1 auto; + font-size: 0.875rem; +} + +.cd-card__link { + padding: 0; + text-decoration: none; + border-top: 0 solid var(--brand-grey); } diff --git a/html/themes/custom/common_design_subtheme/components/uno-cta/README.md b/html/themes/custom/common_design_subtheme/components/uno-cta/README.md new file mode 100644 index 00000000..19cdce17 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-cta/README.md @@ -0,0 +1,8 @@ +UNOCHA CTA +============= + +This component provides styling for the Call to Action paragraph type. +It displays the full-width of the browser using the cd-bleed component and has a +background colour. When it is the last paragraph in the Custom Content field, +the background colour is removed to prevent a visual conflict with the soft +footer. diff --git a/html/themes/custom/common_design_subtheme/components/uno-cta/uno-cta.css b/html/themes/custom/common_design_subtheme/components/uno-cta/uno-cta.css index 1c3f0542..f2ccf8cf 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-cta/uno-cta.css +++ b/html/themes/custom/common_design_subtheme/components/uno-cta/uno-cta.css @@ -1,6 +1,3 @@ -/** - * HR.info CTA button - */ .paragraph--type--call-to-action { padding: 3rem 2rem 4rem; } @@ -21,9 +18,3 @@ .field--name-field-custom-content .paragraph:last-child.paragraph--type--call-to-action.cd-bleed { background-color: transparent; } - -.paragraph--type--call-to-action .uno-subscribe { - max-width: var(--cd-max-content-width); - margin-right: auto; - margin-left: auto; -} diff --git a/html/themes/custom/common_design_subtheme/components/uno-document/README.md b/html/themes/custom/common_design_subtheme/components/uno-document/README.md new file mode 100644 index 00000000..ba5b4455 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-document/README.md @@ -0,0 +1,5 @@ +UNOCHA Document +=============== + +This component provides styling for RW Document paragraph type and overrides for +rw-document component. diff --git a/html/themes/custom/common_design_subtheme/components/uno-donors/uno-donors.css b/html/themes/custom/common_design_subtheme/components/uno-donors/uno-donors.css index b9db783a..04a1dff0 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-donors/uno-donors.css +++ b/html/themes/custom/common_design_subtheme/components/uno-donors/uno-donors.css @@ -4,7 +4,6 @@ align-content: flex-end; margin-bottom: 1rem; padding: 0 0 0.5rem; - /* border-bottom: 1px solid var(--brand-grey); */ font-size: var(--cd-font-size--ref); } @@ -59,7 +58,6 @@ .uno-donors { margin-bottom: 0.75rem; padding: 0.75rem 0 0; - /* border-top: 1px solid var(--brand-grey); */ } .uno-donors + .uno-donors { @@ -230,7 +228,6 @@ ul.uno-donors__list--with-figures .uno-donors__amount { display: block; } - .uno-donors__amount__suffix { margin-inline-start: 0.25rem; } diff --git a/html/themes/custom/common_design_subtheme/components/uno-embed/paragraph--embed.html.twig b/html/themes/custom/common_design_subtheme/components/uno-embed/paragraph--embed.html.twig deleted file mode 100644 index 17766e34..00000000 --- a/html/themes/custom/common_design_subtheme/components/uno-embed/paragraph--embed.html.twig +++ /dev/null @@ -1,82 +0,0 @@ -{# -/** - * @file - * Default theme implementation to display a paragraph. - * - * Available variables: - * - paragraph: Full paragraph entity. - * Only method names starting with "get", "has", or "is" and a few common - * methods such as "id", "label", and "bundle" are available. For example: - * - paragraph.getCreatedTime() will return the paragraph creation timestamp. - * - paragraph.id(): The paragraph ID. - * - paragraph.bundle(): The type of the paragraph, for example, "image" or "text". - * - paragraph.getOwnerId(): The user ID of the paragraph author. - * See Drupal\paragraphs\Entity\Paragraph for a full list of public properties - * and methods for the paragraph object. - * - content: All paragraph items. Use {{ content }} to print them all, - * or print a subset such as {{ content.field_example }}. Use - * {{ content|without('field_example') }} to temporarily suppress the printing - * of a given child element. - * - attributes: HTML attributes for the containing element. - * The attributes.class element may contain one or more of the following - * classes: - * - paragraphs: The current template type (also known as a "theming hook"). - * - paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an - * "Image" it would result in "paragraphs--type--image". Note that the machine - * name will often be in a short form of the human readable label. - * - paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a - * preview would result in: "paragraphs--view-mode--preview", and - * default: "paragraphs--view-mode--default". - * - view_mode: View mode; for example, "preview" or "full". - * - logged_in: Flag for authenticated user status. Will be true when the - * current user is a logged-in member. - * - is_admin: Flag for admin user status. Will be true when the current user - * is an administrator. - * - * @see template_preprocess_paragraph() - * - * @ingroup themeable - */ -#} -{% - set classes = [ - 'paragraph', - 'paragraph--type--' ~ paragraph.bundle|clean_class, - view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, - not paragraph.isPublished() ? 'paragraph--unpublished' -] -%} - -{% set videoURL = content.field_embed_url.0['#context']['value'] %} - -{% block paragraph %} - - - {% block content %} - - {{ content.field_title }} - {{ content.field_text }} - - {% if videoURL %} - - {% else %} - -
- 11 crises to watch in 2023 - by - UN Humanitarian - on - Exposure - {% endif %} - - {% endblock %} - - -{% endblock paragraph %} - diff --git a/html/themes/custom/common_design_subtheme/components/uno-embed/uno-embed.css b/html/themes/custom/common_design_subtheme/components/uno-embed/uno-embed.css deleted file mode 100644 index ab2d1673..00000000 --- a/html/themes/custom/common_design_subtheme/components/uno-embed/uno-embed.css +++ /dev/null @@ -1,22 +0,0 @@ -/** - * HR.info customizations to iFrame Paragraphs. - */ -.hri-iframe { - width: 100%; -} - -.hri-iframe--ratio-16-9 { - aspect-ratio: 16 / 9; -} - -.hri-iframe--ratio-4-3 { - aspect-ratio: 4 / 3; -} - -/* JS will handle this case */ -/* .hri-iframe--ratio-auto {} */ - -.hri-iframe__iframe { - width: 100%; - height: 100%; -} diff --git a/html/themes/custom/common_design_subtheme/components/uno-embed/uno-embed.js b/html/themes/custom/common_design_subtheme/components/uno-embed/uno-embed.js deleted file mode 100644 index b61a6d48..00000000 --- a/html/themes/custom/common_design_subtheme/components/uno-embed/uno-embed.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * HR.info iFrame embeds. - */ -(function iife() { - var autoIframes = document.querySelectorAll('.hri-iframe--ratio-auto'); - - // Did we find iframes with the 'auto' aspect-ratio setting? - if (autoIframes) { - // For every iframe found, set its CSS aspect-ratio using the attributes - // on the container element: data-width, data-height. - autoIframes.forEach(function (el) { - el.style.aspectRatio = el.dataset.width +' / '+ el.dataset.height; - }); - } -})(); diff --git a/html/themes/custom/common_design_subtheme/components/uno-figures/README.md b/html/themes/custom/common_design_subtheme/components/uno-figures/README.md new file mode 100644 index 00000000..4d19598f --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-figures/README.md @@ -0,0 +1,5 @@ +UNOCHA Figures +============== + +This component provides styling for the Figures paragraph type including the RW +Document. diff --git a/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css b/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css index 13c3259d..245edeba 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css +++ b/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css @@ -81,7 +81,7 @@ dd.uno-figure__value { font-size: var(--cd-font-size--small); } -/* RW document */ +/* RW document in Figures paragraph type */ .paragraph--type--figures .rw-river-article { display: inline-block; padding-top: 1.5rem; diff --git a/html/themes/custom/common_design_subtheme/components/uno-gho/uno-gho.css b/html/themes/custom/common_design_subtheme/components/uno-gho/uno-gho.css deleted file mode 100644 index 2b21f56b..00000000 --- a/html/themes/custom/common_design_subtheme/components/uno-gho/uno-gho.css +++ /dev/null @@ -1,95 +0,0 @@ -/** Copied from - https: //github.com/UN-OCHA/gho-2022-site/blob/develop/html/themes/custom/common_design_subtheme/components/gho-needs-and-requirements/gho-needs-and-requirements.css - with some adjustments -*/ - -.gho-needs-and-requirements { - padding-bottom: 2rem; -} - -.gho-needs-and-requirements-figure { - padding: 0 0 1rem; -} - -.gho-needs-and-requirements-figure:last-child { - padding-right: 0; - padding-bottom: 0; -} - -.gho-needs-and-requirements-figure__label { - font-size: 1rem; - font-weight: bold; -} - -.gho-needs-and-requirements-figure__label small { - font-size: inherit; - font-weight: normal; -} - -.gho-needs-and-requirements-figure__value { - color: var(--brand-primary); - font-size: 1.625rem; - font-weight: bold; -} - -@media screen and (min-width: 768px) { - .gho-needs-and-requirements { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - padding-top: 2rem; - } - - .gho-needs-and-requirements-figure { - display: inline-block; - flex-basis: 33%; - flex-grow: 1; - flex-shrink: 0; - padding: 0 1.5rem 2rem 0; - } - - [dir="ltr"] .gho-needs-and-requirements-figure:first-child { - padding-left: 0; - } - - [dir="rtl"] .gho-needs-and-requirements-figure:first-child { - padding-right: 0; - } - - [dir="rtl"] .gho-needs-and-requirements-figure:last-child { - border-width: 0; - } - - .gho-needs-and-requirements-figure__label { - font-size: 1.125rem; - } - - .gho-needs-and-requirements-figure__value { - font-size: 2rem; - } -} - -@media screen and (min-width: 1024px) { - .gho-needs-and-requirements-figure__value { - font-size: 2.25rem; - } - - .gho-needs-and-requirements-figure { - flex-basis: 20%; - padding: 0 1.5rem 0 0; - } -} - -.gho-heading { - margin-bottom: 0; - color: var(--brand-primary); -} - -.gho-content p { - font-size: var(--cd-font-size--small); -} - -.gho-content .cd-read-more { - text-decoration: none; - color: black; -} diff --git a/html/themes/custom/common_design_subtheme/components/uno-hero/README.md b/html/themes/custom/common_design_subtheme/components/uno-hero/README.md new file mode 100644 index 00000000..feee581a --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-hero/README.md @@ -0,0 +1,4 @@ +UNOCHA Hero +============== + +This component provides styling for cd-hero overrides. diff --git a/html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero.css b/html/themes/custom/common_design_subtheme/components/uno-hero/uno-hero.css similarity index 100% rename from html/themes/custom/common_design_subtheme/components/cd-hero/cd-hero.css rename to html/themes/custom/common_design_subtheme/components/uno-hero/uno-hero.css diff --git a/html/themes/custom/common_design_subtheme/components/uno-hero/uno-hero.html.twig b/html/themes/custom/common_design_subtheme/components/uno-hero/uno-hero.html.twig new file mode 100644 index 00000000..94e71e2a --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-hero/uno-hero.html.twig @@ -0,0 +1,9 @@ +{{ attach_library('common_design_subtheme/uno-hero') }} +{{ attach_library('common_design/cd-bleed') }} +
+
+ {% block hero_image %} + {{ content.field_image }} + {% endblock %} +
+
diff --git a/html/themes/custom/common_design_subtheme/components/uno-layout/README.md b/html/themes/custom/common_design_subtheme/components/uno-layout/README.md new file mode 100644 index 00000000..0fe884cd --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-layout/README.md @@ -0,0 +1,4 @@ +UNOCHA Layout +============= + +This component provides styling for Layout paragraph type. diff --git a/html/themes/custom/common_design_subtheme/components/uno-leader/uno-leader.css b/html/themes/custom/common_design_subtheme/components/uno-leader/uno-leader.css index 3de46364..1e122c76 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-leader/uno-leader.css +++ b/html/themes/custom/common_design_subtheme/components/uno-leader/uno-leader.css @@ -1,6 +1,5 @@ .field--name-field-leader-title { margin: 1rem 0; - /* font-size: var(--cd-font-size--medium); */ } .uno-leader--title, diff --git a/html/themes/custom/common_design_subtheme/components/uno-media/README.md b/html/themes/custom/common_design_subtheme/components/uno-media/README.md new file mode 100644 index 00000000..4bdf2b70 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-media/README.md @@ -0,0 +1,5 @@ +UNOCHA Media +============= + +This component provides styling for the Media Collection content type and its +displays in Views Lists and paragraph type. diff --git a/html/themes/custom/common_design_subtheme/components/uno-mega-menu/README.md b/html/themes/custom/common_design_subtheme/components/uno-mega-menu/README.md index 126e7ad7..f47b0136 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-mega-menu/README.md +++ b/html/themes/custom/common_design_subtheme/components/uno-mega-menu/README.md @@ -1,4 +1,4 @@ UNOCHA Mega Menu ================ -This component provides "mega meny" styling for nested main navigation menus. +This component provides "mega menu" styling for nested main navigation menus. diff --git a/html/themes/custom/common_design_subtheme/components/uno-nav/README.md b/html/themes/custom/common_design_subtheme/components/uno-nav/README.md new file mode 100644 index 00000000..06e2e921 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-nav/README.md @@ -0,0 +1,7 @@ +UNOCHA Nav +========== + +This component provides styling for Lists. +There are two variants - vertical and horizontal. + +It is currently used for Resources, Regions and Liaison Offices Views lists. diff --git a/html/themes/custom/common_design_subtheme/components/uno-node/README.md b/html/themes/custom/common_design_subtheme/components/uno-node/README.md new file mode 100644 index 00000000..c0c59fd7 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-node/README.md @@ -0,0 +1,5 @@ +UNOCHA Node +=========== + +This component provides styling for nodes and specific fields on nodes including +the Custom Content field which contains paragraphs. diff --git a/html/themes/custom/common_design_subtheme/components/uno-node/uno-node.css b/html/themes/custom/common_design_subtheme/components/uno-node/uno-node.css new file mode 100644 index 00000000..40b135c1 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-node/uno-node.css @@ -0,0 +1,128 @@ +/* Restrict width and centre horizontally */ +.node--type-story .cd-layout-main-content > .field--label-inline, +.node--type-story .cd-caption, +.node--type-story .field--name-field-theme, +.node--type-story .field--type-text-with-summary, +.node--type-story .field--name-field-text, +.node--type-story .cd-layout-main-content > footer, +.node--type-basic .cd-caption, +.node--type-region .cd-caption, +.node--type-response .cd-caption { + max-width: var(--cd-max-content-width); + margin-right: auto; + margin-left: auto; +} + +/* Basic vertical rhythm, will need adjusting */ +.node--type-event .field--name-field-event-date, +.node--type-event .field--name-field-event-location, +.node--type-event.node--view-mode-full .field--name-field-event-image, +.node--type-event .uno-event__link, +.node--type-event .field--name-field-response, +.node--type-story .field--name-field-theme { + margin-bottom: 1rem; +} + +.node--type-event.node--view-mode-card .uno-event__link { + margin-bottom: 2rem; +} + +.node--view-mode-full .field--name-field-text, +.node--type-event.node--view-mode-full .uno-event__link { + margin-bottom: 2rem; +} + +@media screen and (min-width: 768px) { + .node--view-mode-full .field--name-field-text { + margin-bottom: 6rem; + } +} + +/* When a Text paragraph is in a layout */ +.node--view-mode-full .paragraph .field--name-field-text { + margin-bottom: 2rem; +} + +@media screen and (min-width: 768px) { + .node--view-mode-full .paragraph .field--name-field-text { + margin-bottom: 3rem; + } +} + +.node--view-mode-full .layout .paragraph .field--name-field-text { + margin-bottom: 0; +} + +@media screen and (min-width: 768px) { + .node--view-mode-full .layout .paragraph .field--name-field-text { + margin-bottom: 0; + } +} + +.node--view-mode-full .cd-layout-main-content > .field--name-body { + margin-bottom: 6rem; +} +.node--view-mode-full .node--view-mode-teaser .field--name-body { + margin-bottom: 0; +} + +/* Story node */ +footer.cd-author { + margin-top: 3rem; + padding: 1rem 0; + border-top: 1px solid var(--brand-grey); +} + +/* CTA link on Response and Region pages */ +.uno-content--custom > a.uno-button { + float: right; + margin-bottom: 0.75rem; + margin-inline-start: 0.75rem; +} +/* Prevent the floated button overlapping the next field */ +.uno-content--custom > a.uno-button + .field { + clear: both; +} + +@media (min-width: 1200px) { + .uno-content--custom { + position: relative; + } + + .uno-content--custom > a.cd-button { + position: absolute; + top: 0; + right: 0; + } +} + +/* Center Hero images within the cd-bleed container */ +.field--name-field-story-image, +.field--name-field-basic-image, +.field--name-field-response-image, +.field--name-field-region-image { + text-align: center; +} + +/* When images are missing, restrict width of alt text */ +.field--name-field-media-image { + max-width: var(--cd-max-body-width); + margin-right: auto; + margin-left: auto; + font-size: 12px; +} + +/* Labels for "Featured", "News", "B-roll", "Regional Office" etc */ +.uno-tag { + display: inline-block; + padding-inline-end: 1rem; + letter-spacing: 1px; + text-transform: uppercase; + color: var(--brand-primary--dark); + font-size: 1.0625rem; /* 17px */ + } + +.node--type-response > header > .uno-tag, +.node--type-region > header > .uno-tag { + color: var(--cd-black); +} diff --git a/html/themes/custom/common_design_subtheme/components/uno-page-title/README.md b/html/themes/custom/common_design_subtheme/components/uno-page-title/README.md new file mode 100644 index 00000000..433a5cb5 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-page-title/README.md @@ -0,0 +1,4 @@ +UNOCHA Page title +================= + +This component provides styling for cd-page-title overrides. diff --git a/html/themes/custom/common_design_subtheme/components/cd-page-title/cd-page-title.css b/html/themes/custom/common_design_subtheme/components/uno-page-title/uno-page-title.css similarity index 100% rename from html/themes/custom/common_design_subtheme/components/cd-page-title/cd-page-title.css rename to html/themes/custom/common_design_subtheme/components/uno-page-title/uno-page-title.css diff --git a/html/themes/custom/common_design_subtheme/components/uno-pager/README.md b/html/themes/custom/common_design_subtheme/components/uno-pager/README.md new file mode 100644 index 00000000..497be3c0 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-pager/README.md @@ -0,0 +1,4 @@ +UNOCHA Pager +============ + +This component provides styling for the pager used in Views and RW Rivers. diff --git a/html/themes/custom/common_design_subtheme/components/uno-pager/uno-pager.css b/html/themes/custom/common_design_subtheme/components/uno-pager/uno-pager.css new file mode 100644 index 00000000..16ea694d --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-pager/uno-pager.css @@ -0,0 +1,9 @@ +.pager { + margin-top: 3rem; +} + +@media screen and (min-width: 768px) { + .pager { + margin-top: 6rem; + } +} diff --git a/html/themes/custom/common_design_subtheme/components/uno-paragraphs/README.md b/html/themes/custom/common_design_subtheme/components/uno-paragraphs/README.md new file mode 100644 index 00000000..25c52421 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-paragraphs/README.md @@ -0,0 +1,5 @@ +UNOCHA Paragraphs +================= + +This component provides styling for paragraphs, specifically vertical rhythm and +any other generic rules. diff --git a/html/themes/custom/common_design_subtheme/components/uno-paragraphs/uno-paragraphs.css b/html/themes/custom/common_design_subtheme/components/uno-paragraphs/uno-paragraphs.css new file mode 100644 index 00000000..ef372611 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-paragraphs/uno-paragraphs.css @@ -0,0 +1,205 @@ +.paragraph > .field { + margin-bottom: 1rem; +} + +.paragraph > .field--name-field-title { + margin-bottom: 2rem; + } + +.paragraph--type--node-teaser > .field > .field__items > .field__item { + margin-bottom: 2rem; +} + +.paragraph--type--campaign { + margin-bottom: 2rem; +} + +@media screen and (min-width: 768px) { + .paragraph--type--campaign { + margin-bottom: 8rem; + } +} + +.paragraph--type--image, +.paragraph--type--text-and-image, +.paragraph--type--embed, +.paragraph--type--call-to-action, +.paragraph--type--video, +.paragraph--type--node, +.paragraph--type--section.paragraph--view-mode--default, +.paragraph--type--section.paragraph--view-mode--tabs, +.paragraph--type--events, +.paragraph--type--regions, +.paragraph--type--responses, +.paragraph--type--stories, +.paragraph--type--reliefweb-document, +.paragraph--type--subscribe, +.paragraph--type--cbpf, +.paragraph--type--donors, +.paragraph--type--figures, +.paragraph--type--media-centre { + margin-top: 2rem; + margin-bottom: 2rem; +} + +@media screen and (min-width: 768px) { + .paragraph--type--image, + .paragraph--type--text-and-image, + .paragraph--type--embed, + .paragraph--type--call-to-action, + .paragraph--type--video, + .paragraph--type--node, + .paragraph--type--section.paragraph--view-mode--default, + .paragraph--type--section.paragraph--view-mode--tabs, + .paragraph--type--events, + .paragraph--type--regions, + .paragraph--type--responses, + .paragraph--type--stories, + .paragraph--type--subscribe, + .paragraph--type--cbpf, + .paragraph--type--donors, + .paragraph--type--figures, + .paragraph--type--media-centre { + margin-top: 6rem; + margin-bottom: 6rem; + } +} + +.paragraph--type--subscribe { + margin-top: 6rem; + margin-bottom: 6rem; +} + +@media screen and (min-width: 768px) { + .paragraph--type--subscribe { + margin-top: 12rem; + margin-bottom: 12rem; + } +} + +.paragraph--type--reliefweb-document { + margin-top: 2rem; + margin-bottom: 2rem; +} + +@media screen and (min-width: 768px) { + .paragraph--type--reliefweb-document { + margin-bottom: 6rem; + } +} + +/* Paragraphs in layouts or nested, remove margins */ +.layout__region .paragraph--type--node, +.paragraph--type--section.paragraph--view-mode--tabs .paragraph--type--section, +.layout__region .paragraph--type--reliefweb-document { + margin-top: 0; + margin-bottom: 1rem; +} + +@media screen and (min-width: 768px) { + .layout__region .paragraph--type--node, + .paragraph--type--section.paragraph--view-mode--tabs .paragraph--type--section, + .layout__region .paragraph--type--reliefweb-document { + margin-top: 0; + margin-bottom: 0; + } +} + +/* Layouts vertical rhythm */ +.paragraph--type--layout { + margin-top: 2rem; + margin-bottom: 2rem; +} + +@media screen and (min-width: 768px) { + .paragraph--type--layout { + margin-top: 6rem; + margin-bottom: 6rem; + } +} + +.paragraph--type--layout:first-child { + margin-top: 0; + margin-bottom: 0; +} + +@media screen and (min-width: 768px) { + .paragraph--type--layout:first-child { + margin-top: 0; + margin-bottom: 0; + } +} +/* A layout following another layout, reduce margin */ +.paragraph--type--layout + .paragraph--type--layout { + margin-top:2rem; + margin-bottom: 2rem; +} + +/* Donors followed by Donors */ +@media screen and (min-width: 768px) { + .paragraph--type--donors + .paragraph--type--donors { + margin-top: 0; + } +} + +/* Donors following Figures (in a Section), reduce margin */ +@media screen and (min-width: 768px) { + .paragraph--type--section + .paragraph--type--donors { + margin-top: -2rem; + margin-bottom: 2rem; + } +} + +/* River followed by another river */ +.paragraph--type--reliefweb-river + .paragraph--type--reliefweb-river { + margin-top: 4rem; +} + +@media screen and (min-width: 1024px) { + .paragraph--type--reliefweb-river + .paragraph--type--reliefweb-river { + margin-top: 6rem; + } +} + +/* Full-width paragraphs */ +.paragraph--type--responses.cd-bleed, +.paragraph--type--response-map.cd-bleed { + padding: 2rem 0; + background-color: var(--brand-grey); +} + +.paragraph--type--response-map.cd-bleed + .paragraph--type--responses.cd-bleed { + margin-top: -2rem; +} + +/* CBPF Paragraph type, center align everything so button is centered */ +.paragraph--type--cbpf { + text-align: center; +} + +/* Left align Title and Text fields */ +.paragraph--type--cbpf .field--name-field-title, +.paragraph--type--cbpf .field--name-field-text { + text-align: left; +} + +.paragraph--type--cbpf .cd-button { + margin: 2rem auto 0; +} + +.paragraph--type--image { + text-align: center; +} + +.paragraph--type--text-and-image .field--name-field-text > p:first-child, +.paragraph--type--text .field--name-field-text > p:first-child { + margin-top: 0; +} + +.paragraph--type--node.paragraph--view-mode--teasers article + article { + margin-top: 2rem; +} + +.paragraph--type--layout .cd-teaser { + border-bottom: 0 solid; +} diff --git a/html/themes/custom/common_design_subtheme/components/uno-read-more/README.md b/html/themes/custom/common_design_subtheme/components/uno-read-more/README.md new file mode 100644 index 00000000..e2be4b5b --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-read-more/README.md @@ -0,0 +1,4 @@ +UNOCHA Read more +================ + +This component provides styling for cd-read-more overrides. diff --git a/html/themes/custom/common_design_subtheme/components/cd-read-more/cd-read-more.css b/html/themes/custom/common_design_subtheme/components/uno-read-more/uno-read-more.css similarity index 78% rename from html/themes/custom/common_design_subtheme/components/cd-read-more/cd-read-more.css rename to html/themes/custom/common_design_subtheme/components/uno-read-more/uno-read-more.css index 29089f1e..17051a0a 100644 --- a/html/themes/custom/common_design_subtheme/components/cd-read-more/cd-read-more.css +++ b/html/themes/custom/common_design_subtheme/components/uno-read-more/uno-read-more.css @@ -14,7 +14,3 @@ .cd-read-more:hover svg { fill: var(--brand-primary); } - -[dir="rtl"] .cd-read-more svg { - transform: scale(-1, 1); -} diff --git a/html/themes/custom/common_design_subtheme/components/uno-response-map/uno-response-map.css b/html/themes/custom/common_design_subtheme/components/uno-response-map/uno-response-map.css index de189302..48b3d81c 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-response-map/uno-response-map.css +++ b/html/themes/custom/common_design_subtheme/components/uno-response-map/uno-response-map.css @@ -136,8 +136,8 @@ } /* Active marker */ .js .unocha-response-map[data-map-enabled] .mapboxgl-marker[data-active] { - background: var(--rw-icons--map-marker--marker--24--blue); z-index: 1; + background: var(--rw-icons--map-marker--marker--24--blue); } /** * Mapbox styling. diff --git a/html/themes/custom/common_design_subtheme/components/uno-river/README.md b/html/themes/custom/common_design_subtheme/components/uno-river/README.md new file mode 100644 index 00000000..97cfa6c6 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-river/README.md @@ -0,0 +1,5 @@ +UNOCHA River +============= + +This component provides styling for RW Rivers paragraph type and overrides for +rw-river components. diff --git a/html/themes/custom/common_design_subtheme/components/uno-river/uno-river.css b/html/themes/custom/common_design_subtheme/components/uno-river/uno-river.css index 227e5b12..6538e964 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-river/uno-river.css +++ b/html/themes/custom/common_design_subtheme/components/uno-river/uno-river.css @@ -12,51 +12,12 @@ font-size: 0.875rem; } -.paragraph--type--reliefweb-river .cd-read-more, -.paragraph--type--reliefweb-river .uno-tag { - display: none; -} - -/* Rivers in Layouts */ -/* .layout--twocol-sidebar.cd-layout, -.page-node-type-response .paragraph--type--reliefweb-river, -.page-node-type-region .paragraph--type--reliefweb-river { - background-color: var(--brand-grey); - padding: 2rem; -} -.page-node-type-response .paragraph--type--reliefweb-river, -.page-node-type-region .paragraph--type--reliefweb-river { - background-color: var(--brand-grey); -} -.page-node-type-response .paragraph--type--reliefweb-river, -.page-node-type-region .paragraph--type--reliefweb-river { - padding: 1rem; - background-color: var(--brand-grey); -} - -@media screen and (min-width: 1024px) { - .page-node-type-response .paragraph--type--reliefweb-river, - .page-node-type-region .paragraph--type--reliefweb-river { - padding: 2rem; - } -} */ - -/* CD overrides */ -.cd-article .paragraph--type--reliefweb-river p { - max-width: var(--cd-max-content-width); - margin-right: 0; - margin-left: 0; -} - -/* .layout--twocol-sidebar.cd-layout { - gap: 0; -} */ - /* Matches cd-block-title */ .rw-river__title { margin-bottom: 2.5rem; } +/* When a River paragraph is in a layout */ .layout--twocol-sidebar .cd-layout__content .rw-river__title { margin-bottom: 1rem; } @@ -155,6 +116,11 @@ } /* Control markup display for view modes */ +.paragraph--type--reliefweb-river .cd-read-more, +.paragraph--type--reliefweb-river .uno-tag { + display: none; +} + .paragraph--type--reliefweb-river.paragraph--view-mode--teasers .uno-tag, .paragraph--type--reliefweb-river.paragraph--view-mode--cards .uno-tag { display: block; diff --git a/html/themes/custom/common_design_subtheme/components/uno-rss-feed/uno-rss-feed.css b/html/themes/custom/common_design_subtheme/components/uno-rss-feed/uno-rss-feed.css deleted file mode 100644 index 6800826e..00000000 --- a/html/themes/custom/common_design_subtheme/components/uno-rss-feed/uno-rss-feed.css +++ /dev/null @@ -1,16 +0,0 @@ -/** - * UNO customizations for RSS feed paragraphs. - */ -.uno-rss-feed h3 { - margin-bottom: 0; - font-size: var(--cd-font-size--base); -} - -.uno-rss-feed ul { - margin: 1em 0 2rem; - padding-inline-start: 1rem; -} - -.uno-rss-feed ul li + li { - margin-top: 0.75rem; -} diff --git a/html/themes/custom/common_design_subtheme/components/uno-section-tabs/README.md b/html/themes/custom/common_design_subtheme/components/uno-section-tabs/README.md new file mode 100644 index 00000000..ffbab9ba --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-section-tabs/README.md @@ -0,0 +1,7 @@ +UNOCHA Section tabs +=================== + +This component provides the javascript and styling for Section paragraph type's +Tabs view mode. + +See https://inclusive-components.design/tabbed-interfaces/ diff --git a/html/themes/custom/common_design_subtheme/components/uno-section-tabs/uno-section-tabs.css b/html/themes/custom/common_design_subtheme/components/uno-section-tabs/uno-section-tabs.css new file mode 100644 index 00000000..14a43179 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-section-tabs/uno-section-tabs.css @@ -0,0 +1,76 @@ +.uno-section-tabs [role="tablist"] { + padding: 0; +} + +.uno-section-tabs [role="tablist"] li, +.uno-section-tabs [role="tablist"] a { + display: inline-block; +} + +@media screen and (min-width: 768px) { + /* No left padding on first item for left alignment */ + .uno-section-tabs li:first-child a { + padding: 0.5rem 1rem 0.5rem 0; + } +} + +.uno-section-tabs [role="tablist"] a { + position: relative; + bottom: -3px; + padding: 0.5rem 1rem; + text-decoration: none; + font-weight: 500; +} + +.uno-section-tabs [role="tablist"] [aria-selected] { + position: relative; + border-bottom: 3px solid var(--brand-primary); + background: #fff; + /* border-bottom: 0; */ + /* top: 3px; */ +} + +.uno-section-tabs [role="tabpanel"] { + padding: 1.5rem 0; + border-top: 3px solid var(--brand-grey); +} + +.uno-section-tabs [role="tablist"] a:focus { + outline: 3px solid var(--brand-primary--light); +} + +@media screen and (max-width: 767px) { + .uno-section-tabs [role="tablist"] li, + .uno-section-tabs [role="tablist"] a { + position: static; + display: block; + } + + .uno-section-tabs [role="tablist"] a { + border: 2px solid var(--brand-primary) !important; + } + + .uno-section-tabs [role="tablist"] li + li a { + border-top: 0 !important; + } + + .uno-section-tabs [role="tablist"] [aria-selected] { + position: static; + } + + .uno-section-tabs [role="tablist"] [aria-selected]::after { + content: "\0020⬅"; + } + + .uno-section-tabs [role="tabpanel"] { + border-top: 0; + } +} + +.uno-section-tabs__list { + margin: 0; +} + +.paragraph--type--tab { + margin: 0; +} diff --git a/html/themes/custom/common_design_subtheme/components/uno-tabs/uno-tabs.js b/html/themes/custom/common_design_subtheme/components/uno-section-tabs/uno-section-tabs.js similarity index 88% rename from html/themes/custom/common_design_subtheme/components/uno-tabs/uno-tabs.js rename to html/themes/custom/common_design_subtheme/components/uno-section-tabs/uno-section-tabs.js index 8d0d54db..c5bc6016 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-tabs/uno-tabs.js +++ b/html/themes/custom/common_design_subtheme/components/uno-section-tabs/uno-section-tabs.js @@ -2,7 +2,7 @@ 'use strict'; - Drupal.behaviors.unoTabs = { + Drupal.behaviors.unoSectionTabs = { attach: function (context, settings) { // The tab switching function. const switchTab = (tabs, panels, oldTab, newTab) => { @@ -24,14 +24,14 @@ // Enhanced tabbed section. const enhanceSection = (section) => { - section.setAttribute('data-uno-tabs-processed', ''); + section.setAttribute('data-uno-section-tabs-processed', ''); // Get relevant elements and collections. - const tablist = section.querySelector('.uno-tabs ul'); - const tabs = tablist.querySelectorAll('.uno-tabs ul a'); + const tablist = section.querySelector('.uno-section-tabs ul'); + const tabs = tablist.querySelectorAll('.uno-section-tabs ul a'); const panels = section.querySelectorAll('[id^="section"]'); - // Add the tablist role to the first
    in the .uno-tabs container. + // Add the tablist role to the first
      in the .uno-section-tabs container. tablist.setAttribute('role', 'tablist'); // Add semantics are remove user focusability for each tab. @@ -95,7 +95,7 @@ }; // Enhance tabbed sections. - const sections = document.querySelectorAll('.uno-tabs:not([data-uno-tabs-processed])'); + const sections = document.querySelectorAll('.uno-section-tabs:not([data-uno-section-tabs-processed])'); if (sections) { Array.prototype.forEach.call(sections, enhanceSection); } diff --git a/html/themes/custom/common_design_subtheme/components/uno-social-links/README.md b/html/themes/custom/common_design_subtheme/components/uno-social-links/README.md new file mode 100644 index 00000000..79719e47 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/uno-social-links/README.md @@ -0,0 +1,5 @@ +UNOCHA Social links +=================== + +This component provides the component markup and styling overrides for +cd-social-links. diff --git a/html/themes/custom/common_design_subtheme/components/cd-social-links/cd-social-links.css b/html/themes/custom/common_design_subtheme/components/uno-social-links/uno-social-links.css similarity index 94% rename from html/themes/custom/common_design_subtheme/components/cd-social-links/cd-social-links.css rename to html/themes/custom/common_design_subtheme/components/uno-social-links/uno-social-links.css index 67a48083..958882bf 100644 --- a/html/themes/custom/common_design_subtheme/components/cd-social-links/cd-social-links.css +++ b/html/themes/custom/common_design_subtheme/components/uno-social-links/uno-social-links.css @@ -100,8 +100,3 @@ margin-top: -2rem; border-top: 0 none; } - -/* .path-frontpage .cd-social-links + .cd-layout-main-content { - padding-top: 0; - border-top: 0 none; -} */ diff --git a/html/themes/custom/common_design_subtheme/components/cd-social-links/cd-social-links.html.twig b/html/themes/custom/common_design_subtheme/components/uno-social-links/uno-social-links.html.twig similarity index 97% rename from html/themes/custom/common_design_subtheme/components/cd-social-links/cd-social-links.html.twig rename to html/themes/custom/common_design_subtheme/components/uno-social-links/uno-social-links.html.twig index d8abe5d7..4f7d6e47 100644 --- a/html/themes/custom/common_design_subtheme/components/cd-social-links/cd-social-links.html.twig +++ b/html/themes/custom/common_design_subtheme/components/uno-social-links/uno-social-links.html.twig @@ -1,4 +1,4 @@ -{{ attach_library('common_design_subtheme/cd-social-links') }} +{{ attach_library('common_design_subtheme/uno-social-links') }} {% set shareText = label|render|striptags|default(title|render|striptags) %}