Skip to content

Commit e14687b

Browse files
committed
feat(archive): add collection filters to Technical Conversations page
1 parent 08b5f0d commit e14687b

3 files changed

Lines changed: 95 additions & 1 deletion

File tree

_includes/interview-card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{% endif %}
1414
{% endif %}
1515

16-
<article class="editorial-card">
16+
<article class="editorial-card" data-collection="{{ interview.collection }}">
1717
{% if thumb %}
1818
<a class="editorial-card-thumb" href="{{ primary_url }}">
1919
<img src="{{ thumb }}" alt="Thumbnail for {{ interview.title }}" loading="lazy">

_sass/_p_main.scss

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,3 +576,59 @@
576576
.status-note a:hover {
577577
text-decoration: underline;
578578
}
579+
580+
/* Archive Filters */
581+
.archive-filters {
582+
display: flex;
583+
align-items: center;
584+
gap: 1.5rem;
585+
margin-bottom: 3rem;
586+
padding: 0.5rem 0;
587+
}
588+
589+
.filter-label {
590+
font-size: 0.8rem;
591+
font-weight: 800;
592+
text-transform: uppercase;
593+
letter-spacing: 0.05em;
594+
color: #888;
595+
}
596+
597+
.filter-group {
598+
display: flex;
599+
gap: 0.5rem;
600+
flex-wrap: wrap;
601+
}
602+
603+
.filter-btn {
604+
background: white;
605+
border: 1px solid #eee;
606+
padding: 0.5rem 1.25rem;
607+
border-radius: 2rem;
608+
font-size: 0.85rem;
609+
font-weight: 700;
610+
cursor: pointer;
611+
transition: all 0.2s ease;
612+
color: #666;
613+
}
614+
615+
.filter-btn:hover {
616+
border-color: var(--color-primary, #007bff);
617+
color: var(--color-primary, #007bff);
618+
}
619+
620+
.filter-btn.is-active {
621+
background: var(--color-primary, #007bff);
622+
border-color: var(--color-primary, #007bff);
623+
color: white;
624+
box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
625+
}
626+
627+
/* Editorial Card Filter Logic */
628+
.editorial-card {
629+
transition: opacity 0.3s ease, transform 0.3s ease;
630+
}
631+
632+
.editorial-card.is-hidden {
633+
display: none;
634+
}

interviews/index.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ <h2 class="title">A decade of dialogues with the engineers, authors, and communi
3434
<a href="https://github.com/just3ws/just3ws.github.io/issues" target="_blank" rel="noopener">submit an issue</a> on GitHub.
3535
</p>
3636
</section>
37+
38+
<nav class="archive-filters no-print" aria-label="Archive Collections">
39+
<span class="filter-label">Browse Collections:</span>
40+
<div class="filter-group">
41+
<button class="filter-btn is-active" data-filter="all">All</button>
42+
<button class="filter-btn" data-filter="UGtastic">UGtastic</button>
43+
<button class="filter-btn" data-filter="SCMC">SCMC</button>
44+
<button class="filter-btn" data-filter="Archive">Archive</button>
45+
</div>
46+
</nav>
47+
3748
{% include schema-factory.html
3849
collection_name="Technical Conversations"
3950
collection_description=page.description
@@ -52,4 +63,31 @@ <h2 class="title">A decade of dialogues with the engineers, authors, and communi
5263
{% endif %}
5364
{% endfor %}
5465
</div>
66+
67+
<script>
68+
document.addEventListener('DOMContentLoaded', () => {
69+
const buttons = document.querySelectorAll('.filter-btn');
70+
const cards = document.querySelectorAll('.editorial-card');
71+
72+
buttons.forEach(btn => {
73+
btn.addEventListener('click', () => {
74+
const filter = btn.getAttribute('data-filter');
75+
76+
// Update active state
77+
buttons.forEach(b => b.classList.remove('is-active'));
78+
btn.classList.add('is-active');
79+
80+
// Filter cards
81+
cards.forEach(card => {
82+
const collection = card.getAttribute('data-collection');
83+
if (filter === 'all' || collection === filter) {
84+
card.classList.remove('is-hidden');
85+
} else {
86+
card.classList.add('is-hidden');
87+
}
88+
});
89+
});
90+
});
91+
});
92+
</script>
5593
</article>

0 commit comments

Comments
 (0)