Skip to content

Commit acc4551

Browse files
committed
Toggle arrow
1 parent 7aed54c commit acc4551

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

assets/js/navbar.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,12 @@ document.querySelectorAll('a[id^="toggleButton"]').forEach(button => {
104104
const idNumber = button.id.replace('toggleButton', '');
105105
const correspondingDiv = document.getElementById(`toggleDiv${idNumber}`);
106106

107-
console.log("adding listener")
108-
109107
button.addEventListener('click', () => {
110-
console.log("ping ")
111108
correspondingDiv.classList.toggle('hidden');
109+
if (button.textContent.includes("▲")) {
110+
button.textContent = "Details ▼"
111+
} else {
112+
button.textContent = "Details ▲"
113+
}
112114
});
113115
});

schedule.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ eleventyNavigation:
2121
<tr>
2222
<td>
2323
<h2 class="mt-0 mb-2 italic font-bold">{{ entry.title }}</h2>
24-
<a href="#/" id="toggleButton{{loop.index}}">Details &#x25BC;</a>
24+
<a href="#/" id="toggleButton{{loop.index}}">Details </a>
2525
<ul id="toggleDiv{{loop.index}}" class="hidden">
2626
{% if entry.details_released %}
2727
{% for topic in entry.agenda %}

0 commit comments

Comments
 (0)