Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
19 changes: 10 additions & 9 deletions src/components/FAQ.astro
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ const FAQs = [
<div class="faqs">
<ul>
{
FAQs.map(({ question, answer }) => (
FAQs.map(({ question, answer }, index) => (
<li class="faqItem">
<button class="accordionButton">
<button class="accordionButton" aria-expanded="false" aria-controls={`faq-panel-${index}`} id={`faq-btn-${index}`}>
<span class="accordionIcon" aria-hidden="true" />
<span class="accordionHeader">{question}</span>
</button>
<p class="accordionContent" set:html={answer} />
<p class="accordionContent" id={`faq-panel-${index}`} role="region" aria-labelledby={`faq-btn-${index}`} set:html={answer} />
</li>
Comment thread
gabitoesmiapodo marked this conversation as resolved.
))
}
Expand Down Expand Up @@ -164,7 +164,7 @@ const FAQs = [
.faqItem {
list-style: none;
width: 100%;
color: var(--texColor);
color: var(--textColor);
display: flex;
flex-direction: column;
gap: calc(var(--space) * 2);
Expand Down Expand Up @@ -295,13 +295,14 @@ const FAQs = [
</style>

<script>
const faqItems = document.querySelectorAll(".faqItem");
const faqItems = document.querySelectorAll(".faqItem")
faqItems.forEach((item) => {
const button = item.querySelector(".accordionButton");
const button = item.querySelector(".accordionButton")
if (button) {
button.addEventListener("click", () => {
item.classList.toggle("active");
});
const isActive = item.classList.toggle("active")
button.setAttribute("aria-expanded", String(isActive))
})
Comment thread
gabitoesmiapodo marked this conversation as resolved.
}
});
})
</script>
2 changes: 1 addition & 1 deletion src/components/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import CodeGithub from "@components/CodeGithub.astro";
}
}
p {
color: var(--Light-Grey);
color: var(--greyLight);
font-size: 1.8rem;
font-weight: 400;
line-height: 160%;
Expand Down
4 changes: 2 additions & 2 deletions src/components/HeroImages.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Ghost from "@assets/ghostHero.svg";
id="ghost"
height={233}
width={215}
aria-labelledby="The dAppBooster ghost icon"
aria-label="The dAppBooster ghost icon"
/>
</div>

Expand Down Expand Up @@ -115,7 +115,7 @@ import Ghost from "@assets/ghostHero.svg";
@media (prefers-reduced-motion: reduce) {
#ghost,
#smoke {
@apply animate-none;
animation: none;
}
}
</style>
Loading