The first piece of the new look of the web app. - The Sonda theme takes the new palette (a deep blue ground, a lighter tone for panels instead of shadows, teal for the action). Every theme gets a --friend colour for what comes from another Sonda server, checked for contrast on the page and on a panel and for a hue that is not the primary one. - Figtree is the only font; Fraunces is gone, also from the full-screen player. - The menu is words and a dot: the dot of the open page is the colour of this server, and the dot of Friends is always the colour of what comes from elsewhere. There is nothing to fold, so the fold button and its setting are removed. - The shell is flat: the menu has a line on its right, the page has no panel around it, the player is a band under everything. - A missing cover is the rings of Sonda on a colour taken from the album, the same one every time; a friend's album gets another colour than this server's album with the same id. - The switch is a pill with a round knob and the outline button is a line.
101 lines
3.4 KiB
CSS
101 lines
3.4 KiB
CSS
@import "tailwindcss";
|
|
@import "tw-animate-css";
|
|
@import "shadcn/tailwind.css";
|
|
@import "@fontsource/figtree/400.css";
|
|
@import "@fontsource/figtree/500.css";
|
|
@import "@fontsource/figtree/600.css";
|
|
@import "@fontsource/figtree/700.css";
|
|
@import "@fontsource/figtree/800.css";
|
|
@import "./theme/themes.css";
|
|
|
|
/* The dark variant follows the theme, not the OS setting. */
|
|
@custom-variant dark (&:is([data-theme="sonda"] *, [data-theme="tokyo-night"] *, [data-theme="gruvbox-dark"] *, [data-theme="dracula"] *, [data-theme="neon"] *));
|
|
|
|
@theme inline {
|
|
--font-heading: var(--font-sans);
|
|
--font-sans: 'Figtree', system-ui, sans-serif;
|
|
--color-ring: var(--ring);
|
|
--color-input: var(--input);
|
|
--color-border: var(--border);
|
|
--color-destructive: var(--destructive);
|
|
--color-friend-foreground: var(--friend-foreground);
|
|
--color-friend: var(--friend);
|
|
--color-accent-foreground: var(--accent-foreground);
|
|
--color-accent: var(--accent);
|
|
--color-muted-foreground: var(--muted-foreground);
|
|
--color-muted: var(--muted);
|
|
--color-secondary-foreground: var(--secondary-foreground);
|
|
--color-secondary: var(--secondary);
|
|
--color-primary-foreground: var(--primary-foreground);
|
|
--color-primary: var(--primary);
|
|
--color-popover-foreground: var(--popover-foreground);
|
|
--color-popover: var(--popover);
|
|
--color-card-foreground: var(--card-foreground);
|
|
--color-card: var(--card);
|
|
--color-foreground: var(--foreground);
|
|
--color-background: var(--background);
|
|
--radius-sm: calc(var(--radius) * 0.6);
|
|
--radius-md: calc(var(--radius) * 0.8);
|
|
--radius-lg: var(--radius);
|
|
--radius-xl: calc(var(--radius) * 1.4);
|
|
--radius-2xl: calc(var(--radius) * 1.8);
|
|
--radius-3xl: calc(var(--radius) * 2.2);
|
|
--radius-4xl: calc(var(--radius) * 2.6);
|
|
}
|
|
|
|
:root {
|
|
--radius: 0.5rem;
|
|
}
|
|
|
|
@layer base {
|
|
* {
|
|
@apply border-border outline-ring/50;
|
|
}
|
|
/* A line of reading stays readable on a wide screen, and no line ends on a lone word. */
|
|
p {
|
|
max-width: 56ch;
|
|
text-wrap: pretty;
|
|
}
|
|
h1,
|
|
h2,
|
|
h3 {
|
|
text-wrap: balance;
|
|
}
|
|
body {
|
|
@apply bg-background text-foreground;
|
|
}
|
|
html {
|
|
@apply font-sans;
|
|
}
|
|
}
|
|
|
|
/*
|
|
* The player bar. On a phone it is two lines, so that it leaves the page its room: what is playing and the controls on
|
|
* the first, the position on the second, and no volume or full-screen (the phone has its own volume, and the cover opens
|
|
* the full player). From 640px up the words are on the left, the controls and the position in the middle, the extras
|
|
* on the right.
|
|
*/
|
|
.player-bar {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
grid-template-areas: 'info controls' 'seek seek';
|
|
align-items: center;
|
|
}
|
|
.player-info { grid-area: info; }
|
|
.player-controls { grid-area: controls; }
|
|
.player-seek { grid-area: seek; }
|
|
.player-extras { grid-area: extras; }
|
|
@media (min-width: 640px) {
|
|
.player-bar {
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
|
|
grid-template-areas: 'info controls extras' 'info seek extras';
|
|
}
|
|
}
|
|
|
|
/* A card that is a link answers the pointer: it lifts a little and its picture grows inside its frame. */
|
|
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
|
|
.lift { transition: transform 150ms ease-out; }
|
|
.lift:hover { transform: translateY(-2px); }
|
|
.lift img { transition: transform 200ms ease-out; }
|
|
.lift:hover img { transform: scale(1.03); }
|
|
}
|