Move remaining Pelican pages into Django

This commit is contained in:
Ben Sturmfels 2023-04-24 13:14:39 +10:00
parent fbefff60a6
commit 1d0d5e1d10
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
4 changed files with 176 additions and 11 deletions

View file

@ -13,7 +13,6 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name {{ env.domain }}; server_name {{ env.domain }};
client_max_body_size 50M; client_max_body_size 50M;
root /var/www/fossy;
ssl_certificate /etc/letsencrypt/live/{{ env.domain }}/fullchain.pem; ssl_certificate /etc/letsencrypt/live/{{ env.domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ env.domain }}/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/{{ env.domain }}/privkey.pem;
@ -27,7 +26,7 @@ server {
# Advise browser to only load external content from these sites. # Advise browser to only load external content from these sites.
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com/jquery-3.5.1.min.js https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js https://js.stripe.com/v3/ https://r.stripe.com/0"; add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com/jquery-3.5.1.min.js https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js https://js.stripe.com/v3/ https://r.stripe.com/0";
location @app { location / {
# Django web application including static files (via WhiteNoise). # Django web application including static files (via WhiteNoise).
uwsgi_pass symposion_django_wsgi; uwsgi_pass symposion_django_wsgi;
include uwsgi_params; include uwsgi_params;
@ -39,10 +38,6 @@ server {
gzip off; gzip off;
} }
location / {
try_files $uri $uri/index.html $uri.html @app;
}
location /media/ { location /media/ {
# User-uploaded files and generated reports. # User-uploaded files and generated reports.
alias {{ project_dir }}/media/; alias {{ project_dir }}/media/;

View file

@ -1,11 +1,43 @@
{% extends "site_base.html" %} {% extends "site_base.html" %}
{% load i18n static %}
{% load i18n %}
{% block head_title %}{% trans "Welcome" %}{% endblock %} {% block head_title %}{% trans "Welcome" %}{% endblock %}
{% block body_class %}home{% endblock %} {% block body_class %}home{% endblock %}
{% block body %} {% block content %}
{{ page.body }} <header class="pt3 pt4-ns pb4">
{% endblock %} <div class="flex-ns center">
<div class="mr4 dark-green sans-serif" style="flex-grow: 1">
<h1 class="f-subheadline f-headline-ns b lh-solid tracked-tight mv0">FOSSY 2023</h1>
<h2 class="f3 f2-ns b lh-solid mt0 mb3">July 13-16th 2023 — Portland, OR</h2>
<h3 class="f4 f4-ns b lh-title mv2 mv3-ns">The first Free and Open Source Software Yearly conference</h3>
</div>
<div class="lh-solid mt4 mt0-ns" style="font-size: 10rem; max-width: 250px;"><img class="db" src="{% static 'img/conservancy_logo_tall_mono.svg' %}" style="max-height: 180px" alt="Software Freedom Conservancy"></div>
</div>
<div class="mt4 mt0-ns"><a href="/pages/tickets.html" class="mr2"><button type="button" class="btn btn-primary mb2">Get your ticket!</button></a>
<a href="/pages/call-for-proposals.html" class="mr2"><button type="button" class="btn btn-primary mb2">Propose a talk</button></a>
<a href="https://lists.sfconservancy.org/mailman/listinfo/fossy-announce"><button type="button" class="btn btn-secondary mb2">Subscribe for updates</button></a></div>
</header>
<section id="content">
<h1 class="f3 mt0 mb4">FOSS is back in Portland, OR at the Oregon Convention Center!</h1>
<div class="flex-ns">
<div class="mw6">
<p class="f4 mt0">Software Freedom Conservancy is so proud to announce that we are hosting a community oriented conference this coming summer. FOSSY (Free and Open Source Yearly) is focused on the creation and impact of free and open source software, uplifting contributors of all experience.</p>
<p>We are mindful of having a safe environment for all. In this new time of conferences, we will be focused on COVID safety and making sure all attendees feel safe participating as much as they feel comfortable (we will have a detailed policy published in the coming weeks).</p>
<p>As this is the first year we are running a conference of this scale, we plan to have 15 tracks for talks over 4 days. With tracks for community building, development and legal and licensing issues, our conference will provide ample learning and networking opportunities for contributors of all levels of experience. We also plan to involve significant community participation in the content of our tracks.</p>
<p>As we look to the future of conferences, we are excited to focus on using free software to run a conference and will seek to help reduce the amount of proprietary software that is treated as default.</p>
</div>
<div>
<figure class="fr pa0 mt4 mt2-ns mr0 ml0 ml4-ns mb4">
<img src="/theme/images/occ.jpg" alt="Aerial photograph of the Oregon Convention Center">
<figcaption class="tc mt2">Oregon Convention Center (CC-BY 2.0)</figcaption>
</figure>
</div>
</div>
</section>
{% endblock content %}

View file

@ -12,6 +12,8 @@ import symposion.views
urlpatterns = [ urlpatterns = [
path('', TemplateView.as_view(template_name="homepage.html")),
path('saml2/', include('djangosaml2.urls')), path('saml2/', include('djangosaml2.urls')),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 38 KiB