Add background route and draft text

This commit is contained in:
glyph 2020-05-09 15:44:33 +01:00
parent 371e1b23e6
commit 79dc449f1e
4 changed files with 26 additions and 9 deletions

View File

@ -20,6 +20,11 @@ struct FlashContext {
flash_msg: Option<String>,
}
#[get("/<file..>")]
fn files(file: PathBuf) -> Option<NamedFile> {
NamedFile::open(Path::new("static/").join(file)).ok()
}
#[get("/")]
fn index() -> Template {
let context = FlashContext {
@ -29,9 +34,13 @@ fn index() -> Template {
Template::render("index", &context)
}
#[get("/<file..>")]
fn files(file: PathBuf) -> Option<NamedFile> {
NamedFile::open(Path::new("static/").join(file)).ok()
#[get("/background")]
fn background() -> Template {
let context = FlashContext {
flash_name: None,
flash_msg: None,
};
Template::render("background", &context)
}
#[catch(404)]
@ -46,7 +55,7 @@ fn not_found() -> Template {
fn main() {
rocket::ignite()
.mount("/", routes![index, files])
.mount("/", routes![files, index, background])
.register(catchers![not_found])
.attach(Template::fairing())
.launch();

View File

@ -0,0 +1,8 @@
{% extends "nav" %}
{% block content %}
<h2>Background</h2>
<hr>
<p>I was born and raised in the coastal city of Durban, South Africa, which lies between the Indian Ocean and Drakensberg Mountains. Following completion of high school I moved to Michigan, USA and completed a Bachelor of Science in anthropology (major) and biology (minor) at <a href="https://www.gvsu.edu/">Grand Valley State University</a>. I later returned to South Africa and completed a Master of Social Science in social anthropology at the <a href="http://www.uct.ac.za/">University of Cape Town</a>, with <a href="https://open.uct.ac.za/handle/11427/6795">research focused on decentralised networks of medicinal plant harvesters and herbalists</a> (Rasta bush doctors). I then went on to work as an applied anthropologist and ethnobotanist in the non-profit sector.</p>
<p>Following a year spent travelling in South America, I restructured my livelihood and life around my core interests: carbon-based and silicon-based technologies (biology and computers). Since then I have founded <a href="https://harmonicmycology.com">Harmonic Mycology</a>, a mycology collective dedicated to developing and distributing mycelial medicines, teaching mushroom cultivation and encouraging the formation of humyn-fungal networks. In parallel to those activities, I have worked as an autodidactic software developer on private and open-source projects; most-recently, <a href="https://opencollective.com/peachcloud">PeachCloud</a>.</p>
<p>I hold a deep fascination with the processes through which humyns form relationships with other living beings. When not behind the keyboard, you can find me looking at mushrooms, riding my bicycle or reading sci-fi. I'm dreaming of a three-month adventure across Japan ⛩ .</p>
{%- endblock %}

View File

@ -5,8 +5,8 @@
<h2>Contact Information</h2>
<hr>
<ul style="padding: 0;">
<li style="list-style-type: none; padding: 0.5rem;">Email: <a href="mailto:gnomad@cryptolab.net">gnomad@cryptolab.net</a></li>
<li style="list-style-type: none; padding: 0.5rem;">Merveilles: <a href="https://merveilles.town/@glyph" title="@glyph@merveilles.town">@glyph</a></li>
<li style="list-style-type: none; padding: 0.5rem; word-wrap: break-word;">Scuttlebutt: @HEqy940T6uB+T+d9Jaa58aNfRzLx9eRWqkZljBmnkmk=.ed25519</li>
<li class="list-item">Email: <a href="mailto:gnomad@cryptolab.net">gnomad@cryptolab.net</a></li>
<li class="list-item">Merveilles: <a href="https://merveilles.town/@glyph" title="@glyph@merveilles.town">@glyph</a></li>
<li class="list-item" style="word-wrap: break-word;">Scuttlebutt: @HEqy940T6uB+T+d9Jaa58aNfRzLx9eRWqkZljBmnkmk=.ed25519</li>
</ul>
{%- endblock %}

View File

@ -1,10 +1,10 @@
{% extends "base" %}
{% block nav -%}
<h1>mycelial technology</h1>
<h1><a href="/" style="text-decoration: none;">mycelial technology</a></h1>
<hr>
<nav>
<ol class="nav-bar">
<li class="nav-item"><a href="">background</a></li>
<li class="nav-item"><a href="/background">background</a></li>
<li class="nav-item"><a href="">computers</a></li>
<li class="nav-item"><a href="">drawing</a></li>
<li class="nav-item"><a href="">fermentation</a></li>