Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@

const updateShowAllButton = () => {
if (!showAllButton) return;
showAllButton.textContent = showingAll
showAllButton.querySelector('.show-all-btn-text').textContent = showingAll
? showAllButton.dataset.hideLabel
: showAllButton.dataset.showLabel;
};
Expand Down
20 changes: 20 additions & 0 deletions site/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ nav {
}

.show-all-btn {
display: grid;
padding: 10px 20px;
color: var(--text);
font: inherit;
Expand All @@ -509,6 +510,25 @@ nav {
transition: all 0.25s;
}

.show-all-btn::before,
.show-all-btn::after,
.show-all-btn-text {
grid-area: 1 / 1;
}

.show-all-btn::before,
.show-all-btn::after {
visibility: hidden;
}

.show-all-btn::before {
content: attr(data-show-label);
}

.show-all-btn::after {
content: attr(data-hide-label);
}

.show-all-btn:hover {
transform: translateY(-2px);
background: var(--surface-2);
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ <h2 class="section-title">{{site.allComparisons}}</h2>
</div>
<button class="show-all-btn" id="showAllButton" type="button"
data-show-label="{{filters.showAll}}" data-hide-label="{{filters.hideAll}}">
{{filters.showAll}}
<span class="show-all-btn-text">{{filters.showAll}}</span>
</button>
<button class="view-toggle-btn" id="viewToggle" aria-label="Toggle view mode">
<span class="view-toggle-icon">⊞</span>
Expand Down