Update web/templates/settings/home.html
This commit is contained in:
parent
84c6037b30
commit
8468cee088
@ -57,6 +57,15 @@
|
|||||||
<span class="slider"></span>
|
<span class="slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Swipe navigation (client-side pref) -->
|
||||||
|
<div class="cc-row" style="margin-top:10px;">
|
||||||
|
<label class="cc-label">Swipe to navigate entries (mobile)</label>
|
||||||
|
<label class="switch">
|
||||||
|
<input id="swipeNavToggle" type="checkbox">
|
||||||
|
<span class="slider"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -159,7 +168,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Toast -->
|
<!-- Toast for Clear History -->
|
||||||
<div id="toast-clear-history"
|
<div id="toast-clear-history"
|
||||||
style="position:fixed; right:16px; bottom:16px; padding:10px 14px; border-radius:10px;
|
style="position:fixed; right:16px; bottom:16px; padding:10px 14px; border-radius:10px;
|
||||||
background:#111827; color:#fff; box-shadow:0 6px 20px rgba(0,0,0,.25);
|
background:#111827; color:#fff; box-shadow:0 6px 20px rgba(0,0,0,.25);
|
||||||
@ -200,21 +209,6 @@
|
|||||||
.swatch[data-theme="midnight"]{background:linear-gradient(135deg,#0b1220,#1c2741);}
|
.swatch[data-theme="midnight"]{background:linear-gradient(135deg,#0b1220,#1c2741);}
|
||||||
.swatch[data-theme="forest"]{background:linear-gradient(135deg,#d7f3e2,#92c7a3);}
|
.swatch[data-theme="forest"]{background:linear-gradient(135deg,#d7f3e2,#92c7a3);}
|
||||||
.swatch[data-theme="sandstone"]{background:linear-gradient(135deg,#f7efe4,#e4d2b6);}
|
.swatch[data-theme="sandstone"]{background:linear-gradient(135deg,#f7efe4,#e4d2b6);}
|
||||||
/* Windows 95 swatch */
|
|
||||||
/* Windows 95 swatch */
|
|
||||||
.swatch[data-theme="win95"] {
|
|
||||||
background: linear-gradient(to bottom, #000080 0 30%, #c0c0c0 30% 100%);
|
|
||||||
border: 2px solid #808080;
|
|
||||||
border-top-color: #fff; /* top highlight */
|
|
||||||
border-left-color: #fff; /* left highlight */
|
|
||||||
border-right-color: #404040;
|
|
||||||
border-bottom-color: #404040;
|
|
||||||
border-radius: 0; /* blocky, no rounded corners */
|
|
||||||
box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #000;
|
|
||||||
font-family: "MS Sans Serif", sans-serif;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.swatch-name{background:rgba(255,255,255,.8);padding:2px 6px;border-radius:8px;font-size:12px;color:#0f172a;}
|
.swatch-name{background:rgba(255,255,255,.8);padding:2px 6px;border-radius:8px;font-size:12px;color:#0f172a;}
|
||||||
/* Security accent */
|
/* Security accent */
|
||||||
.cc-sec{position:relative;overflow:hidden;color:#0f172a;}
|
.cc-sec{position:relative;overflow:hidden;color:#0f172a;}
|
||||||
@ -235,19 +229,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function(){
|
(function(){
|
||||||
// Helpers
|
// Helpers already present in your file (unchanged)
|
||||||
function getCookie(name){ const m=document.cookie.match("(^|;)\\s*"+name+"\\s*=\\s*([^;]+)"); return m?m.pop():""; }
|
function getCookie(name){ const m=document.cookie.match("(^|;)\\s*"+name+"\\s*=\\s*([^;]+)"); return m?m.pop():""; }
|
||||||
function setTheme(name){
|
function setTheme(name){
|
||||||
var v='{{ APP_VERSION }}';
|
|
||||||
var link=document.getElementById('theme-css');
|
var link=document.getElementById('theme-css');
|
||||||
if(link) link.href='{% static "themes/" %}'+name+'.css?v='+v; // << cache-busted preview
|
if(link) link.href='{% static "themes/" %}'+name+'.css';
|
||||||
document.documentElement.setAttribute('data-theme',name);
|
document.documentElement.setAttribute('data-theme',name);
|
||||||
try{ localStorage.setItem('theme',name); }catch(e){}
|
try{ localStorage.setItem('theme',name); }catch(e){}
|
||||||
if(name==='classic'){ document.body.classList.add('themed-bg'); } else { document.body.classList.remove('themed-bg'); }
|
if(name==='classic'){ document.body.classList.add('themed-bg'); } else { document.body.classList.remove('themed-bg'); }
|
||||||
var hidden=document.getElementById('theme-hidden'); if(hidden) hidden.value=name;
|
var hidden=document.getElementById('theme-hidden'); if(hidden) hidden.value=name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear history
|
// Clear history (unchanged)
|
||||||
(function(){
|
(function(){
|
||||||
var btn=document.getElementById("clear-history-btn");
|
var btn=document.getElementById("clear-history-btn");
|
||||||
var toast=document.getElementById("toast-clear-history");
|
var toast=document.getElementById("toast-clear-history");
|
||||||
@ -263,13 +256,10 @@
|
|||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Save from tiles
|
// Save from tiles (unchanged)
|
||||||
window.saveTheme = function(){
|
window.saveTheme = function(){ return true; };
|
||||||
// Hidden input already holds current pick; just submit
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Swatch instant preview + set hidden value
|
// Swatch instant preview (unchanged)
|
||||||
document.querySelectorAll('.swatch').forEach(btn=>{
|
document.querySelectorAll('.swatch').forEach(btn=>{
|
||||||
btn.addEventListener('click',()=>{
|
btn.addEventListener('click',()=>{
|
||||||
const name=btn.getAttribute('data-theme');
|
const name=btn.getAttribute('data-theme');
|
||||||
@ -277,7 +267,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Highlight toggle
|
// Highlight toggle (server-backed, unchanged)
|
||||||
(async function(){
|
(async function(){
|
||||||
const toggle=document.getElementById("highlightHitsToggle");
|
const toggle=document.getElementById("highlightHitsToggle");
|
||||||
if(!toggle) return;
|
if(!toggle) return;
|
||||||
@ -295,4 +285,7 @@
|
|||||||
})();
|
})();
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- NEW: client-side swipe preference wiring -->
|
||||||
|
<script src="{% static 'js/settings-swipe.js' %}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Loading…
Reference in New Issue
Block a user