From ce4e7d82b3185c1c88a2f5d42b0d92352bcdf8dc Mon Sep 17 00:00:00 2001 From: rdrew Date: Fri, 4 Dec 2026 15:06:17 -0400 Subject: [PATCH] menu breakoints --- .php-cs-fixer.cache | 2 +- AGENTS.md | 21 +++++++++++++ css/components/header-buttons-mobile.css | 4 +-- css/components/header-navigation.css | 4 +-- css/components/islandora_mods.css | 31 ++++++++++++++++--- .../navigation/nav-primary-button.css | 2 +- .../navigation/nav-primary-wide.css | 4 +-- css/components/navigation/nav-primary.css | 5 +-- oliveskspaces.breakpoints.yml | 2 +- 9 files changed, 60 insertions(+), 15 deletions(-) create mode 100644 AGENTS.md diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index 94b17dd..c3baae0 100644 --- a/.php-cs-fixer.cache +++ b/.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"}} \ No newline at end of file +{"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"}} \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..c300ea5 --- /dev/null +++ b/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 ""` 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. diff --git a/css/components/header-buttons-mobile.css b/css/components/header-buttons-mobile.css index f4ca8a9..bd605e9 100755 --- a/css/components/header-buttons-mobile.css +++ b/css/components/header-buttons-mobile.css @@ -28,14 +28,14 @@ } /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 1300px)))) { +@media ((((min-width: 1336px)))) { .mobile-buttons { margin-block-start: var(--sp6); } } /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 1300px)))) { +@media ((((min-width: 1336px)))) { body:not(.is-always-mobile-nav) .mobile-buttons { display: none; } diff --git a/css/components/header-navigation.css b/css/components/header-navigation.css index 396dc00..871ce28 100755 --- a/css/components/header-navigation.css +++ b/css/components/header-navigation.css @@ -87,7 +87,7 @@ html.js .header-nav { } /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 1300px)))) { +@media ((((min-width: 1336px)))) { body:not(.is-always-mobile-nav) .header-nav { position: static; display: flex; @@ -110,7 +110,7 @@ html.js .header-nav { } /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 1300px)))) { +@media ((((min-width: 1336px)))) { body.is-always-mobile-nav .header-nav { overflow: auto; max-width: calc((7 * (var(--grid-col-width) + var(--grid-gap)))); diff --git a/css/components/islandora_mods.css b/css/components/islandora_mods.css index c9b3b99..187d170 100755 --- a/css/components/islandora_mods.css +++ b/css/components/islandora_mods.css @@ -94,6 +94,7 @@ div#site-header__inner { min-width: 0; /* prevents long text from breaking the flex container */ } } + .node--type-islandora-object { /* display: none; */ @@ -102,6 +103,7 @@ div#site-header__inner { align-items: flex-start; /* keeps labels at the top of multi-line content */ gap: 0.5em; } + .field__label { --label-width: 6em; flex: 0 0 var(--label-width); @@ -109,6 +111,7 @@ div#site-header__inner { margin-right: 1em; /* gap before the content */ box-sizing: border-box; } + fieldset .field__label { --label-width: 11em; flex: 0 0 var(--label-width); @@ -121,6 +124,7 @@ div#site-header__inner { flex: 1; min-width: 0; /* prevents long text from breaking the flex container */ } + legend .field { margin: 0; } @@ -169,32 +173,39 @@ div#block-oliveskspaces-solrsearchcontentsearchresultspagerforblock { div#block-oliveskspaces-solrsearchcontentadvancedsearchforblock h2 { line-height: 1; } + #block-oliveskspaces-book-navigation { li { list-style-type: none; } + a { text-decoration: none; } + ul { margin: 0; font-weight: 600; } + ul * ul { margin-left: 1em; font-weight: normal; } + a.is-active, a:hover { background: #fff; border-radius: 4px; display: block; } + a.is-active:before { content: "-> "; font-weight: 600; } } + .facets-widget-links { ul { margin: 0; @@ -305,14 +316,16 @@ footer hr { border: none; 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 { font-weight: 500; } + span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-3::after { border-top-width: initial !important; } + span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-2 { font-weight: bold; } @@ -320,28 +333,30 @@ span.primary-nav__menu-link-inner.primary-nav__menu-link-inner--level-2 { /* Bookshelf view */ .bookshelf { .views-view-grid__item-inner { - border: 1px solid #ccc; - padding: 4px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0px 5px 11px -2px rgb(0 0 0 / 39%); } + .bookshelf__image img { width: 100%; padding: 4px; border: 1px solid #ccc; background: #ece8e3; } + .bookshelf__title { margin: 0.4em 0; line-height: 1.2; + a { color: var(--color--lmmi-tan); text-decoration: none; } } } + span.mirador-third-party-html p { overflow-wrap: break-word; word-wrap: break-word; /* Legacy support */ @@ -358,12 +373,14 @@ span.mirador-third-party-html p { padding: 1em; border-radius: 4px; box-shadow: 0px 5px 11px -2px rgb(0 0 0 / 39%); + .node__meta { border-bottom: 1px dotted #bbb; margin-bottom: 0.8em; color: var(--color--lmmi-teal); padding-bottom: 1em; } + .node__title { line-height: 1.2; border-bottom: 1px dotted #bbb; @@ -373,8 +390,10 @@ span.mirador-third-party-html p { color: var(--color--lmmi-tan); } } + .node__content { padding-bottom: 1em; + p { line-height: 1.6; } @@ -387,6 +406,7 @@ span.mirador-third-party-html p { padding: 4px; border-radius: 4px 4px 0 0; } + figcaption { border: 1px solid #ccc; padding: 4px; @@ -394,16 +414,19 @@ span.mirador-third-party-html p { border-radius: 0 0 4px 4px; } } + .lmmi-works { h3 { margin: 0; } + td { padding-block: 0.5em !important; } + table { margin: 0; - margin-bottom: 2em; } } + diff --git a/css/components/navigation/nav-primary-button.css b/css/components/navigation/nav-primary-button.css index 94d9d2a..1aee9c3 100755 --- a/css/components/navigation/nav-primary-button.css +++ b/css/components/navigation/nav-primary-button.css @@ -79,7 +79,7 @@ } /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 1300px)))) { +@media ((((min-width: 1336px)))) { body:not(.is-always-mobile-nav) .primary-nav__button-toggle { flex-shrink: 0; align-self: stretch; diff --git a/css/components/navigation/nav-primary-wide.css b/css/components/navigation/nav-primary-wide.css index 35b1fc8..a13de7a 100755 --- a/css/components/navigation/nav-primary-wide.css +++ b/css/components/navigation/nav-primary-wide.css @@ -11,7 +11,7 @@ */ /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 1300px)))) { +@media ((((min-width: 1336px)))) { body:not(.is-always-mobile-nav) .primary-nav__menu-item { 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: 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-🥕 { transition: visibility 0.2s, transform 0.2s, opacity 0.2s; diff --git a/css/components/navigation/nav-primary.css b/css/components/navigation/nav-primary.css index 55f132f..d611b57 100755 --- a/css/components/navigation/nav-primary.css +++ b/css/components/navigation/nav-primary.css @@ -40,8 +40,8 @@ -webkit-text-decoration: none; text-decoration: none; color: var(--color-text-neutral-loud); - font-size: 1.75rem; - /* font-size: 1.3em; */ + /* font-size: 1.75rem; */ + font-size: 1.3em; font-weight: bold; line-height: var(--sp2); } @@ -195,6 +195,7 @@ font-weight: normal; line-height: var(--sp); line-height: 1.2; + font-size: 1.3em; } html:not(.js) .primary-nav__menu--level-2 { diff --git a/oliveskspaces.breakpoints.yml b/oliveskspaces.breakpoints.yml index a6787eb..a05c62c 100755 --- a/oliveskspaces.breakpoints.yml +++ b/oliveskspaces.breakpoints.yml @@ -18,7 +18,7 @@ oliveskspaces.lg: - 1x oliveskspaces.xl: label: X-Large - mediaQuery: 'all and (min-width: 1300px)' + mediaQuery: 'all and (min-width: 1336px)' weight: 3 multipliers: - 1x