mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat: added recipe Sunrise/Sunset
This commit is contained in:
parent
d572c738cc
commit
9cb808dee6
3 changed files with 136 additions and 0 deletions
48
resources/views/flux/icon/sunrise.blade.php
Normal file
48
resources/views/flux/icon/sunrise.blade.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{{-- 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
|
||||
|
||||
<svg
|
||||
{{ $attributes->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"
|
||||
>
|
||||
<path d="M12 2v8" />
|
||||
<path d="m4.93 10.93 1.41 1.41" />
|
||||
<path d="M2 18h2" />
|
||||
<path d="M20 18h2" />
|
||||
<path d="m19.07 10.93-1.41 1.41" />
|
||||
<path d="M22 22H2" />
|
||||
<path d="m8 6 4-4 4 4" />
|
||||
<path d="M16 18a4 4 0 0 0-8 0" />
|
||||
</svg>
|
||||
69
resources/views/recipes/sunrise-sunset.liquid
Normal file
69
resources/views/recipes/sunrise-sunset.liquid
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<!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 layout--col gap--space-between">
|
||||
<!-- Top row: 2 columns -->
|
||||
<div class="grid">
|
||||
<!-- Sunrise Time - Left column -->
|
||||
<div class="item col-span-6">
|
||||
<div class="content text--center flex flex--col flex--center-xy">
|
||||
<span class="label label--large font--bold text--center">Sunrise</span>
|
||||
<span class="value value--large text--center font--normal">
|
||||
{{ data.today.sunrise }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Sunset Time - Right column -->
|
||||
<div class="item col-span-6">
|
||||
<div class="content text--center flex flex--col flex--center-xy">
|
||||
<span class="label label--large font--bold text--center">Sunset</span>
|
||||
<span class="value value--large text--center font--normal">
|
||||
{{ data.today.sunset }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom row: 2 columns -->
|
||||
<div class="grid">
|
||||
<!-- Day Progress - Left column -->
|
||||
|
||||
<!-- Tomorrow's Times - Right column -->
|
||||
<div class="item col-span-6">
|
||||
<div class="content text--center flex flex--col flex--center-xy">
|
||||
<span class="label label--large font--bold text--center">Tomorrow</span>
|
||||
<div class="value value--medium text--center font--normal">
|
||||
<div>
|
||||
<span>↑ {{ data.tomorrow.sunrise }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>↓ {{ data.tomorrow.sunset }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Title Bar -->
|
||||
<div class="title_bar">
|
||||
<span class="title">Sunrise & Sunset</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue