chore: move receipt blade views

This commit is contained in:
Benjamin Nussbaum 2025-03-16 19:21:07 +01:00
parent 09b0d8bcf8
commit b0610a62b0
3 changed files with 159 additions and 0 deletions

View file

@ -0,0 +1,57 @@
<x-trmnl::view>
<x-trmnl::layout>
<x-trmnl::table>
<thead>
<tr>
<th>
<x-trmnl::title>Abfahrt</x-trmnl::title>
</th>
<th>
<x-trmnl::title>Aktuell</x-trmnl::title>
</th>
<th>
<x-trmnl::title>Zug</x-trmnl::title>
</th>
<th>
<x-trmnl::title>Ziel</x-trmnl::title>
</th>
<th>
<x-trmnl::title>Steig</x-trmnl::title>
</th>
</tr>
</thead>
<tbody>
@foreach($data['departures'] as $journey)
<tr>
<td>
<x-trmnl::label>{{ \Carbon\Carbon::parse($journey['scheduledTime'])->setTimezone(config('app.timezone'))->format('H:i') }}</x-trmnl::label>
</td>
@if($journey['isCancelled'])
<td>
<x-trmnl::label variant="inverted">{{ $journey->status }}</x-trmnl::label>
</td>
@else
<td>
<x-trmnl::label>{{ \Carbon\Carbon::parse($journey['time'])->setTimezone(config('app.timezone'))->format('H:i') }}</x-trmnl::label>
</td>
@endif
<td>
<x-trmnl::label
variant="{{ $journey['isCancelled'] ? 'gray-out' : '' }}">{{ $journey['train'] }}</x-trmnl::label>
</td>
<td>
<x-trmnl::label
variant="{{ $journey['isCancelled'] ? 'gray-out' : '' }}">{{ $journey['destination'] }}</x-trmnl::label>
</td>
<td>
<x-trmnl::label
variant="{{ $journey['isCancelled'] ? 'gray-out' : '' }}">{{ $journey['platform']}}</x-trmnl::label>
</td>
</tr>
@endforeach
</tbody>
</x-trmnl::table>
</x-trmnl::layout>
<x-trmnl::title-bar title="{{config('services.oebb.station_name')}}"
instance="aktualisiert: {{now()}}"/>
</x-trmnl::view>

View file

@ -0,0 +1,56 @@
{{--@dump($data)--}}
<x-trmnl::view>
<x-trmnl::layout class="layout--col gap--space-between">
<div class="grid" style="gap: 9px;">
<div class="row row--center col--span-3 col--end">
<img class="weather-image" style="max-height: 150px; margin:auto;" src="https://usetrmnl.com/images/weather/wi-thermometer.svg">
</div>
<div class="col col--span-3 col--end">
<div class="item h--full">
<div class="meta"></div>
<div class="justify-center">
<span class="value value--xxxlarge" data-fit-value="true">{{Arr::get($data, 'properties.timeseries.0.data.instant.details.air_temperature', 'N/A')}}</span>
<span class="label">Temperature</span>
</div>
</div>
</div>
<div class="col col--span-3 col--end gap--medium">
<div class="item">
<div class="meta"></div>
<div class="icon">
{{-- <img class="weather-icon" src="https://usetrmnl.com/images/weather/wi-thermometer.svg">--}}
</div>
<div class="content">
<span class="value value--small">{{Arr::get($data, 'properties.timeseries.0.data.instant.details.wind_speed', 'N/A')}}</span>
<span class="label">Wind Speed (km/h)</span>
</div>
</div>
<div class="item">
<div class="meta"></div>
<div class="icon">
{{-- <img class="weather-icon" src="https://usetrmnl.com/images/weather/wi-raindrops.svg">--}}
</div>
<div class="content">
<span class="value value--small">{{Arr::get($data, 'properties.timeseries.0.data.instant.details.relative_humidity', 'N/A')}}%</span>
<span class="label">Humidity</span>
</div>
</div>
<div class="item">
<div class="meta"></div>
<div class="icon">
{{-- <img class="weather-icon" src="https://usetrmnl.com/images/weather/wi-day-sunny.svg">--}}
</div>
<div class="content">
<span class="value value--xsmall">{{Str::title(Arr::get($data, 'properties.timeseries.0.data.next_1_hours.summary.symbol_code', 'N/A'))}}</span>
<span class="label">Right Now</span>
</div>
</div>
</div>
</div>
</x-trmnl::layout>
<x-trmnl::title-bar title="Weather Vienna"
instance="updated: {{now()}}"/>
</x-trmnl::view>