refactor: migrate from hardcoded hex colors to Tailwind CSS color tokens
Replace all hardcoded hex color values with semantic Tailwind design tokens: - `#bb5b3e` → `accent` - `#a34a31` → `accent-content` / `primary-dark` - `#4a3f3b`, `#89726c` → `zinc-800`, `zinc-500` - `#e5ded7`, `#faf6f3` → `zinc-300`, `zinc-50` - `#8
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="space-y-2">
|
||||
<button
|
||||
@click="toggleMap"
|
||||
class="flex items-center gap-2 text-sm font-bold text-[#bb5b3e] hover:text-[#a34a31] transition-colors"
|
||||
class="flex items-center gap-2 text-sm font-bold text-accent hover:text-accent-content transition-colors"
|
||||
>
|
||||
<iconify-icon :icon="isOpen ? 'lucide:chevron-up' : 'lucide:chevron-down'"></iconify-icon>
|
||||
{{ isOpen ? 'Hide map' : 'Show map' }}
|
||||
@@ -11,7 +11,7 @@
|
||||
<div
|
||||
v-show="isOpen"
|
||||
ref="mapContainer"
|
||||
class="w-full h-72 rounded-2xl overflow-hidden border border-[#e5ded7] shadow-sm"
|
||||
class="w-full h-72 rounded-2xl overflow-hidden border border-zinc-300 shadow-sm"
|
||||
></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
v-if="!isPaidTier"
|
||||
class="absolute inset-0 z-10 rounded-2xl backdrop-blur-sm bg-white/60 flex flex-col items-center justify-center gap-3 text-center px-6"
|
||||
>
|
||||
<iconify-icon icon="lucide:lock" class="text-[#bb5b3e] text-3xl"></iconify-icon>
|
||||
<p class="font-bold text-[#4a3f3b]">Price predictions are available on paid plans</p>
|
||||
<iconify-icon class="text-accent text-3xl" icon="lucide:lock"></iconify-icon>
|
||||
<p class="font-bold text-zinc-800">Price predictions are available on paid plans</p>
|
||||
<a
|
||||
href="/pricing"
|
||||
class="px-6 py-2 bg-[#bb5b3e] text-white rounded-full text-sm font-bold hover:bg-[#a34a31] transition-colors"
|
||||
class="px-6 py-2 bg-accent text-white rounded-full text-sm font-bold hover:bg-accent-content transition-colors"
|
||||
>
|
||||
Upgrade from £0.99/mo
|
||||
</a>
|
||||
@@ -17,15 +17,15 @@
|
||||
|
||||
<!-- Card content (blurred for free users, fully visible for paid) -->
|
||||
<div
|
||||
:class="['p-6 bg-white rounded-2xl border border-[#e5ded7] space-y-4', !isPaidTier && 'select-none pointer-events-none']"
|
||||
:class="['p-6 bg-white rounded-2xl border border-zinc-300 space-y-4', !isPaidTier && 'select-none pointer-events-none']"
|
||||
>
|
||||
<p class="text-xs font-bold uppercase tracking-widest text-[#89726c]">Price Prediction</p>
|
||||
<p class="text-xs font-bold uppercase tracking-widest text-zinc-500">Price Prediction</p>
|
||||
|
||||
<!-- Loading state -->
|
||||
<template v-if="loading">
|
||||
<div class="animate-pulse space-y-2">
|
||||
<div class="h-8 bg-[#e5ded7] rounded w-1/2"></div>
|
||||
<div class="h-4 bg-[#e5ded7] rounded w-3/4"></div>
|
||||
<div class="h-8 bg-zinc-300 rounded w-1/2"></div>
|
||||
<div class="h-4 bg-zinc-300 rounded w-3/4"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -33,22 +33,22 @@
|
||||
<template v-else-if="prediction">
|
||||
<h3
|
||||
class="text-2xl font-black"
|
||||
:class="prediction.action === 'fill_now' ? 'text-[#8B4860]' : prediction.action === 'wait' ? 'text-[#4A7C7E]' : 'text-[#9B8B6B]'"
|
||||
:class="prediction.action === 'fill_now' ? 'text-mauve' : prediction.action === 'wait' ? 'text-teal' : 'text-tan'"
|
||||
>
|
||||
{{ actionLabel }}
|
||||
</h3>
|
||||
|
||||
<div class="w-full h-2 bg-[#eeeae5] rounded-full overflow-hidden">
|
||||
<div class="w-full h-2 bg-zinc-200 rounded-full overflow-hidden">
|
||||
<div
|
||||
class="h-full rounded-full transition-all"
|
||||
:class="prediction.action === 'fill_now' ? 'bg-[#8B4860]' : 'bg-[#4A7C7E]'"
|
||||
:class="prediction.action === 'fill_now' ? 'bg-mauve' : 'bg-teal'"
|
||||
:style="{ width: prediction.confidence_score + '%' }"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<p class="text-sm text-[#89726c] leading-relaxed">{{ prediction.reasoning }}</p>
|
||||
<p class="text-sm text-zinc-500 leading-relaxed">{{ prediction.reasoning }}</p>
|
||||
|
||||
<div class="flex items-center gap-4 text-xs text-[#89726c] font-medium">
|
||||
<div class="flex items-center gap-4 text-xs text-zinc-500 font-medium">
|
||||
<span>Avg: {{ prediction.current_avg }}p</span>
|
||||
<span>Confidence: {{ prediction.confidence_label }}</span>
|
||||
<span v-if="prediction.predicted_change_pence">
|
||||
@@ -59,9 +59,9 @@
|
||||
|
||||
<!-- Empty state (placeholder for gated view) -->
|
||||
<template v-else>
|
||||
<h3 class="text-2xl font-black text-[#8B4860]">Fill up now</h3>
|
||||
<div class="h-2 bg-[#eeeae5] rounded-full"><div class="h-full bg-[#8B4860] w-4/5 rounded-full"></div></div>
|
||||
<p class="text-sm text-[#89726c]">Prices in your area are rising — best to fill up today.</p>
|
||||
<h3 class="text-2xl font-black text-mauve">Fill up now</h3>
|
||||
<div class="h-2 bg-zinc-200 rounded-full"><div class="h-full bg-mauve w-4/5 rounded-full"></div></div>
|
||||
<p class="text-sm text-zinc-500">Prices in your area are rising — best to fill up today.</p>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="relative flex flex-col sm:flex-row gap-3 max-w-md w-full">
|
||||
<div class="relative flex-1">
|
||||
<span class="absolute left-4 top-1/2 -translate-y-1/2 text-[#89726c]">
|
||||
<span class="absolute left-4 top-1/2 -translate-y-1/2 text-zinc-500">
|
||||
<iconify-icon icon="lucide:map-pin" style="font-size:1.25rem"></iconify-icon>
|
||||
</span>
|
||||
<input
|
||||
@@ -9,13 +9,13 @@
|
||||
@input="onInput"
|
||||
type="text"
|
||||
placeholder="Enter postcode, e.g. SW1A 1AA"
|
||||
class="w-full h-14 pl-12 pr-4 bg-white border border-[#e5ded7] rounded-xl focus:outline-none focus:ring-2 focus:ring-[#bb5b3e] shadow-inner text-base"
|
||||
class="w-full h-14 pl-12 pr-4 bg-white border border-zinc-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-accent shadow-inner text-base"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
@click="emit('search', postcode)"
|
||||
:disabled="!postcode.trim()"
|
||||
class="h-14 px-8 bg-[#bb5b3e] text-white rounded-xl font-bold text-base shadow-xl hover:bg-[#a34a31] transition-all disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
class="h-14 px-8 bg-accent text-white rounded-xl font-bold text-base shadow-xl hover:bg-accent-content transition-all disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>
|
||||
Find Prices
|
||||
</button>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div class="flex items-center justify-between p-4 bg-white rounded-xl border border-[#e5ded7] hover:border-[#bb5b3e] transition-colors">
|
||||
<div class="flex items-center justify-between p-4 bg-white rounded-xl border border-zinc-300 hover:border-accent transition-colors">
|
||||
<div class="flex items-center gap-3 min-w-0">
|
||||
<div class="w-10 h-10 rounded-lg bg-[#bb5b3e]/10 flex items-center justify-center flex-shrink-0">
|
||||
<div class="w-10 h-10 rounded-lg bg-accent/10 flex items-center justify-center flex-shrink-0">
|
||||
<iconify-icon
|
||||
:icon="station.is_supermarket ? 'lucide:shopping-cart' : 'lucide:fuel'"
|
||||
style="font-size:1.25rem"
|
||||
class="text-[#bb5b3e]"
|
||||
class="text-accent"
|
||||
></iconify-icon>
|
||||
</div>
|
||||
<div class="min-w-0">
|
||||
<p class="font-bold text-[#4a3f3b] truncate">{{ station.name }}</p>
|
||||
<p class="text-xs text-[#89726c]">{{ station.distance_km.toFixed(1) }} km away · Updated {{ updatedAgo }}</p>
|
||||
<p class="font-bold text-zinc-800 truncate">{{ station.name }}</p>
|
||||
<p class="text-xs text-zinc-500">{{ station.distance_km.toFixed(1) }} km away · Updated {{ updatedAgo }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right flex-shrink-0 ml-4">
|
||||
@@ -28,10 +28,10 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const priceColor = computed(() => {
|
||||
if (!props.lowestPrice) return 'text-[#4a3f3b]'
|
||||
if (props.station.price_pence === props.lowestPrice) return 'text-[#22c55e]'
|
||||
if (props.station.price_pence > props.lowestPrice + 500) return 'text-[#ef4444]'
|
||||
return 'text-[#4a3f3b]'
|
||||
if (!props.lowestPrice) return 'text-zinc-800'
|
||||
if (props.station.price_pence === props.lowestPrice) return 'text-status-good'
|
||||
if (props.station.price_pence > props.lowestPrice + 500) return 'text-status-bad'
|
||||
return 'text-zinc-800'
|
||||
})
|
||||
|
||||
const updatedAgo = computed(() => {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
:class="[
|
||||
'px-4 py-1.5 rounded-full text-sm font-bold transition-colors',
|
||||
currentSort === option.value
|
||||
? 'bg-[#bb5b3e] text-white'
|
||||
: 'bg-white border border-[#e5ded7] text-[#89726c] hover:border-[#bb5b3e]'
|
||||
? 'bg-accent text-white'
|
||||
: 'bg-white border border-zinc-300 text-zinc-500 hover:border-accent'
|
||||
]"
|
||||
>
|
||||
{{ option.label }}
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Count -->
|
||||
<p class="text-sm text-[#89726c] font-medium">
|
||||
<p class="text-sm text-zinc-500 font-medium">
|
||||
{{ stations.length }} station{{ stations.length !== 1 ? 's' : '' }} found
|
||||
</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user