rdrew 2 months ago
parent
commit
3afc2bfe4d
  1. 34
      README.md
  2. 2
      bs.js
  3. 2
      composer.json
  4. 0
      config/install/olivesbdh.settings.yml
  5. 6
      config/optional/block.block.olivesbdh_account_menu.yml
  6. 6
      config/optional/block.block.olivesbdh_book_navigation.yml
  7. 6
      config/optional/block.block.olivesbdh_breadcrumbs.yml
  8. 6
      config/optional/block.block.olivesbdh_content.yml
  9. 6
      config/optional/block.block.olivesbdh_help.yml
  10. 6
      config/optional/block.block.olivesbdh_main_menu.yml
  11. 6
      config/optional/block.block.olivesbdh_messages.yml
  12. 6
      config/optional/block.block.olivesbdh_page_title.yml
  13. 6
      config/optional/block.block.olivesbdh_powered.yml
  14. 6
      config/optional/block.block.olivesbdh_primary_admin_actions.yml
  15. 6
      config/optional/block.block.olivesbdh_primary_local_tasks.yml
  16. 6
      config/optional/block.block.olivesbdh_search_form_narrow.yml
  17. 6
      config/optional/block.block.olivesbdh_search_form_wide.yml
  18. 6
      config/optional/block.block.olivesbdh_secondary_local_tasks.yml
  19. 6
      config/optional/block.block.olivesbdh_site_branding.yml
  20. 6
      config/optional/block.block.olivesbdh_syndicate.yml
  21. 6
      config/optional/core.date_format.olivesbdh_medium.yml
  22. 6
      config/schema/olivesbdh.schema.yml
  23. 4
      css/components/ajax-progress.module.css
  24. 2
      css/components/color-picker.css
  25. 28
      css/components/details.css
  26. 30
      css/components/landing_page.css
  27. 2
      css/components/navigation/nav-primary.css
  28. 2
      css/components/navigation/pcss/nav-primary.pcss.css
  29. 2
      css/components/pager.css
  30. 4
      css/components/pcss/ajax-progress.module.pcss.css
  31. 2
      css/components/pcss/color-picker.pcss.css
  32. 26
      css/components/pcss/details.pcss.css
  33. 2
      css/components/pcss/vertical-tabs.pcss.css
  34. 2
      css/components/vertical-tabs.css
  35. 2
      css/layout/layout-views-grid.css
  36. 4
      css_original/components/ajax-progress.module.css
  37. 2
      css_original/components/color-picker.css
  38. 28
      css_original/components/details.css
  39. 2
      css_original/components/landing_page.css
  40. 2
      css_original/components/navigation/nav-primary.css
  41. 2
      css_original/components/navigation/pcss/nav-primary.pcss.css
  42. 2
      css_original/components/pager.css
  43. 4
      css_original/components/pcss/ajax-progress.module.pcss.css
  44. 2
      css_original/components/pcss/color-picker.pcss.css
  45. 26
      css_original/components/pcss/details.pcss.css
  46. 2
      css_original/components/pcss/vertical-tabs.pcss.css
  47. 2
      css_original/components/vertical-tabs.css
  48. 28
      js/color-picker.js
  49. 2
      js/message.theme.js
  50. 2
      js/messages.js
  51. 4
      js/nav-resize.js
  52. 12
      js/navigation-utils.js
  53. 18
      js/navigation.js
  54. 6
      js/search.js
  55. 10
      js/second-level-navigation.js
  56. 2
      js/tabs.js
  57. 12
      junk_drawer/tests/src/Functional/Update/OlivesbdhPostUpdateTest.php
  58. 12
      junk_drawer/tests/src/Unit/OlivesbdhHexToHslTest.php
  59. 16
      olivesbdh.breakpoints.yml
  60. 46
      olivesbdh.info.yml
  61. 16
      olivesbdh.libraries.yml
  62. 15
      olivesbdh.post_update.php
  63. 102
      olivesbdh.theme
  64. 15
      olivessdu.post_update.php
  65. 2
      package.json
  66. 6
      src/OlivesbdhPreRender.php
  67. 2
      templates/block/block--islandora-mirador.html.twig
  68. 2
      templates/block/block--olivesbdh-learnmorelpblock.html.twig
  69. 2
      templates/block/block--olivesbdh-maparchiveslpblock.html.twig
  70. 2
      templates/block/block--page-title-block.html.twig
  71. 2
      templates/block/block--primary-menu--plugin-id--search-form-block.html.twig
  72. 2
      templates/block/block--search-form-block.html.twig
  73. 2
      templates/block/block--secondary-menu--plugin-id--search-form-block.html.twig
  74. 2
      templates/block/block--secondary-menu.html.twig
  75. 2
      templates/block/block--system-branding-block.html.twig
  76. 2
      templates/block/block--system-menu-block.html.twig
  77. 6
      templates/block/block--system-powered-by-block.html.twig
  78. 2
      templates/block/block.html.twig
  79. 4
      templates/content/comment.html.twig
  80. 2
      templates/content/node--teaser.html.twig
  81. 2
      templates/content/node.html.twig
  82. 2
      templates/content/page-title.html.twig
  83. 2
      templates/content/search-result.html.twig
  84. 2
      templates/dataset/forums.html.twig
  85. 2
      templates/field/field--comment-body.html.twig
  86. 2
      templates/field/field--comment.html.twig
  87. 4
      templates/field/field--node--field-tags.html.twig
  88. 10
      templates/form/details.html.twig
  89. 2
      templates/form/fieldset.html.twig
  90. 2
      templates/includes/get-started.html.twig
  91. 4
      templates/includes/lp-banner.html.twig
  92. 6
      templates/includes/lp-banner.html.twig.old
  93. 22
      templates/includes/preload.twig
  94. 4
      templates/layout/html.html.twig
  95. 4
      templates/layout/page--front.html.twig
  96. 2
      templates/layout/page.html.twig
  97. 2
      templates/layout/region--breadcrumb.html.twig
  98. 2
      templates/layout/region--content-above.html.twig
  99. 4
      templates/layout/region--content-below.html.twig
  100. 2
      templates/layout/region--content.html.twig
  101. Some files were not shown because too many files have changed in this diff Show More

34
README.md

@ -1,12 +1,12 @@
<details open>
<summary>Information on cloning Olives/Olivessdu theme</summary>
# How to sub-theme Olivessdu.
Technically Olivessdu does not support sub-theming, in this document I'll walk you through copying a Olivessdu into a new theme and making changes to the CSS and JavaScript.
<summary>Information on cloning Olives/Olivesbdh theme</summary>
# How to sub-theme Olivesbdh.
Technically Olivesbdh does not support sub-theming, in this document I'll walk you through copying a Olivesbdh into a new theme and making changes to the CSS and JavaScript.
## Why no sub-theming of Olivessdu?
Olivessdu isn't quite stable in Drupal 9. We're still making lots of changes to the markup, which can screw up any CSS overrides that you have in place. Even after reaching stable, we likely won't support sub-theming immediately because of various non-critical technical debt issues that we want to fix.
## Why no sub-theming of Olivesbdh?
Olivesbdh isn't quite stable in Drupal 9. We're still making lots of changes to the markup, which can screw up any CSS overrides that you have in place. Even after reaching stable, we likely won't support sub-theming immediately because of various non-critical technical debt issues that we want to fix.
## Steps to copy Olivessdu into a new theme.
## Steps to copy Olivesbdh into a new theme.
Instead of sub-theming, we're going to copy the core theme into a new theme.
You can do this using manual steps or by using the included script.
@ -33,18 +33,18 @@ Note, this is only tested on MacOS, and is heavily reliant on code from Stack O
### Copy the theme directory.
1. Copy the `/core/themes/olivessdu` directory into the `/themes/` directory.
1. Copy the `/core/themes/olivesbdh` directory into the `/themes/` directory.
2. Rename the files in the new theme.
1. Change the directory name from `olivessdu` to the new theme name (in these example, we'll use `coco`). So rename the `olivessdu` directory to `coco` (Coco is my dogs name).
2. Rename the `olivessdu.info.yml` file to `coco.info.yml`
3. Rename `olivessdu.breakpoints.yml` file to `coco.breakpoints.yml`
4. Rename `olivessdu.libraries.yml` file to `coco.libraries.yml`
5. Rename `olivessdu.theme` file to `coco.theme`
6. Rename all of the `olivessdu` config within the theme's `config` directory to `coco`. For example, rename `block.block.olivessdu_account_menu.yml` to `block.block.coco_account_menu.yml`. There are a number of files in there to rename.
7. Rename `/src/OlivessduPreRender.php` to `/src/CocoPreRender.php`.
1. Change the directory name from `olivesbdh` to the new theme name (in these example, we'll use `coco`). So rename the `olivesbdh` directory to `coco` (Coco is my dogs name).
2. Rename the `olivesbdh.info.yml` file to `coco.info.yml`
3. Rename `olivesbdh.breakpoints.yml` file to `coco.breakpoints.yml`
4. Rename `olivesbdh.libraries.yml` file to `coco.libraries.yml`
5. Rename `olivesbdh.theme` file to `coco.theme`
6. Rename all of the `olivesbdh` config within the theme's `config` directory to `coco`. For example, rename `block.block.olivesbdh_account_menu.yml` to `block.block.coco_account_menu.yml`. There are a number of files in there to rename.
7. Rename `/src/OlivesbdhPreRender.php` to `/src/CocoPreRender.php`.
3. Do a global search and replace for the name. When you search and replace, be case-sensitive
1. Search and replace `Olivessdu` with `Coco`.
2. Search and replace `olivessdu` with `coco`.
1. Search and replace `Olivesbdh` with `Coco`.
2. Search and replace `olivesbdh` with `coco`.
4. Within the `coco.info.yml` file, replace `experimental: true` with `core_version_requirement: ^9`.
5. Move all of the "block" config files (starting with "block") from `config/install` to `config/optional`.
6. Move the `core.date_format.coco_medium.info.yml` from `config/install` to `config/optional`.
@ -65,7 +65,7 @@ Note, this is only tested on MacOS, and is heavily reliant on code from Stack O
### Enable the new theme.
You should now see the new theme listed under `appearance > themes`. Install the new theme and set it to be the default.
It should look exactly like the default core Olivessdu theme.
It should look exactly like the default core Olivesbdh theme.
### Install Node dependencies.
First make sure you have [Node](https://nodejs.org/en/download/), and [Yarn](https://classic.yarnpkg.com/en/docs/install/) installed.

2
bs.js

@ -8,7 +8,7 @@ browserSync({
serveStatic: ['.'],
rewriteRules: [
{
match: /\/themes\/custom\/olivessdu/g,
match: /\/themes\/custom\/olivesbdh/g,
replace: ''
}
]

2
composer.json

@ -1,5 +1,5 @@
{
"name": "rdrew/olivessdu",
"name": "rdrew/olivesbdh",
"description": "drupal theme for SDU",
"type": "drupal-custom-theme",
"authors": [

0
config/install/olivessdu.settings.yml → config/install/olivesbdh.settings.yml

6
config/optional/block.block.olivessdu_account_menu.yml → config/optional/block.block.olivesbdh_account_menu.yml

@ -6,9 +6,9 @@ dependencies:
module:
- system
theme:
- olivessdu
id: olivessdu_account_menu
theme: olivessdu
- olivesbdh
id: olivesbdh_account_menu
theme: olivesbdh
region: secondary_menu
weight: -4
provider: null

6
config/optional/block.block.olivessdu_book_navigation.yml → config/optional/block.block.olivesbdh_book_navigation.yml

@ -4,9 +4,9 @@ dependencies:
module:
- book
theme:
- olivessdu
id: olivessdu_book_navigation
theme: olivessdu
- olivesbdh
id: olivesbdh_book_navigation
theme: olivesbdh
region: sidebar
weight: 0
provider: null

6
config/optional/block.block.olivessdu_breadcrumbs.yml → config/optional/block.block.olivesbdh_breadcrumbs.yml

@ -4,9 +4,9 @@ dependencies:
module:
- system
theme:
- olivessdu
id: olivessdu_breadcrumbs
theme: olivessdu
- olivesbdh
id: olivesbdh_breadcrumbs
theme: olivesbdh
region: breadcrumb
weight: 0
provider: null

6
config/optional/block.block.olivessdu_content.yml → config/optional/block.block.olivesbdh_content.yml

@ -4,9 +4,9 @@ dependencies:
module:
- system
theme:
- olivessdu
id: olivessdu_content
theme: olivessdu
- olivesbdh
id: olivesbdh_content
theme: olivesbdh
region: content
weight: 0
provider: null

6
config/optional/block.block.olivessdu_help.yml → config/optional/block.block.olivesbdh_help.yml

@ -4,9 +4,9 @@ dependencies:
module:
- help
theme:
- olivessdu
id: olivessdu_help
theme: olivessdu
- olivesbdh
id: olivesbdh_help
theme: olivesbdh
region: content_above
weight: 0
provider: null

6
config/optional/block.block.olivessdu_main_menu.yml → config/optional/block.block.olivesbdh_main_menu.yml

@ -6,9 +6,9 @@ dependencies:
module:
- system
theme:
- olivessdu
id: olivessdu_main_menu
theme: olivessdu
- olivesbdh
id: olivesbdh_main_menu
theme: olivesbdh
region: primary_menu
weight: 0
provider: null

6
config/optional/block.block.olivessdu_messages.yml → config/optional/block.block.olivesbdh_messages.yml

@ -4,9 +4,9 @@ dependencies:
module:
- system
theme:
- olivessdu
id: olivessdu_messages
theme: olivessdu
- olivesbdh
id: olivesbdh_messages
theme: olivesbdh
region: highlighted
weight: -5
provider: null

6
config/optional/block.block.olivessdu_page_title.yml → config/optional/block.block.olivesbdh_page_title.yml

@ -2,9 +2,9 @@ langcode: en
status: true
dependencies:
theme:
- olivessdu
id: olivessdu_page_title
theme: olivessdu
- olivesbdh
id: olivesbdh_page_title
theme: olivesbdh
region: content_above
weight: -5
provider: null

6
config/optional/block.block.olivessdu_powered.yml → config/optional/block.block.olivesbdh_powered.yml

@ -4,9 +4,9 @@ dependencies:
module:
- system
theme:
- olivessdu
id: olivessdu_powered
theme: olivessdu
- olivesbdh
id: olivesbdh_powered
theme: olivesbdh
region: footer_bottom
weight: 0
provider: null

6
config/optional/block.block.olivessdu_primary_admin_actions.yml → config/optional/block.block.olivesbdh_primary_admin_actions.yml

@ -2,9 +2,9 @@ langcode: en
status: true
dependencies:
theme:
- olivessdu
id: olivessdu_primary_admin_actions
theme: olivessdu
- olivesbdh
id: olivesbdh_primary_admin_actions
theme: olivesbdh
region: highlighted
weight: -5
provider: null

6
config/optional/block.block.olivessdu_primary_local_tasks.yml → config/optional/block.block.olivesbdh_primary_local_tasks.yml

@ -2,9 +2,9 @@ langcode: en
status: true
dependencies:
theme:
- olivessdu
id: olivessdu_primary_local_tasks
theme: olivessdu
- olivesbdh
id: olivesbdh_primary_local_tasks
theme: olivesbdh
region: highlighted
weight: -4
provider: null

6
config/optional/block.block.olivessdu_search_form_narrow.yml → config/optional/block.block.olivesbdh_search_form_narrow.yml

@ -4,9 +4,9 @@ dependencies:
module:
- search
theme:
- olivessdu
id: olivessdu_search_form_narrow
theme: olivessdu
- olivesbdh
id: olivesbdh_search_form_narrow
theme: olivesbdh
region: primary_menu
weight: -4
provider: null

6
config/optional/block.block.olivessdu_search_form_wide.yml → config/optional/block.block.olivesbdh_search_form_wide.yml

@ -4,9 +4,9 @@ dependencies:
module:
- search
theme:
- olivessdu
id: olivessdu_search_form_wide
theme: olivessdu
- olivesbdh
id: olivesbdh_search_form_wide
theme: olivesbdh
region: secondary_menu
weight: -5
provider: null

6
config/optional/block.block.olivessdu_secondary_local_tasks.yml → config/optional/block.block.olivesbdh_secondary_local_tasks.yml

@ -2,9 +2,9 @@ langcode: en
status: true
dependencies:
theme:
- olivessdu
id: olivessdu_secondary_local_tasks
theme: olivessdu
- olivesbdh
id: olivesbdh_secondary_local_tasks
theme: olivesbdh
region: highlighted
weight: -2
provider: null

6
config/optional/block.block.olivessdu_site_branding.yml → config/optional/block.block.olivesbdh_site_branding.yml

@ -4,9 +4,9 @@ dependencies:
module:
- system
theme:
- olivessdu
id: olivessdu_site_branding
theme: olivessdu
- olivesbdh
id: olivesbdh_site_branding
theme: olivesbdh
region: header
weight: 0
provider: null

6
config/optional/block.block.olivessdu_syndicate.yml → config/optional/block.block.olivesbdh_syndicate.yml

@ -4,9 +4,9 @@ dependencies:
module:
- node
theme:
- olivessdu
id: olivessdu_syndicate
theme: olivessdu
- olivesbdh
id: olivesbdh_syndicate
theme: olivesbdh
region: social
weight: 0
provider: null

6
config/optional/core.date_format.olivessdu_medium.yml → config/optional/core.date_format.olivesbdh_medium.yml

@ -3,8 +3,8 @@ status: true
dependencies:
enforced:
theme:
- olivessdu
id: olivessdu_medium
label: 'Olivessdu Medium'
- olivesbdh
id: olivesbdh_medium
label: 'Olivesbdh Medium'
locked: false
pattern: 'j F, Y'

6
config/schema/olivessdu.schema.yml → config/schema/olivesbdh.schema.yml

@ -1,8 +1,8 @@
# Schema for the configuration files of the Olivessdu theme.
# Schema for the configuration files of the Olivesbdh theme.
olivessdu.settings:
olivesbdh.settings:
type: theme_settings
label: 'olivessdu settings'
label: 'olivesbdh settings'
mapping:
third_party_settings:
type: mapping

4
css/components/ajax-progress.module.css

@ -85,7 +85,7 @@
.ajax-progress-throbber .throbber,
.ajax-progress-fullscreen::before {
animation: olivessdu-throbber 0.75s linear infinite;
animation: olivesbdh-throbber 0.75s linear infinite;
border-style: solid dotted solid solid;
border-color: var(--color--primary-50) transparent var(--color--primary-50) var(--color--primary-50);
border-radius: 50%;
@ -100,7 +100,7 @@ html.js .button:not(.js-hide) + .ajax-progress-throbber {
margin-inline-start: 0;
}
@keyframes olivessdu-throbber {
@keyframes olivesbdh-throbber {
0% {
transform: rotateZ(0);
}

2
css/components/color-picker.css

@ -10,7 +10,7 @@
* Color picker styles. These appear within theme settings when selecting a custom color.
*/
[data-drupal-selector="olivessdu-color-picker"] input[type="color"] {
[data-drupal-selector="olivesbdh-color-picker"] input[type="color"] {
margin-left: 0.8125rem;
vertical-align: bottom;
}

28
css/components/details.css

@ -15,7 +15,7 @@
--details-summary-transition: background-color 0.12s ease-in-out;
}
.olivessdu-details {
.olivesbdh-details {
display: block;
margin-block: var(--sp1);
color: inherit;
@ -26,7 +26,7 @@
/* Details summary styles */
.olivessdu-details__summary {
.olivesbdh-details__summary {
position: relative;
padding-block: var(--sp1);
padding-inline-start: var(--sp2);
@ -46,7 +46,7 @@
/* Arrow icon */
.olivessdu-details__summary::before {
.olivesbdh-details__summary::before {
position: absolute;
inset-block-start: 50%;
inset-inline-start: var(--sp0-75);
@ -59,13 +59,13 @@
border-right: solid 2px currentColor;
}
[dir="rtl"] .olivessdu-details__summary::before {
[dir="rtl"] .olivesbdh-details__summary::before {
transform: translateY(-50%) rotate(-135deg);
}
/* Pseudo-selector to manage focus styles */
.olivessdu-details__summary::after {
.olivesbdh-details__summary::after {
position: absolute;
inset: calc(var(--details-border-width) * -1);
content: "";
@ -77,45 +77,45 @@
/* Hide the marker */
.olivessdu-details__summary::-webkit-details-marker {
.olivesbdh-details__summary::-webkit-details-marker {
display: none;
}
/* Disable default outline for summary, since we have own implementation */
.olivessdu-details__summary:focus {
.olivesbdh-details__summary:focus {
outline: solid 2px transparent;
outline-offset: -4px;
}
/* Details summary, hover state */
.olivessdu-details__summary:hover {
.olivesbdh-details__summary:hover {
background-color: var(--color--gray-95);
}
/* Details summary, focus and active states */
.olivessdu-details__summary:focus::after,
.olivessdu-details__summary:active::after {
.olivesbdh-details__summary:focus::after,
.olivesbdh-details__summary:active::after {
opacity: 1;
}
/* Rotate arrow icon of the details summary, when details expanded */
.olivessdu-details[open] > .olivessdu-details__summary::before {
.olivesbdh-details[open] > .olivesbdh-details__summary::before {
margin-block-start: -2px;
transform: translateY(-50%) rotate(135deg);
}
/* Details content wrapper */
.olivessdu-details__wrapper {
.olivesbdh-details__wrapper {
margin: var(--sp1);
}
@media (min-width: 62.5rem) {
.olivessdu-details__wrapper {
.olivesbdh-details__wrapper {
margin-block-start: var(--sp1-5);
margin-block-end: var(--sp1-5);
margin-inline-start: var(--sp2);
@ -125,7 +125,7 @@
/* Description */
.olivessdu-details__description {
.olivesbdh-details__description {
margin-block-end: var(--sp1);
color: var(--color-text-neutral-medium);
font-size: var(--font-size-xs);

30
css/components/landing_page.css

@ -1,4 +1,4 @@
figure.logo--ilivessdu {
figure.logo--ilivesbdh {
background: none;
width: 24em;
margin: 0 auto;
@ -27,9 +27,9 @@ article.node.node--type-landing-page h2 {
.path-frontpage .region--content {
margin-bottom: 0;
}
#block-olivessdu-views-block-front-page-featured-books-block-2
#block-olivesbdh-views-block-front-page-featured-books-block-2
.view-content,
#block-olivessdu-views-block-front-page-featured-books-block-1
#block-olivesbdh-views-block-front-page-featured-books-block-1
.view-content {
/*display: none;*/
.node__title {
@ -80,23 +80,23 @@ article.node.node--type-landing-page h2 {
}
}
/*clean up titles on lp figure block*/
div#block-olivessdu-views-block-front-page-featured-books-block-2
div#block-olivesbdh-views-block-front-page-featured-books-block-2
.node__title {
margin: 0;
}
div#block-olivessdu-views-block-front-page-featured-books-block-2
div#block-olivesbdh-views-block-front-page-featured-books-block-2
.node__title
a {
line-height: 1.4;
}
div#block-olivessdu-views-block-front-page-featured-books-block-2
div#block-olivesbdh-views-block-front-page-featured-books-block-2
.view-eva
.views-row {
padding: 0 !important;
margin-top: 1em;
}
@media (min-width: 43.75rem) {
#block-olivessdu-views-block-front-page-featured-books-block-1
#block-olivesbdh-views-block-front-page-featured-books-block-1
.view-content {
.views-field.views-field-title {
height: 7em;
@ -116,14 +116,14 @@ div#block-olivessdu-views-block-front-page-featured-books-block-2
}
.region--content-below
#block-olivessdu-views-block-front-page-featured-books-block-1 {
#block-olivesbdh-views-block-front-page-featured-books-block-1 {
flex-basis: calc(72% - (var(--grid-gap) / 2));
flex-grow: 1;
flex-shrink: 0;
margin-inline-end: var(--grid-gap);
}
.region--content-below
#block-olivessdu-views-block-front-page-featured-books-block-2 {
#block-olivesbdh-views-block-front-page-featured-books-block-2 {
flex-basis: calc(25% - (var(--grid-gap) / 2));
flex-grow: 1;
flex-shrink: 0;
@ -135,8 +135,8 @@ div#block-olivessdu-views-block-front-page-featured-books-block-2
margin-inline-end: 0;
}
}
#block-olivessdu-maparchiveslpblock,
#block-olivessdu-learnmorelpblock {
#block-olivesbdh-maparchiveslpblock,
#block-olivesbdh-learnmorelpblock {
.block__content {
border: 1px solid #ccc;
img {
@ -177,8 +177,8 @@ div#block-olivessdu-views-block-front-page-featured-books-block-2
padding-top: 1rem;
}
/*icons*/
#block-olivessdu-learnmorelpblock .block__title,
#block-olivessdu-maparchiveslpblock .block__title {
#block-olivesbdh-learnmorelpblock .block__title,
#block-olivesbdh-maparchiveslpblock .block__title {
position: relative; /* Optional: for positioning adjustments */
font-size: 1.8rem;
svg {
@ -193,9 +193,9 @@ div#block-olivessdu-views-block-front-page-featured-books-block-2
}
}
#block-olivessdu-learnmorelpblock .block__title::before {
#block-olivesbdh-learnmorelpblock .block__title::before {
content: url("../../images/telescope.svg"); /* Path to your SVG file */
}
#block-olivessdu-maparchiveslpblock .block__title::before {
#block-olivesbdh-maparchiveslpblock .block__title::before {
content: url("../../images/sextant.svg"); /* Path to your SVG file */
}

2
css/components/navigation/nav-primary.css

@ -178,7 +178,7 @@
}
/*
* Olivessdu doesn't officially support nested tertiary submenus, but this
* Olivesbdh doesn't officially support nested tertiary submenus, but this
* ensures that it doesn't break all the way.
*
* @see https://www.drupal.org/project/drupal/issues/3221399

2
css/components/navigation/pcss/nav-primary.pcss.css

@ -169,7 +169,7 @@
}
/*
* Olivessdu doesn't officially support nested tertiary submenus, but this
* Olivesbdh doesn't officially support nested tertiary submenus, but this
* ensures that it doesn't break all the way.
*
* @see https://www.drupal.org/project/drupal/issues/3221399

2
css/components/pager.css

@ -10,7 +10,7 @@
* Styles for pagination.
*/
#block-olivessdu-solrsearchcontentsearchresultspagerforcollectionmembers .pager__group {
#block-olivesbdh-solrsearchcontentsearchresultspagerforcollectionmembers .pager__group {
justify-content: space-around;
}
.pager__items {

4
css/components/pcss/ajax-progress.module.pcss.css

@ -77,7 +77,7 @@
*/
.ajax-progress-throbber .throbber,
.ajax-progress-fullscreen::before {
animation: olivessdu-throbber 0.75s linear infinite;
animation: olivesbdh-throbber 0.75s linear infinite;
border-style: solid dotted solid solid;
border-color: var(--color--primary-50) transparent var(--color--primary-50) var(--color--primary-50);
border-radius: 50%;
@ -91,7 +91,7 @@ html.js .button:not(.js-hide) + .ajax-progress-throbber {
margin-inline-start: 0;
}
@keyframes olivessdu-throbber {
@keyframes olivesbdh-throbber {
0% {
transform: rotateZ(0);
}

2
css/components/pcss/color-picker.pcss.css

@ -3,7 +3,7 @@
* Color picker styles. These appear within theme settings when selecting a custom color.
*/
[data-drupal-selector="olivessdu-color-picker"] {
[data-drupal-selector="olivesbdh-color-picker"] {
& input[type="color"] {
margin-left: 13px;
vertical-align: bottom;

26
css/components/pcss/details.pcss.css

@ -10,7 +10,7 @@
--details-summary-transition: background-color 0.12s ease-in-out;
}
.olivessdu-details {
.olivesbdh-details {
display: block;
margin-block: var(--sp1);
color: inherit;
@ -20,7 +20,7 @@
}
/* Details summary styles */
.olivessdu-details__summary {
.olivesbdh-details__summary {
position: relative;
padding-block: var(--sp1);
padding-inline-start: var(--sp2);
@ -38,7 +38,7 @@
}
/* Arrow icon */
.olivessdu-details__summary::before {
.olivesbdh-details__summary::before {
position: absolute;
inset-block-start: 50%;
inset-inline-start: var(--sp0-75);
@ -51,12 +51,12 @@
border-right: solid 2px currentColor;
}
[dir="rtl"] .olivessdu-details__summary::before {
[dir="rtl"] .olivesbdh-details__summary::before {
transform: translateY(-50%) rotate(-135deg);
}
/* Pseudo-selector to manage focus styles */
.olivessdu-details__summary::after {
.olivesbdh-details__summary::after {
position: absolute;
inset: calc(var(--details-border-width) * -1);
content: "";
@ -67,35 +67,35 @@
}
/* Hide the marker */
.olivessdu-details__summary::-webkit-details-marker {
.olivesbdh-details__summary::-webkit-details-marker {
display: none;
}
/* Disable default outline for summary, since we have own implementation */
.olivessdu-details__summary:focus {
.olivesbdh-details__summary:focus {
outline: solid 2px transparent;
outline-offset: -4px;
}
/* Details summary, hover state */
.olivessdu-details__summary:hover {
.olivesbdh-details__summary:hover {
background-color: var(--color--gray-95);
}
/* Details summary, focus and active states */
.olivessdu-details__summary:focus::after,
.olivessdu-details__summary:active::after {
.olivesbdh-details__summary:focus::after,
.olivesbdh-details__summary:active::after {
opacity: 1;
}
/* Rotate arrow icon of the details summary, when details expanded */
.olivessdu-details[open] > .olivessdu-details__summary::before {
.olivesbdh-details[open] > .olivesbdh-details__summary::before {
margin-block-start: -2px;
transform: translateY(-50%) rotate(135deg);
}
/* Details content wrapper */
.olivessdu-details__wrapper {
.olivesbdh-details__wrapper {
margin: var(--sp1);
@media (--lg) {
@ -107,7 +107,7 @@
}
/* Description */
.olivessdu-details__description {
.olivesbdh-details__description {
margin-block-end: var(--sp1);
color: var(--color-text-neutral-medium);
font-size: var(--font-size-xs);

2
css/components/pcss/vertical-tabs.pcss.css

@ -48,7 +48,7 @@
}
}
.vertical-tabs__pane.olivessdu-details {
.vertical-tabs__pane.olivesbdh-details {
margin: 0;
border-radius: 0;
box-shadow: none;

2
css/components/vertical-tabs.css

@ -57,7 +57,7 @@
}
}
.vertical-tabs__pane.olivessdu-details {
.vertical-tabs__pane.olivesbdh-details {
margin: 0;
border-radius: 0;
box-shadow: none;

2
css/layout/layout-views-grid.css

@ -74,6 +74,6 @@
}
}
}
div#block-olivessdu-solrsearchcontentsearchresultspagerforsearchpage {
div#block-olivesbdh-solrsearchcontentsearchresultspagerforsearchpage {
margin-bottom: 0;
}

4
css_original/components/ajax-progress.module.css

@ -85,7 +85,7 @@
.ajax-progress-throbber .throbber,
.ajax-progress-fullscreen::before {
animation: olivessdu-throbber 0.75s linear infinite;
animation: olivesbdh-throbber 0.75s linear infinite;
border-style: solid dotted solid solid;
border-color: var(--color--primary-50) transparent var(--color--primary-50) var(--color--primary-50);
border-radius: 50%;
@ -100,7 +100,7 @@ html.js .button:not(.js-hide) + .ajax-progress-throbber {
margin-inline-start: 0;
}
@keyframes olivessdu-throbber {
@keyframes olivesbdh-throbber {
0% {
transform: rotateZ(0);
}

2
css_original/components/color-picker.css

@ -10,7 +10,7 @@
* Color picker styles. These appear within theme settings when selecting a custom color.
*/
[data-drupal-selector="olivessdu-color-picker"] input[type="color"] {
[data-drupal-selector="olivesbdh-color-picker"] input[type="color"] {
margin-left: 0.8125rem;
vertical-align: bottom;
}

28
css_original/components/details.css

@ -15,7 +15,7 @@
--details-summary-transition: background-color 0.12s ease-in-out;
}
.olivessdu-details {
.olivesbdh-details {
display: block;
margin-block: var(--sp1);
color: inherit;
@ -26,7 +26,7 @@
/* Details summary styles */
.olivessdu-details__summary {
.olivesbdh-details__summary {
position: relative;
padding-block: var(--sp1);
padding-inline-start: var(--sp2);
@ -46,7 +46,7 @@
/* Arrow icon */
.olivessdu-details__summary::before {
.olivesbdh-details__summary::before {
position: absolute;
inset-block-start: 50%;
inset-inline-start: var(--sp0-75);
@ -59,13 +59,13 @@
border-right: solid 2px currentColor;
}
[dir="rtl"] .olivessdu-details__summary::before {
[dir="rtl"] .olivesbdh-details__summary::before {
transform: translateY(-50%) rotate(-135deg);
}
/* Pseudo-selector to manage focus styles */
.olivessdu-details__summary::after {
.olivesbdh-details__summary::after {
position: absolute;
inset: calc(var(--details-border-width) * -1);
content: "";
@ -77,45 +77,45 @@
/* Hide the marker */
.olivessdu-details__summary::-webkit-details-marker {
.olivesbdh-details__summary::-webkit-details-marker {
display: none;
}
/* Disable default outline for summary, since we have own implementation */
.olivessdu-details__summary:focus {
.olivesbdh-details__summary:focus {
outline: solid 2px transparent;
outline-offset: -4px;
}
/* Details summary, hover state */
.olivessdu-details__summary:hover {
.olivesbdh-details__summary:hover {
background-color: var(--color--gray-95);
}
/* Details summary, focus and active states */
.olivessdu-details__summary:focus::after,
.olivessdu-details__summary:active::after {
.olivesbdh-details__summary:focus::after,
.olivesbdh-details__summary:active::after {
opacity: 1;
}
/* Rotate arrow icon of the details summary, when details expanded */
.olivessdu-details[open] > .olivessdu-details__summary::before {
.olivesbdh-details[open] > .olivesbdh-details__summary::before {
margin-block-start: -2px;
transform: translateY(-50%) rotate(135deg);
}
/* Details content wrapper */
.olivessdu-details__wrapper {
.olivesbdh-details__wrapper {
margin: var(--sp1);
}
@media (min-width: 62.5rem) {
.olivessdu-details__wrapper {
.olivesbdh-details__wrapper {
margin-block-start: var(--sp1-5);
margin-block-end: var(--sp1-5);
margin-inline-start: var(--sp2);
@ -125,7 +125,7 @@
/* Description */
.olivessdu-details__description {
.olivesbdh-details__description {
margin-block-end: var(--sp1);
color: var(--color-text-neutral-medium);
font-size: var(--font-size-xs);

2
css_original/components/landing_page.css

@ -1,4 +1,4 @@
figure.logo--ilivessdu {
figure.logo--ilivesbdh {
background: none;
width: 24em;
margin: 0 auto;

2
css_original/components/navigation/nav-primary.css

@ -178,7 +178,7 @@
}
/*
* Olivessdu doesn't officially support nested tertiary submenus, but this
* Olivesbdh doesn't officially support nested tertiary submenus, but this
* ensures that it doesn't break all the way.
*
* @see https://www.drupal.org/project/drupal/issues/3221399

2
css_original/components/navigation/pcss/nav-primary.pcss.css

@ -169,7 +169,7 @@
}
/*
* Olivessdu doesn't officially support nested tertiary submenus, but this
* Olivesbdh doesn't officially support nested tertiary submenus, but this
* ensures that it doesn't break all the way.
*
* @see https://www.drupal.org/project/drupal/issues/3221399

2
css_original/components/pager.css

@ -10,7 +10,7 @@
* Styles for pagination.
*/
#block-olivessdu-solrsearchcontentsearchresultspagerforcollectionmembers .pager__group {
#block-olivesbdh-solrsearchcontentsearchresultspagerforcollectionmembers .pager__group {
justify-content: space-around;
}
.pager__items {

4
css_original/components/pcss/ajax-progress.module.pcss.css

@ -77,7 +77,7 @@
*/
.ajax-progress-throbber .throbber,
.ajax-progress-fullscreen::before {
animation: olivessdu-throbber 0.75s linear infinite;
animation: olivesbdh-throbber 0.75s linear infinite;
border-style: solid dotted solid solid;
border-color: var(--color--primary-50) transparent var(--color--primary-50) var(--color--primary-50);
border-radius: 50%;
@ -91,7 +91,7 @@ html.js .button:not(.js-hide) + .ajax-progress-throbber {
margin-inline-start: 0;
}
@keyframes olivessdu-throbber {
@keyframes olivesbdh-throbber {
0% {
transform: rotateZ(0);
}

2
css_original/components/pcss/color-picker.pcss.css

@ -3,7 +3,7 @@
* Color picker styles. These appear within theme settings when selecting a custom color.
*/
[data-drupal-selector="olivessdu-color-picker"] {
[data-drupal-selector="olivesbdh-color-picker"] {
& input[type="color"] {
margin-left: 13px;
vertical-align: bottom;

26
css_original/components/pcss/details.pcss.css

@ -10,7 +10,7 @@
--details-summary-transition: background-color 0.12s ease-in-out;
}
.olivessdu-details {
.olivesbdh-details {
display: block;
margin-block: var(--sp1);
color: inherit;
@ -20,7 +20,7 @@
}
/* Details summary styles */
.olivessdu-details__summary {
.olivesbdh-details__summary {
position: relative;
padding-block: var(--sp1);
padding-inline-start: var(--sp2);
@ -38,7 +38,7 @@
}
/* Arrow icon */
.olivessdu-details__summary::before {
.olivesbdh-details__summary::before {
position: absolute;
inset-block-start: 50%;
inset-inline-start: var(--sp0-75);
@ -51,12 +51,12 @@
border-right: solid 2px currentColor;
}
[dir="rtl"] .olivessdu-details__summary::before {
[dir="rtl"] .olivesbdh-details__summary::before {
transform: translateY(-50%) rotate(-135deg);
}
/* Pseudo-selector to manage focus styles */
.olivessdu-details__summary::after {
.olivesbdh-details__summary::after {
position: absolute;
inset: calc(var(--details-border-width) * -1);
content: "";
@ -67,35 +67,35 @@
}
/* Hide the marker */
.olivessdu-details__summary::-webkit-details-marker {
.olivesbdh-details__summary::-webkit-details-marker {
display: none;
}
/* Disable default outline for summary, since we have own implementation */
.olivessdu-details__summary:focus {
.olivesbdh-details__summary:focus {
outline: solid 2px transparent;
outline-offset: -4px;
}
/* Details summary, hover state */
.olivessdu-details__summary:hover {
.olivesbdh-details__summary:hover {
background-color: var(--color--gray-95);
}
/* Details summary, focus and active states */
.olivessdu-details__summary:focus::after,
.olivessdu-details__summary:active::after {
.olivesbdh-details__summary:focus::after,
.olivesbdh-details__summary:active::after {
opacity: 1;
}
/* Rotate arrow icon of the details summary, when details expanded */
.olivessdu-details[open] > .olivessdu-details__summary::before {
.olivesbdh-details[open] > .olivesbdh-details__summary::before {
margin-block-start: -2px;
transform: translateY(-50%) rotate(135deg);
}
/* Details content wrapper */
.olivessdu-details__wrapper {
.olivesbdh-details__wrapper {
margin: var(--sp1);
@media (--lg) {
@ -107,7 +107,7 @@
}
/* Description */
.olivessdu-details__description {
.olivesbdh-details__description {
margin-block-end: var(--sp1);
color: var(--color-text-neutral-medium);
font-size: var(--font-size-xs);

2
css_original/components/pcss/vertical-tabs.pcss.css

@ -48,7 +48,7 @@
}
}
.vertical-tabs__pane.olivessdu-details {
.vertical-tabs__pane.olivesbdh-details {
margin: 0;
border-radius: 0;
box-shadow: none;

2
css_original/components/vertical-tabs.css

@ -57,7 +57,7 @@
}
}
.vertical-tabs__pane.olivessdu-details {
.vertical-tabs__pane.olivesbdh-details {
margin: 0;
border-radius: 0;
box-shadow: none;

28
js/color-picker.js

@ -1,6 +1,6 @@
/**
* @file
* Provides UI/UX progressive enhancements on Olivessdu's theme settings by
* Provides UI/UX progressive enhancements on Olivesbdh's theme settings by
* creating an HTMLColorInput element and synchronizing its input with a text
* input to provide an accessible and user-friendly interface. Additionally,
* provides a select element with pre-defined color values for easy color
@ -8,7 +8,7 @@
*/
((Drupal, settings, once) => {
const colorSchemeOptions = settings.olivessdu.colorSchemes;
const colorSchemeOptions = settings.olivesbdh.colorSchemes;
/**
* Announces the text value of the field's label.
@ -36,8 +36,8 @@
function synchronizeInputs(changedInput, inputToSync) {
inputToSync.value = changedInput.value;
changedInput.setAttribute('data-olivessdu-custom-color', changedInput.value);
inputToSync.setAttribute('data-olivessdu-custom-color', changedInput.value);
changedInput.setAttribute('data-olivesbdh-custom-color', changedInput.value);
inputToSync.setAttribute('data-olivesbdh-custom-color', changedInput.value);
const colorSchemeSelect = document.querySelector(
'[data-drupal-selector="edit-color-scheme"]',
@ -74,9 +74,9 @@
});
} else {
document
.querySelectorAll(`input[data-olivessdu-custom-color]`)
.querySelectorAll(`input[data-olivesbdh-custom-color]`)
.forEach((input) => {
input.value = input.getAttribute('data-olivessdu-custom-color');
input.value = input.getAttribute('data-olivesbdh-custom-color');
});
}
}
@ -111,7 +111,7 @@
}
/**
* Initializes Olivessdu theme-settings color picker.
* Initializes Olivesbdh theme-settings color picker.
* creates a color-type input and inserts it after the original text field.
* modifies aria values to make label apply to both inputs.
* adds event listeners to keep text & color inputs in sync.
@ -133,8 +133,8 @@
colorInput.value = textInput.value;
colorInput.setAttribute('name', `${textInput.name}_visual`);
colorInput.setAttribute(
'data-olivessdu-custom-color',
textInput.getAttribute('data-olivessdu-custom-color'),
'data-olivesbdh-custom-color',
textInput.getAttribute('data-olivesbdh-custom-color'),
);
// Insert new input into DOM.
@ -160,16 +160,16 @@
}
/**
* Olivessdu Color Picker behavior.
* Olivesbdh Color Picker behavior.
*
* @type {Drupal~behavior}
* @prop {Drupal~behaviorAttach} attach
* Initializes color picker fields.
*/
Drupal.behaviors.olivessduColorPicker = {
Drupal.behaviors.olivesbdhColorPicker = {
attach: () => {
const colorSchemeSelect = once(
'olivessdu-color-picker',
'olivesbdh-color-picker',
'[data-drupal-selector="edit-color-scheme"]',
);
@ -178,8 +178,8 @@
});
const colorTextInputs = once(
'olivessdu-color-picker',
'[data-drupal-selector="olivessdu-color-picker"] input[type="text"]',
'olivesbdh-color-picker',
'[data-drupal-selector="olivesbdh-color-picker"] input[type="text"]',
);
colorTextInputs.forEach((textInput) => {

2
js/message.theme.js

@ -74,7 +74,7 @@
</div>
`;
Drupal.olivessdu.closeMessage(messageWrapper);
Drupal.olivesbdh.closeMessage(messageWrapper);
return messageWrapper;
};

2
js/messages.js

@ -51,5 +51,5 @@
},
};
Drupal.olivessdu.closeMessage = closeMessage;
Drupal.olivesbdh.closeMessage = closeMessage;
})(Drupal, once);

4
js/nav-resize.js

@ -34,7 +34,7 @@
const navItem = document.querySelector('.primary-nav__menu-item');
if (
Drupal.olivessdu.isDesktopNav() &&
Drupal.olivesbdh.isDesktopNav() &&
entries[0].contentRect.height > navItem.clientHeight
) {
const navMediaQuery = window.matchMedia(
@ -77,7 +77,7 @@
Drupal.behaviors.automaticMobileNav = {
attach(context) {
once(
'olivessdu-automatic-mobile-nav',
'olivesbdh-automatic-mobile-nav',
'[data-drupal-selector="primary-nav-menu--level-1"]',
context,
).forEach(init);

12
js/navigation-utils.js

@ -9,11 +9,11 @@
/* eslint-disable no-inner-declarations */
((Drupal) => {
/**
* Olivessdu helper functions.
* Olivesbdh helper functions.
*
* @namespace
*/
Drupal.olivessdu = {};
Drupal.olivesbdh = {};
/**
* Checks if the mobile navigation button is visible.
@ -31,7 +31,7 @@
: false;
}
Drupal.olivessdu.isDesktopNav = isDesktopNav;
Drupal.olivesbdh.isDesktopNav = isDesktopNav;
const stickyHeaderToggleButton = document.querySelector(
'[data-drupal-selector="sticky-header-toggle"]',
@ -65,7 +65,7 @@
expiry: now.getTime() + 20160000, // 2 weeks from now.
};
localStorage.setItem(
'Drupal.olivessdu.stickyHeaderState',
'Drupal.olivesbdh.stickyHeaderState',
JSON.stringify(item),
);
}
@ -93,7 +93,7 @@
*/
function getStickyHeaderStorage() {
const stickyHeaderState = localStorage.getItem(
'Drupal.olivessdu.stickyHeaderState',
'Drupal.olivesbdh.stickyHeaderState',
);
if (!stickyHeaderState) return false;
@ -104,7 +104,7 @@
// Compare the expiry time of the item with the current time.
if (now.getTime() > item.expiry) {
// If the item is expired, delete the item from storage and return null.
localStorage.removeItem('Drupal.olivessdu.stickyHeaderState');
localStorage.removeItem('Drupal.olivesbdh.stickyHeaderState');
return false;
}
return item.value;

18
js/navigation.js

@ -50,8 +50,8 @@
// Close any open sub-navigation first, then close the header navigation.
document.addEventListener('keyup', (e) => {
if (e.key === 'Escape') {
if (props.olivessdu.areAnySubNavsOpen()) {
props.olivessdu.closeAllSubNav();
if (props.olivesbdh.areAnySubNavsOpen()) {
props.olivesbdh.closeAllSubNav();
} else {
toggleNav(props, false);
}
@ -80,14 +80,14 @@
if (e.shiftKey) {
if (
document.activeElement === firstTabbableEl &&
!props.olivessdu.isDesktopNav()
!props.olivesbdh.isDesktopNav()
) {
lastTabbableEl.focus();
e.preventDefault();
}
} else if (
document.activeElement === lastTabbableEl &&
!props.olivessdu.isDesktopNav()
!props.olivesbdh.isDesktopNav()
) {
firstTabbableEl.focus();
e.preventDefault();
@ -97,14 +97,14 @@
// Remove overlays when browser is resized and desktop nav appears.
window.addEventListener('resize', () => {
if (props.olivessdu.isDesktopNav()) {
if (props.olivesbdh.isDesktopNav()) {
toggleNav(props, false);
props.body.classList.remove('is-overlay-active');
props.body.classList.remove('is-fixed');
}
// Ensure that all sub-navigation menus close when the browser is resized.
Drupal.olivessdu.closeAllSubNav();
Drupal.olivesbdh.closeAllSubNav();
});
// If hyperlink links to an anchor in the current page, close the
@ -128,7 +128,7 @@
* @prop {Drupal~behaviorAttach} attach
* Attach context and settings for navigation.
*/
Drupal.behaviors.olivessduNavigation = {
Drupal.behaviors.olivesbdhNavigation = {
attach(context) {
const headerId = 'header';
const header = once('navigation', `#${headerId}`, context).shift();
@ -136,7 +136,7 @@
if (header) {
const navWrapper = header.querySelector(`#${navWrapperId}`);
const { olivessdu } = Drupal;
const { olivesbdh } = Drupal;
const navButton = context.querySelector(
'[data-drupal-selector="mobile-nav-button"]',
);
@ -146,7 +146,7 @@
);
init({
olivessdu,
olivesbdh,
header,
navWrapperId,
navWrapper,

6
js/search.js

@ -20,7 +20,7 @@
function searchIsVisible() {
return searchWideWrapper.classList.contains('is-active');
}
Drupal.olivessdu.searchIsVisible = searchIsVisible;
Drupal.olivesbdh.searchIsVisible = searchIsVisible;
/**
* Closes search bar when a click event does not happen at an (x,y) coordinate
@ -105,7 +105,7 @@
});
if (visibility === true) {
Drupal.olivessdu.closeAllSubNav();
Drupal.olivesbdh.closeAllSubNav();
document.addEventListener('click', watchForClickOut, { capture: true });
document.addEventListener('focusout', watchForFocusOut, {
@ -125,7 +125,7 @@
}
}
Drupal.olivessdu.toggleSearchVisibility = toggleSearchVisibility;
Drupal.olivesbdh.toggleSearchVisibility = toggleSearchVisibility;
/**
* Initializes the search wide button.

10
js/second-level-navigation.js

@ -4,7 +4,7 @@
*/
((Drupal) => {
const { isDesktopNav } = Drupal.olivessdu;
const { isDesktopNav } = Drupal.olivesbdh;
const secondLevelNavMenus = document.querySelectorAll(
'[data-drupal-selector="primary-nav-menu-item-has-children"]',
);
@ -55,7 +55,7 @@
.classList.toggle('is-active-menu-parent', state);
}
Drupal.olivessdu.toggleSubNav = toggleSubNav;
Drupal.olivesbdh.toggleSubNav = toggleSubNav;
/**
* Sets a timeout and closes current desktop navigation submenu if it
@ -65,7 +65,7 @@
* The event object.
*/
function handleBlur(e) {
if (!Drupal.olivessdu.isDesktopNav()) return;
if (!Drupal.olivesbdh.isDesktopNav()) return;
setTimeout(() => {
const menuParentItem = e.target.closest(
@ -145,7 +145,7 @@
});
}
Drupal.olivessdu.closeAllSubNav = closeAllSubNav;
Drupal.olivesbdh.closeAllSubNav = closeAllSubNav;
/**
* Checks if any sub navigation items are currently active.
@ -170,7 +170,7 @@
return subNavsAreOpen;
}
Drupal.olivessdu.areAnySubNavsOpen = areAnySubNavsOpen;
Drupal.olivesbdh.areAnySubNavsOpen = areAnySubNavsOpen;
// Ensure that desktop submenus close when escape key is pressed.
document.addEventListener('keyup', (e) => {

2
js/tabs.js

@ -61,7 +61,7 @@
*/
Drupal.behaviors.primaryTabs = {
attach(context) {
once('olivessdu-tabs', '[data-drupal-nav-primary-tabs]', context).forEach(
once('olivesbdh-tabs', '[data-drupal-nav-primary-tabs]', context).forEach(
init,
);
},

12
junk_drawer/tests/src/Functional/Update/OlivessduPostUpdateTest.php → junk_drawer/tests/src/Functional/Update/OlivesbdhPostUpdateTest.php

@ -1,15 +1,15 @@
<?php
namespace Drupal\Tests\olivessdu\Functional\Update;
namespace Drupal\Tests\olivesbdh\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Tests the update path for Olivessdu.
* Tests the update path for Olivesbdh.
*
* @group Update
*/
class OlivessduPostUpdateTest extends UpdatePathTestBase {
class OlivesbdhPostUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
@ -28,14 +28,14 @@ class OlivessduPostUpdateTest extends UpdatePathTestBase {
/**
* Tests update hook setting base primary color.
*/
public function testOlivessduPrimaryColorUpdate() {
$config = $this->config('olivessdu.settings');
public function testOlivesbdhPrimaryColorUpdate() {
$config = $this->config('olivesbdh.settings');
$this->assertEmpty($config->get('base_primary_color'));
// Run updates.
$this->runUpdates();
$config = $this->config('olivessdu.settings');
$config = $this->config('olivesbdh.settings');
$this->assertSame('#1b9ae4', $config->get('base_primary_color'));
}

12
junk_drawer/tests/src/Unit/OlivessduHexToHslTest.php → junk_drawer/tests/src/Unit/OlivesbdhHexToHslTest.php

@ -1,22 +1,22 @@
<?php
namespace Drupal\Tests\olivessdu\Unit;
namespace Drupal\Tests\olivesbdh\Unit;
use Drupal\Tests\UnitTestCase;
/**
* Tests the _olivessdu_hex_to_hsl() function.
* Tests the _olivesbdh_hex_to_hsl() function.
*
* @group olivessdu
* @group olivesbdh
*/
final class OlivessduHexToHslTest extends UnitTestCase {
final class OlivesbdhHexToHslTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp(): void {
parent::setUp();
require_once __DIR__ . '/../../../olivessdu.theme';
require_once __DIR__ . '/../../../olivesbdh.theme';
}
/**
@ -30,7 +30,7 @@ final class OlivessduHexToHslTest extends UnitTestCase {
* @dataProvider hexCodes
*/
public function testHexToHsl(string $hex, array $expected_hsl): void {
self::assertEquals($expected_hsl, _olivessdu_hex_to_hsl($hex));
self::assertEquals($expected_hsl, _olivesbdh_hex_to_hsl($hex));
}
/**

16
olivessdu.breakpoints.yml → olivesbdh.breakpoints.yml

@ -1,46 +1,46 @@
olivessdu.sm:
olivesbdh.sm:
label: Small
mediaQuery: 'all and (min-width: 500px)'
weight: 0
multipliers:
- 1x
olivessdu.md:
olivesbdh.md:
label: Medium
mediaQuery: 'all and (min-width: 700px)'
weight: 1
multipliers:
- 1x
olivessdu.lg:
olivesbdh.lg:
label: Large
mediaQuery: 'all and (min-width: 1000px)'
weight: 2
multipliers:
- 1x
olivessdu.xl:
olivesbdh.xl:
label: X-Large
mediaQuery: 'all and (min-width: 1300px)'
weight: 3
multipliers:
- 1x
olivessdu.nav-md:
olivesbdh.nav-md:
label: Nav Medium
mediaQuery: 'all and (min-width: 500px)'
weight: 4
multipliers:
- 1x
olivessdu.nav:
olivesbdh.nav:
label: Nav
mediaQuery: 'all and (min-width: 1200px)'
weight: 5
multipliers:
- 1x
olivessdu.grid-md:
olivesbdh.grid-md:
label: Grid Medium
mediaQuery: 'all and (min-width: 700px)'
weight: 6
multipliers:
- 1x
olivessdu.grid-max:
olivesbdh.grid-max:
label: Grid Max
mediaQuery: 'all and (min-width: 1440px)'
weight: 7

46
olivessdu.info.yml → olivesbdh.info.yml

@ -1,25 +1,25 @@
# This theme is marked as @internal. It is intended to evolve and change over
# minor releases.
# As the UI of Drupal improves between minor versions, the markup and assets in
# the Olivessdu theme will change. The Olivessdu theme is not backwards compatible
# If you wish to modify the output or assets of Olivessdu you can:
# 1. Copy the whole of Olivessdu and rename it as your own theme. You will need to
# manually manage your own updates if you want to stay up to date with Olivessdu's
# the Olivesbdh theme will change. The Olivesbdh theme is not backwards compatible
# If you wish to modify the output or assets of Olivesbdh you can:
# 1. Copy the whole of Olivesbdh and rename it as your own theme. You will need to
# manually manage your own updates if you want to stay up to date with Olivesbdh's
# bug fixes and feature support.
#
# 2. Sub-theme Olivessdu. This is only recommended if you want to make minor
# tweaks and understand that Olivessdu could break your modifications as it
# 2. Sub-theme Olivesbdh. This is only recommended if you want to make minor
# tweaks and understand that Olivesbdh could break your modifications as it
# changes.
name: Olivessdu
name: Olivesbdh
type: theme
base theme: false
description: THIS IS A CLONE OF OLIVERO FOR ISLANDIMAGINED.
alt text: Screenshot of Olivessdu, Drupal front-end theme.
alt text: Screenshot of Olivesbdh, Drupal front-end theme.
package: Core
version: VERSION
core_version_requirement: ^10
libraries:
- olivessdu/global-styling
- olivesbdh/global-styling
regions:
header: Header
primary_menu: Primary menu
@ -54,29 +54,29 @@ libraries-override:
component:
misc/vertical-tabs.css: css/components/vertical-tabs.css
media/oembed.formatter: false
layout_builder/twocol_section: olivessdu/layout_builder_twocol_section
layout_builder/threecol_section: olivessdu/layout_builder_threecol_section
layout_builder/fourcol_section: olivessdu/layout_builder_fourcol_section
layout_builder/twocol_section: olivesbdh/layout_builder_twocol_section
layout_builder/threecol_section: olivesbdh/layout_builder_threecol_section
layout_builder/fourcol_section: olivesbdh/layout_builder_fourcol_section
libraries-extend:
core/drupal.message:
- olivessdu/drupal.message
- olivesbdh/drupal.message
core/drupal.collapse:
- olivessdu/details
- olivesbdh/details
core/drupal.dialog:
- olivessdu/drupal.dialog
- olivesbdh/drupal.dialog
core/drupal.progress:
- olivessdu/progress
- olivesbdh/progress
layout_discovery/onecol:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
layout_discovery/twocol_bricks:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
layout_discovery/twocol:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
layout_discovery/threecol_25_50_25:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
layout_discovery/threecol_33_34_33:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
node/drupal.node.preview:
- olivessdu/drupal.node.preview
- olivesbdh/drupal.node.preview
content_moderation/content_moderation:
- olivessdu/content_moderation
- olivesbdh/content_moderation

16
olivessdu.libraries.yml → olivesbdh.libraries.yml

@ -61,7 +61,7 @@ global-styling:
- core/drupal
- core/once
- core/tabbable
- olivessdu/navigation-base
- olivesbdh/navigation-base
book:
version: VERSION
@ -135,7 +135,7 @@ drupal.message:
js:
js/message.theme.js: {}
dependencies:
- olivessdu/messages
- olivesbdh/messages
drupal.node.preview:
version: VERSION
@ -167,7 +167,7 @@ layout_builder_fourcol_section:
layout:
css/layout/layout-builder-fourcol-section.css: {}
dependencies:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
layout_builder_threecol_section:
version: VERSION
@ -175,7 +175,7 @@ layout_builder_threecol_section:
layout:
css/layout/layout-builder-threecol-section.css: {}
dependencies:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
layout_builder_twocol_section:
version: VERSION
@ -183,7 +183,7 @@ layout_builder_twocol_section:
layout:
css/layout/layout-builder-twocol-section.css: {}
dependencies:
- olivessdu/layout_discovery_section
- olivesbdh/layout_discovery_section
layout_discovery_section:
version: VERSION
@ -220,7 +220,7 @@ messages:
js:
js/messages.js: {}
dependencies:
- olivessdu/global-styling
- olivesbdh/global-styling
navigation-base:
version: VERSION
@ -243,7 +243,7 @@ navigation-primary:
js/second-level-navigation.js: {}
js/nav-resize.js: {}
dependencies:
- olivessdu/navigation-base
- olivesbdh/navigation-base
navigation-secondary:
version: VERSION
@ -283,7 +283,7 @@ search-wide:
js:
js/search.js: {}
dependencies:
- olivessdu/navigation-primary
- olivesbdh/navigation-primary
sidebar:
version: VERSION

15
olivesbdh.post_update.php

@ -0,0 +1,15 @@
<?php
/**
* @file
* Post update functions for Olivesbdh.
*/
/**
* Sets the default `base_primary_color` value of Olivesbdh's theme settings.
*/
function olivesbdh_post_update_add_olivesbdh_primary_color() {
\Drupal::configFactory()->getEditable('olivesbdh.settings')
->set('base_primary_color', '#1b9ae4')
->save();
}

102
olivessdu.theme → olivesbdh.theme

@ -2,10 +2,10 @@
/**
* @file
* Functions to support theming in the Olivessdu theme.
* Functions to support theming in the Olivesbdh theme.
*/
use Drupal\olivessdu\OlivessduPreRender;
use Drupal\olivesbdh\OlivesbdhPreRender;
use Drupal\Component\Utility\Html;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Template\Attribute;
@ -17,19 +17,19 @@ use Drupal\user\UserInterface;
*
* Adds body classes if certain regions have content.
*/
function olivessdu_preprocess_html(&$variables) {
function olivesbdh_preprocess_html(&$variables) {
if (theme_get_setting('mobile_menu_all_widths') === 1) {
$variables['attributes']['class'][] = 'is-always-mobile-nav';
}
// Convert custom hex to hsl so we can use the hue value
$brand_color_hex = theme_get_setting('base_primary_color') ?? '#1b9ae4';
[$h, $s, $l] = _olivessdu_hex_to_hsl($brand_color_hex);
[$h, $s, $l] = _olivesbdh_hex_to_hsl($brand_color_hex);
$variables['html_attributes']->setAttribute('style', "--color--primary-hue:$h;--color--primary-saturation:$s%;--color--primary-lightness:$l");
// So fonts can be preloaded from base theme in the event Olivessdu is used as a subtheme.
$variables['olivessdu_path'] = \Drupal::request()->getBasePath() . '/' . \Drupal::service('extension.list.theme')->getPath('olivessdu');
// So fonts can be preloaded from base theme in the event Olivesbdh is used as a subtheme.
$variables['olivesbdh_path'] = \Drupal::request()->getBasePath() . '/' . \Drupal::service('extension.list.theme')->getPath('olivesbdh');
$query_string = \Drupal::state()->get('system.css_js_query_string') ?: '0';
@ -41,7 +41,7 @@ function olivessdu_preprocess_html(&$variables) {
'#tag' => 'link',
'#attributes' => [
'rel' => 'stylesheet',
'href' => $variables['olivessdu_path'] . '/css/components/navigation/nav-primary-no-js.css?' . $query_string,
'href' => $variables['olivesbdh_path'] . '/css/components/navigation/nav-primary-no-js.css?' . $query_string,
],
];
}
@ -50,7 +50,7 @@ function olivessdu_preprocess_html(&$variables) {
/**
* Implements hook_preprocess_HOOK() for page title templates.
*/
function olivessdu_preprocess_page_title(&$variables) {
function olivesbdh_preprocess_page_title(&$variables) {
// Since the title and the shortcut link are both block level elements,
// positioning them next to each other is much simpler with a wrapper div.
if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
@ -79,7 +79,7 @@ function olivessdu_preprocess_page_title(&$variables) {
/**
* Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
*/
function olivessdu_preprocess_maintenance_page(&$variables) {
function olivesbdh_preprocess_maintenance_page(&$variables) {
// By default, site_name is set to Drupal if no db connection is available
// or during site installation. Setting site_name to an empty string makes
// the site and update pages look cleaner.
@ -88,14 +88,14 @@ function olivessdu_preprocess_maintenance_page(&$variables) {
$variables['site_name'] = '';
}
// Olivessdu has custom styling for the maintenance page.
$variables['#attached']['library'][] = 'olivessdu/maintenance-page';
// Olivesbdh has custom styling for the maintenance page.
$variables['#attached']['library'][] = 'olivesbdh/maintenance-page';
}
/**
* Implements hook_preprocess_HOOK() for node.html.twig.
*/
function olivessdu_preprocess_node(&$variables) {
function olivesbdh_preprocess_node(&$variables) {
// Remove the "Add new comment" link on teasers or when the comment form is
// displayed on the page.
if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) {
@ -104,7 +104,7 @@ function olivessdu_preprocess_node(&$variables) {
// Apply custom date formatter to "date" field.
if (!empty($variables['date']) && !empty($variables['display_submitted']) && $variables['display_submitted'] === TRUE) {
$variables['date'] = \Drupal::service('date.formatter')->format($variables['node']->getCreatedTime(), 'olivessdu_medium');
$variables['date'] = \Drupal::service('date.formatter')->format($variables['node']->getCreatedTime(), 'olivesbdh_medium');
}
// Pass layout variable to template if content type is article in full view
@ -118,7 +118,7 @@ function olivessdu_preprocess_node(&$variables) {
/**
* Implements hook_preprocess_HOOK() for block.html.twig.
*/
function olivessdu_preprocess_block(&$variables) {
function olivesbdh_preprocess_block(&$variables) {
if (!empty($variables['elements']['#id'])) {
/** @var \Drupal\block\BlockInterface $block */
$block = \Drupal::entityTypeManager()
@ -130,17 +130,17 @@ function olivessdu_preprocess_block(&$variables) {
if ($variables['base_plugin_id'] === 'system_menu_block') {
$variables['content']['#attributes']['region'] = $region;
if ($region === 'sidebar') {
$variables['#attached']['library'][] = 'olivessdu/menu-sidebar';
$variables['#attached']['library'][] = 'olivesbdh/menu-sidebar';
}
}
if ($variables['base_plugin_id'] === 'search_form_block') {
if ($region === 'primary_menu') {
$variables['#attached']['library'][] = 'olivessdu/search-narrow';
$variables['#attached']['library'][] = 'olivesbdh/search-narrow';
$variables['content']['actions']['submit']['#theme_wrappers'] = ['input__submit__header_search'];
}
elseif ($region === 'secondary_menu') {
$variables['#attached']['library'][] = 'olivessdu/search-wide';
$variables['#attached']['library'][] = 'olivesbdh/search-wide';
$variables['content']['actions']['submit']['#theme_wrappers'] = ['input__submit__header_search'];
}
}
@ -167,7 +167,7 @@ function olivessdu_preprocess_block(&$variables) {
/**
* Implements hook_theme_suggestions_HOOK_alter() for menu.
*/
function olivessdu_theme_suggestions_menu_alter(&$suggestions, array $variables) {
function olivesbdh_theme_suggestions_menu_alter(&$suggestions, array $variables) {
if (isset($variables['attributes']['region'])) {
$suggestions[] = 'menu__' . $variables['attributes']['region'];
}
@ -176,7 +176,7 @@ function olivessdu_theme_suggestions_menu_alter(&$suggestions, array $variables)
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_menu(&$variables) {
function olivesbdh_preprocess_menu(&$variables) {
if (isset($variables['attributes']['region'])) {
if ($variables['attributes']['region'] === 'sidebar') {
$variables['attributes']['class'][] = 'menu--sidebar';
@ -188,7 +188,7 @@ function olivessdu_preprocess_menu(&$variables) {
/**
* Implements hook_theme_suggestions_HOOK_alter() for form templates.
*/
function olivessdu_theme_suggestions_form_alter(array &$suggestions, array $variables) {
function olivesbdh_theme_suggestions_form_alter(array &$suggestions, array $variables) {
if ($variables['element']['#form_id'] === 'search_block_form') {
$suggestions[] = 'form__search_block_form';
}
@ -197,7 +197,7 @@ function olivessdu_theme_suggestions_form_alter(array &$suggestions, array $vari
/**
* Implements hook_form_alter() for adding classes and placeholder text to the search forms.
*/
function olivessdu_form_alter(&$form, FormStateInterface $form_state, $form_id) {
function olivesbdh_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (isset($form['actions']['submit']) && (count($form['actions'])) <= 2) {
$form['actions']['submit']['#attributes']['class'][] = 'button--primary';
}
@ -222,7 +222,7 @@ function olivessdu_form_alter(&$form, FormStateInterface $form_state, $form_id)
/**
* Implements hook_theme_suggestions_HOOK_alter() for block().
*/
function olivessdu_theme_suggestions_block_alter(&$suggestions, array $variables) {
function olivesbdh_theme_suggestions_block_alter(&$suggestions, array $variables) {
if (!empty($variables['elements']['#id'])) {
/** @var \Drupal\block\BlockInterface $block */
@ -245,7 +245,7 @@ function olivessdu_theme_suggestions_block_alter(&$suggestions, array $variables
/**
* Implements hook_preprocess_HOOK() for menu-local-tasks templates.
*/
function olivessdu_preprocess_menu_local_tasks(&$variables) {
function olivesbdh_preprocess_menu_local_tasks(&$variables) {
foreach (Element::children($variables['primary']) as $key) {
$variables['primary'][$key]['#level'] = 'primary';
}
@ -257,7 +257,7 @@ function olivessdu_preprocess_menu_local_tasks(&$variables) {
/**
* Implements hook_preprocess_form_element().
*/
function olivessdu_preprocess_form_element(&$variables) {
function olivesbdh_preprocess_form_element(&$variables) {
if (in_array($variables['element']['#type'] ?? FALSE, ['checkbox', 'radio'], TRUE)) {
$variables['attributes']['class'][] = 'form-type-boolean';
}
@ -274,14 +274,14 @@ function olivessdu_preprocess_form_element(&$variables) {
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_form_element_label(&$variables) {
function olivesbdh_preprocess_form_element_label(&$variables) {
$variables['attributes']['class'][] = 'form-item__label';
}
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_input(&$variables) {
function olivesbdh_preprocess_input(&$variables) {
if (
!empty($variables['element']['#title_display']) &&
$variables['element']['#title_display'] === 'attribute' &&
@ -330,7 +330,7 @@ function olivessdu_preprocess_input(&$variables) {
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_textarea(&$variables) {
function olivesbdh_preprocess_textarea(&$variables) {
$variables['attributes']['class'][] = 'form-element';
$variables['attributes']['class'][] = 'form-element--type-textarea';
$variables['attributes']['class'][] = 'form-element--api-textarea';
@ -339,7 +339,7 @@ function olivessdu_preprocess_textarea(&$variables) {
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_select(&$variables) {
function olivesbdh_preprocess_select(&$variables) {
$variables['attributes']['class'][] = 'form-element';
$variables['attributes']['class'][] = $variables['element']['#multiple'] ?
'form-element--type-select-multiple' :
@ -349,21 +349,21 @@ function olivessdu_preprocess_select(&$variables) {
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_checkboxes(&$variables) {
function olivesbdh_preprocess_checkboxes(&$variables) {
$variables['attributes']['class'][] = 'form-boolean-group';
}
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_radios(&$variables) {
function olivesbdh_preprocess_radios(&$variables) {
$variables['attributes']['class'][] = 'form-boolean-group';
}
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_field(&$variables) {
function olivesbdh_preprocess_field(&$variables) {
$rich_field_types = ['text_with_summary', 'text', 'text_long'];
if (in_array($variables['field_type'], $rich_field_types, TRUE)) {
@ -378,7 +378,7 @@ function olivessdu_preprocess_field(&$variables) {
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_field_multiple_value_form(&$variables) {
function olivesbdh_preprocess_field_multiple_value_form(&$variables) {
// Make disabled available for the template.
$variables['disabled'] = !empty($variables['element']['#disabled']);
@ -433,7 +433,7 @@ function olivessdu_preprocess_field_multiple_value_form(&$variables) {
/**
* Implements hook_preprocess_HOOK() for menu-local-task templates.
*/
function olivessdu_preprocess_menu_local_task(&$variables) {
function olivesbdh_preprocess_menu_local_task(&$variables) {
$variables['link']['#options']['attributes']['class'][] = 'tabs__link';
$variables['link']['#options']['attributes']['class'][] = 'js-tabs-link';
@ -452,7 +452,7 @@ function olivessdu_preprocess_menu_local_task(&$variables) {
/**
* Implements template_preprocess_HOOK() for fieldset.
*/
function olivessdu_preprocess_fieldset(&$variables) {
function olivesbdh_preprocess_fieldset(&$variables) {
$element = $variables['element'];
$composite_types = ['checkboxes', 'radios'];
@ -485,14 +485,14 @@ function olivessdu_preprocess_fieldset(&$variables) {
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
function olivessdu_theme_suggestions_user_alter(&$suggestions, $variables) {
function olivesbdh_theme_suggestions_user_alter(&$suggestions, $variables) {
$suggestions[] = 'user__' . $variables['elements']['#view_mode'];
}
/**
* Implements hook_preprocess_HOOK().
*/
function olivessdu_preprocess_field__node__created(&$variables) {
function olivesbdh_preprocess_field__node__created(&$variables) {
foreach (Element::children($variables['items']) as $item) {
unset($variables['items'][$item]['content']['#prefix']);
}
@ -501,14 +501,14 @@ function olivessdu_preprocess_field__node__created(&$variables) {
/**
* Implements hook_preprocess_HOOK() for setting classes.
*/
function olivessdu_preprocess_filter_caption(&$variables) {
function olivesbdh_preprocess_filter_caption(&$variables) {
$variables['classes'] = isset($variables['classes']) && !empty($variables['classes']) ? $variables['classes'] . ' caption' : 'caption';
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function olivessdu_form_node_preview_form_select_alter(&$form, FormStateInterface $form_state, $form_id) {
function olivesbdh_form_node_preview_form_select_alter(&$form, FormStateInterface $form_state, $form_id) {
$form['backlink']['#options']['attributes']['class'][] = 'button';
$form['backlink']['#options']['attributes']['class'][] = 'button--small';
$form['backlink']['#options']['attributes']['class'][] = 'button--icon-back';
@ -519,7 +519,7 @@ function olivessdu_form_node_preview_form_select_alter(&$form, FormStateInterfac
/**
* Implements hook_preprocess_HOOK() for comment.html.twig.
*/
function olivessdu_preprocess_comment(&$variables) {
function olivesbdh_preprocess_comment(&$variables) {
// Getting the node creation time stamp from the comment object.
$date = $variables['comment']->getCreatedTime();
// Formatting "created" as "X days ago".
@ -529,7 +529,7 @@ function olivessdu_preprocess_comment(&$variables) {
/**
* Implements hook_preprocess_HOOK() for field--comment.html.twig.
*/
function olivessdu_preprocess_field__comment(&$variables) {
function olivesbdh_preprocess_field__comment(&$variables) {
// Add a comment_count.
$variables['comment_count'] = count(array_filter($variables['comments'], 'is_numeric', ARRAY_FILTER_USE_KEY));
@ -550,13 +550,13 @@ function olivessdu_preprocess_field__comment(&$variables) {
/**
* Implements hook_element_info_alter().
*/
function olivessdu_element_info_alter(&$info) {
function olivesbdh_element_info_alter(&$info) {
if (array_key_exists('text_format', $info)) {
$info['text_format']['#pre_render'][] = [OlivessduPreRender::class, 'textFormat'];
$info['text_format']['#pre_render'][] = [OlivesbdhPreRender::class, 'textFormat'];
}
if (isset($info['status_messages'])) {
$info['status_messages']['#pre_render'][] = [OlivessduPreRender::class, 'messagePlaceholder'];
$info['status_messages']['#pre_render'][] = [OlivesbdhPreRender::class, 'messagePlaceholder'];
}
}
@ -565,7 +565,7 @@ function olivessdu_element_info_alter(&$info) {
*
* @todo Remove when https://www.drupal.org/node/3016343 is fixed.
*/
function olivessdu_preprocess_text_format_wrapper(&$variables) {
function olivesbdh_preprocess_text_format_wrapper(&$variables) {
$description_attributes = [];
if (!empty($variables['attributes']['id'])) {
$description_attributes['id'] = $variables['attributes']['aria-describedby'] = $variables['attributes']['id'];
@ -577,17 +577,17 @@ function olivessdu_preprocess_text_format_wrapper(&$variables) {
/**
* Implements hook_preprocess_search_result().
*/
function olivessdu_preprocess_search_result(&$variables) {
function olivesbdh_preprocess_search_result(&$variables) {
// Apply custom date formatter to "date" field.
if (!empty($variables['result']['date'])) {
$variables['info_date'] = \Drupal::service('date.formatter')->format($variables['result']['node']->getCreatedTime(), 'olivessdu_medium');
$variables['info_date'] = \Drupal::service('date.formatter')->format($variables['result']['node']->getCreatedTime(), 'olivesbdh_medium');
}
}
/**
* Implements hook_preprocess_links__comment().
*/
function olivessdu_preprocess_links__comment(&$variables) {
function olivesbdh_preprocess_links__comment(&$variables) {
foreach ($variables['links'] as &$link) {
$link['link']['#options']['attributes']['class'][] = 'comment__links-link';
}
@ -596,7 +596,7 @@ function olivessdu_preprocess_links__comment(&$variables) {
/**
* Implements hook_preprocess_table().
*/
function olivessdu_preprocess_table(&$variables) {
function olivesbdh_preprocess_table(&$variables) {
// Mark the whole table and the first cells if rows are draggable.
if (!empty($variables['rows'])) {
$draggable_row_found = FALSE;
@ -615,7 +615,7 @@ function olivessdu_preprocess_table(&$variables) {
/**
* Implements hook_form_views_exposed_form_alter().
*/
function olivessdu_form_views_exposed_form_alter(&$form) {
function olivesbdh_form_views_exposed_form_alter(&$form) {
$form['#attributes']['class'][] = 'form--inline';
}
@ -638,7 +638,7 @@ function olivessdu_form_views_exposed_form_alter(&$form) {
*
* @internal
*/
function _olivessdu_hex_to_hsl(string $hex_string) {
function _olivesbdh_hex_to_hsl(string $hex_string) {
// Convert hexcode pairs to rgb values (0-255).
$hex_val = trim($hex_string, '#');
$r0 = hexdec($hex_val[0] . $hex_val[1]);
@ -699,7 +699,7 @@ function _olivessdu_hex_to_hsl(string $hex_string) {
}
/*
function olivessdu_preprocess_mirador(&$variables) {
function olivesbdh_preprocess_mirador(&$variables) {
$block = \Drupal::service('plugin.manager.block')->createInstance($viewer . 'mirador_block', [
'iiif_manifest_url' => "/node/$manifest_nid/manifest-single",
'thumbnail_navigation_position' => 'hidden',

15
olivessdu.post_update.php

@ -1,15 +0,0 @@
<?php
/**
* @file
* Post update functions for Olivessdu.
*/
/**
* Sets the default `base_primary_color` value of Olivessdu's theme settings.
*/
function olivessdu_post_update_add_olivessdu_primary_color() {
\Drupal::configFactory()->getEditable('olivessdu.settings')
->set('base_primary_color', '#1b9ae4')
->save();
}

2
package.json

@ -1,5 +1,5 @@
{
"name": "Olivessdu",
"name": "Olivesbdh",
"engines": {
"yarn": ">= 1.6",
"node": ">= 12.0"

6
src/OlivessduPreRender.php → src/OlivesbdhPreRender.php

@ -1,15 +1,15 @@
<?php
namespace Drupal\olivessdu;
namespace Drupal\olivesbdh;
use Drupal\Core\Security\TrustedCallbackInterface;
/**
* Implements trusted prerender callbacks for the Olivessdu theme.
* Implements trusted prerender callbacks for the Olivesbdh theme.
*
* @internal
*/
class OlivessduPreRender implements TrustedCallbackInterface {
class OlivesbdhPreRender implements TrustedCallbackInterface {
/**
* Prerender callback for text_format elements.

2
templates/block/block--islandora-mirador.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's implementation to display a block.
* Olivesbdh's implementation to display a block.
*
* Available variables:
* - layout: String that will determine the layout of the block.

2
templates/block/block--olivessdu-maparchiveslpblock.html.twig → templates/block/block--olivesbdh-learnmorelpblock.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's implementation to display a block.
* Olivesbdh's implementation to display a block.
*
* Available variables:
* - layout: String that will determine the layout of the block.

2
templates/block/block--olivessdu-learnmorelpblock.html.twig → templates/block/block--olivesbdh-maparchiveslpblock.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's implementation to display a block.
* Olivesbdh's implementation to display a block.
*
* Available variables:
* - layout: String that will determine the layout of the block.

2
templates/block/block--page-title-block.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's implementation to display a block.
* Olivesbdh's implementation to display a block.
*
* Available variables:
* - layout: String that will determine the layout of the block.

2
templates/block/block--primary-menu--plugin-id--search-form-block.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation for a search form block in the Primary Menu region.
* Olivesbdh's theme implementation for a search form block in the Primary Menu region.
*
* Available variables:
* - plugin_id: The ID of the block implementation.

2
templates/block/block--search-form-block.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation for a search form block.
* Olivesbdh's theme implementation for a search form block.
*
* Available variables:
* - content: The content of this block.

2
templates/block/block--secondary-menu--plugin-id--search-form-block.html.twig

@ -36,7 +36,7 @@
{{ title_suffix }}
{% block content %}
<button class="block-search-wide__button" aria-label="{{ 'Search Form'|t }}" data-drupal-selector="block-search-wide-button">
{% include "@olivessdu/../images/search.svg" %}
{% include "@olivesbdh/../images/search.svg" %}
<span class="block-search-wide__button-close"></span>
</button>

2
templates/block/block--secondary-menu.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's override for the User Account Menu navigation block.
* Olivesbdh's override for the User Account Menu navigation block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.

2
templates/block/block--system-branding-block.html.twig

@ -2,7 +2,7 @@
{#
/**
* @file
* Olivessdu's theme implementation for a branding block.
* Olivesbdh's theme implementation for a branding block.
*
* Each branding element variable (logo, name, slogan) is only available if
* enabled in the block configuration.

2
templates/block/block--system-menu-block.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's override for the main menu navigation block.
* Olivesbdh's override for the main menu navigation block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.

6
templates/block/block--system-powered-by-block.html.twig

@ -2,7 +2,7 @@
{#
/**
* @file
* Olivessdu's theme implementation for Powered by Drupal block.
* Olivesbdh's theme implementation for Powered by Drupal block.
*
* The Powered by Drupal block is an optional link to the home page of the
* Drupal project.
@ -10,12 +10,12 @@
*/
#}
{% block content %}
{{ attach_library('olivessdu/powered-by-block') }}
{{ attach_library('olivesbdh/powered-by-block') }}
<span>
{% trans %}Powered by{% endtrans %}
<a href="https://www.drupal.org">{% trans %}Drupal{% endtrans %}</a>
<span class="drupal-logo" role="img" aria-label="{{ 'Drupal Logo'|t }}">
{% include "@olivessdu/../images/drupal.svg" %}
{% include "@olivesbdh/../images/drupal.svg" %}
</span>
</span>
{% endblock %}

2
templates/block/block.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's implementation to display a block.
* Olivesbdh's implementation to display a block.
*
* Available variables:
* - layout: String that will determine the layout of the block.

4
templates/content/comment.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation for comments.
* Olivesbdh's theme implementation for comments.
*
* Available variables:
* - author: (optional) Comment author. Can be a link or plain text.
@ -76,7 +76,7 @@
author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author',
]
%}
{{ attach_library('olivessdu/comments') }}
{{ attach_library('olivesbdh/comments') }}
<article {{ attributes.addClass(classes).setAttribute('role', 'article').setAttribute('data-drupal-selector', 'comment') }}>
{#
Hide the "new" indicator by default, let a piece of JavaScript ask the

2
templates/content/node--teaser.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation to display a node teaser.
* Olivesbdh's theme implementation to display a node teaser.
*
* Available variables:
* - node: The node entity with limited access to object properties and methods.

2
templates/content/node.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation to display a node.
* Olivesbdh's theme implementation to display a node.
*
* Available variables:
* - node: The node entity with limited access to object properties and methods.

2
templates/content/page-title.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation for a page title.
* Olivesbdh's theme implementation for a page title.
*
* Available variables:
* - title_attributes: HTML attributes for the page title element.

2
templates/content/search-result.html.twig

@ -55,7 +55,7 @@
* @see template_preprocess_search_result()
*/
#}
{{ attach_library('olivessdu/search-results') }}
{{ attach_library('olivesbdh/search-results') }}
{% if info_split %}
<div class="search-result__meta">
{% if info_split.user %}

2
templates/dataset/forums.html.twig

@ -14,7 +14,7 @@
* @see template_preprocess_forums()
*/
#}
{{ attach_library('olivessdu/forum') }}
{{ attach_library('olivesbdh/forum') }}
{% if forums_defined %}
<div class="forum">
{{ forums }}

2
templates/field/field--comment-body.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme override for comment body field.
* Olivesbdh's theme override for comment body field.
*
* Available variables:
* - attributes: HTML attributes for the containing element.

2
templates/field/field--comment.html.twig

@ -28,7 +28,7 @@
*/
#}
{{ attach_library('olivessdu/comments') }}
{{ attach_library('olivesbdh/comments') }}
<section{{ attributes.setAttribute('data-drupal-selector', 'comments').addClass('comments') }}>
{% if not label_hidden %}

4
templates/field/field--node--field-tags.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu theme override for tags field.
* Olivesbdh theme override for tags field.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
@ -37,7 +37,7 @@
]
%}
{{ attach_library('olivessdu/tags') }}
{{ attach_library('olivesbdh/tags') }}
<div{{ attributes.addClass(classes) }}>
{% if not label_hidden %}
<h3{{ title_attributes.addClass(title_classes) }}>{{ label }}</h3>

10
templates/form/details.html.twig

@ -13,17 +13,17 @@
* - value: (optional) The value of the element, may not be set.
*
* @see template_preprocess_details()
* @see olivessdu_preprocess_details()
* @see olivesbdh_preprocess_details()
*/
#}
{%
set classes = [
'olivessdu-details',
'olivesbdh-details',
]
%}
{%
set content_wrapper_classes = [
'olivessdu-details__wrapper',
'olivesbdh-details__wrapper',
'details-wrapper',
]
%}
@ -31,7 +31,7 @@
{%- if title -%}
{%
set summary_classes = [
'olivessdu-details__summary',
'olivesbdh-details__summary',
required ? 'js-form-required',
required ? 'form-required',
]
@ -50,7 +50,7 @@
</div>
{% endif %}
{%- if description -%}
<div class="olivessdu-details__description">{{ description }}</div>
<div class="olivesbdh-details__description">{{ description }}</div>
{%- endif -%}
{%- if children -%}
{{ children }}

2
templates/form/fieldset.html.twig

@ -26,7 +26,7 @@
* - inline_items: Boolean indicating whether the <fieldset> items are inline.
*
* @see template_preprocess_fieldset()
* @see olivessdu_preprocess_fieldset()
* @see olivesbdh_preprocess_fieldset()
*/
#}
{%

2
templates/includes/get-started.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme Get Started section.
* Olivesbdh's theme Get Started section.
*
* This section is enabled when no front page content has been populated.
*

4
templates/includes/lp-banner.html.twig

@ -1,7 +1,7 @@
<div class="hero--wrapper">
<div class="hero-section" style="background:url(/themes/custom/olivessdu/images/pei_map_banner.jpg) 50% no-repeat;">
<div class="hero-section" style="background:url(/themes/custom/olivesbdh/images/pei_map_banner.jpg) 50% no-repeat;">
<div class="logo-wrapper">
<figure class="logo--ilivessdu">
<figure class="logo--ilivesbdh">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 400 250" style="enable-background:new 0 0 400 250;" xml:space="preserve">
<style type="text/css">

6
templates/includes/lp-banner.html.twig.old

File diff suppressed because one or more lines are too long

22
templates/includes/preload.twig

@ -4,17 +4,17 @@
* Preload the non-bold & non-italic fonts for the headings and the body copy.
*
* Available variables:
* - olivessdu_path: Returns the path to the Olivessdu theme.
* - olivesbdh_path: Returns the path to the Olivesbdh theme.
*/
#}
<link rel="preload" href="{{ olivessdu_path }}/fonts/metropolis/Metropolis-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivessdu_path }}/fonts/metropolis/Metropolis-SemiBold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivessdu_path }}/fonts/metropolis/Metropolis-Bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivessdu_path }}/fonts/lora/lora-v14-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
{#<link rel="preload" href="{{ olivessdu_path }}/fonts/LibreBodoni-Bold.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivessdu_path }}/fonts/LibreBodoni-Italic.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivessdu_path }}/fonts/LibreBodoni-Regular.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivessdu_path }}/fonts/SourceSans3-Bold.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivessdu_path }}/fonts/SourceSans3-Regular.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivessdu_path }}/fonts/SourceSans3-Italic.woff2" as="font" type="font/woff2" crossorigin>#}
<link rel="preload" href="{{ olivesbdh_path }}/fonts/metropolis/Metropolis-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivesbdh_path }}/fonts/metropolis/Metropolis-SemiBold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivesbdh_path }}/fonts/metropolis/Metropolis-Bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivesbdh_path }}/fonts/lora/lora-v14-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
{#<link rel="preload" href="{{ olivesbdh_path }}/fonts/LibreBodoni-Bold.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivesbdh_path }}/fonts/LibreBodoni-Italic.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivesbdh_path }}/fonts/LibreBodoni-Regular.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivesbdh_path }}/fonts/SourceSans3-Bold.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivesbdh_path }}/fonts/SourceSans3-Regular.woff2" as="font" type="font/woff2" crossorigin>#}
{#<link rel="preload" href="{{ olivesbdh_path }}/fonts/SourceSans3-Italic.woff2" as="font" type="font/woff2" crossorigin>#}

4
templates/layout/html.html.twig

@ -19,7 +19,7 @@
* - db_offline: A flag indicating if the database is offline.
* - placeholder_token: The token for generating head, css, js and js-bottom
* placeholders.
* - olivessdu_path: Returns the path to an Olivessdu theme.
* - olivesbdh_path: Returns the path to an Olivesbdh theme.
* - noscript_styles: <noscript> content.
*
* @see template_preprocess_html()
@ -40,7 +40,7 @@
<title>{{ head_title|safe_join(' | ') }}</title>
<css-placeholder token="{{ placeholder_token }}">
<js-placeholder token="{{ placeholder_token }}">
{% include '@olivessdu/includes/preload.twig' with { olivessdu_path: olivessdu_path } only %}
{% include '@olivesbdh/includes/preload.twig' with { olivesbdh_path: olivesbdh_path } only %}
{{ noscript_styles }}
</head>
<body{{ attributes.addClass(body_classes) }}>

4
templates/layout/page--front.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation to display a single page.
* Olivesbdh's theme implementation to display a single page.
*
* The doctype, html, head and body tags are not in this template. Instead they
* can be found in the html.html.twig template normally located in the
@ -94,7 +94,7 @@
<div class="main-content">
<a id="main-content" tabindex="-1"></a>
{{ page.hero }}
{% include '@olivessdu/includes/lp-banner.html.twig' %}
{% include '@olivesbdh/includes/lp-banner.html.twig' %}
<div class="main-content__container container">
{{ page.highlighted }}
{{ page.breadcrumb }}

2
templates/layout/page.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme implementation to display a single page.
* Olivesbdh's theme implementation to display a single page.
*
* The doctype, html, head and body tags are not in this template. Instead they
* can be found in the html.html.twig template normally located in the

2
templates/layout/region--breadcrumb.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme override to display the breadcrumb region.
* Olivesbdh's theme override to display the breadcrumb region.
*
* Available variables:
* - content: The content for this region, typically blocks.

2
templates/layout/region--content-above.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme override to display the content above region.
* Olivesbdh's theme override to display the content above region.
*
* Available variables:
* - content: The content for this region, typically blocks.

4
templates/layout/region--content-below.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme override to display the content below region.
* Olivesbdh's theme override to display the content below region.
*
* Available variables:
* - content: The content for this region, typically blocks.
@ -19,7 +19,7 @@
]
%}
{{ attach_library('olivessdu/content-below') }}
{{ attach_library('olivesbdh/content-below') }}
{% if content %}
<div{{ attributes.addClass(classes) }}>

2
templates/layout/region--content.html.twig

@ -1,7 +1,7 @@
{#
/**
* @file
* Olivessdu's theme override to display the content region.
* Olivesbdh's theme override to display the content region.
*
* Available variables:
* - content: The content for this region, typically blocks.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save