aggiunto le due sezioni quasar private e admin
This commit is contained in:
0
web/static/vendor/.gitkeep
vendored
0
web/static/vendor/.gitkeep
vendored
5
web/static/vendor/flags/ch.svg
vendored
5
web/static/vendor/flags/ch.svg
vendored
@@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<rect width="24" height="24" fill="#d52b1e"/>
|
||||
<rect x="10" y="5" width="4" height="14" fill="#ffffff"/>
|
||||
<rect x="5" y="10" width="14" height="4" fill="#ffffff"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 255 B |
5
web/static/vendor/flags/de.svg
vendored
5
web/static/vendor/flags/de.svg
vendored
@@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2" aria-hidden="true">
|
||||
<rect width="3" height="0.6667" x="0" y="0" fill="#000000"/>
|
||||
<rect width="3" height="0.6667" x="0" y="0.6667" fill="#dd0000"/>
|
||||
<rect width="3" height="0.6667" x="0" y="1.3333" fill="#ffce00"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 284 B |
11
web/static/vendor/flags/en.svg
vendored
11
web/static/vendor/flags/en.svg
vendored
@@ -1,11 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30" aria-hidden="true">
|
||||
<clipPath id="s"><path d="M0,0 v30 h60 v-30 z"/></clipPath>
|
||||
<clipPath id="t"><path d="M30,15 h30 v15 z v-30 h-30 z h-30 v15 z v15 h30 z"/></clipPath>
|
||||
<g clip-path="url(#s)">
|
||||
<path d="M0,0 v30 h60 v-30 z" fill="#012169"/>
|
||||
<path d="M0,0 L60,30 M60,0 L0,30" stroke="#fff" stroke-width="6"/>
|
||||
<path d="M0,0 L60,30 M60,0 L0,30" clip-path="url(#t)" stroke="#C8102E" stroke-width="4"/>
|
||||
<path d="M30,0 v30 M0,15 h60" stroke="#fff" stroke-width="10"/>
|
||||
<path d="M30,0 v30 M0,15 h60" stroke="#C8102E" stroke-width="6"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 628 B |
12
web/static/vendor/flags/en_us.svg
vendored
12
web/static/vendor/flags/en_us.svg
vendored
@@ -1,12 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190 100" aria-hidden="true">
|
||||
<rect width="190" height="100" fill="#b22234"/>
|
||||
<g fill="#fff">
|
||||
<rect y="7.69" width="190" height="7.69"/>
|
||||
<rect y="23.08" width="190" height="7.69"/>
|
||||
<rect y="38.46" width="190" height="7.69"/>
|
||||
<rect y="53.85" width="190" height="7.69"/>
|
||||
<rect y="69.23" width="190" height="7.69"/>
|
||||
<rect y="84.62" width="190" height="7.69"/>
|
||||
</g>
|
||||
<rect width="76" height="53.85" fill="#3c3b6e"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 502 B |
5
web/static/vendor/flags/fr.svg
vendored
5
web/static/vendor/flags/fr.svg
vendored
@@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2" aria-hidden="true">
|
||||
<rect width="1" height="2" x="0" y="0" fill="#0055a4"/>
|
||||
<rect width="1" height="2" x="1" y="0" fill="#ffffff"/>
|
||||
<rect width="1" height="2" x="2" y="0" fill="#ef4135"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 259 B |
5
web/static/vendor/flags/it.svg
vendored
5
web/static/vendor/flags/it.svg
vendored
@@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2" aria-hidden="true">
|
||||
<rect width="1" height="2" x="0" y="0" fill="#009246"/>
|
||||
<rect width="1" height="2" x="1" y="0" fill="#ffffff"/>
|
||||
<rect width="1" height="2" x="2" y="0" fill="#ce2b37"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 259 B |
2
web/static/vendor/flowbite.js
vendored
2
web/static/vendor/flowbite.js
vendored
File diff suppressed because one or more lines are too long
1
web/static/vendor/htmx.min.js
vendored
1
web/static/vendor/htmx.min.js
vendored
File diff suppressed because one or more lines are too long
101
web/static/vendor/theme.js
vendored
101
web/static/vendor/theme.js
vendored
@@ -1,101 +0,0 @@
|
||||
(function () {
|
||||
var STORAGE_KEY = "theme";
|
||||
var root = document.documentElement;
|
||||
var mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
var isAuthenticated = window.__TC_IS_AUTHENTICATED === true || window.__TC_IS_AUTHENTICATED === "true";
|
||||
var serverTheme = normalizeTheme(window.__TC_SERVER_THEME);
|
||||
|
||||
function normalizeTheme(theme) {
|
||||
if (!theme) return "";
|
||||
return String(theme).trim().toLowerCase();
|
||||
}
|
||||
|
||||
function getStoredTheme() {
|
||||
var value = null;
|
||||
try {
|
||||
value = localStorage.getItem(STORAGE_KEY);
|
||||
} catch (e) {
|
||||
value = null;
|
||||
}
|
||||
return value === "dark" || value === "light" ? value : null;
|
||||
}
|
||||
|
||||
function getPreferredTheme() {
|
||||
return mediaQuery.matches ? "dark" : "light";
|
||||
}
|
||||
|
||||
function applyTheme(theme) {
|
||||
root.classList.toggle("dark", theme === "dark");
|
||||
}
|
||||
|
||||
function currentTheme() {
|
||||
return root.classList.contains("dark") ? "dark" : "light";
|
||||
}
|
||||
|
||||
function setStoredTheme(theme) {
|
||||
try {
|
||||
localStorage.setItem(STORAGE_KEY, theme);
|
||||
} catch (e) {
|
||||
// localStorage may be unavailable in private mode or blocked contexts.
|
||||
}
|
||||
}
|
||||
|
||||
function persistThemePreference(theme) {
|
||||
if (!isAuthenticated) return;
|
||||
fetch("/preferences/theme", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
credentials: "same-origin",
|
||||
body: JSON.stringify({ theme: theme }),
|
||||
}).catch(function () {});
|
||||
}
|
||||
|
||||
function updateToggleState(theme) {
|
||||
var button = document.getElementById("themeToggle");
|
||||
if (!button) return;
|
||||
|
||||
var isDark = theme === "dark";
|
||||
button.setAttribute("aria-pressed", isDark ? "true" : "false");
|
||||
button.textContent = isDark ? "Light mode" : "Dark mode";
|
||||
}
|
||||
|
||||
function applyInitialTheme() {
|
||||
if (isAuthenticated && (serverTheme === "dark" || serverTheme === "light")) {
|
||||
setStoredTheme(serverTheme);
|
||||
applyTheme(serverTheme);
|
||||
return;
|
||||
}
|
||||
var stored = getStoredTheme();
|
||||
applyTheme(stored || getPreferredTheme());
|
||||
}
|
||||
|
||||
window.toggleTheme = function toggleTheme() {
|
||||
var next = currentTheme() === "dark" ? "light" : "dark";
|
||||
applyTheme(next);
|
||||
setStoredTheme(next);
|
||||
persistThemePreference(next);
|
||||
updateToggleState(next);
|
||||
};
|
||||
|
||||
window.initThemeToggle = function initThemeToggle() {
|
||||
updateToggleState(currentTheme());
|
||||
};
|
||||
|
||||
if (typeof mediaQuery.addEventListener === "function") {
|
||||
mediaQuery.addEventListener("change", function (event) {
|
||||
if (getStoredTheme()) return;
|
||||
var theme = event.matches ? "dark" : "light";
|
||||
applyTheme(theme);
|
||||
updateToggleState(theme);
|
||||
});
|
||||
} else if (typeof mediaQuery.addListener === "function") {
|
||||
mediaQuery.addListener(function (event) {
|
||||
if (getStoredTheme()) return;
|
||||
var theme = event.matches ? "dark" : "light";
|
||||
applyTheme(theme);
|
||||
updateToggleState(theme);
|
||||
});
|
||||
}
|
||||
|
||||
applyInitialTheme();
|
||||
})();
|
||||
Reference in New Issue
Block a user