Files
abogen/abogen/web/static/styles.css
T
JB b718dae1b3 feat: Implement voice mixer UI and functionality
- Added new styles for the voice mixer components in styles.css.
- Updated base.html to include a block for scripts.
- Refactored voices.html to create a structured voice mixer interface with profile management features.
- Introduced voices.js to handle voice mixer logic, including profile creation, editing, and previewing.
- Implemented actions for importing and exporting voice profiles.
- Enhanced user experience with loading states and status messages.
2025-10-06 05:10:32 -07:00

655 lines
12 KiB
CSS

:root {
color-scheme: dark light;
--bg: #0f172a;
--bg-alt: #111c30;
--panel: rgba(255, 255, 255, 0.04);
--panel-border: rgba(148, 163, 184, 0.12);
--text: #e2e8f0;
--muted: #94a3b8;
--accent: #38bdf8;
--accent-strong: #0ea5e9;
--success: #34d399;
--danger: #f87171;
--warning: #fbbf24;
font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
margin: 0;
min-height: 100vh;
background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 40%),
radial-gradient(circle at 100% 0%, rgba(244, 114, 182, 0.08), transparent 45%),
var(--bg);
color: var(--text);
display: flex;
flex-direction: column;
}
.top-bar {
backdrop-filter: blur(20px);
background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7));
padding: 1.25rem 3rem;
border-bottom: 1px solid var(--panel-border);
display: flex;
align-items: center;
justify-content: space-between;
}
.brand {
display: flex;
align-items: center;
gap: 1rem;
}
.brand__mark {
font-size: 1.75rem;
}
.brand__name {
font-size: 1.5rem;
font-weight: 600;
letter-spacing: 0.04em;
}
.brand__tagline {
color: var(--muted);
font-size: 0.9rem;
}
.top-actions .btn {
color: var(--accent);
text-decoration: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
border-radius: 999px;
transition: all 0.2s ease;
}
.top-actions .btn:hover {
border-color: var(--accent);
background: rgba(56, 189, 248, 0.1);
}
.main {
flex: 1;
padding: 2.5rem 3rem 3.5rem;
max-width: 1100px;
width: 100%;
margin: 0 auto;
display: grid;
gap: 2rem;
}
.footer {
padding: 1.5rem 3rem;
display: flex;
justify-content: center;
gap: 0.75rem;
color: var(--muted);
border-top: 1px solid var(--panel-border);
background: rgba(15, 23, 42, 0.8);
}
.footer a {
color: var(--accent);
text-decoration: none;
}
.card {
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: 28px;
padding: 2rem;
box-shadow: 0 20px 50px rgba(8, 15, 32, 0.35);
position: relative;
overflow: hidden;
}
.card::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.15), transparent 55%);
pointer-events: none;
}
.card__title {
font-size: 1.4rem;
font-weight: 600;
margin-bottom: 1rem;
}
.grid {
display: grid;
gap: 1.5rem;
}
.grid--two {
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.button {
appearance: none;
border: none;
border-radius: 16px;
padding: 0.85rem 1.2rem;
font-size: 1rem;
font-weight: 600;
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
color: #fff;
cursor: pointer;
transition: transform 0.15s ease, box-shadow 0.15s ease;
box-shadow: 0 12px 30px rgba(56, 189, 248, 0.2);
}
.button:hover {
transform: translateY(-2px);
box-shadow: 0 16px 30px rgba(14, 165, 233, 0.28);
}
.button--ghost {
background: transparent;
border: 1px solid var(--panel-border);
color: var(--muted);
box-shadow: none;
}
.button--ghost:hover {
border-color: var(--accent);
color: var(--accent);
}
.field {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.field label {
font-weight: 500;
color: var(--muted);
font-size: 0.9rem;
}
.field input,
.field select,
.field textarea {
width: 100%;
border-radius: 14px;
border: 1px solid rgba(148, 163, 184, 0.2);
background: rgba(15, 23, 42, 0.45);
padding: 0.75rem 1rem;
color: var(--text);
font-size: 1rem;
transition: border 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}
.split {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 1rem;
}
.tag {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 999px;
padding: 0.35rem 0.8rem;
font-size: 0.8rem;
background: rgba(148, 163, 184, 0.12);
color: var(--muted);
}
.badge {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.4rem 0.85rem;
border-radius: 999px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.badge--pending {
background: rgba(148, 163, 184, 0.12);
color: var(--muted);
}
.badge--running {
background: rgba(56, 189, 248, 0.12);
color: var(--accent);
}
.badge--completed {
background: rgba(52, 211, 153, 0.15);
color: var(--success);
}
.badge--failed,
.badge--cancelled {
background: rgba(248, 113, 113, 0.15);
color: var(--danger);
}
.log-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 0.65rem;
max-height: 260px;
overflow-y: auto;
}
.log-item {
padding: 0.75rem 0.95rem;
border-radius: 14px;
border: 1px solid rgba(148, 163, 184, 0.12);
background: rgba(15, 23, 42, 0.3);
font-size: 0.9rem;
line-height: 1.4;
}
.log-item--success {
border-color: rgba(52, 211, 153, 0.4);
color: var(--success);
}
.log-item--error {
border-color: rgba(248, 113, 113, 0.45);
color: var(--danger);
}
.log-item--warning {
border-color: rgba(251, 191, 36, 0.45);
color: var(--warning);
}
.jobs-table {
width: 100%;
border-collapse: collapse;
overflow: hidden;
border-radius: 20px;
}
.jobs-table thead {
background: rgba(148, 163, 184, 0.12);
text-transform: uppercase;
letter-spacing: 0.04em;
font-size: 0.75rem;
}
.jobs-table th,
.jobs-table td {
padding: 0.9rem 1.15rem;
text-align: left;
}
.jobs-table tbody tr {
border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.jobs-table tbody tr:hover {
background: rgba(56, 189, 248, 0.08);
}
.progress-bar {
width: 100%;
height: 9px;
border-radius: 999px;
background: rgba(148, 163, 184, 0.15);
overflow: hidden;
}
.progress-bar__fill {
height: 100%;
background: linear-gradient(90deg, var(--accent), var(--accent-strong));
border-radius: inherit;
transition: width 0.35s ease;
}
.list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 1rem;
}
.list__item {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid rgba(148, 163, 184, 0.18);
border-radius: 18px;
padding: 1rem 1.25rem;
background: rgba(15, 23, 42, 0.35);
gap: 1rem;
}
.button--danger {
background: linear-gradient(135deg, var(--danger), #ef4444);
box-shadow: 0 12px 30px rgba(239, 68, 68, 0.2);
}
.pill-grid {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.pill {
border-radius: 999px;
border: 1px solid rgba(148, 163, 184, 0.2);
padding: 0.35rem 0.75rem;
font-size: 0.8rem;
color: var(--muted);
background: rgba(15, 23, 42, 0.4);
}
progress.progress {
width: 100%;
height: 0.6rem;
border-radius: 999px;
overflow: hidden;
background: rgba(148, 163, 184, 0.15);
}
progress.progress::-webkit-progress-bar {
background: rgba(148, 163, 184, 0.15);
border-radius: 999px;
}
progress.progress::-webkit-progress-value {
background: linear-gradient(90deg, var(--accent), var(--accent-strong));
border-radius: 999px;
}
progress.progress::-moz-progress-bar {
background: linear-gradient(90deg, var(--accent), var(--accent-strong));
border-radius: 999px;
}
.voice-mixer__header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1.5rem;
margin-bottom: 1.5rem;
}
.voice-mixer__header-actions {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
}
.voice-mixer__layout {
display: grid;
grid-template-columns: minmax(240px, 280px) 1fr;
gap: 2rem;
align-items: start;
}
.voice-mixer__profiles {
display: flex;
flex-direction: column;
gap: 1rem;
border-right: 1px solid var(--panel-border);
padding-right: 1.5rem;
}
.voice-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 0.75rem;
}
.voice-list__header {
display: flex;
align-items: center;
justify-content: space-between;
}
.voice-list__item {
border: 1px solid rgba(148, 163, 184, 0.18);
border-radius: 16px;
padding: 0.75rem 1rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
background: rgba(15, 23, 42, 0.35);
transition: border 0.2s ease, background 0.2s ease;
}
.voice-list__item.is-selected {
border-color: var(--accent);
background: rgba(56, 189, 248, 0.1);
}
.voice-list__select {
all: unset;
display: flex;
flex-direction: column;
gap: 0.25rem;
cursor: pointer;
}
.voice-list__select:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 3px;
}
.voice-list__name {
font-weight: 600;
}
.voice-list__meta {
font-size: 0.78rem;
color: var(--muted);
}
.voice-list__actions {
display: flex;
gap: 0.5rem;
}
.voice-list__action {
border: none;
border-radius: 999px;
padding: 0.35rem 0.65rem;
font-size: 0.75rem;
cursor: pointer;
background: rgba(148, 163, 184, 0.15);
color: var(--muted);
transition: background 0.2s ease, color 0.2s ease;
}
.voice-list__action:hover {
background: rgba(56, 189, 248, 0.18);
color: var(--accent);
}
.voice-list__action--danger:hover {
background: rgba(248, 113, 113, 0.2);
color: var(--danger);
}
.voice-editor {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.voice-editor__meta {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1rem;
}
.voice-editor__summary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
flex-wrap: wrap;
}
.voice-editor__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1rem;
max-height: 60vh;
overflow-y: auto;
padding-right: 0.5rem;
}
.voice-card {
border: 1px solid rgba(148, 163, 184, 0.18);
border-radius: 18px;
background: rgba(15, 23, 42, 0.33);
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
transition: border 0.2s ease, transform 0.2s ease;
}
.voice-card:hover {
border-color: var(--accent);
transform: translateY(-1px);
}
.voice-card__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
flex-wrap: wrap;
}
.voice-card__toggle {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
}
.voice-card__checkbox {
width: 1rem;
height: 1rem;
}
.voice-card__name {
font-weight: 600;
}
.voice-card__meta {
font-size: 0.8rem;
color: var(--muted);
}
.voice-card__value {
margin-left: auto;
font-size: 0.8rem;
color: var(--accent);
}
.voice-card__body {
display: flex;
align-items: center;
gap: 0.75rem;
}
.voice-card__slider {
flex: 1;
accent-color: var(--accent);
}
.voice-card__number {
width: 4.5rem;
text-align: center;
}
.voice-editor__actions {
display: grid;
gap: 1.25rem;
}
.button-row {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
}
.voice-preview {
display: grid;
gap: 0.75rem;
}
.voice-preview__controls {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
}
.voice-preview audio {
width: 100%;
border-radius: 12px;
background: rgba(15, 23, 42, 0.45);
}
.voice-status {
min-height: 1.2rem;
font-size: 0.9rem;
}
.voice-status--info {
color: var(--accent);
}
.voice-status--success {
color: var(--success);
}
.voice-status--warning {
color: var(--warning);
}
.voice-status--danger {
color: var(--danger);
}
.voice-mixer[data-state="loading"] .voice-editor {
opacity: 0.6;
pointer-events: none;
}
@media (max-width: 980px) {
.voice-mixer__layout {
grid-template-columns: 1fr;
}
.voice-mixer__profiles {
border-right: none;
border-bottom: 1px solid var(--panel-border);
padding-right: 0;
padding-bottom: 1.5rem;
margin-bottom: 1.5rem;
}
}