From 2fb4f0c7ac1331f7c71ad0ce5989e4cdecf04058 Mon Sep 17 00:00:00 2001 From: tarunsinghofficial Date: Fri, 17 Jan 2025 18:15:55 +0530 Subject: [PATCH 1/9] add APP_PRIMARY_COLOR to env and implement brand, brand-secondary in tailwind.config.js for global color styling --- tailwind.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tailwind.config.js b/tailwind.config.js index 01af366..f4cbbbb 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -10,6 +10,8 @@ export default { theme: { extend: { colors: { + brand: process.env.APP_PRIMARY_COLOR || '#78aa36', + 'brand-secondary': '#486621', // flowbite-svelte primary: { 50: '#FFF5F2', From ecf4b841c1bfac3b15ad37a703422896a93095ec Mon Sep 17 00:00:00 2001 From: tarunsinghofficial Date: Fri, 17 Jan 2025 22:09:59 +0530 Subject: [PATCH 2/9] fix: apply primary color to all changed files with green-500 to brand and green-600 to brand-secondary --- src/app.css | 4 ++-- src/components/ArrivalDeparture.svelte | 2 +- src/components/map/StopMarker.svelte | 2 +- src/components/map/VehiclePopupContent.svelte | 2 +- src/components/navigation/AlertsModal.svelte | 2 +- src/components/oba/TripDetailsPane.svelte | 2 +- src/components/search/SearchPane.svelte | 2 +- src/components/stops/StopPageHeader.svelte | 2 +- src/components/stops/StopPane.svelte | 2 +- src/components/trip-planner/LegDetails.svelte | 6 +++--- src/components/trip-planner/TripPlan.svelte | 10 +--------- 11 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/app.css b/src/app.css index 91088bd..6a4385b 100644 --- a/src/app.css +++ b/src/app.css @@ -28,7 +28,7 @@ } .tab-container__item--active { - @apply border-b-2 border-green-500 text-green-500; + @apply border-b-2 border-brand-secondary text-brand-secondary; } .button { @@ -36,7 +36,7 @@ } .button--primary { - @apply rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600; + @apply rounded-md bg-brand-secondary px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-secondary; } .rtl { diff --git a/src/components/ArrivalDeparture.svelte b/src/components/ArrivalDeparture.svelte index 8cba661..8b62d24 100644 --- a/src/components/ArrivalDeparture.svelte +++ b/src/components/ArrivalDeparture.svelte @@ -36,7 +36,7 @@ return { status: `${$t('status.on_time')}`, text: `${$t('status.arrives_on_time')}`, - color: 'text-green-500' + color: 'text-brand' }; } else { return { diff --git a/src/components/map/StopMarker.svelte b/src/components/map/StopMarker.svelte index b993847..b95ca61 100644 --- a/src/components/map/StopMarker.svelte +++ b/src/components/map/StopMarker.svelte @@ -40,7 +40,7 @@ } .highlight { - @apply scale-125 border-green-600 drop-shadow-md; + @apply scale-125 border-brand-secondary drop-shadow-md; } .custom-marker:hover { diff --git a/src/components/map/VehiclePopupContent.svelte b/src/components/map/VehiclePopupContent.svelte index be858b2..305c27a 100644 --- a/src/components/map/VehiclePopupContent.svelte +++ b/src/components/map/VehiclePopupContent.svelte @@ -14,7 +14,7 @@
-
+
{nextDestination}
diff --git a/src/components/navigation/AlertsModal.svelte b/src/components/navigation/AlertsModal.svelte index fe90050..2bc3c69 100644 --- a/src/components/navigation/AlertsModal.svelte +++ b/src/components/navigation/AlertsModal.svelte @@ -42,7 +42,7 @@ {$t('alert.close')}