filter for marketplace

This commit is contained in:
Isabelle Nachbaur 2026-04-07 23:56:55 +02:00
parent 02b8a75947
commit 3da8813c41
2 changed files with 101 additions and 16 deletions

View File

@ -31,16 +31,30 @@
font-size: 1rem; font-size: 1rem;
} }
/* Filter + Sort Row */
.filter-sort-row {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
margin-bottom: 32px;
border-bottom: 1px solid #e5e7eb;
padding-bottom: 16px;
}
/* Filter buttons - centered */ /* Filter buttons - centered */
.filter-buttons { .filter-buttons {
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 12px; gap: 12px;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 32px; flex: 1;
border-bottom: 1px solid #e5e7eb; margin: 0;
padding-bottom: 16px; border-bottom: none;
padding-bottom: 0;
} }
.filter-btn { .filter-btn {
background: transparent; background: transparent;
border: none; border: none;
@ -60,6 +74,20 @@
background: #f1f5f9; background: #f1f5f9;
} }
/* Sort Dropdown - right aligned */
.sort-dropdown {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 30px;
padding: 8px 16px;
font-size: 0.9rem;
font-weight: 500;
color: #334155;
cursor: pointer;
outline: none;
margin-left: auto;
}
/* Prompts grid */ /* Prompts grid */
.prompts-grid { .prompts-grid {
display: grid; display: grid;
@ -166,13 +194,21 @@
} }
/* Responsive */ /* Responsive */
@media (max-width: 700px) {
.filter-sort-row {
flex-direction: column;
align-items: stretch;
}
.sort-dropdown {
align-self: flex-end;
margin-left: 0;
}
}
@media (max-width: 768px) { @media (max-width: 768px) {
.marketplace-main { .marketplace-main {
padding: 16px !important; padding: 16px !important;
} }
.filter-buttons {
gap: 8px;
}
.filter-btn { .filter-btn {
padding: 6px 14px; padding: 6px 14px;
font-size: 0.8rem; font-size: 0.8rem;

View File

@ -1,5 +1,6 @@
<!-- OnlyPrompt - Marketplace page: <!-- OnlyPrompt - Marketplace page:
- Browse and filter AI prompts with buy/view details buttons and pricing --> - Browse and filter AI prompts with buy/view details buttons and pricing
- Added sort dropdown (Best Rating, Price Low to High, Price High to Low) - UI only -->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -14,6 +15,47 @@
<link rel="stylesheet" href="../css/topbar.css"> <link rel="stylesheet" href="../css/topbar.css">
<link rel="stylesheet" href="../css/marketplace.css"> <link rel="stylesheet" href="../css/marketplace.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<style>
/* Additional inline style for sort dropdown can be moved to marketplace.css */
.filter-sort-row {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
margin-bottom: 32px;
border-bottom: 1px solid #e5e7eb;
padding-bottom: 16px;
}
.filter-buttons {
margin-bottom: 0;
border-bottom: none;
padding-bottom: 0;
}
.sort-dropdown {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 30px;
padding: 8px 16px;
font-size: 0.9rem;
font-weight: 500;
color: #334155;
cursor: pointer;
outline: none;
}
.sort-dropdown:hover {
border-color: #94a3b8;
}
@media (max-width: 700px) {
.filter-sort-row {
flex-direction: column;
align-items: stretch;
}
.sort-dropdown {
align-self: flex-start;
}
}
</style>
</head> </head>
<body> <body>
<div class="layout" style="display: flex; min-height: 100vh; background: var(--bg);"> <div class="layout" style="display: flex; min-height: 100vh; background: var(--bg);">
@ -32,7 +74,8 @@
<p>Browse and discover high-quality AI prompts</p> <p>Browse and discover high-quality AI prompts</p>
</div> </div>
<!-- Filter Buttons --> <!-- Filter + Sort Row -->
<div class="filter-sort-row">
<div class="filter-buttons"> <div class="filter-buttons">
<button class="filter-btn active">All</button> <button class="filter-btn active">All</button>
<button class="filter-btn">Writing</button> <button class="filter-btn">Writing</button>
@ -42,6 +85,12 @@
<button class="filter-btn">Video</button> <button class="filter-btn">Video</button>
<button class="filter-btn">Data</button> <button class="filter-btn">Data</button>
</div> </div>
<select class="sort-dropdown" aria-label="Sort prompts">
<option value="best">Best Rating</option>
<option value="price_low">Price: Low to High</option>
<option value="price_high">Price: High to Low</option>
</select>
</div>
<!-- Prompts Grid --> <!-- Prompts Grid -->
<div class="prompts-grid"> <div class="prompts-grid">