From d5d2923dc59dbc4a021cdffb30b625f0373cfa74 Mon Sep 17 00:00:00 2001 From: codey Date: Fri, 19 Dec 2025 07:46:41 -0500 Subject: [PATCH] misc --- src/assets/styles/global.css | 127 ++++++++++++++++++++++++++++++--- src/components/Footer.astro | 105 ++++++++++++++++++++++++--- src/components/LyricSearch.jsx | 22 +++++- src/components/RandomMsg.jsx | 115 ++++++++++++++--------------- src/pages/TRip/index.astro | 2 +- src/utils/buildTime.js | 20 ++++-- 6 files changed, 303 insertions(+), 88 deletions(-) diff --git a/src/assets/styles/global.css b/src/assets/styles/global.css index 444d4e2..8107d19 100644 --- a/src/assets/styles/global.css +++ b/src/assets/styles/global.css @@ -217,6 +217,11 @@ Custom border-top: 1px solid rgba(0, 0, 0, 0.06); } +.footer--subsite { + padding-top: 1rem; + margin-top: 0; +} + [data-theme="dark"] .footer { border-top-color: rgba(255, 255, 255, 0.06); } @@ -350,6 +355,63 @@ Custom color: #f87171; } +/* Source pill in lyrics result */ +.source-pill { + display: inline-flex; + align-items: center; + font-size: 0.7rem; + font-weight: 600; + padding: 0.25rem 0.5rem; + border-radius: 9999px; + border: 1px solid; + text-transform: uppercase; + letter-spacing: 0.025em; +} + +.source-pill--genius { + border-color: rgba(255, 204, 0, 0.5); + background: rgba(255, 204, 0, 0.1); + color: #b38f00; +} +[data-theme="dark"] .source-pill--genius { + border-color: rgba(255, 204, 0, 0.4); + background: rgba(255, 204, 0, 0.15); + color: #ffd633; +} + +.source-pill--lrclib { + border-color: rgba(59, 130, 246, 0.5); + background: rgba(59, 130, 246, 0.1); + color: #2563eb; +} +[data-theme="dark"] .source-pill--lrclib { + border-color: rgba(96, 165, 250, 0.4); + background: rgba(96, 165, 250, 0.15); + color: #60a5fa; +} + +.source-pill--cache { + border-color: rgba(34, 197, 94, 0.5); + background: rgba(34, 197, 94, 0.1); + color: #16a34a; +} +[data-theme="dark"] .source-pill--cache { + border-color: rgba(74, 222, 128, 0.4); + background: rgba(74, 222, 128, 0.15); + color: #4ade80; +} + +.source-pill--other { + border-color: rgba(156, 163, 175, 0.5); + background: rgba(156, 163, 175, 0.1); + color: #6b7280; +} +[data-theme="dark"] .source-pill--other { + border-color: rgba(156, 163, 175, 0.4); + background: rgba(156, 163, 175, 0.15); + color: #9ca3af; +} + #lyric-search-input { margin: 0; padding: 0; @@ -421,11 +483,11 @@ Custom .lyrics-card { border-radius: 16px; - box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.04); - padding: 1.5rem; + box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06); + padding: 1.75rem 2rem; transition: background 0.3s, box-shadow 0.3s; background: white; - border: 1px solid rgba(0, 0, 0, 0.06); + border: 1px solid rgba(0, 0, 0, 0.05); } [data-theme="dark"] .lyrics-card { @@ -451,9 +513,9 @@ Custom justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; - margin-bottom: 1.25rem; + margin-bottom: 1.5rem; padding-bottom: 1rem; - border-bottom: 1px solid rgba(0, 0, 0, 0.06); + border-bottom: 1px solid rgba(0, 0, 0, 0.05); } [data-theme="dark"] .lyrics-toolbar { @@ -472,8 +534,20 @@ Custom } @media (max-width: 480px) { + .lyrics-toolbar { + flex-direction: column; + align-items: flex-start; + gap: 0.5rem; + } + .lyrics-title { font-size: 0.95rem; + width: 100%; + } + + .lyrics-actions { + width: 100%; + justify-content: flex-start; } } @@ -520,15 +594,21 @@ Custom } .lyrics-content { - line-height: 2.0; + line-height: 1.85; font-family: 'IBM Plex Sans', 'Inter', sans-serif; font-size: 1rem; white-space: pre-wrap; + color: #374151; + letter-spacing: 0.01em; +} + +[data-theme="dark"] .lyrics-content { + color: #d1d5db; } .lyrics-content-large { - font-size: 1.08rem; - line-height: 1.85; + font-size: 1.25rem; + line-height: 2.0; } .lyrics-verse { @@ -581,13 +661,42 @@ Custom } .random-msg { - padding-top: 10px; max-width: 100%; word-wrap: break-word; white-space: pre-wrap; color: 'inherit'; } +.random-msg-container { + text-align: center; +} + +.random-msg-reload { + display: inline-flex; + align-items: center; + justify-content: center; + background: none; + border: none; + padding: 0.2rem; + margin-left: 0.35rem; + border-radius: 4px; + cursor: pointer; + opacity: 0; + transition: opacity 0.15s ease; + vertical-align: middle; + color: inherit; +} + +.random-msg-container:hover .random-msg-reload, +.random-msg-reload:focus { + opacity: 0.4; +} + +.random-msg-reload:hover { + opacity: 0.7; + background: rgba(128, 128, 128, 0.15); +} + .lyrics-card-copyButton { float: right; padding-bottom: 3%; diff --git a/src/components/Footer.astro b/src/components/Footer.astro index eebda58..27f8581 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,5 +1,5 @@ --- -import { metaData, ENVIRONMENT, WHITELABELS } from "../config"; +import { metaData, ENVIRONMENT, WHITELABELS, MAJOR_VERSION, RELEASE_FLAG } from "../config"; import RandomMsg from "../components/RandomMsg"; import { buildTime, buildNumber } from '../utils/buildTime.js'; @@ -12,17 +12,106 @@ import { getSubsiteByPath } from '../utils/subsites.js'; const detected = getSubsiteByHost(host) ?? getSubsiteByPath(Astro.url.pathname) ?? null; const isReq = detected?.short === 'req'; const whitelabel = WHITELABELS[host] ?? (isReq ? WHITELABELS[detected.host] : null); + +const versionDisplay = `v${MAJOR_VERSION}${RELEASE_FLAG ? `-${RELEASE_FLAG}` : ''}`; +const envBadge = ENVIRONMENT === 'Dev' ? 'DEV' : null; --- -