Website redesign
@ -1,6 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-eye" width="40" height="40" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<circle cx="12" cy="12" r="2" />
|
||||
<path d="M2 12l1.5 2a11 11 0 0 0 17 0l1.5 -2" />
|
||||
<path d="M2 12l1.5 -2a11 11 0 0 1 17 0l1.5 2" />
|
||||
</svg>
|
Before Width: | Height: | Size: 406 B |
@ -1,7 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-ghost" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<path d="M5 11a7 7 0 0 1 14 0v7a1.78 1.78 0 0 1 -3.1 1.4a1.65 1.65 0 0 0 -2.6 0a1.65 1.65 0 0 1 -2.6 0a1.65 1.65 0 0 0 -2.6 0a1.78 1.78 0 0 1 -3.1 -1.4v-7" />
|
||||
<line x1="10" y1="10" x2="10.01" y2="10" />
|
||||
<line x1="14" y1="10" x2="14.01" y2="10" />
|
||||
<path d="M10 14a3.5 3.5 0 0 0 4 0" />
|
||||
</svg>
|
Before Width: | Height: | Size: 564 B |
@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="40" height="40" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<path d="M9 19c-4.286 1.35-4.286-2.55-6-3m12 5v-3.5c0-1 .099-1.405-.5-2 2.791-.3 5.5-1.366 5.5-6.04a4.567 4.567 0 0 0 -1.333 -3.21 4.192 4.192 0 00-.08-3.227s-1.05-.3-3.476 1.267a12.334 12.334 0 0 0 -6.222 0C6.462 2.723 5.413 3.023 5.413 3.023a4.192 4.192 0 0 0 -.08 3.227A4.566 4.566 0 004 9.486c0 4.64 2.709 5.68 5.5 6.014-.591.589-.56 1.183-.5 2V21" />
|
||||
</svg>
|
Before Width: | Height: | Size: 636 B |
@ -1,6 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-info-square" width="40" height="40" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<line x1="12" y1="8" x2="12.01" y2="8" />
|
||||
<rect x="4" y="4" width="16" height="16" rx="2" />
|
||||
<polyline points="11 12 12 12 12 16 13 16" />
|
||||
</svg>
|
Before Width: | Height: | Size: 422 B |
@ -1,7 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-notes" width="40" height="40" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<rect x="5" y="3" width="14" height="18" rx="2" />
|
||||
<line x1="9" y1="7" x2="15" y2="7" />
|
||||
<line x1="9" y1="11" x2="15" y2="11" />
|
||||
<line x1="9" y1="15" x2="13" y2="15" />
|
||||
</svg>
|
Before Width: | Height: | Size: 448 B |
@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-refresh" width="40" height="40" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -5v5h5" />
|
||||
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 5v-5h-5" />
|
||||
</svg>
|
Before Width: | Height: | Size: 382 B |
@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<circle cx="10" cy="10" r="7" />
|
||||
<line x1="21" y1="21" x2="15" y2="15" />
|
||||
</svg>
|
Before Width: | Height: | Size: 362 B |
@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="20" height="20" viewBox="0 0 24 24" stroke-width="2.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<circle cx="10" cy="10" r="7" />
|
||||
<line x1="21" y1="21" x2="15" y2="15" />
|
||||
</svg>
|
Before Width: | Height: | Size: 362 B |
@ -1,6 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-square-plus" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<rect x="4" y="4" width="16" height="16" rx="2" />
|
||||
<line x1="9" y1="12" x2="15" y2="12" />
|
||||
<line x1="12" y1="9" x2="12" y2="15" />
|
||||
</svg>
|
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 226 KiB |
BIN
website/site/static/img/fts-feature_dark.png
Normal file
After Width: | Height: | Size: 229 KiB |
97
website/site/static/js/light-switch.js
Normal file
@ -0,0 +1,97 @@
|
||||
/// Handles lights-switch link
|
||||
|
||||
var loadTheme = function() {
|
||||
var syntaxCss = document.getElementById('syntax-css');
|
||||
if (localStorage.theme === 'dark' ||
|
||||
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||
document.documentElement.classList.add('dark');
|
||||
if (syntaxCss) {
|
||||
syntaxCss.href = "/syntax-dark.css";
|
||||
}
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
if (syntaxCss) {
|
||||
syntaxCss.href = "/syntax-light.css";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var updateIcon = function(btn) {
|
||||
var icon = document.createElement('i');
|
||||
icon.classList.add('fa');
|
||||
if (localStorage.theme === 'dark') {
|
||||
icon.classList.add('fa-moon');
|
||||
}
|
||||
else if (localStorage.theme === 'light') {
|
||||
icon.classList.add('fa-sun');
|
||||
icon.classList.add('font-thin');
|
||||
}
|
||||
else {
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
icon.classList.add('fa-moon');
|
||||
} else {
|
||||
icon.classList.add('fa-sun');
|
||||
}
|
||||
icon.classList.add('opacity-40');
|
||||
}
|
||||
btn.replaceChild(icon, btn.firstElementChild);
|
||||
};
|
||||
|
||||
var initTheme = function() {
|
||||
loadTheme();
|
||||
const switches = document.getElementsByClassName('lights-container');
|
||||
if (switches) {
|
||||
for (var i=0; i<switches.length; i++) {
|
||||
var el = switches.item(i);
|
||||
var menuBtn = el.getElementsByClassName('lights-switch')[0];
|
||||
|
||||
updateIcon(menuBtn);
|
||||
|
||||
const menu = el.getElementsByClassName('lights-menu')[0];
|
||||
if (menuBtn) {
|
||||
menuBtn.onclick = function() {
|
||||
if (menu && menu.classList.contains('hidden')) {
|
||||
menu.classList.remove('hidden');
|
||||
} else {
|
||||
menu.classList.add('hidden');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const toDark = el.getElementsByClassName('lights-to-dark')[0];
|
||||
if (toDark) {
|
||||
toDark.onclick = function() {
|
||||
localStorage.theme = 'dark';
|
||||
loadTheme();
|
||||
menu.classList.add('hidden');
|
||||
updateIcon(menuBtn);
|
||||
};
|
||||
}
|
||||
const toLight = el.getElementsByClassName('lights-to-light')[0];
|
||||
if (toLight) {
|
||||
toLight.onclick = function() {
|
||||
localStorage.theme = 'light';
|
||||
loadTheme();
|
||||
menu.classList.add('hidden');
|
||||
updateIcon(menuBtn);
|
||||
};
|
||||
}
|
||||
const toSystem = el.getElementsByClassName('lights-to-system')[0];
|
||||
if (toSystem) {
|
||||
toSystem.onclick = function() {
|
||||
localStorage.removeItem('theme');
|
||||
loadTheme();
|
||||
menu.classList.add('hidden');
|
||||
updateIcon(menuBtn);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (document.readyState === "complete" ||
|
||||
(document.readyState !== "loading" && !document.documentElement.doScroll)
|
||||
) {
|
||||
initTheme();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", initTheme);
|
||||
}
|