Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Displays the 2 most recent active hackathons on homepage, positioned above "Our Components" section. Moves "Community Leaderboards" below hackathons per requirement.

Changes

Backend (website/views/core.py, website/models.py)

  • Query 2 most recent active hackathons with select_related("organization") to prevent N+1
  • Add status_badge_class and status_text model properties for cleaner templates

Frontend (website/templates/home.html)

  • New "Recent Hackathons" section: 2-column responsive grid with banner images, status badges, organization links, dates, CTAs
  • Reorder: Hackathons → Leaderboards → Components
# website/views/core.py
recent_hackathons = Hackathon.objects.filter(is_active=True).select_related("organization").order_by("-start_time")[:2]
# website/models.py (Hackathon model)
@property
def status_badge_class(self):
    if self.is_ongoing:
        return "bg-green-100 text-green-800"
    elif self.has_ended:
        return "bg-gray-100 text-gray-800"
    return "bg-blue-100 text-blue-800"

Preview

Homepage with hackathons section

Section conditionally renders only when active hackathons exist.

Original prompt

show the most recent hackathons on the homepage, show the most recent two have these be above the our components page - also move community leaderboards under this


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 1, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Update homepage to display recent hackathons above components page Add recent hackathons section to homepage above Our Components Nov 1, 2025
Copilot AI requested a review from DonnieBLT November 1, 2025 20:23
@DonnieBLT DonnieBLT marked this pull request as ready for review November 2, 2025 16:10
@DonnieBLT DonnieBLT merged commit 15c36ac into main Nov 2, 2025
1 check passed
@DonnieBLT DonnieBLT deleted the copilot/update-homepage-hackathons branch November 2, 2025 16:10
@github-project-automation github-project-automation bot moved this from Backlog to Done in 📌 OWASP BLT Project Board Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants