Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 39 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,47 @@
<title>Simple Timer - Screenly Edge App</title>
<script src="screenly.js?version=1"></script>
</head>
<body>
<body
class="text-white text-shadow bg-[url('/static/images/bg.webp')] bg-no-repeat bg-center bg-cover before:content-[''] before:fixed before:inset-0 before:z-[var(--z-index-backdrop)] before:pointer-events-none before:bg-black/20 before:backdrop-blur-[7px]"
>
<auto-scaler
reference-width="1920"
reference-height="1080"
orientation="auto"
class="relative z-[var(--z-index-content)]"
>
<div id="app">
<div id="app" class="w-full h-full portrait:flex portrait:flex-col">
<app-header class="header"></app-header>
<main class="content">
<section class="timer-section">
<div class="date-text" data-date>--</div>
<div class="timer-card">
<div class="progress-ring-container" data-progress-ring></div>
<div class="timer-display">
<div class="timer-digits" data-timer-digits>00:00:00</div>
<div class="timer-total" data-timer-total>--</div>
<main
class="flex justify-center items-center h-[calc(100%-5rem)] portrait:flex-1 portrait:h-auto"
>
<section class="flex flex-col items-center gap-8">
<div
class="text-[2.8125rem] font-normal tracking-[-0.1125rem] portrait:text-[2.4rem]"
data-date
>
--
</div>
<div
class="relative flex justify-center items-center w-[41.25rem] h-[41.25rem] rounded-3xl border-[0.047rem] border-white/10 bg-[linear-gradient(90deg,rgba(0,0,0,0.4),rgba(0,0,0,0.4)),linear-gradient(90deg,rgba(68,68,68,0.4),rgba(68,68,68,0.4)),linear-gradient(135deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_100%)] shadow-[0_0.84rem_2.52rem_0_rgba(0,0,0,0.15),0_0.047rem_0_0_rgba(255,255,255,0.15)_inset,0_-0.047rem_0_0_rgba(255,255,255,0.05)_inset] portrait:w-[36rem] portrait:h-[36rem]"
>
<div
class="absolute inset-0 flex justify-center items-center [&>svg]:w-[73%] [&>svg]:h-[73%]"
data-progress-ring
></div>
<div class="relative flex flex-col items-center gap-2 z-[1]">
<div
class="font-[Inria_Sans,sans-serif] font-bold text-[5.8rem] leading-none tracking-[0.15rem] tabular-nums portrait:text-[5rem]"
data-timer-digits
>
00:00:00
</div>
<div
class="font-[Inria_Sans,sans-serif] font-normal text-[1.7rem] text-white/70"
data-timer-total
>
--
</div>
</div>
</div>
</section>
Expand All @@ -30,7 +55,10 @@
</auto-scaler>
<template id="timer-digits-template">
<span data-time-prefix></span
><span class="accent" data-time-seconds></span>
><span
class="text-[var(--theme-color-primary)]"
data-time-seconds
></span>
</template>
<script type="module" src="/src/main.ts"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prettier": "./.prettierrc.json",
"devDependencies": {
"@playwright/test": "^1.60.0",
"@screenly/edge-apps": "^1.2.1",
"@screenly/edge-apps": "^1.3.0",
"@types/bun": "^1.3.14",
"@types/jsdom": "^28.0.3",
"bun-types": "^1.3.14",
Expand Down
Binary file modified screenshots/1080x1920.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/1280x720.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/1920x1080.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/2160x3840.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/2160x4096.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/3840x2160.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/4096x2160.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/480x800.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/720x1280.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/800x480.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
166 changes: 14 additions & 152 deletions src/css/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/* Import Screenly Design System */
@import '@screenly/edge-apps/styles';
/* Skip Tailwind's preflight: it resets `border` on every element (including
custom-element hosts like <app-header>), which strips their shadow-DOM
:host styling. The design system's own reset.css already normalizes
box-sizing/margin/padding, so preflight isn't needed here. */
@layer theme, base, utilities;

@import 'tailwindcss/theme.css' layer(theme);
/* @screenly/edge-apps/styles goes in the `base` layer so Tailwind utilities
(declared after `base` above) always win the cascade, regardless of
selector specificity — unlayered CSS otherwise beats layered CSS. */
@import '@screenly/edge-apps/styles' layer(base);
@import 'tailwindcss/utilities.css' layer(utilities);

/* App-specific styles */

@font-face {
font-family: 'Inria Sans';
Expand All @@ -20,153 +32,3 @@
:root {
--theme-color-primary: #ac1fff;
}

* {
box-sizing: border-box;
}

body {
margin: 0;
padding: 0;
overflow: hidden;
color: white;
font-family: 'Inter', system-ui, sans-serif;
background: url('/static/images/bg.webp') no-repeat center center;
background-size: cover;
text-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
}

body::before {
content: '';
position: fixed;
inset: 0;
z-index: var(--z-index-backdrop);
pointer-events: none;
background: rgba(0, 0, 0, 0.2);
backdrop-filter: blur(7px);
}

auto-scaler {
position: relative;
z-index: var(--z-index-content);
}

#app {
width: 100%;
height: 100%;
}

.content {
display: flex;
justify-content: center;
align-items: center;
height: calc(100% - 5rem);
}

.timer-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
}

.date-text {
font-family: 'Inter', system-ui, sans-serif;
font-size: 2.8125rem;
font-weight: 400;
color: white;
letter-spacing: -0.1125rem;
text-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
}

.timer-card {
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 41.25rem;
height: 41.25rem;
border-radius: 1.5rem;
border: 0.047rem solid rgba(255, 255, 255, 0.1);
background:
linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
linear-gradient(90deg, rgba(68, 68, 68, 0.4), rgba(68, 68, 68, 0.4)),
linear-gradient(
135deg,
rgba(255, 255, 255, 0.08) 0%,
rgba(255, 255, 255, 0.02) 100%
);
box-shadow:
0 0.84rem 2.52rem 0 rgba(0, 0, 0, 0.15),
0 0.047rem 0 0 rgba(255, 255, 255, 0.15) inset,
0 -0.047rem 0 0 rgba(255, 255, 255, 0.05) inset;
}

.progress-ring-container {
position: absolute;
inset: 0;
display: flex;
justify-content: center;
align-items: center;
}

.progress-ring-container svg {
width: 73%;
height: 73%;
}

.timer-display {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
z-index: 1;
}

.timer-digits {
font-family: 'Inria Sans', sans-serif;
font-weight: 700;
font-size: 5.8rem;
line-height: 1;
letter-spacing: 0.15rem;
color: white;
font-variant-numeric: tabular-nums;
}

.timer-digits .accent {
color: var(--theme-color-primary);
}

.timer-total {
font-family: 'Inria Sans', sans-serif;
font-weight: 400;
font-size: 1.7rem;
color: rgba(255, 255, 255, 0.7);
}

@media (orientation: portrait) {
#app {
display: flex;
flex-direction: column;
height: 100%;
}

.content {
flex: 1;
height: auto;
}

.timer-card {
width: 36rem;
height: 36rem;
}

.timer-digits {
font-size: 5rem;
}

.date-text {
font-size: 2.4rem;
}
}
Loading