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
173 changes: 173 additions & 0 deletions web-app/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,179 @@ body {
═══════════════════════════════════════ */
.projects-section { padding: 4rem 0; }

.faq-section {
padding: 4rem 0;
}

.section-header {
max-width: 820px;
margin: 0 auto;
text-align: center;
}

.section-kicker {
color: var(--accent-color);
font-size: 0.9rem;
letter-spacing: 0.17em;
text-transform: uppercase;
margin-bottom: 0.8rem;
}

.section-title {
font-size: clamp(2rem, 2.5vw, 2.8rem);
color: var(--text-color);
margin-bottom: 0.8rem;
line-height: 1.05;
}

.section-subtitle {
color: var(--text-secondary);
max-width: 640px;
margin: 0 auto;
font-size: 1rem;
line-height: 1.75;
}

.faq-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
margin-top: 2rem;
align-items: start;
}

.faq-card {
display: flex;
flex-direction: column;
justify-content: flex-start;
background: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 1.5rem;
overflow: hidden;
box-shadow: var(--shadow);
transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-card:hover {
transform: translateY(-3px);
border-color: var(--accent-border);
}

.faq-trigger {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1.25rem 1.5rem;
background: transparent;
border: none;
color: var(--text-color);
text-align: left;
font-size: 1rem;
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease;
}

.faq-trigger:hover,
.faq-trigger:focus-visible {
background: rgba(99, 102, 241, 0.08);
outline: none;
}

.faq-trigger:focus-visible {
box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.faq-label {
display: inline-flex;
align-items: center;
gap: 0.85rem;
}

.faq-label i {
color: var(--primary-color);
min-width: 1.25rem;
font-size: 1.05rem;
}

.faq-icon {
display: inline-flex;
align-items: center;
justify-content: center;
transition: transform 0.25s ease;
}

.faq-card.open .faq-icon {
transform: rotate(180deg);
}

.faq-panel {
max-height: 0;
overflow: hidden;
padding: 0 1.5rem;
transition: max-height 0.32s ease, padding 0.32s ease;
}

.faq-card.open .faq-panel {
max-height: 1000px;
padding-bottom: 1.25rem;
}

.faq-panel p {
margin: 0;
color: var(--text-secondary);
line-height: 1.8;
font-size: 0.98rem;
}

.faq-panel ul {
margin: 0.75rem 0 0 1.1rem;
color: var(--text-secondary);
line-height: 1.8;
}

.faq-panel ul li {
margin-bottom: 0.55rem;
}

.faq-panel pre {
margin: 0.75rem 0 0;
padding: 1rem;
background: rgba(99, 102, 241, 0.08);
border: 1px solid var(--border-color);
border-radius: 0.85rem;
overflow-x: auto;
color: var(--text-color);
font-family: 'Courier New', monospace;
font-size: 0.92rem;
line-height: 1.6;
}

.faq-panel code {
white-space: pre-wrap;
}

@media (max-width: 860px) {
.faq-grid {
grid-template-columns: 1fr;
}
}

@media (max-width: 640px) {
.faq-section {
padding: 3rem 0;
}

.faq-trigger {
padding: 1rem 1.25rem;
}

.faq-panel {
padding: 0 1.25rem;
}
}

.projects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
Expand Down
154 changes: 152 additions & 2 deletions web-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,113 @@ <h3>Word Scramble</h3><p>Unscramble words before attempts run out!</p><button cl
</div>
</section>

<section class="faq-section" id="faqSection" aria-label="Frequently asked questions">
<div class="container">
<div class="section-header">
<p class="section-kicker">Need a hand?</p>
<h2 class="section-title">Frequently Asked Questions</h2>
<p class="section-subtitle">Explore common questions about the lab, project launch flow, and how to use the integrated playground.</p>
</div>
<div class="faq-grid">
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-1" id="faq-button-1">
<span class="faq-label"><i class="fas fa-book-open" aria-hidden="true"></i> What is Python Mini Projects?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-1" class="faq-panel" role="region" aria-labelledby="faq-button-1">
<p>Python Mini Projects is a GSSoC-approved open-source project designed to make learning Python fun, practical, and beginner-friendly through interactive mini projects.</p>
<p>Perfect for students, beginners, and anyone who wants to build fun projects while learning Python.</p>
</div>
</article>
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-2" id="faq-button-2">
<span class="faq-label"><i class="fas fa-hands-helping" aria-hidden="true"></i> Who can contribute to this project?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-2" class="faq-panel" role="region" aria-labelledby="faq-button-2">
<p>Currently, contributions are open only to officially approved GSSoC participants.</p>
</div>
</article>
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-3" id="faq-button-3">
<span class="faq-label"><i class="fas fa-code-branch" aria-hidden="true"></i> How can I contribute?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-3" class="faq-panel" role="region" aria-labelledby="faq-button-3">
<p>You can:</p>
<ul>
<li>work on existing issues</li>
<li>create a new issue (after checking for duplicates)</li>
<li>comment under the issue to get assigned</li>
</ul>
<p>A project admin will review and assign the issue.</p>
</div>
</article>
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-4" id="faq-button-4">
<span class="faq-label"><i class="fas fa-list-check" aria-hidden="true"></i> What are the project requirements?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-4" class="faq-panel" role="region" aria-labelledby="faq-button-4">
<ul>
<li>Python 3.10+</li>
<li>Standard library only (no external dependencies)</li>
<li>Zero setup required</li>
<li>Cross-platform support (Windows, macOS, Linux)</li>
</ul>
</div>
</article>
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-5" id="faq-button-5">
<span class="faq-label"><i class="fas fa-user-graduate" aria-hidden="true"></i> Can I contribute without prior open-source experience?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-5" class="faq-panel" role="region" aria-labelledby="faq-button-5">
<p>Yes. This project is beginner-friendly and a great place to start contributing to open source.</p>
</div>
</article>
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-6" id="faq-button-6">
<span class="faq-label"><i class="fas fa-ban" aria-hidden="true"></i> Are external Python libraries allowed?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-6" class="faq-panel" role="region" aria-labelledby="faq-button-6">
<p>No. Only Python standard libraries are allowed in this project.</p>
</div>
</article>
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-7" id="faq-button-7">
<span class="faq-label"><i class="fas fa-check-circle" aria-hidden="true"></i> What happens after my PR is submitted?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-7" class="faq-panel" role="region" aria-labelledby="faq-button-7">
<p>After your PR is reviewed and merged, your contribution points will be updated on your GSSoC profile within approximately 20–24 hours.</p>
</div>
</article>
<article class="faq-card">
<button class="faq-trigger" aria-expanded="false" aria-controls="faq-panel-8" id="faq-button-8">
<span class="faq-label"><i class="fas fa-terminal" aria-hidden="true"></i> How do I run a project locally?</span>
<span class="faq-icon"><i class="fas fa-chevron-down" aria-hidden="true"></i></span>
</button>
<div id="faq-panel-8" class="faq-panel" role="region" aria-labelledby="faq-button-8">
<p>Clone the repository:</p>
<pre><code>git clone https://github.com/YOUR_USERNAME/python-mini-project.git</code></pre>
<p>Then:</p>
<pre><code>cd web-app
python -m http.server 5500</code></pre>
<p>Open the local link in your browser.</p>
<p>For live-server do this:</p>
<p>If Node.js installed:</p>
<pre><code>npm install -g live-server</code></pre>
<p>Then:</p>
<pre><code>cd web-app
live-server</code></pre>
</div>
</article>
</div>
</div>
</section>

<section class="playground-section" id="playgroundSection" aria-label="Python Playground">
<div class="container">
<div class="playground-header">
Expand Down Expand Up @@ -1106,8 +1213,7 @@ <h3>Resources</h3>
<ul>
<li><a href="https://github.com/steam-bell-92/python-mini-project/blob/main/README.md"><i class="fas fa-book"></i> Documentation</a></li>
<li><a href="https://github.com/steam-bell-92/python-mini-project/blob/main/CONTRIBUTING.md"><i class="fas fa-code-branch"></i> Contribute</a></li>
<li><a href="https://github.com/steam-bell-92/python-mini-project/issues/new"><i class="fas fa-bug"></i> Report a Bug</a></li>
<li><a href="https://github.com/steam-bell-92/python-mini-project/blob/main/README.md"><i class="fas fa-question-circle"></i> FAQ</a></li>
<li><a href="https://github.com/steam-bell-92/python-mini-project/issues/new?template=bug_report.md"><i class="fas fa-bug"></i> Report a Bug</a></li>
</ul>
</div>
<div class="footer-newsletter">
Expand Down Expand Up @@ -1220,6 +1326,50 @@ <h3>Stay Updated</h3>
searchInput.value = '';
});
});

(function() {
function closeAllFaqItems() {
document.querySelectorAll('.faq-trigger').forEach(function(button) {
button.setAttribute('aria-expanded', 'false');
button.closest('.faq-card')?.classList.remove('open');
});
}

function toggleFaqItem(button) {
var isExpanded = button.getAttribute('aria-expanded') === 'true';
closeAllFaqItems();
if (!isExpanded) {
button.setAttribute('aria-expanded', 'true');
button.closest('.faq-card')?.classList.add('open');
}
}

document.querySelectorAll('.faq-trigger').forEach(function(button) {
button.addEventListener('click', function() {
toggleFaqItem(button);
});
button.addEventListener('keydown', function(event) {
if (event.key === 'Enter' || event.key === ' ') {
event.preventDefault();
toggleFaqItem(button);
}
});
});

document.querySelectorAll('a[href="#faqSection"]').forEach(function(anchor) {
anchor.addEventListener('click', function(event) {
event.preventDefault();
var target = document.getElementById('faqSection');
if (target) {
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
var firstTrigger = target.querySelector('.faq-trigger');
if (firstTrigger) {
firstTrigger.focus({ preventScroll: true });
}
}
});
});
})();
</script>

</body>
Expand Down
Loading