Add frontend search input

This commit is contained in:
2024-10-13 11:51:55 +11:00
parent 04c7ce0d1f
commit 2bbc30e48d
4 changed files with 127 additions and 38 deletions
+38
View File
@@ -600,6 +600,10 @@ video {
border-width: 0;
}
.pointer-events-none {
pointer-events: none;
}
.visible {
visibility: visible;
}
@@ -628,6 +632,11 @@ video {
position: sticky;
}
.inset-y-0 {
top: 0px;
bottom: 0px;
}
.left-0 {
left: 0px;
}
@@ -761,6 +770,10 @@ video {
height: 1rem;
}
.h-5 {
height: 1.25rem;
}
.h-screen {
height: 100vh;
}
@@ -789,6 +802,14 @@ video {
width: 12rem;
}
.w-5 {
width: 1.25rem;
}
.w-64 {
width: 16rem;
}
.w-full {
width: 100%;
}
@@ -1165,6 +1186,10 @@ video {
padding-bottom: 1.25rem;
}
.pr-3 {
padding-right: 0.75rem;
}
.text-left {
text-align: left;
}
@@ -1259,6 +1284,11 @@ video {
color: rgb(30 64 175 / var(--tw-text-opacity));
}
.text-gray-400 {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity));
}
.text-gray-500 {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
@@ -1378,6 +1408,10 @@ video {
transition-duration: 150ms;
}
.duration-150 {
transition-duration: 150ms;
}
.ease-in-out {
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
@@ -1481,6 +1515,10 @@ video {
border-color: rgb(165 180 252 / var(--tw-border-opacity));
}
.focus\:border-transparent:focus {
border-color: transparent;
}
.focus\:outline-none:focus {
outline: 2px solid transparent;
outline-offset: 2px;
+1 -9
View File
@@ -1,17 +1,12 @@
console.log('navbar.js is being executed');
document.addEventListener('DOMContentLoaded', function() {
console.log('DOMContentLoaded event fired in navbar.js');
const moreMenuButton = document.getElementById('more-menu-button');
const moreMenuDropdown = document.getElementById('more-menu-dropdown');
const languageSelectorButton = document.getElementById('language-selector-button');
const languageOptions = document.getElementById('language-options');
console.log('moreMenuButton:', moreMenuButton);
console.log('moreMenuDropdown:', moreMenuDropdown);
console.log('languageSelectorButton:', languageSelectorButton);
console.log('languageOptions:', languageOptions);
function toggleDropdown(button, dropdown) {
button.addEventListener('click', function(e) {
@@ -45,13 +40,10 @@ document.addEventListener('DOMContentLoaded', function() {
// 处理语言选择
const languageForm = document.getElementById('language-form');
console.log('languageForm:', languageForm);
if (languageForm) {
const languageButtons = languageForm.querySelectorAll('button[name="language"]');
console.log('languageButtons:', languageButtons);
languageButtons.forEach(button => {
button.addEventListener('click', function() {
console.log('Language changed');
languageForm.submit();
});
});