Files
RSS-Feed/assets/style.css
T
Harwinder Sekhon 41f07b6ad8 Add manual subreddit/YouTube channel configuration (manage.php)
Browser-based feed selection layered on top of config/feeds.php:

- manage.php (password + CSRF gated, session based): add subreddits
  (name / r/name / URL) and YouTube channels (@handle / UC id / URL,
  handle resolved to channel_id once, youtube.com only); enable/disable
  toggles; remove manual feeds; config feeds are hidden, not deleted.
- New feeds are validated with one immediate fetch (bypassing the
  per-refresh host cap): HTTP 404 rejects the entry, 429 keeps it for
  a later refresh. YouTube labels adopt the real channel title.
- feeds table gains origin (config|manual) and enabled columns, with
  a guarded ALTER migration for existing databases.
- Only enabled feeds are refreshed and served: getItems/countItems
  filter by feed_url in enabled feeds, so deselected feeds' cached
  stories are hidden, not deleted; re-adding a URL re-enables it.
- Dashboard header gets a Manage link; manage page styled with the
  existing design tokens; README documents the feature.
2026-10-05 18:58:38 -04:00

688 lines
14 KiB
CSS

:root {
--ink: #160b2e;
--ink-soft: #5b5178;
--bg: #f4f1ff;
--surface: #ffffff;
--line: #e6dffb;
--accent: #6a3dff;
--youtube: #ff1f4b;
--reddit: #ff6a00;
--rt: #00c389;
--sun: #ffc24b;
--display: "Space Grotesk", system-ui, sans-serif;
--body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
--mono: "JetBrains Mono", ui-monospace, monospace;
}
/* ---------- Shell ---------- */
.app-body {
position: relative;
min-height: 100vh;
background-color: var(--bg);
color: var(--ink);
font-family: var(--body);
-webkit-font-smoothing: antialiased;
}
.app-body::before {
content: "";
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
background:
radial-gradient(42rem 30rem at 6% -8%, rgba(106, 61, 255, 0.18), transparent 62%),
radial-gradient(36rem 26rem at 98% -4%, rgba(255, 31, 75, 0.14), transparent 60%),
radial-gradient(34rem 26rem at 52% 112%, rgba(0, 195, 137, 0.16), transparent 62%),
radial-gradient(30rem 22rem at 82% 78%, rgba(255, 106, 0, 0.12), transparent 60%);
}
.site-header,
main {
position: relative;
z-index: 1;
}
/* ---------- Header ---------- */
.site-header {
position: sticky;
top: 0;
z-index: 20;
background: rgba(255, 255, 255, 0.78);
border-bottom: 1px solid var(--line);
backdrop-filter: saturate(180%) blur(16px);
-webkit-backdrop-filter: saturate(180%) blur(16px);
}
.brand {
display: inline-flex;
align-items: center;
gap: 0.65rem;
text-decoration: none;
}
.brand-mark {
width: 26px;
height: 26px;
border-radius: 9px;
background: conic-gradient(from 220deg, var(--accent), var(--youtube), var(--reddit), var(--rt), var(--accent));
box-shadow: 0 6px 16px rgba(106, 61, 255, 0.4);
}
.brand-text {
font-family: var(--display);
font-weight: 700;
font-size: 1.12rem;
letter-spacing: -0.01em;
color: var(--ink);
}
.brand-text em {
font-style: normal;
background: linear-gradient(90deg, var(--accent), var(--youtube) 55%, var(--reddit));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.header-meta {
gap: 0.55rem;
font-size: 0.76rem;
color: var(--ink-soft);
}
.header-meta .sep {
opacity: 0.4;
}
.pulse {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--rt);
animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(0, 195, 137, 0.55); }
70% { box-shadow: 0 0 0 9px rgba(0, 195, 137, 0); }
100% { box-shadow: 0 0 0 0 rgba(0, 195, 137, 0); }
}
.spectrum-rail {
height: 5px;
background: linear-gradient(90deg,
var(--accent), var(--youtube) 32%, var(--reddit) 60%, var(--sun) 78%, var(--rt));
}
/* ---------- Filter pills ---------- */
.filter-pills {
gap: 0.5rem;
}
.filter-pill {
--pill: var(--accent);
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.42rem 0.95rem;
border-radius: 999px;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.7);
color: var(--ink);
font-weight: 600;
font-size: 0.86rem;
text-decoration: none;
white-space: nowrap;
transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.filter-pill .pill-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--pill);
transition: background 0.15s ease;
}
.filter-pill:hover {
transform: translateY(-1px);
box-shadow: 0 8px 18px -10px var(--pill);
color: var(--ink);
}
.filter-pill.active {
background: var(--pill);
border-color: transparent;
color: #fff;
box-shadow: 0 10px 22px -10px var(--pill);
}
.filter-pill.active .pill-dot {
background: rgba(255, 255, 255, 0.9);
}
.refresh-chip {
display: inline-flex;
align-items: center;
gap: 0.4rem;
padding: 0.32rem 0.7rem;
border-radius: 999px;
background: rgba(106, 61, 255, 0.1);
color: var(--accent);
font-size: 0.72rem;
font-weight: 500;
}
/* ---------- Time range ---------- */
.toolbar-label {
font-size: 0.66rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--ink-soft);
padding-right: 0.15rem;
}
.range-pills {
gap: 0.35rem;
}
.range-pill {
display: inline-flex;
align-items: center;
padding: 0.32rem 0.75rem;
border-radius: 999px;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.7);
color: var(--ink-soft);
font-size: 0.78rem;
font-weight: 600;
text-decoration: none;
white-space: nowrap;
transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.range-pill:hover {
color: var(--ink);
border-color: var(--accent);
transform: translateY(-1px);
}
.range-pill.active {
background: var(--accent);
border-color: transparent;
color: #fff;
box-shadow: 0 10px 22px -10px var(--accent);
}
/* ---------- Cards ---------- */
.feed-card {
--src: var(--accent);
position: relative;
border: 1px solid var(--line);
border-top: 4px solid var(--src);
border-radius: 18px;
background: var(--surface);
overflow: hidden;
box-shadow: 0 1px 2px rgba(22, 11, 46, 0.04), 0 14px 34px -26px rgba(22, 11, 46, 0.5);
transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feed-card:hover {
transform: translateY(-4px);
box-shadow: 0 20px 44px -20px rgba(22, 11, 46, 0.4);
box-shadow: 0 20px 44px -20px color-mix(in srgb, var(--src) 55%, transparent);
}
.feed-thumb-link {
position: relative;
display: block;
overflow: hidden;
background: #efeaff;
}
.feed-thumb-link::after {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
background: linear-gradient(to top, rgba(22, 11, 46, 0.5), transparent 52%);
}
.feed-thumb {
width: 100%;
aspect-ratio: 16 / 9;
object-fit: cover;
display: block;
transition: transform 0.4s ease;
}
.feed-card:hover .feed-thumb {
transform: scale(1.06);
}
.thumb-tag,
.source-chip {
font-family: var(--mono);
font-size: 0.64rem;
font-weight: 600;
letter-spacing: 0.09em;
text-transform: uppercase;
color: #fff;
background: var(--src);
}
.thumb-tag {
position: absolute;
left: 0.7rem;
bottom: 0.7rem;
z-index: 1;
padding: 0.24rem 0.6rem;
border-radius: 999px;
box-shadow: 0 6px 16px -6px rgba(22, 11, 46, 0.6);
}
.source-chip {
display: inline-flex;
align-items: center;
padding: 0.2rem 0.55rem;
border-radius: 999px;
}
.feed-card .card-body {
padding: 1rem 1.1rem 1.1rem;
}
.feed-name {
font-size: 0.68rem;
letter-spacing: 0.02em;
color: var(--ink-soft);
}
.feed-card .card-title {
font-family: var(--display);
font-size: 1.02rem;
font-weight: 600;
line-height: 1.32;
}
.feed-card .card-title a {
color: var(--ink);
text-decoration: none;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
transition: color 0.15s ease;
}
.feed-card .card-title a:hover {
color: var(--src);
}
.feed-card .card-text {
font-size: 0.86rem;
line-height: 1.55;
color: var(--ink-soft);
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.card-footer-meta {
border-top: 1px dashed var(--line);
}
.author {
font-size: 0.78rem;
color: var(--ink-soft);
}
.timestamp {
font-size: 0.72rem;
font-weight: 500;
color: var(--src);
}
.mono {
font-family: var(--mono);
}
/* ---------- Empty state ---------- */
.empty-state {
padding: 4.5rem 1rem;
color: var(--ink-soft);
}
.empty-mark {
width: 58px;
height: 58px;
margin: 0 auto 1rem;
border-radius: 20px;
background: conic-gradient(from 220deg, var(--accent), var(--youtube), var(--reddit), var(--rt), var(--accent));
filter: saturate(1.1);
animation: spin 12s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.empty-title {
font-family: var(--display);
font-size: 1.15rem;
color: var(--ink);
}
/* ---------- Button ---------- */
.btn-energy {
border: 0;
border-radius: 999px;
padding: 0.7rem 1.7rem;
font-family: var(--display);
font-weight: 600;
color: #fff;
background: linear-gradient(100deg, var(--accent), var(--youtube) 48%, var(--reddit) 78%, var(--rt));
background-size: 160% 100%;
box-shadow: 0 14px 30px -14px rgba(106, 61, 255, 0.8);
transition: transform 0.15s ease, background-position 0.4s ease, box-shadow 0.15s ease;
}
.btn-energy:hover,
.btn-energy:focus {
color: #fff;
transform: translateY(-2px);
background-position: 100% 0;
box-shadow: 0 18px 36px -14px rgba(255, 31, 75, 0.7);
}
.btn-energy:disabled {
opacity: 0.65;
transform: none;
color: #fff;
}
.alert-soft {
border: 1px solid #ffe1a8;
border-radius: 14px;
background: #fff8ea;
color: #7a5a12;
}
.alert-ok-soft {
border: 1px solid #b7ecd2;
border-radius: 14px;
background: #ecfbf3;
color: #14624a;
}
/* ---------- Manage page ---------- */
.manage-link {
display: inline-flex;
align-items: center;
padding: 0.38rem 0.85rem;
border-radius: 999px;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.7);
color: var(--ink-soft);
font-size: 0.78rem;
font-weight: 600;
text-decoration: none;
white-space: nowrap;
transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.manage-link:hover {
color: var(--accent);
border-color: var(--accent);
transform: translateY(-1px);
box-shadow: 0 8px 18px -12px var(--accent);
}
.manage-title {
font-size: 0.68rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--ink-soft);
}
.manage-main {
max-width: 920px;
}
.manage-panel {
background: var(--surface);
border: 1px solid var(--line);
border-radius: 18px;
padding: 1.25rem 1.4rem;
box-shadow: 0 1px 2px rgba(22, 11, 46, 0.04), 0 14px 34px -26px rgba(22, 11, 46, 0.5);
}
.manage-notice {
max-width: 560px;
margin: 3rem auto;
}
.manage-login {
max-width: 460px;
margin: 3rem auto;
}
.manage-heading {
font-family: var(--display);
font-size: 1.25rem;
font-weight: 700;
margin-bottom: 0.5rem;
}
.manage-subheading {
font-family: var(--display);
font-size: 1rem;
font-weight: 600;
margin-bottom: 0.85rem;
}
.btn-compact {
padding: 0.5rem 1.35rem;
white-space: nowrap;
}
.manage-group {
margin-bottom: 1.9rem;
}
.manage-group-title {
display: flex;
align-items: center;
gap: 0.5rem;
font-family: var(--display);
font-size: 1.02rem;
font-weight: 700;
margin-bottom: 0.7rem;
}
.manage-group-title .pill-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--src);
}
.manage-group-title .count {
font-size: 0.68rem;
font-weight: 600;
color: var(--ink-soft);
background: rgba(22, 11, 46, 0.06);
padding: 0.12rem 0.5rem;
border-radius: 999px;
}
.feed-rows {
display: flex;
flex-direction: column;
gap: 0.55rem;
}
.feed-row {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.6rem 0.9rem;
background: var(--surface);
border: 1px solid var(--line);
border-left: 4px solid var(--src);
border-radius: 14px;
padding: 0.7rem 1rem;
transition: box-shadow 0.15s ease, opacity 0.15s ease;
}
.feed-row:hover {
box-shadow: 0 12px 26px -18px rgba(22, 11, 46, 0.55);
}
.feed-row.is-off {
opacity: 0.55;
}
.feed-row-main {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.35rem 0.6rem;
min-width: 0;
flex: 1 1 320px;
}
.feed-row-label {
font-weight: 600;
font-size: 0.9rem;
}
.origin-badge {
font-size: 0.6rem;
font-weight: 600;
letter-spacing: 0.09em;
text-transform: uppercase;
color: var(--ink-soft);
background: rgba(22, 11, 46, 0.06);
padding: 0.16rem 0.5rem;
border-radius: 999px;
}
.feed-row-url {
font-size: 0.66rem;
color: var(--ink-soft);
text-decoration: none;
max-width: 36ch;
opacity: 0.85;
}
.feed-row-url:hover {
color: var(--accent);
opacity: 1;
}
.health {
display: inline-flex;
align-items: center;
gap: 0.32rem;
font-size: 0.64rem;
letter-spacing: 0.03em;
white-space: nowrap;
}
.health-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: currentColor;
}
.health-ok {
color: var(--rt);
}
.health-err {
color: var(--youtube);
}
.health-idle {
color: var(--ink-soft);
opacity: 0.75;
}
.feed-row-actions {
display: flex;
align-items: center;
gap: 0.45rem;
flex-shrink: 0;
}
.btn-mini {
border: 1px solid var(--line);
border-radius: 999px;
background: rgba(255, 255, 255, 0.75);
color: var(--ink-soft);
font-size: 0.72rem;
font-weight: 600;
padding: 0.3rem 0.85rem;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.btn-mini:hover,
.btn-mini:focus {
color: var(--ink);
border-color: var(--ink-soft);
}
.btn-mini-on {
color: var(--accent);
border-color: rgba(106, 61, 255, 0.45);
background: rgba(106, 61, 255, 0.08);
}
.btn-mini-on:hover,
.btn-mini-on:focus {
color: var(--accent);
border-color: var(--accent);
background: rgba(106, 61, 255, 0.14);
}
.btn-mini-danger:hover,
.btn-mini-danger:focus {
color: var(--youtube);
border-color: rgba(255, 31, 75, 0.5);
background: rgba(255, 31, 75, 0.07);
}
/* ---------- Focus & motion ---------- */
a:focus-visible,
button:focus-visible {
outline: 3px solid rgba(106, 61, 255, 0.55);
outline-offset: 2px;
border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
}
}