diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache old mode 100644 new mode 100755 diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php old mode 100644 new mode 100755 diff --git a/CLAUDE.md b/CLAUDE.md old mode 100644 new mode 100755 diff --git a/css/components/advanced_search.pager.css b/css/components/advanced_search.pager.css old mode 100644 new mode 100755 diff --git a/css/components/form-textarea.css b/css/components/form-textarea.css index 5df31e0..5217178 100755 --- a/css/components/form-textarea.css +++ b/css/components/form-textarea.css @@ -17,7 +17,7 @@ textarea { padding: var(--sp); } .region--sidebar input.form-text { - width: 14em; + max-width: 14em; } .region--sidebar .advanced-search-form { input.form-text { diff --git a/css/components/header-buttons-mobile.css b/css/components/header-buttons-mobile.css index e322aad..4b907db 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: 55rem)))) { +@media ((((min-width: 1250px)))) { .mobile-buttons { margin-block-start: var(--sp6); } } /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 55rem)))) { +@media ((((min-width: 1250px)))) { 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 94abe37..c630aee 100755 --- a/css/components/header-navigation.css +++ b/css/components/header-navigation.css @@ -30,14 +30,17 @@ * mobile navigation needs to slide beneath the button, but we also cannot * use padding because that would enable the button to scroll out of the * viewport on short screens. */ - border-block-start: solid var(--color--white) calc(var(--sp3) + var(--drupal-displace-offset-top, 0px)); + border-block-start: solid var(--color--white) + calc(var(--sp3) + var(--drupal-displace-offset-top, 0px)); background-color: var(--color--white); box-shadow: 0 0 72px rgba(0, 0, 0, 0.1); } .header-nav.is-active { visibility: visible; - transform: translateX(calc(-100% - var(--drupal-displace-offset-right, 0px))); /* LTR */ + transform: translateX( + calc(-100% - var(--drupal-displace-offset-right, 0px)) + ); /* LTR */ } [dir="rtl"] .header-nav.is-active { @@ -84,7 +87,7 @@ html.js .header-nav { } /* @media ((((min-width: 60rem)))) { */ -@media ((((min-width: 55rem)))) { +@media ((((min-width: 1250px)))) { body:not(.is-always-mobile-nav) .header-nav { position: static; display: flex; @@ -113,14 +116,21 @@ html.js .header-nav { max-width: calc((7 * (var(--grid-col-width) + var(--grid-gap)))); padding-inline-end: var(--sp); transition: transform 0.2s, visibility 0.2s; - border-top-width: calc(var(--drupal-displace-offset-top, 0px) + var(--sp11)); + border-top-width: calc( + var(--drupal-displace-offset-top, 0px) + var(--sp11) + ); } } @media (min-width: 90rem) { body.is-always-mobile-nav .header-nav { - max-width: calc(100vw - (var(--max-width) + var(--content-left)) + ((7 * (var(--grid-col-width) + var(--grid-gap))))); - padding-inline-end: calc(100vw - (var(--max-width) + var(--content-left) - var(--sp))); + max-width: calc( + 100vw - (var(--max-width) + var(--content-left)) + + ((7 * (var(--grid-col-width) + var(--grid-gap)))) + ); + padding-inline-end: calc( + 100vw - (var(--max-width) + var(--content-left) - var(--sp)) + ); } } diff --git a/css/components/islandora_mods.css b/css/components/islandora_mods.css index f43a143..6fc3c69 100755 --- a/css/components/islandora_mods.css +++ b/css/components/islandora_mods.css @@ -826,3 +826,4 @@ div#block-olivesnews-search { .path-frontpage .main-content__container.container { padding-top: 4em; } +.search-result.views-row { min-width: 0;} diff --git a/css/components/navigation/nav-primary-button.css b/css/components/navigation/nav-primary-button.css index 0704e2f..edad2e4 100755 --- a/css/components/navigation/nav-primary-button.css +++ b/css/components/navigation/nav-primary-button.css @@ -15,7 +15,9 @@ overflow: hidden; width: var(--sp2); height: var(--sp2); - margin-block-start: var(--sp0-5); /* Visually align button with menu link text. */ + margin-block-start: var( + --sp0-5 + ); /* Visually align button with menu link text. */ padding-block: 0; padding-inline-start: 0; padding-inline-end: 0; @@ -76,7 +78,7 @@ pointer-events: none; } -@media ((((min-width: 60rem)))) { +@media ((((min-width: 1250px)))) { body:not(.is-always-mobile-nav) .primary-nav__button-toggle { flex-shrink: 0; align-self: stretch; @@ -91,7 +93,9 @@ outline: 0; } - body:not(.is-always-mobile-nav) .primary-nav__button-toggle:focus .icon--menu-toggle { + body:not(.is-always-mobile-nav) + .primary-nav__button-toggle:focus + .icon--menu-toggle { border: solid 2px var(--color--primary-40); } @@ -100,11 +104,15 @@ color: currentColor; } - body:not(.is-always-mobile-nav) .primary-nav__button-toggle[aria-expanded="true"] .icon--menu-toggle::after { + body:not(.is-always-mobile-nav) + .primary-nav__button-toggle[aria-expanded="true"] + .icon--menu-toggle::after { opacity: 0.8; } - body:not(.is-always-mobile-nav) .primary-nav__button-toggle .icon--menu-toggle { + body:not(.is-always-mobile-nav) + .primary-nav__button-toggle + .icon--menu-toggle { inset-inline-start: 0.1875rem; width: 1.125rem; transform: translateY(-50%); @@ -112,11 +120,15 @@ background-color: var(--color--white); } - body:not(.is-always-mobile-nav) .primary-nav__button-toggle .icon--menu-toggle::before { + body:not(.is-always-mobile-nav) + .primary-nav__button-toggle + .icon--menu-toggle::before { content: none; } - body:not(.is-always-mobile-nav) .primary-nav__button-toggle .icon--menu-toggle::after { + body:not(.is-always-mobile-nav) + .primary-nav__button-toggle + .icon--menu-toggle::after { /* stylelint-disable csstools/use-logical */ top: calc(50% - 2px); left: 0.1875rem; diff --git a/css/components/navigation/nav-primary-wide.css b/css/components/navigation/nav-primary-wide.css index 26f0094..dc7f0c7 100755 --- a/css/components/navigation/nav-primary-wide.css +++ b/css/components/navigation/nav-primary-wide.css @@ -10,7 +10,7 @@ * Nav Primary (wide widths). */ -@media ((((min-width: 50rem)))) { +@media ((((min-width: 1250px)))) { body:not(.is-always-mobile-nav) .primary-nav__menu-item { flex-wrap: nowrap; /* Ensure that sub navigation toggle button doesn't wrap underneath link. */ } diff --git a/css/components/readmore.css b/css/components/readmore.css old mode 100644 new mode 100755 diff --git a/deploy.sh b/deploy.sh index 83e4bea..492efe3 100755 --- a/deploy.sh +++ b/deploy.sh @@ -12,7 +12,8 @@ # -------------------------------------------------------- # --- CONFIGURATION (Edit these for new environments) --- -SERVER="newspapers2.islandarchives.ca" +# SERVER="newspapers2.islandarchives.ca" +SERVER="137.149.52.48" THEME_DIR="/var/www/islandnewspapers2/web/themes/custom/olivesnews" SITE_ROOT="/var/www/islandnewspapers2/web/sites/islandnewspapers2" DRUSH_PATH="/var/www/islandnewspapers2/vendor/drush/drush/drush" @@ -20,9 +21,9 @@ DRUSH_PATH="/var/www/islandnewspapers2/vendor/drush/drush/drush" # 1. Check if a commit message was provided if [ -z "$1" ]; then - echo "❌ Error: Please provide a commit message." - echo "Usage: ./deploy.sh 'Your message here'" - exit 1 + echo "❌ Error: Please provide a commit message." + echo "Usage: ./deploy.sh 'Your message here'" + exit 1 fi COMMIT_MSG="$1" diff --git a/fonts/Libre_Baskerville/LibreBaskerville-Italic-VariableFont_wght.ttf b/fonts/Libre_Baskerville/LibreBaskerville-Italic-VariableFont_wght.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/LibreBaskerville-Italic-VariableFont_wght.woff2 b/fonts/Libre_Baskerville/LibreBaskerville-Italic-VariableFont_wght.woff2 old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/LibreBaskerville-VariableFont_wght.ttf b/fonts/Libre_Baskerville/LibreBaskerville-VariableFont_wght.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/LibreBaskerville-VariableFont_wght.woff2 b/fonts/Libre_Baskerville/LibreBaskerville-VariableFont_wght.woff2 old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/OFL.txt b/fonts/Libre_Baskerville/OFL.txt old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/README.txt b/fonts/Libre_Baskerville/README.txt old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-Bold.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-Bold.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-BoldItalic.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-BoldItalic.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-Italic.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-Italic.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-Medium.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-Medium.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-MediumItalic.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-MediumItalic.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-Regular.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-Regular.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-SemiBold.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-SemiBold.ttf old mode 100644 new mode 100755 diff --git a/fonts/Libre_Baskerville/static/LibreBaskerville-SemiBoldItalic.ttf b/fonts/Libre_Baskerville/static/LibreBaskerville-SemiBoldItalic.ttf old mode 100644 new mode 100755 diff --git a/fonts/Manufacturing_Consent/ManufacturingConsent-Regular.ttf b/fonts/Manufacturing_Consent/ManufacturingConsent-Regular.ttf old mode 100644 new mode 100755 diff --git a/fonts/Manufacturing_Consent/ManufacturingConsent-Regular.woff2 b/fonts/Manufacturing_Consent/ManufacturingConsent-Regular.woff2 old mode 100644 new mode 100755 diff --git a/fonts/Manufacturing_Consent/OFL.txt b/fonts/Manufacturing_Consent/OFL.txt old mode 100644 new mode 100755 diff --git a/images/natural_paper.png b/images/natural_paper.png old mode 100644 new mode 100755 diff --git a/images/newsprint.webp b/images/newsprint.webp old mode 100644 new mode 100755 diff --git a/js/custom.js b/js/custom.js old mode 100644 new mode 100755 diff --git a/js/nouislider-year-format.js b/js/nouislider-year-format.js old mode 100644 new mode 100755 diff --git a/js/nouislider-year-format_v2.js b/js/nouislider-year-format_v2.js new file mode 100755 index 0000000..f8eaf75 --- /dev/null +++ b/js/nouislider-year-format_v2.js @@ -0,0 +1,38 @@ +(function (Drupal) { + "use strict"; + + Drupal.behaviors.nouisliderYearFormat = { + attach: function (context) { + // 1. Target the slider element + const sliderEl = document.getElementById("year"); + if (!sliderEl) return; + + // 2. Use a small function to attach the rounding logic + const applyRounding = () => { + if (sliderEl.noUiSlider && !sliderEl.dataset.yearFormatApplied) { + sliderEl.dataset.yearFormatApplied = "true"; + + sliderEl.noUiSlider.on("update", function (values, handle) { + const inputId = + handle === 0 ? "nouislider-input-from" : "nouislider-input-to"; + const input = document.getElementById(inputId); + if (input) { + // Round the string value ("1971.00" -> 1971) + input.value = Math.round(parseFloat(values[handle])); + } + }); + } + }; + + // 3. Try immediately, then periodically until the slider is ready + applyRounding(); + const retry = setInterval(() => { + applyRounding(); + if (sliderEl.dataset.yearFormatApplied) clearInterval(retry); + }, 100); + + // Stop trying after 3 seconds + setTimeout(() => clearInterval(retry), 3000); + }, + }; +})(Drupal); diff --git a/js/readmore.js b/js/readmore.js old mode 100644 new mode 100755 diff --git a/logo.svg b/logo.svg old mode 100644 new mode 100755 diff --git a/olivesnews.libraries.yml b/olivesnews.libraries.yml index 701e67f..0d97daa 100755 --- a/olivesnews.libraries.yml +++ b/olivesnews.libraries.yml @@ -58,7 +58,7 @@ global-styling: js: js/checkbox.js: {} - js/custom.js: {} + #js/custom.js: {} js/readmore.js: {} dependencies: @@ -69,7 +69,7 @@ global-styling: nouislider-year-format: js: - js/nouislider-year-format.js: {} + js/nouislider-year-format_v2.js: {} dependencies: - core/drupal diff --git a/templates/facets-result-item.html.twig b/templates/facets-result-item.html.twig old mode 100644 new mode 100755 diff --git a/templates/views/views-view-fields--newspaper_directory--page_2.html.twig b/templates/views/views-view-fields--newspaper_directory--page_2.html.twig old mode 100644 new mode 100755 diff --git a/templates/views/views-view-unformatted--newspaper_directory--page_2.html.twig b/templates/views/views-view-unformatted--newspaper_directory--page_2.html.twig old mode 100644 new mode 100755