index.html
Copy Code
<!DOCTYPE html>
<!--
SYNTAXIS_CHALLENGE
slug: faq-accordion
title: FAQ Accordion
difficulty: BEGINNER
technologies: HTML, CSS, JavaScript
suggested_tier: FREE
description: Create an elegant FAQ page with animated accordions, keyboard accessibility, plus/minus indicators, and category tabs.
-->
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>FAQ Accordion | Syntaxis Challenge 06</title>
<link href="css/styles.css" rel="stylesheet"/></head>
<body>
<main class="faq-container">
<div class="header-badge">
<svg fill="none" height="14" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" viewbox="0 0 24 24" width="14"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" x2="12.01" y1="17" y2="17"></line></svg>
Knowledge Base
</div>
<h1 class="faq-title">Frequently Asked Questions</h1>
<p class="faq-subtitle">Everything you need to know about the Syntaxis developer learning platform, subscription tiers, and project submissions.</p>
<div class="accordion-list" id="faqList">
<!-- Item 1 -->
<div class="accordion-item active">
<button aria-expanded="true" class="accordion-trigger">
<span>What programming skills do I need to start?</span>
<span class="icon-box">
<svg fill="none" viewbox="0 0 24 24"><line x1="12" x2="12" y1="5" y2="19"></line><line x1="5" x2="19" y1="12" y2="12"></line></svg>
</span>
</button>
<div class="accordion-content">
<div class="content-inner">
Our beginner challenges are designed for anyone who understands basic HTML and CSS syntax. You don't need frameworks like React or Vue — every project encourages mastery of native web primitives.
</div>
</div>
</div>
<!-- Item 2 -->
<div class="accordion-item">
<button aria-expanded="false" class="accordion-trigger">
<span>Can I showcase these completed projects in my portfolio?</span>
<span class="icon-box">
<svg fill="none" viewbox="0 0 24 24"><line x1="12" x2="12" y1="5" y2="19"></line><line x1="5" x2="19" y1="12" y2="12"></line></svg>
</span>
</button>
<div class="accordion-content">
<div class="content-inner">
Yes, absolutely! All original challenge designs, vector assets, and starter kits are licensed for commercial and personal portfolio showcase. We encourage you to host them on GitHub Pages or Vercel.
</div>
</div>
</div>
<!-- Item 3 -->
<div class="accordion-item">
<button aria-expanded="false" class="accordion-trigger">
<span>How does the automated code review system work?</span>
<span class="icon-box">
<svg fill="none" viewbox="0 0 24 24"><line x1="12" x2="12" y1="5" y2="19"></line><line x1="5" x2="19" y1="12" y2="12"></line></svg>
</span>
</button>
<div class="accordion-content">
<div class="content-inner">
When you submit your repository URL, our CI test suite evaluates visual pixel parity against 1440px desktop and 390px mobile targets, checks semantic accessibility, and verifies interactive JavaScript triggers.
</div>
</div>
</div>
<!-- Item 4 -->
<div class="accordion-item">
<button aria-expanded="false" class="accordion-trigger">
<span>What is the difference between Free and Pro tiers?</span>
<span class="icon-box">
<svg fill="none" viewbox="0 0 24 24"><line x1="12" x2="12" y1="5" y2="19"></line><line x1="5" x2="19" y1="12" y2="12"></line></svg>
</span>
</button>
<div class="accordion-content">
<div class="content-inner">
Free accounts receive lifetime access to all Beginner challenges and community discord reviews. Pro members unlock comprehensive multi-page dashboard specifications, high-res Figma design tokens, and private feedback.
</div>
</div>
</div>
<!-- Item 5 -->
<div class="accordion-item">
<button aria-expanded="false" class="accordion-trigger">
<span>Are external JavaScript or CSS libraries permitted?</span>
<span class="icon-box">
<svg fill="none" viewbox="0 0 24 24"><line x1="12" x2="12" y1="5" y2="19"></line><line x1="5" x2="19" y1="12" y2="12"></line></svg>
</span>
</button>
<div class="accordion-content">
<div class="content-inner">
While real-world jobs often use frameworks, Syntaxis challenges specifically hone native browser capabilities. We advocate pure HTML5, modern CSS (Flexbox, Grid, Custom Properties), and vanilla ES6+ interactions.
</div>
</div>
</div>
<!-- Item 6 -->
<div class="accordion-item">
<button aria-expanded="false" class="accordion-trigger">
<span>How frequently are new real-world challenges published?</span>
<span class="icon-box">
<svg fill="none" viewbox="0 0 24 24"><line x1="12" x2="12" y1="5" y2="19"></line><line x1="5" x2="19" y1="12" y2="12"></line></svg>
</span>
</button>
<div class="accordion-content">
<div class="content-inner">
We drop 2 curated design challenges every Tuesday morning, alternating between accessible micro-interactions, full-page conversion layouts, and complex data visualizer interfaces.
</div>
</div>
</div>
</div>
<div class="faq-footer">
<div class="help-text">Still have unanswered questions?</div>
<button class="contact-btn">Speak with our mentor team</button>
</div>
</main>
<script src="js/script.js"></script></body>
</html>
css/styles.css
Copy Code
/* Syntaxis starter styles for: FAQ Accordion
Recreate the supplied reference design. The completed Stitch CSS is intentionally not included.
*/
:root {
--bg: #0c0f17;
--card-bg: #141a29;
--card-border: rgba(255, 255, 255, 0.08);
--accent: #6366f1;
--accent-glow: rgba(99, 102, 241, 0.25);
--text-main: #f8fafc;
--text-muted: #94a3b8;
--text-dim: #64748b;
--item-bg: rgba(255, 255, 255, 0.03);
--item-hover: rgba(255, 255, 255, 0.06);
}
* {
box-sizing: border-box;
}
html, body {
margin: 0;
min-height: 100%;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* TODO:
1. Build the desktop reference.
2. Add responsive/mobile states.
3. Add hover, focus, error, success, open/closed, selected, or active states required by the brief.
*/
js/script.js
Copy Code
// Syntaxis challenge starter: faq-accordion
// Create an elegant FAQ page with animated accordions, keyboard accessibility, plus/minus indicators, and category tabs.
document.addEventListener('DOMContentLoaded', () => {
console.info('Starter ready: faq-accordion');
// TODO: Wire the required user interactions and event handlers.
});