diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 79b2e12..cc6cd85 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -31,6 +31,7 @@ ENV NODE_ENV=production \ HOSTNAME=0.0.0.0 COPY --from=builder --chown=node:node /app/apps/web/.next/standalone ./ COPY --from=builder --chown=node:node /app/apps/web/.next/static ./apps/web/.next/static +COPY --from=builder --chown=node:node /app/apps/web/public ./apps/web/public USER node EXPOSE 3737 HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \ diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 9c82f37..db0c1ca 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -7,6 +7,27 @@ const config: NextConfig = { output: 'standalone', // Monorepo: trace files from the repo root so the shared package is included. outputFileTracingRoot: fileURLToPath(new URL('../..', import.meta.url)), + async headers() { + return [ + { + source: '/(.*)', + headers: [ + { key: 'X-Content-Type-Options', value: 'nosniff' }, + { key: 'X-Frame-Options', value: 'DENY' }, + { key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' }, + ], + }, + { + // The service worker must never be cached, or updates would never reach users. + source: '/sw.js', + headers: [ + { key: 'Content-Type', value: 'application/javascript; charset=utf-8' }, + { key: 'Cache-Control', value: 'no-cache, no-store, must-revalidate' }, + { key: 'Content-Security-Policy', value: "default-src 'self'; script-src 'self'" }, + ], + }, + ]; + }, }; export default config; diff --git a/apps/web/package.json b/apps/web/package.json index a01e02d..446bc85 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -15,10 +15,11 @@ "typescript": "~6.0.3" }, "dependencies": { + "@musicshare/shared": "*", + "motion": "^14.0.0", "next": "^16.3.8", "react": "19.2.3", "react-dom": "19.2.3", - "swr": "^2.5.1", - "@musicshare/shared": "*" + "swr": "^2.5.1" } } diff --git a/apps/web/public/icon-192.png b/apps/web/public/icon-192.png new file mode 100644 index 0000000..84f5176 Binary files /dev/null and b/apps/web/public/icon-192.png differ diff --git a/apps/web/public/icon-512.png b/apps/web/public/icon-512.png new file mode 100644 index 0000000..93dd443 Binary files /dev/null and b/apps/web/public/icon-512.png differ diff --git a/apps/web/public/icon-maskable-512.png b/apps/web/public/icon-maskable-512.png new file mode 100644 index 0000000..ddafb39 Binary files /dev/null and b/apps/web/public/icon-maskable-512.png differ diff --git a/apps/web/public/logo.png b/apps/web/public/logo.png new file mode 100644 index 0000000..22ae091 Binary files /dev/null and b/apps/web/public/logo.png differ diff --git a/apps/web/public/offline.html b/apps/web/public/offline.html new file mode 100644 index 0000000..ec7cf7e --- /dev/null +++ b/apps/web/public/offline.html @@ -0,0 +1,38 @@ + + + + + + + musicshare · offline + + + +
+ +

You're offline

+

musicshare needs a connection to see what your friends are playing.

+ +
+ + diff --git a/apps/web/public/sw.js b/apps/web/public/sw.js new file mode 100644 index 0000000..6201881 --- /dev/null +++ b/apps/web/public/sw.js @@ -0,0 +1,49 @@ +// musicshare service worker. +// Deliberately small: live data must always come from the network, so we only +// cache Next.js's immutable build assets, and show an offline page when a +// navigation fails. (Web push notifications will hook in here later.) +const VERSION = 'v1'; +const STATIC_CACHE = `static-${VERSION}`; +const OFFLINE_URL = '/offline.html'; + +self.addEventListener('install', (event) => { + event.waitUntil(caches.open(STATIC_CACHE).then((cache) => cache.addAll([OFFLINE_URL, '/icon-192.png']))); + self.skipWaiting(); +}); + +self.addEventListener('activate', (event) => { + event.waitUntil( + caches + .keys() + .then((keys) => Promise.all(keys.filter((k) => k !== STATIC_CACHE).map((k) => caches.delete(k)))) + .then(() => self.clients.claim()), + ); +}); + +self.addEventListener('fetch', (event) => { + const { request } = event; + if (request.method !== 'GET') return; + const url = new URL(request.url); + if (url.origin !== self.location.origin) return; // API calls, artwork, etc.: straight to the network + + // Hashed build assets never change: cache first. + if (url.pathname.startsWith('/_next/static/')) { + event.respondWith( + caches.match(request).then( + (hit) => + hit || + fetch(request).then((res) => { + const copy = res.clone(); + caches.open(STATIC_CACHE).then((cache) => cache.put(request, copy)); + return res; + }), + ), + ); + return; + } + + // Pages: always fresh; offline page if the network is gone. + if (request.mode === 'navigate') { + event.respondWith(fetch(request).catch(() => caches.match(OFFLINE_URL))); + } +}); diff --git a/apps/web/src/app/apple-icon.png b/apps/web/src/app/apple-icon.png new file mode 100644 index 0000000..159ddab Binary files /dev/null and b/apps/web/src/app/apple-icon.png differ diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css index 7da62f6..a61b7f7 100644 --- a/apps/web/src/app/globals.css +++ b/apps/web/src/app/globals.css @@ -1,133 +1,230 @@ :root { - --bg: #0e0f13; - --surface: #171920; - --surface-2: #20232c; - --border: #2a2e39; - --text: #eceef3; - --muted: #9097a6; - --accent: #7c5cff; + --bg: #07070b; + --surface: rgba(255, 255, 255, 0.045); + --surface-solid: #12121a; + --surface-2: rgba(255, 255, 255, 0.08); + --border: rgba(255, 255, 255, 0.09); + --border-strong: rgba(255, 255, 255, 0.16); + --text: #f4f3fa; + --muted: #9b99ae; + /* Brand: the logo's purple-to-blue. */ + --accent: #7c4dff; + --accent-2: #2f8cff; + --grad: linear-gradient(135deg, #7b2ff7 0%, #5b4cf0 50%, #2f8cff 100%); --accent-text: #fff; - --live: #3ddc84; - --danger: #ff5c6c; - --radius: 14px; + --live: #34d399; + --pin: #fbbf24; + --danger: #fb7185; + --radius: 20px; + --font-display: var(--font-space-grotesk), ui-sans-serif, system-ui, sans-serif; + --font-body: var(--font-inter), ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; + --spring: cubic-bezier(0.34, 1.56, 0.64, 1); color-scheme: dark; } * { box-sizing: border-box; } +html { background: var(--bg); } body { margin: 0; + min-height: 100vh; background: var(--bg); color: var(--text); - font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; + font: 15px/1.55 var(--font-body); + -webkit-font-smoothing: antialiased; } + +/* Slowly drifting colour behind everything, so the app never feels static. */ +.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; } +.ambient::before, .ambient::after { + content: ''; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; + filter: blur(90px); opacity: 0.34; +} +.ambient::before { background: #6d28d9; top: -25vmax; left: -15vmax; animation: drift-a 28s ease-in-out infinite alternate; } +.ambient::after { background: #1d6fe0; bottom: -30vmax; right: -20vmax; animation: drift-b 34s ease-in-out infinite alternate; } +@keyframes drift-a { to { transform: translate(18vmax, 12vmax) scale(1.15); } } +@keyframes drift-b { to { transform: translate(-16vmax, -10vmax) scale(0.9); } } + a { color: inherit; } -h1 { font-size: 1.6rem; margin: 0; } -h2 { font-size: 1.05rem; margin: 0 0 0.5rem; } +h1, h2, .brand, .display { font-family: var(--font-display); letter-spacing: -0.02em; } +h1 { font-size: 1.85rem; margin: 0; line-height: 1.15; } +h2 { font-size: 1.1rem; margin: 0 0 0.5rem; } input, textarea, select { width: 100%; - padding: 0.6rem 0.75rem; - border-radius: 10px; + padding: 0.7rem 0.85rem; + border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; + transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; +} +input:focus, textarea:focus, select:focus { + outline: none; border-color: var(--accent); background: rgba(124, 77, 255, 0.08); + box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.2); } -input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; } -.container { max-width: 680px; margin: 0 auto; padding: 1.5rem 1rem 4rem; } +.container { max-width: 680px; margin: 0 auto; padding: 1.75rem 1rem 5rem; } .stack { display: flex; flex-direction: column; gap: 1rem; } .row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .muted { color: var(--muted); } .error { color: var(--danger); margin: 0; } -.notice { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; margin: 0; } -.section-label { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); } -.narrow { max-width: 420px; margin: 2rem auto; } +.notice { + background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.85rem 1rem; margin: 0; + backdrop-filter: blur(16px); +} +.section-label { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; } +.narrow { max-width: 420px; margin: 2.5rem auto; } .nav { display: flex; justify-content: space-between; align-items: center; - padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); - position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); z-index: 10; + padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border); + position: sticky; top: 0; background: rgba(7, 7, 11, 0.65); backdrop-filter: blur(18px) saturate(1.4); z-index: 10; } -.brand { font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.1rem; } -.nav-links { display: flex; gap: 1rem; align-items: center; } -.nav-links a { text-decoration: none; color: var(--muted); } +.brand { font-weight: 700; text-decoration: none; font-size: 1.2rem; display: inline-flex; align-items: center; gap: 0.5rem; } +.brand-logo { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 4px 14px -4px rgba(47, 140, 255, 0.6); } +.nav-links { display: flex; gap: 1.1rem; align-items: center; } +.nav-links a { text-decoration: none; color: var(--muted); transition: color 0.2s; } .nav-links a:hover { color: var(--text); } .nav-links a.btn-primary { color: var(--accent-text); } -.nav-links a.support-link { color: #ff7aa8; } +.nav-links a.support-link { color: #f9a8d4; } @media (max-width: 480px) { .nav-links a.support-link { display: none; } } .btn { - display: inline-flex; align-items: center; justify-content: center; - padding: 0.5rem 0.95rem; border-radius: 999px; border: 1px solid var(--border); + display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; + padding: 0.55rem 1.05rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; + transition: transform 0.25s var(--spring), border-color 0.2s, background 0.2s, box-shadow 0.25s, filter 0.2s; } -.btn:hover { border-color: var(--muted); } -.btn:disabled { opacity: 0.6; cursor: default; } -.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); } -.btn-primary:hover { border-color: var(--accent); filter: brightness(1.1); } +.btn:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); } +.btn:active { transform: scale(0.96); } +.btn:disabled { opacity: 0.55; cursor: default; transform: none; } +.btn-primary { + background: var(--grad); border-color: transparent; color: var(--accent-text); + box-shadow: 0 6px 22px -6px rgba(91, 76, 240, 0.6); +} +.btn-primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 10px 28px -6px rgba(47, 140, 255, 0.65); } .btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; } -.link-button { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; } +.btn-small { padding: 0.3rem 0.75rem; font-size: 0.82rem; } +.link-button { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; transition: color 0.2s; } .link-button:hover { color: var(--text); } -.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; } -.card-pinned { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); } -.pin { background: none; border: 0; cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--muted); padding: 0.1rem 0.2rem; } -.pin:hover, .pin.pinned { color: #f5c542; } -.card-header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; } -.form { display: flex; flex-direction: column; gap: 0.75rem; } -.form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; } - -.user-chip { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 600; } -.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; } -.avatar-empty { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; } - -.status { font-size: 0.85rem; color: var(--muted); } -.status-live { color: var(--live); } -.status-live::before { - content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; - background: var(--live); margin-right: 6px; animation: pulse 1.6s ease-in-out infinite; +.card { + position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); + padding: 1.1rem; backdrop-filter: blur(20px) saturate(1.3); overflow: hidden; } -@keyframes pulse { 50% { opacity: 0.35; } } +.card-header { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.85rem; } +.card-header .user-chip { flex-shrink: 0; } +.card-header > .row { flex-wrap: nowrap; min-width: 0; justify-content: flex-end; margin-left: auto; } +.card-header .status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; display: inline-block; } +.card-header .status .eq { vertical-align: -1px; margin-right: 0.4rem; } +.card-header .pin { flex-shrink: 0; } +.form { display: flex; flex-direction: column; gap: 0.8rem; } +.form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; } + +/* Now-playing cards take their colour from the album art. */ +.np-card { border-color: rgba(255, 255, 255, 0.11); } +.np-card.pinned { border-color: rgba(251, 191, 36, 0.45); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15), 0 18px 40px -20px rgba(251, 191, 36, 0.35); } +.np-backdrop { + position: absolute; inset: -40%; z-index: 0; background-size: cover; background-position: center; + filter: blur(40px) saturate(2.2) brightness(1.1); opacity: 0.6; transform: scale(1.1); transition: opacity 0.6s; +} +.np-card.playing .np-backdrop { animation: breathe 9s ease-in-out infinite alternate; } +@keyframes breathe { to { transform: scale(1.3) rotate(8deg); opacity: 0.75; } } +.np-card::after { + content: ''; position: absolute; inset: 0; z-index: 0; + background: linear-gradient(180deg, rgba(7, 7, 11, 0.05), rgba(7, 7, 11, 0.45)); +} +.np-card > *:not(.np-backdrop) { position: relative; z-index: 1; } + +.pin { + background: none; border: 0; cursor: pointer; font-size: 1.25rem; line-height: 1; color: var(--muted); + padding: 0.15rem 0.25rem; transition: color 0.2s; +} +.pin:hover, .pin.pinned { color: var(--pin); } +.pin.pinned { text-shadow: 0 0 14px rgba(251, 191, 36, 0.6); } + +.user-chip { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 600; } +.user-chip:hover .user-name { text-decoration: underline; } +.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; } +.avatar-empty { display: grid; place-items: center; background: linear-gradient(135deg, #4a1278, #1872cf); color: #fff; font-weight: 700; font-family: var(--font-display); } +/* A spinning gradient ring while someone is listening. */ +.avatar-ring { position: relative; display: inline-grid; place-items: center; border-radius: 50%; padding: 2px; flex-shrink: 0; } +.avatar-ring.live::before { + content: ''; position: absolute; inset: 0; border-radius: 50%; + background: conic-gradient(from 0deg, #7b2ff7, #2f8cff, #34d399, #7b2ff7); animation: spin 3.5s linear infinite; +} +.avatar-ring > * { position: relative; border: 2px solid var(--bg); border-radius: 50%; } +@keyframes spin { to { transform: rotate(360deg); } } + +.status { font-size: 0.85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.45rem; } +.status-live { color: var(--live); font-weight: 600; } + +/* Equalizer bars: dancing while playing, resting when paused. */ +.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; } +.eq span { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; transform: scaleY(0.3); } +.eq.playing span { animation: eq 1s ease-in-out infinite alternate; } +.eq.playing span:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.3s; } +.eq.playing span:nth-child(3) { animation-duration: 1.2s; animation-delay: -0.6s; } +.eq.playing span:nth-child(4) { animation-duration: 0.85s; animation-delay: -0.15s; } +@keyframes eq { 0% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0.45); } } .track { display: flex; gap: 1rem; align-items: flex-start; } -.artwork { width: 104px; height: 104px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); } -.artwork-empty { display: grid; place-items: center; font-size: 2rem; color: var(--muted); } -.artwork-sm { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; } +.artwork { + width: 112px; height: 112px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); + box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08); + transition: transform 0.4s var(--spring); +} +.track:hover .artwork { transform: scale(1.04) rotate(-1deg); } +.artwork-empty { display: grid; place-items: center; font-size: 2rem; color: rgba(255, 255, 255, 0.85); background: linear-gradient(135deg, #4a1278, #1872cf); } +.artwork-sm { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex-shrink: 0; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.8); } .track-body { min-width: 0; flex: 1; } -.track-title { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.track-artist { color: var(--text); opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.track-actions { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; margin-top: 0.65rem; } -.service-link { font-size: 0.8rem; color: var(--muted); text-decoration: none; } -.service-link:hover { color: var(--text); text-decoration: underline; } -.service-link.inexact { opacity: 0.6; } +.track-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.track-artist { color: var(--text); opacity: 0.82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.track-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.8rem; } +.service-link { + font-size: 0.76rem; color: var(--text); text-decoration: none; padding: 0.2rem 0.55rem; border-radius: 999px; + background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); transition: background 0.2s, transform 0.25s var(--spring); +} +.service-link:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); } +.service-link.inexact { opacity: 0.55; } -.profile-header { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; } -.profile-header p { margin: 0.4rem 0 0; } -.featured blockquote { margin: 0.85rem 0 0; padding-left: 0.85rem; border-left: 3px solid var(--accent); font-style: italic; } +.profile-header { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; padding: 0.5rem 0 0.75rem; } +.profile-header h1 { font-size: 2.1rem; } +.profile-header .bio { margin: 0; max-width: 30rem; } +.stats { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; } +.stats span { padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; } +.stats strong { color: var(--text); font-family: var(--font-display); } +.featured blockquote { + margin: 0.9rem 0 0; padding: 0.6rem 0.9rem; border-left: 3px solid transparent; font-style: italic; + border-image: var(--grad) 1; background: rgba(255, 255, 255, 0.04); +} .search { position: relative; } -.search-results { list-style: none; margin: 0.4rem 0 0; padding: 0.35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; } -.search-results li { padding: 0.35rem 0.4rem; } +.search-results { list-style: none; margin: 0.5rem 0 0; padding: 0.4rem; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 14px; } +.search-results li { padding: 0.4rem 0.45rem; border-radius: 10px; transition: background 0.15s; } +.search-results li:hover { background: var(--surface-2); } .result { display: flex; gap: 0.6rem; align-items: center; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; width: 100%; text-align: left; padding: 0; } -.result:hover { color: var(--accent); } .recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } -.recent-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; text-decoration: none; border-radius: 8px; } -a.recent-row:hover .recent-title { color: var(--accent); } +.recent-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.5rem 0.4rem; text-decoration: none; border-radius: 12px; transition: background 0.15s, transform 0.25s var(--spring); } +a.recent-row:hover { background: var(--surface-2); transform: translateX(3px); } .recent li + li { border-top: 1px solid var(--border); } .recent-text { display: flex; flex-direction: column; min-width: 0; flex: 1; } .recent-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .recent-title { font-weight: 600; } -.credit { margin: 0.6rem 0 0; font-size: 0.8rem; } .recent-time { font-size: 0.8rem; white-space: nowrap; } .artwork-sm.artwork-empty { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); } +.qr-card { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; } +.qr { border-radius: 14px; box-shadow: 0 20px 50px -20px rgba(47, 140, 255, 0.6); } +.credit { margin: 0.6rem 0 0; font-size: 0.8rem; } .picked { display: flex; gap: 0.75rem; align-items: center; } .connections { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; } -.connection { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--border); flex-wrap: wrap; } +.connection { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--border); flex-wrap: wrap; } .connection form input { width: 160px; } .connection.disabled { opacity: 0.55; } +.steps { margin: 0.5rem 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; } .jellyfin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.6rem; } .jellyfin-form input[name='serverUrl'] { grid-column: 1 / -1; } .jellyfin-form .btn { justify-self: start; } @@ -135,15 +232,25 @@ a.recent-row:hover .recent-title { color: var(--accent); } .webhook summary { cursor: pointer; color: var(--muted); } .webhook p { margin: 0.35rem 0; } .webhook code { font-size: 0.75rem; background: var(--surface-2); padding: 0.3rem 0.5rem; border-radius: 6px; word-break: break-all; flex: 1; min-width: 0; } -.btn-small { padding: 0.25rem 0.65rem; font-size: 0.8rem; } @media (max-width: 480px) { .jellyfin-form { grid-template-columns: 1fr; } } -.hero { padding: 3rem 0; display: flex; flex-direction: column; gap: 1rem; } -.hero h1 { font-size: 2.4rem; letter-spacing: -0.03em; line-height: 1.1; } -.hero p { color: var(--muted); font-size: 1.1rem; margin: 0; } +.hero { padding: 4.5rem 0 3rem; display: flex; flex-direction: column; gap: 1.25rem; } +.hero h1 { font-size: 3.2rem; letter-spacing: -0.04em; line-height: 1.02; } +.gradient-text { + background: linear-gradient(90deg, #a78bfa, #7dd3fc, #60a5fa, #a78bfa); background-size: 300% 100%; + -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s linear infinite; +} +@keyframes shimmer { to { background-position: 300% 0; } } +.hero p { color: var(--muted); font-size: 1.15rem; margin: 0; max-width: 34rem; } +.hero .eq { height: 42px; gap: 5px; color: #8b9dff; } +.hero .eq span { width: 8px; border-radius: 4px; } @media (max-width: 480px) { - .artwork { width: 76px; height: 76px; } - .nav-links { gap: 0.7rem; font-size: 0.9rem; } - .hero h1 { font-size: 1.9rem; } + .artwork { width: 84px; height: 84px; } + .nav-links { gap: 0.75rem; font-size: 0.9rem; } + .hero h1 { font-size: 2.3rem; } +} + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } diff --git a/apps/web/src/app/icon.png b/apps/web/src/app/icon.png new file mode 100644 index 0000000..93dd443 Binary files /dev/null and b/apps/web/src/app/icon.png differ diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index a23714e..ad8f047 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -1,18 +1,34 @@ -import type { Metadata } from 'next'; +import type { Metadata, Viewport } from 'next'; +import { Inter, Space_Grotesk } from 'next/font/google'; import { Nav } from '@/components/Nav'; +import { Providers } from '@/components/Providers'; import './globals.css'; +const inter = Inter({ subsets: ['latin'], variable: '--font-inter', display: 'swap' }); +const spaceGrotesk = Space_Grotesk({ subsets: ['latin'], variable: '--font-space-grotesk', display: 'swap' }); + export const metadata: Metadata = { title: 'musicshare', description: "See what your friends are listening to, and play it on your own service.", + applicationName: 'musicshare', + // iOS "Add to Home Screen": open full-screen with a dark status bar. + appleWebApp: { capable: true, title: 'musicshare', statusBarStyle: 'black-translucent' }, +}; + +export const viewport: Viewport = { + themeColor: '#07070b', + viewportFit: 'cover', }; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( - + -