Add Dune theme system with 14 themes

This commit is contained in:
Reditus committed 2026-05-15 03:08:32 +01:00
1 parent 7c7e655de7
commit 70f573eed5
2 files changed
+489 -1

No files matched your search

+416
View File
@@ -0,0 +1,416 @@
/* Dune Theme System - Multiple themes from bright to dark */
/* Default / Classic Dune Theme */
[data-theme="default"] {
--primary: #c9a24e;
--primary-dark: #a8862e;
--primary-light: #e0c97a;
--bg: #f4f1ea;
--card-bg: #ffffff;
--text: #2c1810;
--text-light: #6b5a4a;
--text-muted: #9a8a7a;
--border: #e0d5c7;
--accent: #8b4513;
--danger: #c0392b;
--success: #27ae60;
--nav-bg: #1a1a2e;
--nav-text: #c9c4d0;
--nav-active: #c9a24e;
--hover: #f0ebe0;
--shadow: 0 2px 8px rgba(44,24,16,0.08);
--table-header: #e8e2d6;
--code-bg: #faf8f5;
}
/* Atreides Theme - Green and Gold (House Atreides) */
[data-theme="atreides"] {
--primary: #2d5a27;
--primary-dark: #1e3d19;
--primary-light: #4a8c42;
--bg: #f0f5ed;
--card-bg: #ffffff;
--text: #1a2e1a;
--text-light: #3d4d3d;
--text-muted: #6b7c6b;
--border: #d4ddd4;
--accent: #1e3d19;
--danger: #8b2500;
--success: #2d5a27;
--nav-bg: #1a2e1a;
--nav-text: #d4ddd4;
--nav-active: #6abf6a;
--hover: #e2ebe2;
--shadow: 0 2px 8px rgba(30,61,25,0.1);
--table-header: #dfe6df;
--code-bg: #f5faf4;
}
/* Harkonnen Theme - Black and Orange (House Harkonnen) */
[data-theme="harkonnen"] {
--primary: #ff6b00;
--primary-dark: #cc5500;
--primary-light: #ff8c33;
--bg: #1a1a1a;
--card-bg: #2d2d2d;
--text: #e8e8e8;
--text-light: #b0b0b0;
--text-muted: #808080;
--border: #404040;
--accent: #ff4500;
--danger: #ff0000;
--success: #00cc44;
--nav-bg: #000000;
--nav-text: #cccccc;
--nav-active: #ff6b00;
--hover: #333333;
--shadow: 0 2px 8px rgba(0,0,0,0.4);
--table-header: #333333;
--code-bg: #222222;
}
/* Fremen Theme - Sand and Blue Eyes (Desert warriors) */
[data-theme="fremen"] {
--primary: #d4a853;
--primary-dark: #b8913f;
--primary-light: #e8c87a;
--bg: #e8dcc8;
--card-bg: #f5efe3;
--text: #3d3428;
--text-light: #5c4f3d;
--text-muted: #8a7d66;
--border: #d4cbb8;
--accent: #8b6914;
--danger: #a04000;
--success: #6b8e23;
--nav-bg: #2c2418;
--nav-text: #d4cbb8;
--nav-active: #d4a853;
--hover: #e8dcc8;
--shadow: 0 2px 8px rgba(44,36,24,0.1);
--table-header: #e0d6c8;
--code-bg: #f5f0e8;
}
/* Bene Gesserit Theme - White and Silver (Hidden power) */
[data-theme="bene-gesserit"] {
--primary: #a8a8a8;
--primary-dark: #888888;
--primary-light: #c8c8c8;
--bg: #f8f8f8;
--card-bg: #ffffff;
--text: #2a2a2a;
--text-light: #505050;
--text-muted: #787878;
--border: #e0e0e0;
--accent: #606060;
--danger: #c41e3a;
--success: #2e8b57;
--nav-bg: #1a1a1a;
--nav-text: #d0d0d0;
--nav-active: #ffffff;
--hover: #f0f0f0;
--shadow: 0 2px 8px rgba(0,0,0,0.08);
--table-header: #eeeeee;
--code-bg: #fafafa;
}
/* Spacing Guild Theme - Blue and Purple (Interstellar travel) */
[data-theme="spacing-guild"] {
--primary: #4a90d9;
--primary-dark: #2e6ab3;
--primary-light: #6baee8;
--bg: #1a1a2e;
--card-bg: #252540;
--text: #e0e0f0;
--text-light: #a0a0c0;
--text-muted: #707090;
--border: #3a3a50;
--accent: #6b5b95;
--danger: #d94545;
--success: #45d985;
--nav-bg: #0f0f1a;
--nav-text: #b0b0d0;
--nav-active: #4a90d9;
--hover: #2a2a40;
--shadow: 0 2px 8px rgba(0,0,0,0.3);
--table-header: #303045;
--code-bg: #1e1e30;
}
/* Emperor Theme - Gold and White (Imperial might) */
[data-theme="emperor"] {
--primary: #d4af37;
--primary-dark: #b8962f;
--primary-light: #e8c962;
--bg: #1a1a1a;
--card-bg: #2a2a2a;
--text: #f0f0f0;
--text-light: #c0c0c0;
--text-muted: #808080;
--border: #404040;
--accent: #d4af37;
--danger: #c0392b;
--success: #27ae60;
--nav-bg: #0d0d0d;
--nav-text: #d4d4d4;
--nav-active: #d4af37;
--hover: #333333;
--shadow: 0 2px 8px rgba(0,0,0,0.4);
--table-header: #333333;
--code-bg: #222222;
}
/* House Corrino Theme - Imperial Red and Gold */
[data-theme="corrino"] {
--primary: #8b0000;
--primary-dark: #5c0000;
--primary-light: #c43030;
--bg: #f5f0f0;
--card-bg: #ffffff;
--text: #2a1515;
--text-light: #5a3535;
--text-muted: #8a5555;
--border: #e0d5d5;
--accent: #a01010;
--danger: #8b0000;
--success: #2d5a27;
--nav-bg: #1a0a0a;
--nav-text: #d4c4c4;
--nav-active: #ff6b6b;
--hover: #f0e8e8;
--shadow: 0 2px 8px rgba(90,0,0,0.1);
--table-header: #ede5e5;
--code-bg: #faf5f5;
}
/* Mentat Theme - Blue Computing Precision */
[data-theme="mentat"] {
--primary: #008b8b;
--primary-dark: #006666;
--primary-light: #20b2aa;
--bg: #e8f4f4;
--card-bg: #ffffff;
--text: #1a2a2a;
--text-light: #3d5050;
--text-muted: #6b8080;
--border: #d4e0e0;
--accent: #006666;
--danger: #c44569;
--success: #008b8b;
--nav-bg: #0a1a1a;
--nav-text: #c4d4d4;
--nav-active: #00ced1;
--hover: #e0f0f0;
--shadow: 0 2px 8px rgba(0,60,60,0.1);
--table-header: #dce8e8;
--code-bg: #f0fafa;
}
/* Sardaukar Theme - Desert Warrior */
[data-theme="sardaukar"] {
--primary: #cd853f;
--primary-dark: #a0522d;
--primary-light: #deb887;
--bg: #f5ebe0;
--card-bg: #ffffff;
--text: #2a2018;
--text-light: #5a4a38;
--text-muted: #8a7a68;
--border: #e0d5c8;
--accent: #8b4513;
--danger: #8b0000;
--success: #6b8e23;
--nav-bg: #1a140c;
--nav-text: #d4c8b8;
--nav-active: #cd853f;
--hover: #f0e8e0;
--shadow: 0 2px 8px rgba(60,40,20,0.1);
--table-header: #e8e0d8;
--code-bg: #faf8f4;
}
/* Bene Tleilax Theme - Dark Master */
[data-theme="tleilax"] {
--primary: #4a0080;
--primary-dark: #2d0050;
--primary-light: #6b20b0;
--bg: #1a1a24;
--card-bg: #252530;
--text: #e0e0e8;
--text-light: #a0a0b0;
--text-muted: #707080;
--border: #404050;
--accent: #6b0099;
--danger: #c41e3a;
--success: #00c080;
--nav-bg: #0a0a10;
--nav-text: #b0b0c0;
--nav-active: #9966cc;
--hover: #2a2a38;
--shadow: 0 2px 8px rgba(0,0,0,0.4);
--table-header: #303040;
--code-bg: #1e1e28;
}
/* House Ordos Theme - Mercantile Green */
[data-theme="ordos"] {
--primary: #2e8b57;
--primary-dark: #1c5c3a;
--primary-light: #3cb371;
--bg: #e8f5f0;
--card-bg: #ffffff;
--text: #1a2e22;
--text-light: #3d5045;
--text-muted: #6b8075;
--border: #d4e0d8;
--accent: #1c5c3a;
--danger: #c45c3a;
--success: #2e8b57;
--nav-bg: #0a1a12;
--nav-text: #c4d8d0;
--nav-active: #3cb371;
--hover: #e0f0e8;
--shadow: 0 2px 8px rgba(20,60,40,0.1);
--table-header: #dce8e0;
--code-bg: #f4faf8;
}
/* Ix Theme - Technology Blue */
[data-theme="ix"] {
--primary: #4169e1;
--primary-dark: #2c4db8;
--primary-light: #6495ed;
--bg: #e8edf8;
--card-bg: #ffffff;
--text: #1a2248;
--text-light: #3d4470;
--text-muted: #6b7098;
--border: #d0d8e8;
--accent: #2c4db8;
--danger: #c44569;
--success: #32cd32;
--nav-bg: #0a1028;
--nav-text: #c0c8d8;
--nav-active: #6495ed;
--hover: #e0e8f0;
--shadow: 0 2px 8px rgba(30,50,100,0.15);
--table-header: #d8e0f0;
--code-bg: #f4f6fa;
}
/* CHOAM Theme - Commerce Gold */
[data-theme="choam"] {
--primary: #b8860b;
--primary-dark: #8b6508;
--primary-light: #daa520;
--bg: #faf8f0;
--card-bg: #ffffff;
--text: #2a2820;
--text-light: #5a5848;
--text-muted: #8a8878;
--border: #e8e4d8;
--accent: #8b6508;
--danger: #b22222;
--success: #228b22;
--nav-bg: #1a180c;
--nav-text: #d4d0c0;
--nav-active: #daa520;
--hover: #f0ece0;
--shadow: 0 2px 8px rgba(60,50,20,0.1);
--table-header: #f0ece0;
--code-bg: #fafaf5;
}
/* Theme Selector Button */
.theme-btn {
background: none;
border: none;
color: var(--nav-text);
font-size: 18px;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
transition: all 0.2s;
}
.theme-btn:hover {
background: rgba(255,255,255,0.1);
color: #fff;
}
/* Theme Dropdown */
.theme-dropdown {
position: relative;
display: inline-block;
}
.theme-dropdown-content {
display: none;
position: absolute;
right: 0;
background: var(--card-bg);
min-width: 180px;
box-shadow: 0 4px 16px rgba(0,0,0,0.2);
border-radius: 8px;
z-index: 1000;
padding: 8px 0;
border: 1px solid var(--border);
}
.theme-dropdown:hover .theme-dropdown-content {
display: block;
}
.theme-option {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 16px;
cursor: pointer;
color: var(--text);
font-size: 13px;
transition: background 0.15s;
}
.theme-option:hover {
background: var(--hover);
}
.theme-option.active {
background: var(--primary);
color: #fff;
}
.theme-option.active:hover {
background: var(--primary-dark);
}
.theme-swatch {
width: 20px;
height: 20px;
border-radius: 4px;
border: 1px solid var(--border);
}
.theme-swatch.default { background: linear-gradient(135deg, #c9a24e 50%, #f4f1ea 50%); }
.theme-swatch.atreides { background: linear-gradient(135deg, #2d5a27 50%, #4a8c42 50%); }
.theme-swatch.harkonnen { background: linear-gradient(135deg, #000000 50%, #ff6b00 50%); }
.theme-swatch.fremen { background: linear-gradient(135deg, #d4a853 50%, #e8dcc8 50%); }
.theme-swatch.bene-gesserit { background: linear-gradient(135deg, #ffffff 50%, #a8a8a8 50%); }
.theme-swatch.spacing-guild { background: linear-gradient(135deg, #1a1a2e 50%, #4a90d9 50%); }
.theme-swatch.emperor { background: linear-gradient(135deg, #d4af37 50%, #1a1a1a 50%); }
.theme-swatch.corrino { background: linear-gradient(135deg, #8b0000 50%, #f5f0f0 50%); }
.theme-swatch.mentat { background: linear-gradient(135deg, #008b8b 50%, #e8f4f4 50%); }
.theme-swatch.sardaukar { background: linear-gradient(135deg, #cd853f 50%, #f5ebe0 50%); }
.theme-swatch.tleilax { background: linear-gradient(135deg, #4a0080 50%, #1a1a24 50%); }
.theme-swatch.ordos { background: linear-gradient(135deg, #2e8b57 50%, #e8f5f0 50%); }
.theme-swatch.ix { background: linear-gradient(135deg, #4169e1 50%, #e8edf8 50%); }
.theme-swatch.choam { background: linear-gradient(135deg, #b8860b 50%, #faf8f0 50%); }
/* Current theme indicator */
#current-theme-display {
font-size: 11px;
color: var(--nav-text);
margin-right: 8px;
}
+73 -1
View File
@@ -6,6 +6,7 @@
<title>{% block title %}Dune Awakening Server Dashboard{% endblock %}</title> <title>{% block title %}Dune Awakening Server Dashboard{% endblock %}</title>
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='themes.css') }}">
</head> </head>
<body> <body>
<div id="update-banner" class="update-banner" style="display:none;"> <div id="update-banner" class="update-banner" style="display:none;">
@@ -21,6 +22,53 @@
<a href="{{ href }}" class="{% if current_path == href %}active{% endif %}">{{ label }}</a> <a href="{{ href }}" class="{% if current_path == href %}active{% endif %}">{{ label }}</a>
{% endfor %} {% endfor %}
<div class="spacer"></div> <div class="spacer"></div>
<div class="theme-dropdown">
<button class="theme-btn" title="Theme">🎨</button>
<div class="theme-dropdown-content">
<div class="theme-option active" data-theme="default" onclick="setTheme('default')">
<span class="theme-swatch default"></span> Classic Dune
</div>
<div class="theme-option" data-theme="atreides" onclick="setTheme('atreides')">
<span class="theme-swatchatreides"></span> House Atreides
</div>
<div class="theme-option" data-theme="harkonnen" onclick="setTheme('harkonnen')">
<span class="theme-swatch harkonnen"></span> House Harkonnen
</div>
<div class="theme-option" data-theme="fremen" onclick="setTheme('fremen')">
<span class="theme-swatch fremen"></span> Fremen
</div>
<div class="theme-option" data-theme="bene-gesserit" onclick="setTheme('bene-gesserit')">
<span class="theme-swatch bene-gesserit"></span> Bene Gesserit
</div>
<div class="theme-option" data-theme="spacing-guild" onclick="setTheme('spacing-guild')">
<span class="theme-swatch spacing-guild"></span> Spacing Guild
</div>
<div class="theme-option" data-theme="emperor" onclick="setTheme('emperor')">
<span class="theme-swatch emperor"></span> Emperor
</div>
<div class="theme-option" data-theme="corrino" onclick="setTheme('corrino')">
<span class="theme-swatch corrino"></span> House Corrino
</div>
<div class="theme-option" data-theme="mentat" onclick="setTheme('mentat')">
<span class="theme-swatch mentat"></span> Mentat
</div>
<div class="theme-option" data-theme="sardaukar" onclick="setTheme('sardaukar')">
<span class="theme-swatch sardaukar"></span> Sardaukar
</div>
<div class="theme-option" data-theme="tleilax" onclick="setTheme('tleilax')">
<span class="theme-swatch tleilax"></span> Bene Tleilax
</div>
<div class="theme-option" data-theme="ordos" onclick="setTheme('ordos')">
<span class="theme-swatch ordos"></span> House Ordos
</div>
<div class="theme-option" data-theme="ix" onclick="setTheme('ix')">
<span class="theme-swatch ix"></span> Ix
</div>
<div class="theme-option" data-theme="choam" onclick="setTheme('choam')">
<span class="theme-swatch choam"></span> CHOAM
</div>
</div>
</div>
<span style="font-size:12px;color:var(--nav-text);display:flex;align-items:center;"> <span style="font-size:12px;color:var(--nav-text);display:flex;align-items:center;">
<span class="conn-dot {% if conn_ok %}online{% else %}offline{% endif %}"></span> <span class="conn-dot {% if conn_ok %}online{% else %}offline{% endif %}"></span>
{{ 'Connected' if conn_ok else 'Disconnected' }} {{ 'Connected' if conn_ok else 'Disconnected' }}
@@ -108,10 +156,34 @@
} }
setInterval(checkForUpdate, 60000); setInterval(checkForUpdate, 60000);
checkForUpdate(); checkForUpdate();
// Theme System
function setTheme(themeName) {
document.documentElement.setAttribute('data-theme', themeName);
localStorage.setItem('dune-theme', themeName);
updateThemeUI(themeName);
}
function updateThemeUI(themeName) {
document.querySelectorAll('.theme-option').forEach(opt => {
opt.classList.remove('active');
if (opt.getAttribute('data-theme') === themeName) {
opt.classList.add('active');
}
});
}
function initTheme() {
const savedTheme = localStorage.getItem('dune-theme') || 'default';
document.documentElement.setAttribute('data-theme', savedTheme);
updateThemeUI(savedTheme);
}
initTheme();
</script> </script>
{% block scripts %}{% endblock %} {% block scripts %}{% endblock %}
<style> <style>
.update-banner { background: var(--bg-hover); border-bottom: 2px solid var(--accent); padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text); } .update-banner { background: var(--hover); border-bottom: 2px solid var(--accent); padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text); }
.update-actions { display: flex; gap: 8px; } .update-actions { display: flex; gap: 8px; }
.update-btn { padding: 4px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-card); color: var(--text); cursor: pointer; font-size: 12px; } .update-btn { padding: 4px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-card); color: var(--text); cursor: pointer; font-size: 12px; }
.update-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); } .update-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }