From 1cb8335158b1bf0ff3841c904cab417764bed550 Mon Sep 17 00:00:00 2001 From: Philip Peterson <1326208+philip-peterson@users.noreply.github.com> Date: Mon, 1 Jun 2026 02:46:47 -0700 Subject: [PATCH] add swatch page, rename colors --- tailwind.config.js | 16 +++ .../custom/riverside_pt/js/calendar.js | 4 + .../riverside_pt/riverside_pt.routing.yml | 8 ++ .../src/Controller/PaletteController.php | 97 +++++++++++++++++++ .../templates/riverside-pt-home.html.twig | 2 +- 5 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 web/modules/custom/riverside_pt/src/Controller/PaletteController.php diff --git a/tailwind.config.js b/tailwind.config.js index eddd1fd..5356b9e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -7,6 +7,22 @@ module.exports = { ], theme: { extend: { + colors: { + 'pt-blue': { + 50: '#e8f2f6', + 100: '#dde8f0', + 200: '#b8d4dc', + 300: '#9dbdcb', + 400: '#86aab6', + 500: '#306f8e', + 600: '#1f5a6e', + }, + 'pt-sage': { + 400: '#83a1a1', + 500: '#6f8f96', + }, + 'pt-navy': '#1e3a5f', + }, screens: { // Adjusted for current hybrid usage (hero changes at sm, header/layout at md) 'sm': '768px', // iPad portrait + when hero layout activates diff --git a/web/modules/custom/riverside_pt/js/calendar.js b/web/modules/custom/riverside_pt/js/calendar.js index a32b548..f542489 100644 --- a/web/modules/custom/riverside_pt/js/calendar.js +++ b/web/modules/custom/riverside_pt/js/calendar.js @@ -3,6 +3,8 @@ const el = document.getElementById('riverside-calendar'); if (!el) return; + requestAnimationFrame(function () { + const calendar = new FullCalendar.Calendar(el, { initialView: 'dayGridMonth', headerToolbar: { left: 'prev', center: 'title', right: 'next' }, @@ -101,5 +103,7 @@ }); calendar.render(); + + }); // end requestAnimationFrame }); })(drupalSettings); diff --git a/web/modules/custom/riverside_pt/riverside_pt.routing.yml b/web/modules/custom/riverside_pt/riverside_pt.routing.yml index 22215b6..ebce8a2 100644 --- a/web/modules/custom/riverside_pt/riverside_pt.routing.yml +++ b/web/modules/custom/riverside_pt/riverside_pt.routing.yml @@ -1,3 +1,11 @@ +riverside_pt.palette: + path: '/dev/palette' + defaults: + _controller: '\Drupal\riverside_pt\Controller\PaletteController::page' + _title: 'Color Palette' + requirements: + _permission: 'administer site configuration' + riverside_pt.home: path: '/home' defaults: diff --git a/web/modules/custom/riverside_pt/src/Controller/PaletteController.php b/web/modules/custom/riverside_pt/src/Controller/PaletteController.php new file mode 100644 index 0000000..5da304e --- /dev/null +++ b/web/modules/custom/riverside_pt/src/Controller/PaletteController.php @@ -0,0 +1,97 @@ +parseColors(); + + if (!$colors) { + return ['#markup' => '
Could not parse tailwind.config.js
']; + } + + $html = '