From 861b36ec322e90ff5772c659b11fb0504215c236 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Wed, 30 Mar 2022 08:14:42 -0300 Subject: [PATCH] Add social --- content/index_en.md | 15 --------------- index.py | 21 +++++++-------------- static/stylesheet.css | 26 ++++++++++++++++++++++--- templates/index.html | 32 ------------------------------- templates/index_en.html | 42 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+), 64 deletions(-) delete mode 100644 content/index_en.md delete mode 100644 templates/index.html create mode 100644 templates/index_en.html diff --git a/content/index_en.md b/content/index_en.md deleted file mode 100644 index e1ff53b..0000000 --- a/content/index_en.md +++ /dev/null @@ -1,15 +0,0 @@ -# Augusto Gunsch -Polish-Brazilian fullstack developer living in Caxias do Sul, Brazil. - -## Contact -Matrix: @augusto-gunsch:matrix.org -Email: augustogunsch@tutanota.com -If you want to encrypt your email messages, you can use my [public PGP -key](static/augustogunsch@tutanota.com.pub.asc). - -## Links -[Github](https://github.com/augustogunsch) -[LinkedIn](https://www.linkedin.com/in/augusto-gunsch-210b17218) - -## Donations -Monero: 86JjGobWkTwh7k5SoBhXVB4Nbx28fhVi122knfyHYWJvN33Jsn1Z6yPAXfc4dsRhLN4zAAs29fUEJWmAmVJxoPUgGmtpS5P diff --git a/index.py b/index.py index 4c3dd8e..f44280a 100644 --- a/index.py +++ b/index.py @@ -9,6 +9,8 @@ app = Flask(__name__) CONTENT_DIR = 'content/' STATIC_DIR = 'static/' +lang = 'en' + def not_found(): return '

This page does not exist

', 404 @@ -34,22 +36,13 @@ def get_quote(lang): @app.route('/') def index(): - return redirect(url_for('index_lang', lang='en')) + quote, author = get_quote(lang) + index = 'index_%s.html' % lang -@app.route('/') -def index_lang(lang): - md = CONTENT_DIR + 'index_%s.md' % lang + return render_template(index, quote=quote, author=author) - if os.path.isfile(md): - body = read_md(md) - quote, author = get_quote(lang) - - return render_template('index.html', body=body, quote=quote, author=author) - else: - return not_found() - -@app.route('//') -def page_lang(lang, page): +@app.route('/') +def page(page): md = CONTENT_DIR + '%s_%s.md' % (page, lang) if os.path.isfile(md): diff --git a/static/stylesheet.css b/static/stylesheet.css index 177f4a4..a922df0 100644 --- a/static/stylesheet.css +++ b/static/stylesheet.css @@ -55,14 +55,34 @@ nav a { border-radius: 20px; } -main { +#page { height: 100%; display: flex; + margin: 1rem; + margin-bottom: 4rem; +} + +#social { + width: 1.5em; + display: flex; + flex-direction: column; + justify-content: center; +} + +#social a { + margin: .5em 0; +} + +#social a img { + width: 100%; +} + +main { + width: 100%; + display: flex; align-items: center; justify-content: space-evenly; flex-wrap: wrap-reverse; - padding: 1rem; - padding-bottom: 5rem; } main figure { diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index 576e37e..0000000 --- a/templates/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Augusto Gunsch - - - - -
-

Augusto
Gunsch

- - -
- -
-
-
- {{ quote }} -
-
{{ author }}
-
- - I turn ideas
into
software. -
-
- - diff --git a/templates/index_en.html b/templates/index_en.html new file mode 100644 index 0000000..090d0e9 --- /dev/null +++ b/templates/index_en.html @@ -0,0 +1,42 @@ + + + + + Augusto Gunsch + + + + +
+

Augusto
Gunsch

+ + +
+ +
+ +
+
+
+ {{ quote }} +
+
{{ author }}
+
+ + I turn ideas
into
software. +
+
+
+ +