mirror of
https://gitlab.com/octtspacc/sitoctt
synced 2025-06-05 22:09:20 +02:00
Aggiornamento Musica, Miglioramento ricerca con delay query
This commit is contained in:
@@ -35,6 +35,7 @@ href = "/miscellanea/Open-Source-sitoctt/"
|
|||||||
alt = "✨sitoctt"
|
alt = "✨sitoctt"
|
||||||
file = "Sites/sitoctt-1.png"
|
file = "Sites/sitoctt-1.png"
|
||||||
href = "/miscellanea/Raccolta-Siti-Internet/#il-mio"
|
href = "/miscellanea/Raccolta-Siti-Internet/#il-mio"
|
||||||
|
oc = true
|
||||||
|
|
||||||
[[10-site]]
|
[[10-site]]
|
||||||
alt = "Sign my guestoobk"
|
alt = "Sign my guestoobk"
|
||||||
@@ -85,16 +86,19 @@ alt = "Visita la OctoSpacc Hub"
|
|||||||
file = "Sites/octospacc-hub-1.png"
|
file = "Sites/octospacc-hub-1.png"
|
||||||
href = "https://hub.octt.eu.org"
|
href = "https://hub.octt.eu.org"
|
||||||
rel = "me"
|
rel = "me"
|
||||||
|
oc = true
|
||||||
|
|
||||||
[[20-me]]
|
[[20-me]]
|
||||||
alt = "Visita il mio Fritto Misto di OctoSpacc"
|
alt = "Visita il mio Fritto Misto di OctoSpacc"
|
||||||
file = "Sites/fritto-misto-di-octospacc-1.png"
|
file = "Sites/fritto-misto-di-octospacc-1.png"
|
||||||
href = "https://octospacc.altervista.org"
|
href = "https://octospacc.altervista.org"
|
||||||
rel = "me"
|
rel = "me"
|
||||||
|
oc = true
|
||||||
|
|
||||||
[[20-me]]
|
[[20-me]]
|
||||||
alt = "Bandiera Octt"
|
alt = "Bandiera Octt"
|
||||||
file = "Octt-Flag.png"
|
file = "Octt-Flag.png"
|
||||||
|
oc = true
|
||||||
|
|
||||||
[[20-me]]
|
[[20-me]]
|
||||||
alt = "Rainbow"
|
alt = "Rainbow"
|
||||||
@@ -210,6 +214,7 @@ alt = "Firefox"
|
|||||||
file = "Firefox-Modern.png"
|
file = "Firefox-Modern.png"
|
||||||
href = "https://www.mozilla.org/it/firefox"
|
href = "https://www.mozilla.org/it/firefox"
|
||||||
spam = true
|
spam = true
|
||||||
|
oc = true
|
||||||
|
|
||||||
[[50-fun]]
|
[[50-fun]]
|
||||||
alt = "The Onion Router"
|
alt = "The Onion Router"
|
||||||
|
@@ -31,7 +31,21 @@ Sapevo fossero la stessa persona, ma non sapevo che "Ujico" e "Snail's House" fo
|
|||||||
|
|
||||||
* [SoundCloud](https://soundcloud.com/ujico), [YouTube](https://www.youtube.com/channel/UCYxBY8mhJ7R2rMIcQ28H_Zw), [Bandcamp](https://0101.bandcamp.com/music), [Archive.org](https://archive.org/details/ujico-snails-house-full-discography)
|
* [SoundCloud](https://soundcloud.com/ujico), [YouTube](https://www.youtube.com/channel/UCYxBY8mhJ7R2rMIcQ28H_Zw), [Bandcamp](https://0101.bandcamp.com/music), [Archive.org](https://archive.org/details/ujico-snails-house-full-discography)
|
||||||
|
|
||||||
<!-- ## Album vari -->
|
## Album vari
|
||||||
|
|
||||||
|
### FÜGENE
|
||||||
|
|
||||||
|
* [FÜGENE 01](https://linkco.re/XRuRv8rH?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_khd5b0R0IMDkw0gePLwh5Rrgr9WGHEsvg), [Bandcamp](https://megarex-jp.bandcamp.com/album/fugene-01)
|
||||||
|
* [FÜGENE 02](https://linkco.re/mDPeVZRV?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_mWo8vkOoCPpP1lCY8UeiBCSoWYEgx-_ME)
|
||||||
|
* [FÜGENE 03](https://linkco.re/AuSy2sZ6?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_l_FdJ96W2OaVCMQebNejLt3VXOnd5qpOY)
|
||||||
|
* [FÜGENE 04](https://linkco.re/C3vsXvtq?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_nWn26hNyAqHxJJ40lbYqRczBYDswPLRAc)
|
||||||
|
* [FÜGENE Remixes](https://linkco.re/YxcmVDHX?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_lzy3JOHetCfnOMdcQhPxjeM3cKisvYIrk)
|
||||||
|
|
||||||
|
### SPD GAR
|
||||||
|
|
||||||
|
* [SPD GAR 001](https://linkco.re/cF0ZGmQP?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_mNq8bjZS7WjR0Ir-bB_xiwfo308YKIQB0), [Bandcamp](https://megarex-jp.bandcamp.com/album/spd-gar-001)
|
||||||
|
* [SPD GAR 002](https://linkco.re/UMBY67rd?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_mM8EfyV20cZEhVZiLdSZNbI763Jg0KK0s), [Bandcamp](https://megarex-jp.bandcamp.com/album/spd-gar-002)
|
||||||
|
* [SPD GAR 003](https://linkco.re/4M5rXzbd?lang=en): [YouTube](https://music.youtube.com/playlist?list=OLAK5uy_lGHiR_5TwywEjY-EDBoIfeDb5LM07MKT0)
|
||||||
|
|
||||||
## Menzioni speciali
|
## Menzioni speciali
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
class="flex flex-column w-100 max-w-3xl min-h-0 mx-auto border rounded-md shadow-lg top-20 border-neutral-200 bg-neutral dark:border-neutral-700 dark:bg-neutral-800"
|
class="flex flex-column w-100 max-w-3xl min-h-0 mx-auto border rounded-md shadow-lg top-20 border-neutral-200 bg-neutral dark:border-neutral-700 dark:bg-neutral-800"
|
||||||
>
|
>
|
||||||
<header class="relative z-10 flex items-center justify-between flex-none px-2">
|
<header class="relative z-10 flex items-center justify-between flex-none px-2">
|
||||||
<form class="flex items-center flex-auto min-w-0">
|
<form class="flex items-center flex-auto min-w-0" onsubmit="return false;">
|
||||||
<div class="flex items-center justify-center w-8 h-8 text-neutral-400">
|
<div class="flex items-center justify-center w-8 h-8 text-neutral-400">
|
||||||
{{/* partial "icon.html" "search" */}}
|
{{/* partial "icon.html" "search" */}}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,12 +1,11 @@
|
|||||||
(function(){
|
(function(){
|
||||||
// TODO fix ajax navigation to different-language page, doesn't currently load the index for the selected language
|
// TODO fix ajax navigation to different-language page, doesn't currently load the index for the selected language
|
||||||
// TODO better perf
|
|
||||||
// TODO thumbnails?
|
// TODO thumbnails?
|
||||||
// TODO highlight found word in text summary? we must handle generating summary client-side at different points of text for it to work
|
// TODO highlight found word in text summary? we must handle generating summary client-side at different points of text for it to work
|
||||||
|
|
||||||
function init () {
|
function init () {
|
||||||
|
|
||||||
var fuse;
|
var fuse, queryTimeout, lastQueryTerm;
|
||||||
var hideButton = document.getElementById("close-search-button");
|
var hideButton = document.getElementById("close-search-button");
|
||||||
var wrapper = document.getElementById("search-wrapper");
|
var wrapper = document.getElementById("search-wrapper");
|
||||||
var modal = document.getElementById("search-modal");
|
var modal = document.getElementById("search-modal");
|
||||||
@@ -31,7 +30,14 @@ document.addEventListener('keydown', SiteSearchOnKeyHandler);
|
|||||||
|
|
||||||
// Update search on each keypress
|
// Update search on each keypress
|
||||||
input.onkeyup = function (event) {
|
input.onkeyup = function (event) {
|
||||||
executeQuery(this.value);
|
if (input.value !== lastQueryTerm) {
|
||||||
|
queryTimeout = clearTimeout(queryTimeout);
|
||||||
|
queryTimeout = setTimeout(function(){
|
||||||
|
queryTimeout = null;
|
||||||
|
executeQuery(input.value);
|
||||||
|
}, 300);
|
||||||
|
lastQueryTerm = input.value;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function documentOnKeyDown (event) {
|
function documentOnKeyDown (event) {
|
||||||
@@ -48,8 +54,17 @@ function documentOnKeyDown (event) {
|
|||||||
hideSearch();
|
hideSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.key == "ArrowDown") {
|
if ((event.key === 'Enter' || event.key === 'ArrowDown') && searchVisible && queryTimeout) {
|
||||||
if (searchVisible && hasResults) {
|
queryTimeout = clearTimeout(queryTimeout);
|
||||||
|
executeQuery(input.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!searchVisible || !hasResults) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (event.key) {
|
||||||
|
case 'ArrowDown': {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (document.activeElement == input) {
|
if (document.activeElement == input) {
|
||||||
first.focus();
|
first.focus();
|
||||||
@@ -58,11 +73,10 @@ function documentOnKeyDown (event) {
|
|||||||
} else {
|
} else {
|
||||||
document.activeElement.parentElement.nextSibling.firstElementChild.focus();
|
document.activeElement.parentElement.nextSibling.firstElementChild.focus();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (event.key == "ArrowUp") {
|
case 'ArrowUp': {
|
||||||
if (searchVisible && hasResults) {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (document.activeElement == input) {
|
if (document.activeElement == input) {
|
||||||
input.focus();
|
input.focus();
|
||||||
@@ -71,18 +85,18 @@ function documentOnKeyDown (event) {
|
|||||||
} else {
|
} else {
|
||||||
document.activeElement.parentElement.previousSibling.firstElementChild.focus();
|
document.activeElement.parentElement.previousSibling.firstElementChild.focus();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Enter to get to results
|
// Enter to get to results
|
||||||
if (event.key == "Enter") {
|
case 'Enter': {
|
||||||
if (searchVisible && hasResults) {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (document.activeElement == input) {
|
if (document.activeElement == input) {
|
||||||
first.focus();
|
first.focus();
|
||||||
} else {
|
} else {
|
||||||
document.activeElement.click();
|
document.activeElement.click();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,8 +146,8 @@ function buildIndex() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function executeQuery(term) {
|
function executeQuery(term) {
|
||||||
let results = fuse.search(term);
|
var results = fuse.search(term);
|
||||||
let resultsHTML = "";
|
var resultsHTML = "";
|
||||||
|
|
||||||
if (results.length > 0) {
|
if (results.length > 0) {
|
||||||
results.forEach(function (value, key) {
|
results.forEach(function (value, key) {
|
||||||
|
Reference in New Issue
Block a user