From b0610a62b02c4bc96872a610f0f741d6ab5dee81 Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Sun, 16 Mar 2025 19:21:07 +0100 Subject: [PATCH] chore: move receipt blade views --- .../views/flux/icon/train-front.blade.php | 46 +++++++++++++++ resources/views/receipts/train.blade.php | 57 +++++++++++++++++++ resources/views/receipts/weather.blade.php | 56 ++++++++++++++++++ 3 files changed, 159 insertions(+) create mode 100644 resources/views/flux/icon/train-front.blade.php create mode 100644 resources/views/receipts/train.blade.php create mode 100644 resources/views/receipts/weather.blade.php diff --git a/resources/views/flux/icon/train-front.blade.php b/resources/views/flux/icon/train-front.blade.php new file mode 100644 index 0000000..253df28 --- /dev/null +++ b/resources/views/flux/icon/train-front.blade.php @@ -0,0 +1,46 @@ +{{-- Credit: Lucide (https://lucide.dev) --}} + +@props([ + 'variant' => 'outline', +]) + +@php +if ($variant === 'solid') { + throw new \Exception('The "solid" variant is not supported in Lucide.'); +} + +$classes = Flux::classes('shrink-0') + ->add(match($variant) { + 'outline' => '[:where(&)]:size-6', + 'solid' => '[:where(&)]:size-6', + 'mini' => '[:where(&)]:size-5', + 'micro' => '[:where(&)]:size-4', + }); + +$strokeWidth = match ($variant) { + 'outline' => 2, + 'mini' => 2.25, + 'micro' => 2.5, +}; +@endphp + +class($classes) }} + data-flux-icon + xmlns="http://www.w3.org/2000/svg" + viewBox="0 0 24 24" + fill="none" + stroke="currentColor" + stroke-width="{{ $strokeWidth }}" + stroke-linecap="round" + stroke-linejoin="round" + aria-hidden="true" + data-slot="icon" +> + + + + + + + diff --git a/resources/views/receipts/train.blade.php b/resources/views/receipts/train.blade.php new file mode 100644 index 0000000..16a33aa --- /dev/null +++ b/resources/views/receipts/train.blade.php @@ -0,0 +1,57 @@ + + + + + + + Abfahrt + + + Aktuell + + + Zug + + + Ziel + + + Steig + + + + + @foreach($data['departures'] as $journey) + + + {{ \Carbon\Carbon::parse($journey['scheduledTime'])->setTimezone(config('app.timezone'))->format('H:i') }} + + @if($journey['isCancelled']) + + {{ $journey->status }} + + @else + + {{ \Carbon\Carbon::parse($journey['time'])->setTimezone(config('app.timezone'))->format('H:i') }} + + @endif + + {{ $journey['train'] }} + + + {{ $journey['destination'] }} + + + {{ $journey['platform']}} + + + @endforeach + + + + + diff --git a/resources/views/receipts/weather.blade.php b/resources/views/receipts/weather.blade.php new file mode 100644 index 0000000..800ddf4 --- /dev/null +++ b/resources/views/receipts/weather.blade.php @@ -0,0 +1,56 @@ +{{--@dump($data)--}} + + +
+
+ +
+
+
+
+
+ {{Arr::get($data, 'properties.timeseries.0.data.instant.details.air_temperature', 'N/A')}} + Temperature +
+
+
+
+
+
+
+{{-- --}} +
+
+ {{Arr::get($data, 'properties.timeseries.0.data.instant.details.wind_speed', 'N/A')}} + Wind Speed (km/h) +
+
+ +
+
+
+{{-- --}} +
+
+ {{Arr::get($data, 'properties.timeseries.0.data.instant.details.relative_humidity', 'N/A')}}% + Humidity +
+
+ +
+
+
+{{-- --}} +
+
+ {{Str::title(Arr::get($data, 'properties.timeseries.0.data.next_1_hours.summary.symbol_code', 'N/A'))}} + Right Now +
+
+
+
+ +
+ +