fix(#12): correct mispelled word recipe

fix(#12): correct mispelled word recipe
This commit is contained in:
Benjamin Nussbaum 2025-04-26 12:06:44 +02:00
parent 302730c81e
commit f530875210
17 changed files with 93 additions and 46 deletions

View file

@ -0,0 +1,79 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=Inter:300,400,500" rel="stylesheet"/>
<link rel="stylesheet" href="https://usetrmnl.com/css/latest/plugins.css">
<script src="https://usetrmnl.com/js/latest/plugins.js"></script>
<title>plugin</title>
<style>
.trmnl .content .description {
word-break: break-word;
}
</style>
</head>
<body class="environment trmnl">
<div class="screen">
<div class="view view--full">
<div class="layout">
<div class="columns">
<div class="column"
data-list-limit="true"
data-list-max-height="340">
<div class="title center">Events</div>
{% for event in data.metadata.events %}
<div class="item ">
<div class="meta">
<span class="index"></span>
</div>
<div class="content">
<span class="title title--small">{{ data.events[event].year }}</span>
<span class="description clamp--3">{{ data.events[event].text }}</span>
</div>
</div>
{% endfor %}
</div>
<div class="column"
data-list-limit="true"
data-list-max-height="340">
<div class="title center">Births</div>
{% for birth in data.metadata.births %}
<div class="item ">
<div class="meta">
<span class="index"></span>
</div>
<div class="content">
<span class="title title--small">{{ data.births[birth].year }}</span>
<span class="description clamp--1">{{ data.births[birth].text }}</span>
</div>
</div>
{% endfor %}
<div class="title center">Deaths</div>
{% for death in data.metadata.deaths %}
<div class="item ">
<div class="meta">
<span class="index"></span>
</div>
<div class="content">
<span class="title title--small">{{ data.deaths[death].year }}</span>
<span class="description clamp--1">{{ data.deaths[death].text }}</span>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="title_bar">
<img class="image"
src="https://raw.githubusercontent.com/jvivona/tidbyt-data/refs/heads/main/thisdayinhistwikipedia/thisdayinhist_icon.svg">
<span class="title">This Day in History (Wikipedia)</span>
<span class="instance">{{ data.metadata.current_date }}</span>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,68 @@
@php
$weatherEntity = collect($data)->first(function($entity) {
return $entity['entity_id'] === 'weather.forecast_home';
});
@endphp
<x-trmnl::view>
<x-trmnl::layout class="layout--col gap--space-between">
@if($weatherEntity)
<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">{{ $weatherEntity['attributes']['temperature'] }}</span>
<span class="label">Temperature {{ $weatherEntity['attributes']['temperature_unit'] }}</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">{{ $weatherEntity['attributes']['wind_speed'] }} {{ $weatherEntity['attributes']['wind_speed_unit'] }}</span>
<span class="label">Wind Speed</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">{{ $weatherEntity['attributes']['humidity'] }}%</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($weatherEntity['state']) }}</span>
<span class="label">Right Now</span>
</div>
</div>
</div>
</div>
@else
<p>Weather forecast data not found.</p>
@endif
</x-trmnl::layout>
<x-trmnl::title-bar title="Home Assistant"/>
</x-trmnl::view>

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['data'] as $journey)
<tr>
<td>
<x-trmnl::label>{{ $journey['departure_time_planned'] ?? '' }}</x-trmnl::label>
</td>
@if($journey['cancelled'] ?? false)
<td>
<x-trmnl::label variant="inverted">{{ $journey['status'] ?? '' }}</x-trmnl::label>
</td>
@else
<td>
<x-trmnl::label>{{ $journey['departure_time_est'] ?? '' }}</x-trmnl::label>
</td>
@endif
<td>
<x-trmnl::label
variant="{{ ($journey['cancelled'] ?? false) ? 'gray-out' : '' }}">{{ $journey['train_number'] ?? '' }}</x-trmnl::label>
</td>
<td>
<x-trmnl::label
variant="{{ ($journey['cancelled'] ?? false) ? 'gray-out' : '' }}">{{ $journey['destination_station'] ?? '' }}</x-trmnl::label>
</td>
<td>
<x-trmnl::label
variant="{{ ($journey['cancelled'] ?? false) ? 'gray-out' : '' }}">{{ $journey['track'] ?? '' }}</x-trmnl::label>
</td>
</tr>
@endforeach
</tbody>
</x-trmnl::table>
</x-trmnl::layout>
<x-trmnl::title-bar title="Station Monitor"
instance="aktualisiert: {{ now() }}"/>
</x-trmnl::view>

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>

View file

@ -0,0 +1,18 @@
{{--@dump($data)--}}
<x-trmnl::view>
<x-trmnl::layout>
<x-trmnl::layout class="layout--col">
<div class="b-h-gray-1">{{$data[0]['a']}}</div>
@if (strlen($data[0]['q']) < 300)
<p class="value">{{ $data[0]['q'] }}</p>
@else
<p class="value--small">{{ $data[0]['q'] }}</p>
@endif
</x-trmnl::layout>
</x-trmnl::layout>
<div class="title_bar">
<img class="image" src="https://img.icons8.com/books"/>
<span class="title">Zen Quotes</span>
</div>
</x-trmnl::view>