Alikategoriat: välilehdet kategorian alla
- defaultCategories(): subcategories-kenttä jokaisella kategorialla (reseptit: kasvis/vegaaniset/jälkiruuat, neulominen: aloittelijoille/ vaatteet/kodin tekstiilit) - 30 julkaisua merkitty subcategory-kentällä - script.js: currentSubFilter-tila, setSubFilter(), renderSubFilters() renderöi alafiltterit kun kategoria on valittu; filterPosts() ottaa molemmat filtterit huomioon; cards saavat data-subcategory-attribuutin - index.html: #subCategoryFilters-div kategoriafilttereiden alle - style.css: .sub-filter-btn -tyyli (pienempi, tummanharmaa aktiiviasennossa) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
19
style.css
19
style.css
@@ -168,6 +168,25 @@ nav a:hover { color: #fff; }
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sub-filters { margin-top: 6px; min-height: 0; }
|
||||
|
||||
.sub-filter-btn {
|
||||
padding: 5px 15px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: 20px;
|
||||
background: #f5f5f5;
|
||||
color: var(--text-light);
|
||||
font-size: 0.78rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.sub-filter-btn:hover, .sub-filter-btn.active {
|
||||
background: #555;
|
||||
border-color: #555;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* =====================
|
||||
RECIPE GRID
|
||||
===================== */
|
||||
|
||||
Reference in New Issue
Block a user