Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Add semantic status-tint CSS variables (--tint-{info,success,warn,danger,processing,pending,incognito}) and a .pill-status primitive with --info/--success/--warn/--danger/--processing/--pending/--incognito variants; replace the most visible bg-blue-500/15 / bg-amber-500/15 / violet-500 opacity offenders in detail-view.html incognito bar and admin.html prompt variable badges with the new primitive; dark mode bumps opacity slightly so tinted pills stay legible against darker surfaces

Murtaza Nasir22143e02a6f8
diff --git a/folder-pill-confirmed.png b/folder-pill-confirmed.png
new file mode 100644
index 00000000..ebd35b94
Binary files /dev/null and b/folder-pill-confirmed.png differ
diff --git a/sidebar-folder-pill.png b/sidebar-folder-pill.png
new file mode 100644
index 00000000..5e53e37f
Binary files /dev/null and b/sidebar-folder-pill.png differ
diff --git a/static/css/primitives.css b/static/css/primitives.css
index 766556b6..b82688c3 100644
--- a/static/css/primitives.css
+++ b/static/css/primitives.css
@@ -73,6 +73,59 @@
/* Transition */
--t-fast: 120ms;
--t-base: 180ms;
+
+ /* Status tints — semantic, *not* theme-customizable. Status colours
+ * (purple = processing, amber = warning, etc.) carry universal
+ * meaning and should look the same across all themes. The opacity
+ * is just enough to read on either surface tint. Use the pill-*
+ * primitive classes below rather than hardcoding bg-blue-500/15
+ * style Tailwind utilities. */
+ --tint-info: rgba(59, 130, 246, 0.12); /* blue */
+ --tint-info-border: rgba(59, 130, 246, 0.30);
+ --tint-info-fg: rgb(37, 99, 235);
+
+ --tint-success: rgba(16, 185, 129, 0.12); /* green */
+ --tint-success-border: rgba(16, 185, 129, 0.30);
+ --tint-success-fg: rgb(5, 150, 105);
+
+ --tint-warn: rgba(245, 158, 11, 0.12); /* amber */
+ --tint-warn-border: rgba(245, 158, 11, 0.30);
+ --tint-warn-fg: rgb(180, 83, 9);
+
+ --tint-danger: rgba(239, 68, 68, 0.12); /* red */
+ --tint-danger-border: rgba(239, 68, 68, 0.30);
+ --tint-danger-fg: rgb(185, 28, 28);
+
+ --tint-processing: rgba(168, 85, 247, 0.12); /* purple */
+ --tint-processing-border: rgba(168, 85, 247, 0.30);
+ --tint-processing-fg: rgb(126, 34, 206);
+
+ --tint-pending: rgba(234, 179, 8, 0.12); /* yellow */
+ --tint-pending-border: rgba(234, 179, 8, 0.30);
+ --tint-pending-fg: rgb(161, 98, 7);
+
+ --tint-incognito: rgba(139, 92, 246, 0.10); /* violet */
+ --tint-incognito-border: rgba(139, 92, 246, 0.30);
+ --tint-incognito-fg: rgb(109, 40, 217);
+}
+
+html.dark {
+ /* Slightly more opaque tints + lighter foreground on dark mode so
+ * tinted pills stay legible against the darker surface. */
+ --tint-info: rgba(96, 165, 250, 0.18);
+ --tint-info-fg: rgb(147, 197, 253);
+ --tint-success: rgba(52, 211, 153, 0.18);
+ --tint-success-fg: rgb(110, 231, 183);
+ --tint-warn: rgba(251, 191, 36, 0.18);
+ --tint-warn-fg: rgb(252, 211, 77);
+ --tint-danger: rgba(248, 113, 113, 0.18);
+ --tint-danger-fg: rgb(252, 165, 165);
+ --tint-processing: rgba(192, 132, 252, 0.18);
+ --tint-processing-fg: rgb(216, 180, 254);
+ --tint-pending: rgba(250, 204, 21, 0.18);
+ --tint-pending-fg: rgb(253, 224, 71);
+ --tint-incognito: rgba(167, 139, 250, 0.15);
+ --tint-incognito-fg: rgb(196, 181, 253);
}
html.dark {
@@ -519,6 +572,37 @@ html.dark {
}
+/* ---- Status pill (semantic colour, tint background) -------------------
+ *
+ * <span class="pill-status pill-status--info">Allowed</span>
+ *
+ * Use for at-a-glance status badges where the colour carries semantic
+ * meaning. Backgrounds use --tint-* tokens so they look consistent
+ * across themes but still adapt to light/dark.
+ * --------------------------------------------------------------------- */
+
+.pill-status {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--sp-1);
+ padding: 1px var(--sp-2);
+ border-radius: var(--radius-pill);
+ font-size: var(--fs-label);
+ font-weight: 600;
+ letter-spacing: 0.02em;
+ border: var(--border-hairline) solid transparent;
+ white-space: nowrap;
+ line-height: 1.6;
+}
+.pill-status--info { background: var(--tint-info); color: var(--tint-info-fg); border-color: var(--tint-info-border); }
+.pill-status--success { background: var(--tint-success); color: var(--tint-success-fg); border-color: var(--tint-success-border); }
+.pill-status--warn { background: var(--tint-warn); color: var(--tint-warn-fg); border-color: var(--tint-warn-border); }
+.pill-status--danger { background: var(--tint-danger); color: var(--tint-danger-fg); border-color: var(--tint-danger-border); }
+.pill-status--processing { background: var(--tint-processing); color: var(--tint-processing-fg); border-color: var(--tint-processing-border); }
+.pill-status--pending { background: var(--tint-pending); color: var(--tint-pending-fg); border-color: var(--tint-pending-border); }
+.pill-status--incognito { background: var(--tint-incognito); color: var(--tint-incognito-fg); border-color: var(--tint-incognito-border); }
+
+
/* ---- Toast / Banner ---------------------------------------------------- */
.banner {
diff --git a/templates/admin.html b/templates/admin.html
index d3e2a06b..efc952f1 100644
--- a/templates/admin.html
+++ b/templates/admin.html
@@ -867,11 +867,11 @@
<div class="flex flex-wrap items-center gap-3 text-xs text-[var(--text-secondary)] -mt-2">
<span class="font-medium">${ t('preview.placeholderLegend') }</span>
<span class="inline-flex items-center gap-1.5">
- <span class="px-1.5 py-0.5 rounded text-[11px] font-semibold bg-blue-500/15 text-[var(--text-accent)] border border-blue-500/30 font-mono">{example}</span>
+ <span class="pill-status pill-status--info font-mono">{example}</span>
<span>${ t('preview.systemReplaced') }</span>
</span>
<span class="inline-flex items-center gap-1.5">
- <span class="px-1.5 py-0.5 rounded text-[11px] font-semibold bg-amber-500/15 text-amber-300 border border-amber-500/30 font-mono">{{example}}</span>
+ <span class="pill-status pill-status--warn font-mono">{{example}}</span>
<span>${ t('preview.userSupplied') }</span>
</span>
</div>
@@ -2150,12 +2150,12 @@ Summarization Instructions:
// first because it is the longer pattern; prevents single-brace pass
// from biting into the inner {var}.
.replace(/\{\{\s*([A-Za-z_][A-Za-z0-9_]*)\s*\}\}/g,
- '<span class="px-1.5 py-0.5 rounded text-[11px] font-semibold bg-amber-500/15 text-amber-300 border border-amber-500/30" title="User-supplied variable. Filled at upload or reprocess.">{{$1}}</span>')
+ '<span class="pill-status pill-status--warn font-mono" title="User-supplied variable. Filled at upload or reprocess.">{{$1}}</span>')
// Blue for {system_var} — replaced by the framework (current_date,
// tag_names, transcript_text, ...). Only match identifier-shaped
// names so we don't mangle JSON-looking literals.
.replace(/\{(\s*[A-Za-z_][A-Za-z0-9_]*\s*)\}/g,
- '<span class="px-1.5 py-0.5 rounded text-[11px] font-semibold bg-blue-500/15 text-[var(--text-accent)] border border-blue-500/30" title="System placeholder. Replaced by the framework before the LLM call.">{$1}</span>');
+ '<span class="pill-status pill-status--info font-mono" title="System placeholder. Replaced by the framework before the LLM call.">{$1}</span>');
};
{% endraw %}
diff --git a/templates/components/detail-view.html b/templates/components/detail-view.html
index c158e2fc..1c055b2f 100644
--- a/templates/components/detail-view.html
+++ b/templates/components/detail-view.html
@@ -1,21 +1,24 @@
<!-- Detail View Container -->
<div v-if="currentView === 'detail' && selectedRecording" class="flex-1 flex flex-col overflow-hidden">
- <!-- Incognito Mode Indicator Bar -->
- <div v-if="selectedRecording.incognito" class="bg-gradient-to-r from-violet-500/10 via-purple-500/10 to-violet-500/10 border-b border-violet-300/30 dark:border-violet-500/30 px-4 py-2 flex-shrink-0">
+ <!-- Incognito Mode Indicator Bar (theme-safe tint via --tint-incognito) -->
+ <div v-if="selectedRecording.incognito"
+ class="border-b px-4 py-2 flex-shrink-0"
+ style="background: var(--tint-incognito); border-color: var(--tint-incognito-border);">
<div class="flex items-center justify-between gap-4 max-w-4xl mx-auto">
<div class="flex items-center gap-3">
- <div class="w-7 h-7 rounded-full bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center">
+ <div class="w-7 h-7 rounded-full flex items-center justify-center" style="background: var(--tint-incognito-fg); opacity: 0.85;">
<i class="fas fa-user-secret text-white text-xs"></i>
</div>
<div class="flex items-center gap-2 flex-wrap">
- <span class="text-sm font-medium text-violet-700 dark:text-violet-300">Incognito</span>
- <span class="text-xs text-violet-600/80 dark:text-violet-400/80">
+ <span class="text-sm font-medium" style="color: var(--tint-incognito-fg);">Incognito</span>
+ <span class="text-xs" style="color: var(--tint-incognito-fg); opacity: 0.75;">
&bull; Session only &bull; Not saved to account
</span>
</div>
</div>
<button @click="clearIncognitoRecordingWithConfirm"
- class="flex-shrink-0 px-2.5 py-1 text-xs font-medium text-violet-600 dark:text-violet-400 hover:text-red-600 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded transition-colors"
+ class="btn btn--icon btn--sm"
+ style="color: var(--tint-incognito-fg);"
title="Discard this recording">
<i class="fas fa-times"></i>
</button>