Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 7fa5fa40 authored by 65160258's avatar 65160258
Browse files

css1

parent 2e63e617
No related branches found
No related tags found
No related merge requests found
......@@ -4,23 +4,27 @@
<div class="main-content">
<div class="d-flex justify-content-between align-items-center mb-4 flex-wrap">
<h1 class="h2 fw-bold text-primary">All Posts</h1>
<div class="d-flex align-items-center gap-3">
<label for="category" class="form-label mb-0 fw-semibold text-muted">Filter by Category:</label>
<form action="/index" method="GET" class="d-flex align-items-center gap-2">
<select name="category" id="category" class="form-select form-select-sm w-auto" onchange="this.form.submit()">
<option value="">All Categories</option>
<% categories.forEach(category => { %>
<option value="<%= category.id %>" <%= selectedCategory == category.id ? 'selected' : '' %>>
<%= category.name %>
</option>
<% }) %>
</select>
</form>
</div>
<!-- ส่วนของ Filter -->
<div class="d-flex align-items-center gap-3">
<label for="category" class="form-label mb-0 fw-semibold text-muted">Filter by Category:</label>
<form action="/index" method="GET" class="d-flex align-items-center gap-2">
<select name="category" id="category" class="form-select form-select-sm w-auto" onchange="this.form.submit()">
<option value="">All Categories</option>
<% categories.forEach(category => { %>
<option value="<%= category.id %>" <%= selectedCategory == category.id ? 'selected' : '' %>>
<%= category.name %>
</option>
<% }) %>
</select>
</form>
</div>
<div class="badge bg-primary rounded-pill px-3 py-2">
<%= posts.length %> posts
<!-- ส่วนของ Badge -->
<div class="badge bg-primary rounded-pill px-3 py-2">
<%= posts.length %> posts
</div>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment