From c8e90fccbf19cace0f5dc5a56dc2eaf65a099a9b Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Sun, 15 Feb 2026 17:06:01 +0100 Subject: [PATCH] fix(demo): remove public theme switching --- frontend/src/layouts/Layout.astro | 4 +- frontend/src/layouts/PublicLayout.astro | 78 +---------------------- frontend/src/pages/settings.astro | 82 ++++++++++++++++--------- 3 files changed, 59 insertions(+), 105 deletions(-) diff --git a/frontend/src/layouts/Layout.astro b/frontend/src/layouts/Layout.astro index 408427c..e6954b7 100644 --- a/frontend/src/layouts/Layout.astro +++ b/frontend/src/layouts/Layout.astro @@ -36,9 +36,9 @@ const publicDemoSite = isEnabled((globalThis as any).process?.env?.PUBLIC_DEMO_S {title} | Likwid - @@ -449,20 +391,6 @@ const defaultTheme = DEFAULT_THEME; align-items: center; } - .theme-select { - width: auto; - padding: 0.5rem 0.75rem; - font-size: 0.875rem; - background: rgba(255, 255, 255, 0.06); - border: 1px solid var(--color-border); - border-radius: var(--radius-sm); - color: var(--color-text); - } - - .theme-select:hover { - border-color: var(--color-border-hover); - } - .public-main { flex: 1; } diff --git a/frontend/src/pages/settings.astro b/frontend/src/pages/settings.astro index 977d358..067e323 100644 --- a/frontend/src/pages/settings.astro +++ b/frontend/src/pages/settings.astro @@ -1,6 +1,14 @@ --- import Layout from '../layouts/Layout.astro'; import { API_BASE as apiBase } from '../lib/api'; + +function isEnabled(v: string | undefined): boolean { + if (!v) return false; + const n = v.trim().toLowerCase(); + return n === '1' || n === 'true' || n === 'yes' || n === 'on'; +} + +const publicDemoSite = isEnabled((globalThis as any).process?.env?.PUBLIC_DEMO_SITE); --- @@ -13,7 +21,7 @@ import { API_BASE as apiBase } from '../lib/api'; -