homepage, new newsletter section, multilang support

This commit is contained in:
elvira
2026-08-08 14:50:10 +03:00
parent bf8b9219fc
commit e46276a31b
26 changed files with 1580 additions and 547 deletions
@@ -1,33 +1,5 @@
@props(['variants', 'option' => null])
@php
$colorMap = [
'light blue' => 'rgb(0, 189, 255)',
'terracotta' => 'rgb(217, 104, 73)',
'red-black gradient' => 'rgb(198, 68, 68)',
'green-purple gradient'=> 'rgb(5, 170, 61)',
'metallic blue' => 'rgb(53, 121, 151)',
'copper' => 'rgb(242, 155, 55)',
'purple' => 'rgb(165, 77, 207)',
'red' => 'rgb(255, 0, 0)',
'black' => 'rgb(0, 0, 0)',
'gray' => 'rgb(128, 128, 128)',
'rainbow' => 'rgb(97, 195, 231)',
'white' => 'rgb(255, 255, 255)',
'gold' => 'rgb(212, 154, 6)',
'brown' => 'rgb(154, 86, 48)',
'blue' => 'rgb(0, 91, 211)',
'orange' => 'rgb(255, 138, 0)',
'pink' => 'rgb(255, 192, 203)',
'yellow' => 'rgb(255, 229, 0)',
'green' => 'rgb(5, 170, 61)',
'blue-purple gradient' => 'rgb(159, 113, 247)',
'silver' => 'rgb(211, 211, 211)',
'sparkly black' => 'rgb(5, 5, 5)',
'plum' => 'rgb(198, 34, 159)',
];
@endphp
<div {{ $attributes }}>
@if($option)
<p class="font-bold mb-3 text-sm uppercase tracking-wide">
@@ -42,11 +14,9 @@ class="flex flex-wrap gap-2"
>
@foreach($variants as $variant)
@php
$value = $variant->values->first();
$label = $value?->translate('name') ?? '';
$labelEn = mb_strtolower($value?->translate('name', 'en') ?? '');
$labelEl = mb_strtolower($value?->translate('name', 'el') ?? '');
$bg = $colorMap[$labelEl] ?? $colorMap[$labelEn] ?? '#cccccc';
$value = $variant->values->first();
$label = $value?->translate('name') ?? '';
$bg = $value?->meta['hex'] ?? '#cccccc';
@endphp
<button
type="button"
@@ -11,6 +11,7 @@
<img
src="{{ $image }}"
alt="{{ $name }}"
loading="lazy"
class="w-full h-auto block"
>
@else