Add light theme default with toggle (#8)
Co-authored-by: Cursor <cursoragent@cursor.com> Reviewed-on: #8 Co-authored-by: diaco <dyaco8464@yahoo.com> Co-committed-by: diaco <dyaco8464@yahoo.com>
This commit was merged in pull request #8.
This commit is contained in:
@@ -11,6 +11,12 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Vazirmatn:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{% static 'slips/css/style.css' %}">
|
||||
<script>
|
||||
(function () {
|
||||
var t = localStorage.getItem('slip_theme') || 'light';
|
||||
document.documentElement.setAttribute('data-theme', t);
|
||||
})();
|
||||
</script>
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
@@ -26,7 +32,10 @@
|
||||
<a href="{% url 'calibrate' %}" class="nav-link" data-i18n="calibrate">Calibrate</a>
|
||||
</div>
|
||||
<div class="nav-actions">
|
||||
<button id="lang-toggle" class="btn btn-ghost" onclick="toggleLanguage()">
|
||||
<button id="theme-toggle" class="btn btn-ghost" type="button" onclick="toggleTheme()" aria-label="Toggle theme">
|
||||
<span id="theme-label">🌙</span>
|
||||
</button>
|
||||
<button id="lang-toggle" class="btn btn-ghost" type="button" onclick="toggleLanguage()">
|
||||
<span id="lang-label">🇬🇧 EN</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user