This commit introduces breaking changes. It overhauls how and where services are configured and placed in the codebase, as well as moving the entire source into src/ It also changes how these integrations are configured via environment variables. Old configs will still work for now, but it is strongly suggested that you migrate your config.
98 lines
5.0 KiB
Handlebars
98 lines
5.0 KiB
Handlebars
<main class="grid grid-rows-3 grid-cols-[1fr] justify-center items-center h-screen bg-base">
|
|
<div class="flex h-full p-2.5 justify-between">
|
|
<div>
|
|
{{#if WeatherData}}
|
|
<div class="text-subtle flex items-center">
|
|
<span class="mr-2 flex items-center">
|
|
{{{WeatherData.Icon}}}
|
|
</span>
|
|
<div class="font-semibold">
|
|
<p>{{WeatherData.Temp}}°C</p>
|
|
<p>{{WeatherData.Desc}}</p>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
<div>
|
|
{{#if UptimeData}}
|
|
<div class="text-subtle flex items-end flex-col">
|
|
{{#each UptimeData}}
|
|
<div class="flex items-center">
|
|
<span class="mr-2 flex items-center">
|
|
{{{this.FriendlyName}}}
|
|
</span>
|
|
<div class="relative my-auto size-2">
|
|
<div class="relative my-auto size-2 flex-shrink-0 flex-grow-0">
|
|
<svg class="absolute w-full h-full animate-ping" viewBox="0 0 10 10">
|
|
<circle cx="5" cy="5" r="5"
|
|
class="fill-current {{#if (eq this.Status 2)}} text-success {{else}} text-error {{/if}}">
|
|
</circle>
|
|
</svg>
|
|
<svg class="relative w-full h-full" viewBox="0 0 10 10">
|
|
<circle cx="5" cy="5" r="5"
|
|
class="fill-current {{#if (eq this.Status 2)}} text-success {{else}} text-error {{/if}}">
|
|
</circle>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
<div class="row-start-2 flex flex-col items-center w-full px-6">
|
|
<div class="flex items-center pb-2.5">
|
|
<svg class="mr-3 aspect-square w-[clamp(42px,10vw,60px)]" viewBox="0 0 100 100" fill="none"
|
|
xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="12.1483" y="24.7693" width="70" height="47" rx="12" transform="rotate(14.63 12.1483 24.7693)"
|
|
fill="url(#paint0_linear_20_10)" />
|
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
d="M52.7386 13.4812C46.8869 10.3698 39.6209 12.5913 36.5096 18.4429L32.7819 25.4537L68.4322 34.7599C77.5166 37.1313 82.9586 46.418 80.5872 55.5025L74.7779 77.7567C74.7752 77.7674 74.7724 77.778 74.7696 77.7886C79.7728 78.7022 85.0029 76.3441 87.518 71.6138L98.3159 51.306C101.427 45.4543 99.2058 38.1883 93.3542 35.0769L52.7386 13.4812Z"
|
|
fill="url(#paint1_linear_20_10)" />
|
|
<defs>
|
|
<linearGradient id="paint0_linear_20_10" x1="12.359" y1="44.8681" x2="82.491" y2="48.2607"
|
|
gradientUnits="userSpaceOnUse">
|
|
<stop stop-color="#F0389B" />
|
|
<stop offset="1" stop-color="#EEE740" />
|
|
</linearGradient>
|
|
<linearGradient id="paint1_linear_20_10" x1="33.8935" y1="25.6926" x2="94.2236" y2="61.6131"
|
|
gradientUnits="userSpaceOnUse">
|
|
<stop stop-color="#AA38F0" />
|
|
<stop offset="1" stop-color="#EE406A" />
|
|
</linearGradient>
|
|
</defs>
|
|
</svg>
|
|
<h1>Passport</h1>
|
|
</div>
|
|
<form class="w-full max-w-3xl" action="{{ SearchProviderURL }}" method="GET">
|
|
<input name="{{ SearchParam }}" aria-label="Search bar"
|
|
class="w-full bg-surface border border-highlight-sm/70 rounded-full px-3 py-1 text-white h-7 focus-visible:outline-none placeholder:italic placeholder:text-highlight search"
|
|
placeholder="Search..." />
|
|
</form>
|
|
</div>
|
|
</main>
|
|
<section class="flex justify-center w-full bg-surface">
|
|
<div class="w-full sm:w-4/5 p-2.5">
|
|
{{#each Categories}}
|
|
<div class="flex items-center mt-2 first:mt-0">
|
|
<img class="object-contain mr-2 select-none" width="32" height="32" draggable="false" alt="{{this.Name}}"
|
|
src="{{this.Icon}}" />
|
|
<h2 class="capitalize break-all">{{this.Name}}</h2>
|
|
</div>
|
|
<div class="p-2.5 grid grid-cols-[repeat(auto-fill,_minmax(min(330px,_100%),_1fr))] gap-2">
|
|
{{#each this.Links}} <a href="{{this.URL}}" class="link-card" draggable="false" target="_blank"
|
|
rel="noopener noreferrer">
|
|
<img width="64" height="64" draggable="false" src="{{this.Icon}}" alt="{{this.Name}}" />
|
|
<div>
|
|
<h3>{{this.Name}}</h3>
|
|
<p>{{this.Description}}</p>
|
|
</div>
|
|
</a>
|
|
{{else}}
|
|
<p class="text-subtle">No links here, add one!</p>
|
|
{{/each}}
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
</section> |