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
46 changes: 35 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,55 @@
<title>RSS Reader - Screenly Edge App</title>
<script src="screenly.js?version=1"></script>
</head>
<body>
<body
class="text-white 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-[3px]"
>
<auto-scaler
reference-width="1920"
reference-height="1080"
orientation="auto"
class="relative z-[var(--z-index-content)]"
>
<div id="app">
<div id="app" class="flex flex-col w-full h-full">
<app-header class="header" show-date></app-header>

<template id="feed-card-template">
<article class="feed-card">
<div class="feed-card-meta">
<h2 class="feed-card-title"></h2>
<time class="feed-card-date"></time>
<article
class="feed-card flex flex-col gap-5 p-6 bg-[linear-gradient(90deg,rgba(0,0,0,0.4)_0%,rgba(0,0,0,0.4)_100%),linear-gradient(142deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_100%)] border-[0.75px] border-white/10 rounded-[1.667rem] backdrop-blur-[10px] overflow-hidden shadow-[inset_0_0.75px_0_rgba(255,255,255,0.15),inset_0_-0.75px_0_rgba(255,255,255,0.05)] portrait:gap-10 portrait:p-[3.25rem] portrait:[&:nth-child(n+4)]:hidden"
>
<div class="feed-card-meta flex flex-col gap-1.5">
<h2
class="feed-card-title m-0 text-[1.458rem] font-bold leading-[1.929rem] text-white line-clamp-2 portrait:text-[2rem] portrait:leading-[2.625rem]"
></h2>
<time
class="feed-card-date mt-2 text-[1.042rem] font-normal leading-[1.563rem] text-white/80 whitespace-nowrap portrait:mt-3 portrait:text-2xl portrait:leading-8"
></time>
</div>
<p class="feed-card-excerpt"></p>
<span class="feed-card-source"></span>
<p
class="feed-card-excerpt flex-1 m-0 text-[1.042rem] font-medium leading-[1.563rem] text-white line-clamp-4 portrait:text-2xl portrait:leading-8 portrait:line-clamp-3"
></p>
<span
class="feed-card-source text-[0.833rem] font-semibold leading-5 text-white/80 tracking-[0.08em] uppercase portrait:text-lg portrait:leading-6"
></span>
</article>
</template>

<p id="feed-date" class="feed-date"></p>
<p
id="feed-date"
class="feed-date m-0 pt-[5.25rem] px-40 text-[2.344rem] font-normal leading-[3.073rem] text-white text-center text-shadow whitespace-nowrap portrait:pt-40 portrait:px-10 portrait:text-[5.625rem] portrait:leading-[7.375rem] portrait:whitespace-normal"
></p>

<main id="feed-grid" class="feed-grid" hidden></main>
<main
id="feed-grid"
class="feed-grid flex-1 grid grid-cols-3 gap-5 pt-[3.75rem] px-40 pb-[7.5rem] overflow-hidden [&[hidden]]:hidden portrait:flex-initial portrait:mt-auto portrait:grid-cols-1 portrait:auto-rows-fr portrait:content-start portrait:px-10 portrait:pt-[3.75rem] portrait:pb-[7.5rem]"
hidden
></main>

<div id="feed-error" class="feed-error" hidden>
<div
id="feed-error"
class="feed-error flex-1 flex items-center justify-center pb-[10%] text-2xl leading-[3rem] text-white/80 text-center [&[hidden]]:hidden"
hidden
>
<p>Unable to load RSS feed.<br />Retrying&hellip;</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"devDependencies": {
"@playwright/test": "^1.58.0",
"@screenly/edge-apps": "^1.0.0",
"@screenly/edge-apps": "^1.3.0",
"@types/bun": "^1.3.13",
"@types/jsdom": "^28.0.1",
"bun-types": "^1.3.13",
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.
233 changes: 12 additions & 221 deletions src/css/style.css
Original file line number Diff line number Diff line change
@@ -1,221 +1,12 @@
@import '@screenly/edge-apps/styles';

:root {
--card-bg:
linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%),
linear-gradient(
142deg,
rgba(255, 255, 255, 0.08) 0%,
rgba(255, 255, 255, 0.02) 100%
);
--card-border: rgba(255, 255, 255, 0.1);
--card-radius: 1.667rem;
--card-padding: 1.5rem;
--card-gap: 1.25rem;
--grid-gap: 1.25rem;
--text-primary: #ffffff;
--text-muted: rgba(255, 255, 255, 0.8);
}

* {
box-sizing: border-box;
}

#feed-grid[hidden],
#feed-error[hidden] {
display: none;
}

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

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(3px);
}

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

#app {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}

.header {
border-radius: 1.042rem;
padding-right: 1.25rem;
background: rgba(0, 0, 0, 0.2);
box-shadow:
inset 0 0.052rem 0 rgba(255, 255, 255, 0.15),
inset 0 -0.052rem 0 rgba(255, 255, 255, 0.05);
}

.feed-date {
margin: 0;
padding: 5.25rem 10rem 0;
font-size: 2.344rem;
font-weight: 400;
line-height: 3.073rem;
color: var(--text-primary);
text-align: center;
text-shadow: 0 0.104rem 0.313rem rgba(0, 0, 0, 0.25);
white-space: nowrap;
}

.feed-grid {
flex: 1;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--grid-gap);
padding: 3.75rem 10rem 7.5rem;
overflow: hidden;
}

.feed-card {
display: flex;
flex-direction: column;
gap: var(--card-gap);
padding: var(--card-padding);
background: var(--card-bg);
border: 0.75px solid var(--card-border);
border-radius: var(--card-radius);
backdrop-filter: blur(10px);
overflow: hidden;
box-shadow:
inset 0 0.75px 0 rgba(255, 255, 255, 0.15),
inset 0 -0.75px 0 rgba(255, 255, 255, 0.05);
}

.feed-card-meta {
display: flex;
flex-direction: column;
gap: 0.375rem;
}

.feed-card-title {
margin: 0;
font-size: 1.458rem;
font-weight: 700;
line-height: 1.929rem;
color: var(--text-primary);
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}

.feed-card-date {
margin-top: 0.5rem;
font-size: 1.042rem;
font-weight: 400;
line-height: 1.563rem;
color: var(--text-muted);
white-space: nowrap;
}

.feed-card-source {
font-size: 0.833rem;
font-weight: 600;
line-height: 1.25rem;
color: var(--text-muted);
letter-spacing: 0.08em;
text-transform: uppercase;
}

.feed-card-excerpt {
flex: 1;
margin: 0;
font-size: 1.042rem;
font-weight: 500;
line-height: 1.563rem;
color: var(--text-primary);
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
overflow: hidden;
}

.feed-error {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding-bottom: 10%;
font-size: 1.5rem;
line-height: 3rem;
color: var(--text-muted);
text-align: center;
}

@media (orientation: portrait) {
.header {
padding: 0.938rem 1.25rem;
border-radius: 1.25rem;
font-size: 1.5rem;
}

.feed-date {
padding: 10rem 2.5rem 0;
font-size: 5.625rem;
line-height: 7.375rem;
white-space: normal;
}

.feed-grid {
flex: unset;
margin-top: auto;
grid-template-columns: 1fr;
grid-auto-rows: 1fr;
align-content: start;
padding: 3.75rem 2.5rem 7.5rem;
}

.feed-card {
gap: 2.5rem;
padding: 3.25rem;
}

.feed-card:nth-child(n + 4) {
display: none;
}

.feed-card-title {
font-size: 2rem;
line-height: 2.625rem;
-webkit-line-clamp: 2;
}

.feed-card-date {
margin-top: 0.75rem;
font-size: 1.5rem;
line-height: 2rem;
}

.feed-card-source {
font-size: 1.125rem;
line-height: 1.5rem;
}

.feed-card-excerpt {
font-size: 1.5rem;
line-height: 2rem;
-webkit-line-clamp: 3;
}
}
/* 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);
Loading