-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleft-menu.html.twig
More file actions
82 lines (74 loc) · 4.3 KB
/
Copy pathleft-menu.html.twig
File metadata and controls
82 lines (74 loc) · 4.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<aside class="col-lg-3 col-md-4">
<div class="sticky-top" style="top: 90px; z-index: 10;">
<div class="card border-0 shadow-sm mb-4 rounded-3">
<div class="card-body p-3">
<h6 class="fw-bold text-uppercase text-muted small px-1 mb-3">Search</h6>
<div class="input-group">
<span class="input-group-text bg-light border-end-0 text-muted">
<i class="bi bi-search"></i>
</span>
<input type="text" class="form-control border-start-0 bg-light shadow-none" placeholder="Search articles…">
</div>
</div>
</div>
{% if data is defined %}
<div class="card border-0 shadow-sm rounded-3 my-2">
<div class="card-body p-3">
<h6 class="fw-bold text-uppercase text-muted small px-1 mb-2">Recent Articles</h6>
<div class="list-group list-group-flush">
{% for article in data.items|slice(0, 3) %}
<a href="{{ url('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug}) }}"
class="list-group-item list-group-item-action border-0 px-1 py-2 rounded">
<p class="mb-1 small fw-semibold text-dark lh-sm">{{ article.title }}</p>
<span class="text-muted" >
<i class="bi bi-calendar3 me-1"></i>{{ article.postDate|date('M d, Y') }}
</span>
</a>
{% else %}
<p class="text-muted small mb-0">No recent articles.</p>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class="card border-0 shadow-sm rounded-3">
<div class="card-body p-3">
<h6 class="fw-bold text-uppercase text-muted small px-1 mb-2">Categories</h6>
<div class="list-group list-group-flush mb-3 pe-2" style="max-height: 250px; overflow-y: auto; overflow-x: hidden;">
{% for category in categories %}
<a href="{{ url('page::category-resource', {slug: category.slug}) }}"
class="list-group-item list-group-item-action d-flex align-items-center justify-content-between py-2 px-1 border-0 rounded text-secondary small">
<span>{{ category.name }}</span>
<span class="badge bg-light text-secondary border ms-auto me-2">{{ category.posts.count() }}</span>
</a>
{% endfor %}
</div>
<div class="pt-2 border-top text-center">
<a href="{{ url('page::categories') }}" class="text-primary small fw-semibold text-decoration-none d-inline-flex align-items-center gap-1">
See all categories <i class="bi bi-arrow-right fs-7"></i>
</a>
</div>
</div>
</div>
{% if posts is defined and posts %}
<div class="card border-0 shadow-sm rounded-3 my-2">
<div class="card-body p-3">
<h6 class="fw-bold text-uppercase text-muted small px-1 mb-2">Recent Articles</h6>
<div class="list-group list-group-flush">
{% for post in posts %}
<a href="{{ url('page::blog-resource', {categorySlug: post.category.slug, slug: post.slug}) }}"
class="list-group-item list-group-item-action border-0 px-1 py-2 rounded">
<p class="mb-1 small fw-semibold text-dark lh-sm">{{ post.title }}</p>
<span class="text-muted">
<i class="bi bi-calendar3 me-1"></i>{{ post.postDate|date('M d, Y') }}
</span>
</a>
{% else %}
<p class="text-muted small mb-0">No recent articles.</p>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>
</aside>