new: Added friends page and adjust page style

This commit is contained in:
yv1ing
2024-12-19 15:21:36 +08:00
parent 3e0fff662a
commit a068c22839
16 changed files with 240 additions and 148 deletions

View File

@@ -1,25 +1,4 @@
function search() {
const keyword = document.getElementById("index-search-input").value;
window.location.href = "/search?keyword=" + keyword;
}
function typeWriter(element_id, text) {
const element = document.getElementById(element_id);
let i = 0;
element.innerHTML = '';
function type() {
if (i < text.length) {
const minSpeed = 50;
const maxSpeed = 200;
const randomSpeed = Math.floor(Math.random() * (maxSpeed - minSpeed + 1)) + minSpeed;
element.innerHTML += text.charAt(i);
i++;
setTimeout(type, randomSpeed);
}
}
type();
}