Files
moloapp/example/static/app.css
T
retoorandClaude Sonnet 5.5 837de58136 feat(clients): google cloud voice: generic client, TTS, STT, Gemini audio, live voice page
src/google: GoogleClient over molo::clients (key in x-goog-api-key, never in
URLs), Service base, TextToSpeech, SpeechToText, Generative (replies, audio
in, audio out), Recognizer/Synthesizer seams with cloud, gemini and vertex
backends, VoicePipeline with bounded history. Example: /voice live
conversation page, /voice/{say,hear,turn,reset}, /google/status. Keys load
from env, .env.json.local, .env.json. Paid routes are excluded from locust.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 04:05:41 +02:00

105 lines
5.8 KiB
CSS

/* Living example stylesheet: mobile-first, responsive by default.
Chart palette: validated categorical slots (light and dark). */
:root {
color-scheme: light dark;
--surface-1: #fcfcfb; --text-primary: #0b0b0b; --text-secondary: #52514e;
--grid: #e4e3df; --border: #ccc; --danger: #a00; --danger-bg: #fdecec;
--ok: #0a6b0a;
--series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
--series-4: #eda100; --series-5: #e87ba4; --series-6: #008300;
--series-7: #6250d6; --series-8: #e34948;
}
@media (prefers-color-scheme: dark) {
:root {
--surface-1: #1a1a19; --text-primary: #f0efec; --text-secondary: #c3c2b7;
--grid: #3a3a37; --border: #4a4a46; --danger: #ff8f8f; --danger-bg: #3a1c1c;
--ok: #6fd36f;
--series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
--series-4: #c98500; --series-5: #d55181; --series-6: #008300;
--series-7: #9085e9; --series-8: #e66767;
}
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; line-height: 1.5;
background: var(--surface-1); color: var(--text-primary); }
a { color: var(--series-1); }
.topbar { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1rem;
background: #102030; color: #fff; }
.brand { color: #fff; font-weight: bold; text-decoration: none; }
.nav-wide { display: none; gap: 0.75rem; }
.nav-wide a { color: #cde; text-decoration: none; }
.nav-narrow { margin-left: auto; }
.nav-narrow nav { display: flex; flex-direction: column; gap: 0.25rem;
background: var(--surface-1); padding: 0.5rem; border: 1px solid var(--border); }
main { padding: 1rem; max-width: 60rem; margin: 0 auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--border); padding: 0.25rem 0.5rem; text-align: left; }
form { display: flex; flex-direction: column; gap: 0.5rem; max-width: 28rem; }
input, textarea, button { font-size: 1rem; padding: 0.4rem; }
.ok { color: var(--ok); }
.error { color: var(--danger); }
.hint { color: var(--text-secondary); }
code { overflow-wrap: anywhere; }
/* Forms: inline field errors plus a summary box. */
.field { display: flex; flex-direction: column; gap: 0.2rem; }
.field input, .field textarea { border: 1px solid var(--border);
background: var(--surface-1); color: inherit; border-radius: 4px; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger);
border-width: 2px; }
.field-error { color: var(--danger); font-size: 0.9rem; margin: 0; }
.field-error::before { content: "\26A0\00a0"; }
.form-errors { border: 2px solid var(--danger); background: var(--danger-bg);
border-radius: 4px; padding: 0.5rem 0.75rem; max-width: 28rem; }
.form-errors h2 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--danger); }
.form-errors ul { margin: 0; padding-left: 1.25rem; }
label.inline { flex-direction: row; align-items: center; gap: 0.4rem; display: inline-flex; }
label.inline input { padding: 0; }
/* Statistics page */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.5rem; }
.tile { border: 1px solid var(--border); border-radius: 6px; padding: 0.4rem 0.6rem;
display: flex; flex-direction: column; min-width: 0; }
.tile .k { color: var(--text-secondary); font-size: 0.8rem; }
.tile .v { font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.chart { margin: 0; border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; min-width: 0; }
.chart figcaption { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.25rem; }
.plot { position: relative; height: 14rem; }
.plot.tall { height: 22rem; }
.scroll { overflow-x: auto; margin: 0.75rem 0; }
@media (min-width: 48rem) { .grid { grid-template-columns: 1fr 1fr; } }
/* Big button group becomes a dropdown on small phones: the details element
above is the dropdown; on wide screens show the plain link row. */
@media (min-width: 48rem) {
.nav-wide { display: flex; }
.nav-narrow { display: none; }
}
/* Voice conversation page */
.voice { display: flex; flex-direction: column; gap: 0.75rem; }
.voice-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.voice-controls button.primary { flex: 1 1 12rem; padding: 0.8rem 1rem; font-weight: 600;
border: 0; border-radius: 6px; background: var(--series-1); color: #fff; }
.voice-controls button.primary.live { background: var(--series-8); }
.voice-controls button:disabled { opacity: 0.5; }
.voice-controls select { font-size: 1rem; padding: 0.4rem; }
.voice-state { display: flex; align-items: center; gap: 0.75rem; }
.pill { min-width: 6rem; text-align: center; padding: 0.2rem 0.6rem; border-radius: 1rem;
border: 1px solid var(--border); color: var(--text-secondary); }
.pill.listening { border-color: var(--series-3); color: var(--series-3); }
.pill.hearing { border-color: var(--series-2); color: var(--series-2); }
.pill.thinking { border-color: var(--series-4); color: var(--series-4); }
.pill.speaking { border-color: var(--series-1); color: var(--series-1); }
.meter { flex: 1; height: 0.6rem; border: 1px solid var(--border); border-radius: 0.3rem; overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--series-3); }
.voice-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
gap: 0.4rem; max-height: 22rem; overflow-y: auto; }
.voice-log li { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 6px;
overflow-wrap: anywhere; }
.voice-log li.you { border-left: 4px solid var(--series-2); }
.voice-log li.bot { border-left: 4px solid var(--series-1); }
.voice-form { flex-direction: row; flex-wrap: wrap; max-width: none; }
.voice-form input[type="text"] { flex: 1 1 12rem; min-width: 0; }