contacts page
This commit is contained in:
parent
ea7b5be1a1
commit
7c61f33833
6 changed files with 42 additions and 3 deletions
5
app.py
5
app.py
|
@ -1,11 +1,14 @@
|
||||||
from flask import Flask, render_template
|
from flask import Flask, render_template
|
||||||
|
import json
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
contact_data = json.load(open("data/contact.json"))
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def render_home():
|
def render_home():
|
||||||
return render_template("home.html", big_header = True)
|
return render_template("home.html", big_header = True)
|
||||||
|
|
||||||
@app.route("/contact")
|
@app.route("/contact")
|
||||||
def render_contact():
|
def render_contact():
|
||||||
return render_template("contact.html")
|
return render_template("contact.html", data = contact_data)
|
||||||
|
|
0
config.py
Normal file
0
config.py
Normal file
13
data/contact.json
Normal file
13
data/contact.json
Normal 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/"]
|
||||||
|
]
|
||||||
|
}
|
|
@ -63,6 +63,14 @@ main {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
max-width: max-content;
|
max-width: max-content;
|
||||||
background: #0E111380;
|
background: #0E111380;
|
||||||
text-align: center;
|
|
||||||
font-family: 'VCR OSD Mono', monospace; /*???*/
|
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
15
templates/contact.html
Normal 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 %}
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}home{% endblock %}
|
{% block title %}home{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<main>
|
<main class='centred'>
|
||||||
<h1>Henlo! 0u0</h1>
|
<h1>Henlo! 0u0</h1>
|
||||||
<p>My name is Petra, but Pet, Pech, Pecha etc are all fine =w=</p>
|
<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>
|
<p>I'm an aspiring Political Economist, but I'm broadly interested in the social sciences and philosophy pretty generally.</p>
|
||||||
|
|
Loading…
Reference in a new issue