contacts page

This commit is contained in:
Lynne Megido 2020-04-12 19:37:27 +10:00
parent ea7b5be1a1
commit 7c61f33833
6 changed files with 42 additions and 3 deletions

5
app.py
View file

@ -1,11 +1,14 @@
from flask import Flask, render_template
import json
app = Flask(__name__)
contact_data = json.load(open("data/contact.json"))
@app.route("/")
def render_home():
return render_template("home.html", big_header = True)
@app.route("/contact")
def render_contact():
return render_template("contact.html")
return render_template("contact.html", data = contact_data)

0
config.py Normal file
View file

13
data/contact.json Normal file
View file

@ -0,0 +1,13 @@
{
"Social": [
["pech@bune.city (Email)", "mailto:pech@bune.city"],
["Fediverse", "https://fedi.lynnesbian.space/@Petra_fied"],
["Petra-fied#1528 (Discord)", null]
],
"Other": [
["Keybase", "https://keybase.io/pecha"],
["Git", "https://git.bune.city/petra-fied"],
["SW-0502-8685-4802 (Switch)", null],
["My blog (to be rehosted)", "https://petra.press/"]
]
}

View file

@ -63,6 +63,14 @@ main {
width: 80%;
max-width: max-content;
background: #0E111380;
text-align: center;
font-family: 'VCR OSD Mono', monospace; /*???*/
}
main.centred {
text-align: center;
}
main a {
color: #81a1a8;
}
main ul {
padding-left: 30px;
}

15
templates/contact.html Normal file
View file

@ -0,0 +1,15 @@
{% extends 'base.html' %}
{% block title %}home{% endblock %}
{% block content %}
<main>
<h1>Contact</h1>
{% for heading, entries in data.items() %}
<h2>{{ heading }}</h2>
<ul>
{% for entry in entries %}
<li>{% if entry[1] %}<a href='{{ entry[1] }}'>{% endif %}{{ entry[0] }}{% if entry[1] %}</a>{% endif %}</li>
{% endfor %}
</ul>
{% endfor %}
</main>
{% endblock %}

View file

@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% block title %}home{% endblock %}
{% block content %}
<main>
<main class='centred'>
<h1>Henlo! 0u0</h1>
<p>My name is Petra, but Pet, Pech, Pecha etc are all fine =w=</p>
<p>I'm an aspiring Political Economist, but I'm broadly interested in the social sciences and philosophy pretty generally.</p>