mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 18:15:31 +00:00
fix: linting
This commit is contained in:
1 parent
692dc8c62e
commit
20a6f8202e
5 files changed
+35
-34
No files matched your search
@@ -13,15 +13,19 @@
|
||||
|
||||
/* Gradient Mesh Animations */
|
||||
@keyframes float {
|
||||
0%, 100% {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0) translateX(0);
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: translateY(-20px) translateX(10px);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(-10px) translateX(-10px);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateY(-30px) translateX(5px);
|
||||
}
|
||||
@@ -31,6 +35,7 @@
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
/* Animations */
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.animate-spin {
|
||||
@@ -34,14 +36,15 @@
|
||||
|
||||
/* Smooth transitions */
|
||||
.search-modal-enter {
|
||||
animation: slideInUp 0.2s ease-out;
|
||||
animation: slide-in-up 0.2s ease-out;
|
||||
}
|
||||
|
||||
@keyframes slideInUp {
|
||||
@keyframes slide-in-up {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(1rem) scale(0.95);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
@@ -50,29 +53,24 @@
|
||||
|
||||
/* Loading skeleton */
|
||||
.search-skeleton {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgb(229 231 235) 25%,
|
||||
rgb(243 244 246) 50%,
|
||||
rgb(229 231 235) 75%
|
||||
);
|
||||
background: linear-gradient(90deg, rgb(229 231 235) 25%, rgb(243 244 246) 50%, rgb(229 231 235) 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: shimmer 1.5s infinite;
|
||||
}
|
||||
|
||||
.dark .search-skeleton {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgb(55 65 81) 25%,
|
||||
rgb(75 85 99) 50%,
|
||||
rgb(55 65 81) 75%
|
||||
);
|
||||
background: linear-gradient(90deg, rgb(55 65 81) 25%, rgb(75 85 99) 50%, rgb(55 65 81) 75%);
|
||||
background-size: 200% 100%;
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
0% { background-position: 200% 0; }
|
||||
100% { background-position: -200% 0; }
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Keyboard navigation highlight - handled by Alpine :class binding */
|
||||
@@ -85,4 +83,4 @@
|
||||
.search-result:focus-visible {
|
||||
outline: 2px solid rgb(59 130 246);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
}
|
||||
@@ -2,31 +2,31 @@
|
||||
// Search is handled by Alpine.js component in search-modal.html
|
||||
|
||||
// Additional keyboard shortcuts and utilities
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
console.log('✓ Hugo Blox Search initialized (Pagefind Headless API)');
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
console.log("✓ Hugo Blox Search initialized (Pagefind Headless API)");
|
||||
|
||||
// Handle search toggle buttons
|
||||
const searchButtons = document.querySelectorAll('[data-search-toggle]');
|
||||
searchButtons.forEach(button => {
|
||||
button.addEventListener('click', (e) => {
|
||||
const searchButtons = document.querySelectorAll("[data-search-toggle]");
|
||||
searchButtons.forEach((button) => {
|
||||
button.addEventListener("click", (e) => {
|
||||
const prefilledQuery = button.dataset.searchQuery;
|
||||
|
||||
if (window.Alpine && Alpine.store('search')) {
|
||||
Alpine.store('search').open = true;
|
||||
|
||||
|
||||
if (window.Alpine && Alpine.store("search")) {
|
||||
Alpine.store("search").open = true;
|
||||
|
||||
// Pre-fill query if specified
|
||||
if (prefilledQuery) {
|
||||
setTimeout(() => {
|
||||
const searchInput = document.querySelector('[x-ref="searchInput"]');
|
||||
if (searchInput) {
|
||||
searchInput.value = prefilledQuery;
|
||||
searchInput.dispatchEvent(new Event('input'));
|
||||
searchInput.dispatchEvent(new Event("input"));
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Note: Keyboard navigation (arrow keys, Enter) is handled by Alpine.js in search-modal.html
|
||||
});
|
||||
});
|
||||
@@ -6,4 +6,3 @@
|
||||
"categories": ["content", "interactive"],
|
||||
"preview": "preview.svg"
|
||||
}
|
||||
|
||||
@@ -92,4 +92,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user