-
Notifications
You must be signed in to change notification settings - Fork 72
Sprints page with filter #1383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Sprints page with filter #1383
Changes from 9 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b826b7e
Add sprints POC with demo content
nikoshell d712dea
Update sprints
nikoshell d98d225
Add stubs for 2 known sprints
rodrigogiraoserrao 56009e8
Fix sprints pages.
rodrigogiraoserrao c153245
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8cb2373
Fix sprints pages.
rodrigogiraoserrao 084ce8f
Merge branch 'ep2025' into ep2025-sprints
rodrigogiraoserrao 7644368
Add instructions on how to add a project to the sprints.
rodrigogiraoserrao ab81522
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 202d5d5
Update sprints
nikoshell 764ff0c
Merge branch 'ep2025' into ep2025-sprints
nikoshell 0abf231
Merge branch 'ep2025' into ep2025-sprints
egeakman 7af58a6
Rename draft file name
nikoshell d954bc5
Merge branch 'ep2025' into ep2025-sprints
nikoshell edb0ffc
Add markdown content from old page with toc
nikoshell c9b13a5
Update sprints
nikoshell 34f90ca
Merge branch 'ep2025' into ep2025-sprints
nikoshell 683d4c6
Update _sprints_template.md
rodrigogiraoserrao 75f01a2
Merge branch 'ep2025' into ep2025-sprints
rodrigogiraoserrao 06bef94
Remove draft from template
nikoshell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| import { getEntry } from 'astro:content'; | ||
| import Markdown from "@ui/Markdown.astro"; | ||
|
|
||
| const { slug } = Astro.props; | ||
|
|
||
|
|
||
| const sprint = await getEntry("sprints", slug); | ||
|
|
||
| if (!sprint) { | ||
| throw new Error(`Sprint entry "${slug}" not found`); | ||
| } | ||
|
|
||
| const { data, body } = sprint; | ||
|
|
||
| // <a href={`/sprints/${slug}`} id={slug} class="text-blue-600 hover:text-blue-800 hover:underline"></a> | ||
| --- | ||
|
|
||
| <article class="sprint-card bg-white border border-gray-200 rounded-lg p-6 mb-8 shadow-sm hover:shadow-md transition-shadow duration-200" data-python-level={data.pythonLevel} data-room={data.room}> | ||
| <header class="mb-4"> | ||
| <h3 class="text-2xl font-semibold mb-2"> | ||
| {data.title} | ||
| </h3> | ||
| <div class="flex flex-wrap gap-4 text-sm text-gray-600"> | ||
| <span class="flex items-center gap-1"> | ||
| <span>👥</span> | ||
| <span>{data.numberOfPeople}</span> | ||
| </span> | ||
| <span class="flex items-center gap-1"> | ||
| <span>🐍</span> | ||
| <span>{data.pythonLevel}</span> | ||
| </span> | ||
| </div> | ||
| </header> | ||
|
|
||
| <div class="space-y-4"> | ||
| <div class="text-sm"> | ||
| <span class="font-medium text-gray-900">Contact:</span> | ||
| <span class="text-gray-700">{data.contactPerson.name}</span> | ||
| {data.contactPerson.email && ( | ||
| <span class="text-gray-600"> | ||
| {' '}(<a href={`mailto:${data.contactPerson.email}`} class="text-blue-600 hover:text-blue-800 hover:underline">{data.contactPerson.email}</a>) | ||
| </span> | ||
| )} | ||
| {data.contactPerson.github && ( | ||
| <span class="text-gray-600"> | ||
| {' '}(<a href={`https://github.com/${data.contactPerson.github}`} target="_blank" rel="noopener" class="text-blue-600 hover:text-blue-800 hover:underline">@{data.contactPerson.github}</a>) | ||
| </span> | ||
| )} | ||
| </div> | ||
|
|
||
| {(data.links) && ( | ||
| <div class="text-sm"> | ||
| <span class="font-medium text-gray-900">Links:</span> | ||
| <ul class="mt-2 ml-6 space-y-1 list-disc"> | ||
| {data.links?.map((link) => ( | ||
| <li key={link.url}> | ||
| <a href={link.url} target="_blank" rel="noopener" class="text-blue-600 hover:text-blue-800 hover:underline">{link.title}</a> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| )} | ||
|
|
||
|
|
||
| {body && | ||
| <Markdown content={body} /> | ||
| } | ||
|
|
||
| </div> | ||
|
|
||
| </article> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| title: "Project name" | ||
| numberOfPeople: "" # How many people you expect to be able to accommodate. | ||
| pythonLevel: "Any" # Any, Beginner, Intermediate, or Advanced. | ||
| contactPerson: # The main person to reach out to regarding the sprint. | ||
| name: "" | ||
| email: "[email protected]" | ||
| draft: true # Delete this when you PR your sprint. | ||
| links: # Add as many links as relevant. | ||
| - title: "Project xyz GitHub repo" | ||
| url: "https://github.com/xyz" | ||
| --- | ||
|
|
||
| Your sprint/project description goes here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| title: "BeeWare" | ||
| numberOfPeople: "TBA" | ||
| pythonLevel: "Beginner" | ||
| contactPerson: | ||
| name: "Russell Keith-Magee" | ||
| email: "[email protected]" | ||
| links: | ||
| - title: "BeeWare GitHub" | ||
| url: "https://github.com/beeware" | ||
| --- | ||
|
|
||
| Come sprint on the BeeWare project! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| title: "CPython Core" | ||
| numberOfPeople: "TBA" | ||
| pythonLevel: "Intermediate" | ||
| contactPerson: | ||
| name: "Petr Viktorin" | ||
| email: "[email protected]" | ||
| links: | ||
| - title: "Code of Conduct" | ||
| url: "https://www.python.org/psf/conduct/" | ||
| - title: "CPython's Developer Guide" | ||
| url: "https://devguide.python.org/" | ||
| - title: "Easy Issues" | ||
| url: "https://github.com/python/cpython/issues?q=is%3Aissue+is%3Aopen+label%3Aeasy" | ||
| --- | ||
|
|
||
| Come sprint on CPython and work on Python 3.15! | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| --- | ||
| import { getCollection } from 'astro:content'; | ||
| import Layout from '@layouts/SectionLayout.astro'; | ||
| import SprintCard from '@components/SprintCard.astro'; | ||
| // import Headline from "@ui/Headline.astro" | ||
|
|
||
| const sprints = await getCollection("sprints", ({ data }) => { | ||
| return import.meta.env.MODE === "production" ? data.draft !== true : true; | ||
| }); | ||
|
|
||
| --- | ||
|
|
||
| <Layout title="Sprints & Workshops" description="All in one"> | ||
| <main class="min-h-screen py-8"> | ||
| <div class="max-w-6xl mx-auto px-4"> | ||
| <header class="text-center mb-12"> | ||
| <h1 class="text-5xl font-bold text-gray-900 mb-4">Sprints & Workshops</h1> | ||
| <p class="text-xl text-gray-600 max-w-2xl mx-auto leading-relaxed"> | ||
| Join collaborative coding sessions and hands-on workshops. | ||
| Connect with maintainers, contribute to open source projects, | ||
| and learn new skills alongside fellow Python enthusiasts. | ||
| </p> | ||
| </header> | ||
|
|
||
| <div class="flex flex-wrap gap-8 justify-center mb-8"> | ||
| <div class="flex flex-col gap-2"> | ||
| <label for="level-filter" class="font-semibold text-gray-700 text-sm">Python Level:</label> | ||
| <select id="level-filter" class="px-4 py-2 border border-gray-300 rounded-lg bg-white text-sm min-w-[150px] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | ||
| <option value="">All Levels</option> | ||
| <option value="Any">Any</option> | ||
| <option value="Beginner">Beginner</option> | ||
| <option value="Intermediate">Intermediate</option> | ||
| <option value="Advanced">Advanced</option> | ||
| </select> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="text-center mb-8"> | ||
| <p class="text-gray-600 font-medium">{sprints.length} active {sprints.length === 1 ? 'sprint' : 'sprints'}</p> | ||
| </div> | ||
|
|
||
| <section class="max-w-4xl mx-auto" id="sprints-list"> | ||
| {sprints.map((sprint) => ( | ||
| <SprintCard slug={sprint.slug} /> | ||
| ))} | ||
| </section> | ||
|
|
||
| {sprints.length === 0 && ( | ||
| <div class="text-center py-12"> | ||
| <p class="text-gray-500 text-lg">No sprints are currently available. Check back soon!</p> | ||
| </div> | ||
| )} | ||
| </div> | ||
| </main> | ||
|
|
||
| <script> | ||
| document.addEventListener('DOMContentLoaded', () => { | ||
| const levelFilter = document.getElementById('level-filter') as HTMLSelectElement; | ||
| const sprintsList = document.getElementById('sprints-list'); | ||
| const sprintsCount = document.querySelector('.text-center.mb-8 p'); | ||
|
|
||
| function filterSprints() { | ||
| const selectedLevel = levelFilter.value; | ||
| const sprintCards = sprintsList?.querySelectorAll('.sprint-card'); | ||
|
|
||
| let visibleCount = 0; | ||
|
|
||
| sprintCards?.forEach((card) => { | ||
| const cardElement = card as HTMLElement; | ||
| const pythonLevel = cardElement.getAttribute('data-python-level'); | ||
|
|
||
| const levelMatch = !selectedLevel || pythonLevel === selectedLevel; | ||
|
|
||
| if (levelMatch) { | ||
| cardElement.style.display = 'block'; | ||
| visibleCount++; | ||
| } else { | ||
| cardElement.style.display = 'none'; | ||
| } | ||
| }); | ||
|
|
||
| if (sprintsCount) { | ||
| sprintsCount.textContent = `${visibleCount} active ${visibleCount === 1 ? 'sprint' : 'sprints'}`; | ||
| } | ||
| } | ||
|
|
||
| levelFilter?.addEventListener('change', filterSprints); | ||
| }); | ||
| </script> | ||
| </Layout> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.