Skip to content
Draft
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
46 changes: 46 additions & 0 deletions content/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Welcome to pyOpenSci
subtitle: We make it easier for researchers to create, find, maintain and contributors to reusable code and software.
callout: "A mission statement might go text here"
hero_image: images/headers/pyopensci-sprints.png
buttons:
- label: "Submit a Package For Review"
url: "https://www.pyopensci.org/how-to-submit-a-package-to-pyopensci.html"
- label: "Learn to Create a Python Package"
url: "https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html"
feature_cards:
- image_path: images/landing-pages/software-peer-review.png
alt: "Light purple image that says software Peer Review..."
title: "We Run Software Peer Review"
excerpt: "We review Python packages and software with the goal of helping scientists build better, discoverable and usable software. <br><br>

Your package can also be published in JOSS through our review process. <br>

<i class='fa-solid fa-check-double'></i> Submit a package today for review today. <br>
<i class='fa-solid fa-check-double'></i> Apply to become a reviewer. <br>
"
- image_path: images/landing-pages/community-partnerships.png
alt: "Light purple image with a bunch from different backgrounds..."
title: "We Build Community Partnerships"
excerpt: "We [partner with open source communities](...)...<br>..."
- image_path: images/landing-pages/simple-python-packaging-header.png
title: "We Break Down Python Packaging Painpoints"
alt: "Light purple image that says python packaging guide..."
excerpt: "Check out our beginner-friendly...<br>..."
---

This is your new homepage, written in Markdown.



<div class="breakout-box bg-blue-100 p-4 rounded-lg">
<strong>Did you know?</strong>
You can use custom HTML and classes in your Markdown!
</div>

<div class="bg-pyos-deep-purple text-white p-6 rounded-lg my-6">
<strong>Did you know?</strong><br>
You can use custom HTML and Tailwind classes in your Markdown!
</div>

hi
4 changes: 3 additions & 1 deletion core/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from django.urls import path
from . import views

from core.views import home_markdown

app_name = 'core'

urlpatterns = [
path('', views.home, name='home'),
path('', home_markdown, name='home'),
path('blog/', views.blog_index, name='blog_index'),
path('events/', views.events_index, name='events_index'),
path('blog/<slug:slug>/', views.serve_blog_page, name='blog_page'),
Expand Down
16 changes: 16 additions & 0 deletions core/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import os
from django.shortcuts import render, get_object_or_404
from django.conf import settings

import logging
import markdown
import frontmatter

from .utils import (
get_recent_contributors,
Expand All @@ -12,6 +17,17 @@
logger = logging.getLogger(__name__)


def home_markdown(request):
md_path = os.path.join(settings.BASE_DIR, 'content', 'home.md')
with open(md_path, 'r') as f:
post = frontmatter.load(f)
html_content = markdown.markdown(post.content)
context = {
'markdown_content': html_content,
'meta': post.metadata,
}
return render(request, 'core/home.html', context)

def home(request):
"""
Homepage view for PyOpenSci.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 5.2.4 on 2025-09-24 23:01
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this file so we obviously won't merge any of this.


from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("publications", "0002_blogindexpage_eventindexpage"),
]

operations = [
migrations.RemoveField(
model_name="eventindexpage",
name="page_ptr",
),
migrations.DeleteModel(
name="BlogIndexPage",
),
migrations.DeleteModel(
name="EventIndexPage",
),
]
319 changes: 26 additions & 293 deletions templates/core/home.html

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions templates/core/includes/feature_card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% load static %}

<div class="bg-white rounded-lg shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-300">
<div class="h-48 overflow-hidden">
<img src="{% static card.image_path %}" alt="{{ card.alt }}" class="w-full h-full object-cover">
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-4 text-pyos-deep-purple font-poppins">{{ card.title }}</h3>
<div class="text-gray-700 mb-4">
{{ card.excerpt|safe }}
</div>
</div>
</div>
5 changes: 5 additions & 0 deletions templates/core/includes/feature_card_set.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="grid md:grid-cols-3 gap-8">
{% for card in cards %}
{% include "core/includes/feature_card.html" %}
{% endfor %}
</div>
18 changes: 18 additions & 0 deletions templates/core/includes/hero.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% load static %}
<section class="relative text-white overflow-hidden" style="background-image: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)), url('{% static "images/headers/pyopensci-sprints.png" %}'); background-size: cover; background-position: center;">
<div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24">
<div class="text-center">
<h1 class="text-4xl md:text-6xl font-bold mb-6 font-poppins">{{ meta.title }}</h1>
<p class="text-xl md:text-2xl mb-8 max-w-4xl mx-auto font-nunito">{{ meta.subtitle }}</p>
{% if meta.buttons %}
<div class="flex flex-col sm:flex-row gap-4 justify-center">
{% for button in meta.buttons %}
<a href="{{ button.url }}" class="bg-transparent border-2 border-white hover:bg-white hover:text-pyos-deep-purple text-white px-8 py-3 rounded-lg font-semibold transition-all duration-300" target="_blank" rel="noopener">
{{ button.label }}
</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</section>
Loading