new advanced search page
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
</a>
|
||||
|
||||
<div class="nav-center">
|
||||
<button class="nav-button" data-page="search" onclick="window.location.href='/search'">
|
||||
<svg width="12" height="12" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="nav-button" data-page="anime" onclick="window.location.href='/anime'">Anime</button>
|
||||
<button class="nav-button" data-page="books" onclick="window.location.href='/books'">Books</button>
|
||||
<button class="nav-button" data-page="gallery" onclick="window.location.href='/gallery'">Gallery</button>
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.nav-button[data-page="search"] {
|
||||
padding: 0.6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.nav-brand {
|
||||
font-weight: 900;
|
||||
font-size: 1.5rem;
|
||||
|
||||
410
docker/views/css/search.css
Normal file
410
docker/views/css/search.css
Normal file
@@ -0,0 +1,410 @@
|
||||
/* search.css - Fixed & Unified */
|
||||
|
||||
:root {
|
||||
/* Dimensiones */
|
||||
--sidebar-width: 260px;
|
||||
--nav-height: 80px;
|
||||
--content-max-width: 1800px;
|
||||
|
||||
/* Colores Base (Dark Mode) */
|
||||
--c-bg-page: #09090b; /* Zinc-950 */
|
||||
--c-bg-input: #18181b; /* Zinc-900 */
|
||||
--c-bg-input-hover: #27272a;/* Zinc-800 */
|
||||
|
||||
/* Textos */
|
||||
--c-text-main: #f4f4f5; /* Zinc-100 */
|
||||
--c-text-muted: #a1a1aa; /* Zinc-400 */
|
||||
|
||||
/* Bordes y Acentos */
|
||||
--c-border: rgba(255, 255, 255, 0.08);
|
||||
--c-accent: #8b5cf6; /* Violet-500 */
|
||||
}
|
||||
|
||||
/* =========================================
|
||||
1. LAYOUT & BASE
|
||||
========================================= */
|
||||
.app-layout {
|
||||
display: grid;
|
||||
grid-template-columns: var(--sidebar-width) 1fr;
|
||||
max-width: var(--content-max-width);
|
||||
min-height: 100vh;
|
||||
padding-top: var(--nav-height);
|
||||
}
|
||||
|
||||
.main-view {
|
||||
padding: 2.5rem 3rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* =========================================
|
||||
2. SIDEBAR & FILTROS (DISEÑO MEJORADO)
|
||||
========================================= */
|
||||
.filters-sidebar {
|
||||
position: sticky;
|
||||
top: var(--nav-height);
|
||||
height: calc(100vh - var(--nav-height));
|
||||
border-right: 1px solid var(--c-border);
|
||||
padding: 2rem 1.5rem 2rem 0;
|
||||
margin-left: 2rem;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* Scrollbar oculta */
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
.filters-sidebar::-webkit-scrollbar { display: none; }
|
||||
|
||||
.filter-group {
|
||||
margin-bottom: 1.5rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter-group label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
color: var(--c-text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
margin-bottom: 0.8rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* --- Mode Switcher --- */
|
||||
.mode-switcher {
|
||||
display: flex;
|
||||
background: var(--c-bg-input);
|
||||
padding: 4px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--c-border);
|
||||
}
|
||||
|
||||
.mode-btn {
|
||||
flex: 1;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--c-text-muted);
|
||||
padding: 8px;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.mode-btn:hover { color: var(--c-text-main); }
|
||||
.mode-btn.active {
|
||||
background: var(--c-bg-input-hover);
|
||||
color: white;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
/* --- Inputs y Selects Modernos (Boxed Style) --- */
|
||||
.custom-select select,
|
||||
.filter-input {
|
||||
width: 100%;
|
||||
background-color: var(--c-bg-input);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: 8px;
|
||||
color: var(--c-text-main);
|
||||
padding: 10px 12px;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
/* Icono flecha para selects */
|
||||
.custom-select { position: relative; }
|
||||
.custom-select::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 12px; top: 50%;
|
||||
transform: translateY(-50%);
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top: 5px solid var(--c-text-muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.custom-select select:focus,
|
||||
.filter-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--c-accent);
|
||||
background-color: var(--c-bg-page);
|
||||
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
|
||||
}
|
||||
|
||||
/* --- Checkbox Simple & Toggle --- */
|
||||
.checkbox-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.checkbox-wrapper input[type="checkbox"] {
|
||||
accent-color: var(--c-accent);
|
||||
width: 18px; height: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.checkbox-label {
|
||||
font-size: 0.9rem;
|
||||
color: var(--c-text-main);
|
||||
}
|
||||
.input-hint {
|
||||
font-size: 0.7rem; color: var(--c-text-muted); margin-top: 4px; display: block;
|
||||
}
|
||||
|
||||
/* =========================================
|
||||
3. MULTISELECT AVANZADO (Searchable)
|
||||
========================================= */
|
||||
.multiselect-container {
|
||||
background: var(--c-bg-input);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Buscador interno */
|
||||
.multiselect-search-wrapper {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid var(--c-border);
|
||||
background: var(--c-bg-input);
|
||||
position: sticky; top: 0; z-index: 2;
|
||||
}
|
||||
|
||||
.multiselect-search-input {
|
||||
width: 100%;
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: none;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
color: var(--c-text-main);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.multiselect-search-input:focus { outline: none; background: rgba(255,255,255,0.1); }
|
||||
|
||||
/* Lista Items */
|
||||
.multiselect-group {
|
||||
max-height: 220px;
|
||||
overflow-y: auto;
|
||||
padding: 4px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--c-border) transparent;
|
||||
}
|
||||
.multiselect-group::-webkit-scrollbar { width: 6px; }
|
||||
.multiselect-group::-webkit-scrollbar-thumb { background-color: #3f3f46; border-radius: 3px; }
|
||||
|
||||
/* Item Individual */
|
||||
.checkbox-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
color: var(--c-text-muted);
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.checkbox-item:hover { background-color: rgba(255,255,255,0.05); color: var(--c-text-main); }
|
||||
.checkbox-item.is-selected {
|
||||
background-color: rgba(139, 92, 246, 0.15);
|
||||
color: #ddd6fe;
|
||||
}
|
||||
|
||||
/* Checkbox Custom */
|
||||
.checkbox-item input[type="checkbox"] {
|
||||
appearance: none;
|
||||
width: 16px; height: 16px;
|
||||
border: 2px solid #52525b;
|
||||
border-radius: 4px;
|
||||
display: grid; place-content: center;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
.checkbox-item input[type="checkbox"]::before {
|
||||
content: ""; width: 8px; height: 8px;
|
||||
transform: scale(0);
|
||||
box-shadow: inset 1em 1em white;
|
||||
transform-origin: center;
|
||||
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
|
||||
background-color: white;
|
||||
transition: 0.1s transform ease-in-out;
|
||||
}
|
||||
.checkbox-item input[type="checkbox"]:checked { background-color: var(--c-accent); border-color: var(--c-accent); }
|
||||
.checkbox-item input[type="checkbox"]:checked::before { transform: scale(1); }
|
||||
|
||||
/* =========================================
|
||||
4. HEADER & GRID RESULTADOS
|
||||
========================================= */
|
||||
.content-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 2.5rem;
|
||||
flex-wrap: wrap;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
.header-left h1 { font-size: 2.5rem; font-weight: 800; margin: 0; line-height: 1; color: var(--c-text-main); }
|
||||
#result-count { font-size: 0.9rem; color: var(--c-text-muted); margin-top: 5px; display: block; }
|
||||
|
||||
/* Barra de búsqueda */
|
||||
.search-container { position: relative; width: 350px; max-width: 100%; }
|
||||
#main-search {
|
||||
width: 100%;
|
||||
background: var(--c-bg-input);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: 12px;
|
||||
padding: 12px 16px 12px 42px;
|
||||
color: white;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
#main-search:focus {
|
||||
border-color: var(--c-accent);
|
||||
box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
|
||||
outline: none;
|
||||
}
|
||||
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); font-size: 1.1rem; }
|
||||
.loader-spinner {
|
||||
position: absolute; right: 12px; top: 50%; margin-top: -8px;
|
||||
width: 16px; height: 16px;
|
||||
border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--c-accent);
|
||||
border-radius: 50%; animation: spin 0.8s linear infinite; display: none;
|
||||
}
|
||||
|
||||
/* Grid */
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
|
||||
gap: 3rem 2rem;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Cards */
|
||||
.card { cursor: pointer; display: flex; flex-direction: column; }
|
||||
.card:hover .card-img-wrap img { transform: scale(1.05); }
|
||||
.card:hover h3 { color: var(--c-accent); }
|
||||
|
||||
.card-img-wrap {
|
||||
width: 100%; aspect-ratio: 2 / 3;
|
||||
border-radius: 12px; overflow: hidden;
|
||||
background-color: var(--c-bg-input);
|
||||
margin-bottom: 1rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
|
||||
|
||||
.card-content h3 {
|
||||
font-size: 1rem; font-weight: 600; margin: 0 0 0.4rem 0;
|
||||
color: var(--c-text-main);
|
||||
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
||||
}
|
||||
.card-content p { font-size: 0.85rem; color: var(--c-text-muted); margin: 0; }
|
||||
|
||||
/* =========================================
|
||||
5. RESPONSIVE (MÓVIL)
|
||||
========================================= */
|
||||
|
||||
/* Por defecto ocultamos los controles móviles en escritorio */
|
||||
.mobile-header-controls { display: none; }
|
||||
.overlay-backdrop {
|
||||
position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
|
||||
z-index: 900; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
|
||||
}
|
||||
.overlay-backdrop.active { opacity: 1; pointer-events: auto; }
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
:root { --sidebar-width: 0px; }
|
||||
|
||||
.app-layout { display: block; }
|
||||
.main-view { padding: 1.5rem; }
|
||||
|
||||
/* Mostrar controles de cabecera en móvil */
|
||||
.mobile-header-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.mobile-title { font-size: 1.25rem; font-weight: 700; color: var(--c-text-main); }
|
||||
|
||||
/* Botón hamburguesa */
|
||||
.icon-btn-plain {
|
||||
background: none; border: none; padding: 0;
|
||||
color: var(--c-text-main); font-size: 1.5rem; cursor: pointer;
|
||||
}
|
||||
|
||||
/* Sidebar Móvil (Drawer) */
|
||||
.filters-sidebar {
|
||||
position: fixed;
|
||||
left: 0; top: 0;
|
||||
height: 100dvh;
|
||||
width: 85%; max-width: 320px;
|
||||
background: var(--c-bg-page);
|
||||
z-index: 1000;
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
margin-left: 0;
|
||||
padding: 2rem; /* Restauramos padding normal para el drawer */
|
||||
box-shadow: 10px 0 30px rgba(0,0,0,0.5);
|
||||
border-right: 1px solid var(--c-border);
|
||||
}
|
||||
|
||||
.filters-sidebar.active { transform: translateX(0); }
|
||||
|
||||
.sidebar-header.mobile-only {
|
||||
display: flex !important;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2rem 1rem; }
|
||||
}
|
||||
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
/* Aseguramos que el contenedor se muestre */
|
||||
.mobile-header-controls {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 5; /* Por encima de elementos flotantes */
|
||||
}
|
||||
|
||||
/* Estilo explícito para el botón */
|
||||
#toggle-sidebar {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px; /* Tamaño táctil mínimo */
|
||||
height: 44px;
|
||||
background: transparent;
|
||||
border: 1px solid var(--c-border); /* Borde sutil para verlo si falla el icono */
|
||||
border-radius: 8px;
|
||||
color: var(--c-text-main);
|
||||
font-size: 1.5rem; /* Tamaño del icono */
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#toggle-sidebar:active {
|
||||
background-color: var(--c-bg-input-hover);
|
||||
}
|
||||
|
||||
/* Ajuste del título móvil */
|
||||
.mobile-title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
color: var(--c-text-main);
|
||||
}
|
||||
}
|
||||
143
docker/views/search.html
Normal file
143
docker/views/search.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Browse - WaifuBoard</title>
|
||||
<link rel="stylesheet" href="/views/css/globals.css">
|
||||
<link rel="stylesheet" href="/views/css/components/navbar.css">
|
||||
<link rel="stylesheet" href="/views/css/search.css">
|
||||
<link rel="stylesheet" href="/views/css/components/updateNotifier.css">
|
||||
<link rel="stylesheet" href="/views/css/components/create-room.css"/>
|
||||
<link rel="icon" href="/public/assets/waifuboards.ico" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="app-layout">
|
||||
|
||||
<aside class="filters-sidebar" id="sidebar">
|
||||
|
||||
<div class="sidebar-header mobile-only" style="margin-bottom: 2rem; display:none;">
|
||||
<h3 style="margin:0;">Filters</h3>
|
||||
<button id="close-sidebar-mobile" style="background:none; border:none; color:white; font-size:1.5rem;"><i class="ri-close-line"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<div class="mode-switcher">
|
||||
<button class="mode-btn active" data-mode="anime">Anime</button>
|
||||
<button class="mode-btn" data-mode="books">Manga</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-group" style="padding-bottom: 1.5rem; border-bottom: 1px solid var(--c-border-light); margin-bottom: 1.5rem;">
|
||||
<label>Source</label>
|
||||
<div class="custom-select">
|
||||
<select id="source-select">
|
||||
<option value="anilist">Anilist</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="anilist-filters" style="display: flex; flex-direction: column; gap: 1.5rem;">
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Sort By</label>
|
||||
<div class="custom-select">
|
||||
<select id="filter-sort">
|
||||
<option value="TRENDING_DESC">Trending</option>
|
||||
<option value="POPULARITY_DESC">Popularity</option>
|
||||
<option value="SCORE_DESC">Top Rated</option>
|
||||
<option value="START_DATE_DESC">Newest</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Season & Year</label>
|
||||
<div style="display: flex; gap: 8px;">
|
||||
<div class="custom-select" style="flex:1">
|
||||
<select id="filter-season">
|
||||
<option value="">Season</option>
|
||||
<option value="WINTER">Winter</option>
|
||||
<option value="SPRING">Spring</option>
|
||||
<option value="SUMMER">Summer</option>
|
||||
<option value="FALL">Fall</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="custom-select" style="flex:1">
|
||||
<select id="filter-year"><option value="">Year</option></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Genre</label>
|
||||
<div class="custom-select">
|
||||
<select id="filter-genre"><option value="">All Genres</option></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Status</label>
|
||||
<div class="custom-select">
|
||||
<select id="filter-status">
|
||||
<option value="">Any Status</option>
|
||||
<option value="RELEASING">Airing</option>
|
||||
<option value="FINISHED">Finished</option>
|
||||
<option value="NOT_YET_RELEASED">Upcoming</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Format</label>
|
||||
<div class="custom-select">
|
||||
<select id="filter-format"><option value="">Any Format</option></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="extension-filters" style="display: none; flex-direction: column; gap: 1.5rem;">
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="main-view">
|
||||
|
||||
<div class="mobile-header-controls">
|
||||
<button id="toggle-sidebar" class="icon-btn-plain">
|
||||
<i class="ri-menu-2-line"></i>
|
||||
</button>
|
||||
<span class="mobile-title">Browse</span>
|
||||
</div>
|
||||
|
||||
<div class="content-header">
|
||||
<div class="header-left">
|
||||
<h1 id="results-title">Trending Now</h1>
|
||||
<span id="result-count">20 results</span>
|
||||
</div>
|
||||
|
||||
<div class="search-container">
|
||||
<i class="ri-search-line search-icon"></i>
|
||||
<input type="text" id="main-search" placeholder="Search..." autocomplete="off">
|
||||
<div id="search-loader" class="loader-spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="results-grid" class="media-grid"></div>
|
||||
|
||||
<div class="loading-state" id="initial-loader" style="display: none;">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="mobile-overlay" class="overlay-backdrop"></div>
|
||||
|
||||
<script src="/src/scripts/room-modal.js"></script>
|
||||
<script src="/src/scripts/updateNotifier.js"></script>
|
||||
<script src="/src/scripts/auth-guard.js"></script>
|
||||
<script src="/src/scripts/settings.js"></script>
|
||||
<script src="/src/scripts/search.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user