Browse Source

menu breakoints

master
rdrew 9 hours ago
parent
commit
ce4e7d82b3
  1. 2
      .php-cs-fixer.cache
  2. 21
      AGENTS.md
  3. 4
      css/components/header-buttons-mobile.css
  4. 4
      css/components/header-navigation.css
  5. 31
      css/components/islandora_mods.css
  6. 2
      css/components/navigation/nav-primary-button.css
  7. 4
      css/components/navigation/nav-primary-wide.css
  8. 5
      css/components/navigation/nav-primary.css
  9. 2
      oliveskspaces.breakpoints.yml

2
.php-cs-fixer.cache

@ -1 +1 @@
{"php":"8.5.6","version":"3.94.2","indent":" ","lineEnding":"\n","rules":{"nullable_type_declaration":true,"operator_linebreak":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":true,"attribute_block_no_spaces":true,"cast_spaces":true,"concat_space":{"spacing":"one"},"function_declaration":{"closure_fn_spacing":"none"},"method_argument_space":{"after_heredoc":false},"new_with_parentheses":{"anonymous_class":false},"single_line_empty_body":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const","const_import","do","else","elseif","enum","final","finally","for","foreach","function","function_import","if","insteadof","interface","match","named_argument","namespace","new","private","protected","public","readonly","static","switch","trait","try","type_colon","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["arguments","array_destructuring","arrays","match","parameters"]},"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_anonymous_functions":false,"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{".conform.2686488.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.1386336.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.6013459.oliveskspaces.theme":"3b1f0e53ce3e89d253dcd965c03484d0",".conform.1117317.oliveskspaces.theme":"92804bfb350085c2200e3e286e0d60f1",".conform.6178012.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.5225526.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.9127829.oliveskspaces.theme":"4371758f7cd8d36b1c7151c229ffec89",".conform.2331781.oliveskspaces.theme":"8319af8e40687bb01a3d08fc9de02a77",".conform.9882494.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.2836943.oliveskspaces.theme":"78daf0be673c47afce5084a9037e194e",".conform.2934848.oliveskspaces.theme":"06748a57e2f11f3c33ca14e5260441ff",".conform.4085354.oliveskspaces.theme":"190cf050a58bf0ecb18a334a7c3af624",".conform.9630384.oliveskspaces.theme":"21e8bd79790c2438e37f6df14ddee0bd",".conform.8186638.oliveskspaces.theme":"d6e445698775f91be6bae9f0aa1994bc",".conform.7082070.oliveskspaces.theme":"4bb06ce5bdf3859dc02e8126ce304741",".conform.2085665.oliveskspaces.theme":"5c4af3364ab8979c8ad2a1af548d7891",".conform.9160820.oliveskspaces.theme":"0ead26ab1318509388c979a5600e9f50",".conform.4215051.oliveskspaces.theme":"d6fbe731e351c4f5ef0bf0b73ab2f8e7",".conform.1629603.oliveskspaces.theme":"baf83382ad68d3cd9c69d88ef8e3d10d",".conform.2799195.oliveskspaces.theme":"d7918fe4351e70825422ed42782877c1",".conform.4183032.oliveskspaces.theme":"223967bb3388cac44bb16d7515543ae0"}} {"php":"8.5.6","version":"3.94.2","indent":" ","lineEnding":"\n","rules":{"nullable_type_declaration":true,"operator_linebreak":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":true,"attribute_block_no_spaces":true,"cast_spaces":true,"concat_space":{"spacing":"one"},"function_declaration":{"closure_fn_spacing":"none"},"method_argument_space":{"after_heredoc":false},"new_with_parentheses":{"anonymous_class":false},"single_line_empty_body":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const","const_import","do","else","elseif","enum","final","finally","for","foreach","function","function_import","if","insteadof","interface","match","named_argument","namespace","new","private","protected","public","readonly","static","switch","trait","try","type_colon","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["arguments","array_destructuring","arrays","match","parameters"]},"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_anonymous_functions":false,"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{".conform.2686488.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.1386336.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.6013459.oliveskspaces.theme":"3b1f0e53ce3e89d253dcd965c03484d0",".conform.1117317.oliveskspaces.theme":"92804bfb350085c2200e3e286e0d60f1",".conform.6178012.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.5225526.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.9127829.oliveskspaces.theme":"4371758f7cd8d36b1c7151c229ffec89",".conform.2331781.oliveskspaces.theme":"8319af8e40687bb01a3d08fc9de02a77",".conform.9882494.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.2836943.oliveskspaces.theme":"78daf0be673c47afce5084a9037e194e",".conform.2934848.oliveskspaces.theme":"06748a57e2f11f3c33ca14e5260441ff",".conform.4085354.oliveskspaces.theme":"190cf050a58bf0ecb18a334a7c3af624",".conform.9630384.oliveskspaces.theme":"21e8bd79790c2438e37f6df14ddee0bd",".conform.8186638.oliveskspaces.theme":"d6e445698775f91be6bae9f0aa1994bc",".conform.7082070.oliveskspaces.theme":"4bb06ce5bdf3859dc02e8126ce304741",".conform.2085665.oliveskspaces.theme":"5c4af3364ab8979c8ad2a1af548d7891",".conform.9160820.oliveskspaces.theme":"0ead26ab1318509388c979a5600e9f50",".conform.4215051.oliveskspaces.theme":"d6fbe731e351c4f5ef0bf0b73ab2f8e7",".conform.1629603.oliveskspaces.theme":"baf83382ad68d3cd9c69d88ef8e3d10d",".conform.2799195.oliveskspaces.theme":"d7918fe4351e70825422ed42782877c1",".conform.4183032.oliveskspaces.theme":"223967bb3388cac44bb16d7515543ae0","node_modules\/flatted\/php\/flatted.php":"36a273c279e872bb55a000eb98bb59bc","oliveskspaces.post_update.php":"2d6b976801466cf9c6d8220043d75949","theme-settings.php":"bff993e4556a6f72675f9771811ab215","src\/OliveskspacesPreRender.php":"89c9e20bd1d483e893855d4f96ce21d1"}}

21
AGENTS.md

@ -0,0 +1,21 @@
# AGENTS.md
## Overview
Custom Drupal 10 theme for Kindred Spaces (`kspaces2.islandarchives.ca`), derived from Drupal core's Olivero.
## Toolchain & Workflow Gotchas
- **Direct Asset Editing**: Edit `.css` files in `css/` and `.js` files in `js/` directly. Do **not** run `yarn build` or `yarn build:css`/`watch`; `package.json` contains leftover Olivero scripts referencing a missing `scripts/` directory.
- **Local Dev Proxy**: Run `node bs.js` to start BrowserSync proxying `https://kspaces2.islandarchives.ca`.
- **Deployment**: `./deploy.sh "<commit message>"` automatically runs `git add --all`, commits, pushes, and executes remote `git pull` + `drush cr` on `kspaces2.islandarchives.ca`.
## Verification Commands
- **PHP Syntax Check**: `php -l oliveskspaces.theme && find . -not -path "*/node_modules/*" -name "*.php" -exec php -l {} \;`
- **PHP Code Style**: `php-cs-fixer fix --dry-run --diff .` (omit `--dry-run` to auto-fix).
## Codebase Architecture
- `oliveskspaces.info.yml`: Drupal 10 theme definition, region layouts, library overrides/extends.
- `oliveskspaces.libraries.yml`: CSS/JS asset bundle declarations (`global-styling`, `navigation-primary`, `color-picker`, etc.).
- `oliveskspaces.theme`: Main PHP theme file containing preprocess hooks (`html`, `block`, `mirador`), dynamic HSL primary color variable setting, and Islandora collection/model class alterations.
- `theme-settings.php`: Theme configuration form alters (color scheme options & mobile menu settings).
- `src/OliveskspacesPreRender.php`: Trusted `#pre_render` callbacks (`textFormat`, `messagePlaceholder`).
- `templates/`: Twig overrides for blocks, navigation, menus, forms, and views.

4
css/components/header-buttons-mobile.css

@ -28,14 +28,14 @@
} }
/* @media ((((min-width: 60rem)))) { */ /* @media ((((min-width: 60rem)))) { */
@media ((((min-width: 1300px)))) { @media ((((min-width: 1336px)))) {
.mobile-buttons { .mobile-buttons {
margin-block-start: var(--sp6); margin-block-start: var(--sp6);
} }
} }
/* @media ((((min-width: 60rem)))) { */ /* @media ((((min-width: 60rem)))) { */
@media ((((min-width: 1300px)))) { @media ((((min-width: 1336px)))) {
body:not(.is-always-mobile-nav) .mobile-buttons { body:not(.is-always-mobile-nav) .mobile-buttons {
display: none; display: none;
} }

4
css/components/header-navigation.css

@ -87,7 +87,7 @@ html.js .header-nav {
} }
/* @media ((((min-width: 60rem)))) { */ /* @media ((((min-width: 60rem)))) { */
@media ((((min-width: 1300px)))) { @media ((((min-width: 1336px)))) {
body:not(.is-always-mobile-nav) .header-nav { body:not(.is-always-mobile-nav) .header-nav {
position: static; position: static;
display: flex; display: flex;
@ -110,7 +110,7 @@ html.js .header-nav {
} }
/* @media ((((min-width: 60rem)))) { */ /* @media ((((min-width: 60rem)))) { */
@media ((((min-width: 1300px)))) { @media ((((min-width: 1336px)))) {
body.is-always-mobile-nav .header-nav { body.is-always-mobile-nav .header-nav {
overflow: auto; overflow: auto;
max-width: calc((7 * (var(--grid-col-width) + var(--grid-gap)))); max-width: calc((7 * (var(--grid-col-width) + var(--grid-gap))));

31
css/components/islandora_mods.css

@ -94,6 +94,7 @@ div#site-header__inner {
min-width: 0; /* prevents long text from breaking the flex container */ min-width: 0; /* prevents long text from breaking the flex container */
} }
} }
.node--type-islandora-object { .node--type-islandora-object {
/* display: none; */ /* display: none; */
@ -102,6 +103,7 @@ div#site-header__inner {
align-items: flex-start; /* keeps labels at the top of multi-line content */ align-items: flex-start; /* keeps labels at the top of multi-line content */
gap: 0.5em; gap: 0.5em;
} }
.field__label { .field__label {
--label-width: 6em; --label-width: 6em;
flex: 0 0 var(--label-width); flex: 0 0 var(--label-width);
@ -109,6 +111,7 @@ div#site-header__inner {
margin-right: 1em; /* gap before the content */ margin-right: 1em; /* gap before the content */
box-sizing: border-box; box-sizing: border-box;
} }
fieldset .field__label { fieldset .field__label {
--label-width: 11em; --label-width: 11em;
flex: 0 0 var(--label-width); flex: 0 0 var(--label-width);
@ -121,6 +124,7 @@ div#site-header__inner {
flex: 1; flex: 1;
min-width: 0; /* prevents long text from breaking the flex container */ min-width: 0; /* prevents long text from breaking the flex container */
} }
legend .field { legend .field {
margin: 0; margin: 0;
} }
@ -169,32 +173,39 @@ div#block-oliveskspaces-solrsearchcontentsearchresultspagerforblock {
div#block-oliveskspaces-solrsearchcontentadvancedsearchforblock h2 { div#block-oliveskspaces-solrsearchcontentadvancedsearchforblock h2 {
line-height: 1; line-height: 1;
} }
#block-oliveskspaces-book-navigation { #block-oliveskspaces-book-navigation {
li { li {
list-style-type: none; list-style-type: none;
} }
a { a {
text-decoration: none; text-decoration: none;
} }
ul { ul {
margin: 0; margin: 0;
font-weight: 600; font-weight: 600;
} }
ul * ul { ul * ul {
margin-left: 1em; margin-left: 1em;
font-weight: normal; font-weight: normal;
} }
a.is-active, a.is-active,
a:hover { a:hover {
background: #fff; background: #fff;
border-radius: 4px; border-radius: 4px;
display: block; display: block;
} }
a.is-active:before { a.is-active:before {
content: "-> "; content: "-> ";
font-weight: 600; font-weight: 600;
} }
} }
.facets-widget-links { .facets-widget-links {
ul { ul {
margin: 0; margin: 0;
@ -305,14 +316,16 @@ footer hr {
border: none; border: none;
background-color: var(--color--lmmi-tan--50); background-color: var(--color--lmmi-tan--50);
} }
/* main menu tweaks */
/* main menu tweaks */
span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-3 { span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-3 {
font-weight: 500; font-weight: 500;
} }
span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-3::after { span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-3::after {
border-top-width: initial !important; border-top-width: initial !important;
} }
span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-2 { span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-2 {
font-weight: bold; font-weight: bold;
} }
@ -320,28 +333,30 @@ span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-2 {
/* Bookshelf view */ /* Bookshelf view */
.bookshelf { .bookshelf {
.views-view-grid__item-inner { .views-view-grid__item-inner {
border: 1px solid #ccc;
padding: 4px;
padding: 8px; padding: 8px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 4px;
box-shadow: 0px 5px 11px -2px rgb(0 0 0 / 39%); box-shadow: 0px 5px 11px -2px rgb(0 0 0 / 39%);
} }
.bookshelf__image img { .bookshelf__image img {
width: 100%; width: 100%;
padding: 4px; padding: 4px;
border: 1px solid #ccc; border: 1px solid #ccc;
background: #ece8e3; background: #ece8e3;
} }
.bookshelf__title { .bookshelf__title {
margin: 0.4em 0; margin: 0.4em 0;
line-height: 1.2; line-height: 1.2;
a { a {
color: var(--color--lmmi-tan); color: var(--color--lmmi-tan);
text-decoration: none; text-decoration: none;
} }
} }
} }
span.mirador-third-party-html p { span.mirador-third-party-html p {
overflow-wrap: break-word; overflow-wrap: break-word;
word-wrap: break-word; /* Legacy support */ word-wrap: break-word; /* Legacy support */
@ -358,12 +373,14 @@ span.mirador-third-party-html p {
padding: 1em; padding: 1em;
border-radius: 4px; border-radius: 4px;
box-shadow: 0px 5px 11px -2px rgb(0 0 0 / 39%); box-shadow: 0px 5px 11px -2px rgb(0 0 0 / 39%);
.node__meta { .node__meta {
border-bottom: 1px dotted #bbb; border-bottom: 1px dotted #bbb;
margin-bottom: 0.8em; margin-bottom: 0.8em;
color: var(--color--lmmi-teal); color: var(--color--lmmi-teal);
padding-bottom: 1em; padding-bottom: 1em;
} }
.node__title { .node__title {
line-height: 1.2; line-height: 1.2;
border-bottom: 1px dotted #bbb; border-bottom: 1px dotted #bbb;
@ -373,8 +390,10 @@ span.mirador-third-party-html p {
color: var(--color--lmmi-tan); color: var(--color--lmmi-tan);
} }
} }
.node__content { .node__content {
padding-bottom: 1em; padding-bottom: 1em;
p { p {
line-height: 1.6; line-height: 1.6;
} }
@ -387,6 +406,7 @@ span.mirador-third-party-html p {
padding: 4px; padding: 4px;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
} }
figcaption { figcaption {
border: 1px solid #ccc; border: 1px solid #ccc;
padding: 4px; padding: 4px;
@ -394,16 +414,19 @@ span.mirador-third-party-html p {
border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;
} }
} }
.lmmi-works { .lmmi-works {
h3 { h3 {
margin: 0; margin: 0;
} }
td { td {
padding-block: 0.5em !important; padding-block: 0.5em !important;
} }
table { table {
margin: 0; margin: 0;
margin-bottom: 2em; margin-bottom: 2em;
} }
} }

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

@ -79,7 +79,7 @@
} }
/* @media ((((min-width: 60rem)))) { */ /* @media ((((min-width: 60rem)))) { */
@media ((((min-width: 1300px)))) { @media ((((min-width: 1336px)))) {
body:not(.is-always-mobile-nav) .primary-nav__button-toggle { body:not(.is-always-mobile-nav) .primary-nav__button-toggle {
flex-shrink: 0; flex-shrink: 0;
align-self: stretch; align-self: stretch;

4
css/components/navigation/nav-primary-wide.css

@ -11,7 +11,7 @@
*/ */
/* @media ((((min-width: 60rem)))) { */ /* @media ((((min-width: 60rem)))) { */
@media ((((min-width: 1300px)))) { @media ((((min-width: 1336px)))) {
body:not(.is-always-mobile-nav) .primary-nav__menu-item { body:not(.is-always-mobile-nav) .primary-nav__menu-item {
flex-wrap: nowrap; /* Ensure that sub navigation toggle button doesn't wrap underneath link. */ flex-wrap: nowrap; /* Ensure that sub navigation toggle button doesn't wrap underneath link. */
} }
@ -253,7 +253,7 @@
*/ */
/* @media ((((min-width: 60rem)))) { */ /* @media ((((min-width: 60rem)))) { */
@media ((((min-width: 1300px)))) { @media ((((min-width: 1336px)))) {
html.js body:not(.is-always-mobile-nav) .primary-nav__menu--level-2, html.js body:not(.is-always-mobile-nav) .primary-nav__menu--level-2,
html.js body:not(.is-always-mobile-nav) .primary-nav__menu-🥕 { html.js body:not(.is-always-mobile-nav) .primary-nav__menu-🥕 {
transition: visibility 0.2s, transform 0.2s, opacity 0.2s; transition: visibility 0.2s, transform 0.2s, opacity 0.2s;

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

@ -40,8 +40,8 @@
-webkit-text-decoration: none; -webkit-text-decoration: none;
text-decoration: none; text-decoration: none;
color: var(--color-text-neutral-loud); color: var(--color-text-neutral-loud);
font-size: 1.75rem; /* font-size: 1.75rem; */
/* font-size: 1.3em; */ font-size: 1.3em;
font-weight: bold; font-weight: bold;
line-height: var(--sp2); line-height: var(--sp2);
} }
@ -195,6 +195,7 @@
font-weight: normal; font-weight: normal;
line-height: var(--sp); line-height: var(--sp);
line-height: 1.2; line-height: 1.2;
font-size: 1.3em;
} }
html:not(.js) .primary-nav__menu--level-2 { html:not(.js) .primary-nav__menu--level-2 {

2
oliveskspaces.breakpoints.yml

@ -18,7 +18,7 @@ oliveskspaces.lg:
- 1x - 1x
oliveskspaces.xl: oliveskspaces.xl:
label: X-Large label: X-Large
mediaQuery: 'all and (min-width: 1300px)' mediaQuery: 'all and (min-width: 1336px)'
weight: 3 weight: 3
multipliers: multipliers:
- 1x - 1x

Loading…
Cancel
Save