From a5a4efe60cb0878150ef5e5d19cd578ade757e60 Mon Sep 17 00:00:00 2001 From: Sean Dolan Date: Sat, 27 Jul 2019 22:03:03 -0400 Subject: moar css moar problems --- app.py | 3 ++- ...16684_506601916548235_6755603739765112832_n.jpg | Bin 0 -> 14657 bytes static/favicon.ico | Bin 0 -> 1150 bytes static/ihatecss.css | 8 ++++++++ templates/Homepage.jinja2 | 22 ++++++++++++++------- templates/base.html | 22 +++++++++++++++++++++ 6 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 static/67416684_506601916548235_6755603739765112832_n.jpg create mode 100644 static/favicon.ico create mode 100644 static/ihatecss.css create mode 100644 templates/base.html diff --git a/app.py b/app.py index 91b5d83..5a075e9 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,5 @@ from flask import Flask +from flask import render_template import json import random import re @@ -12,7 +13,7 @@ with open("./static/beers.json") as beers_json: @app.route('/') def hello_world(): hello_beer = random.choice(list(beer.keys())) - return json.dumps({hello_beer:beer[hello_beer]}) + return render_template('./Homepage.jinja2', item=beer[hello_beer]) @app.route('/brewery//') diff --git a/static/67416684_506601916548235_6755603739765112832_n.jpg b/static/67416684_506601916548235_6755603739765112832_n.jpg new file mode 100644 index 0000000..a0f27d6 Binary files /dev/null and b/static/67416684_506601916548235_6755603739765112832_n.jpg differ diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..c3e306f Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/ihatecss.css b/static/ihatecss.css new file mode 100644 index 0000000..3e48ac3 --- /dev/null +++ b/static/ihatecss.css @@ -0,0 +1,8 @@ +#footer { + position:fixed; + left:0px; + bottom:0px; + height:30px; + width:100%; + background:#999; +} \ No newline at end of file diff --git a/templates/Homepage.jinja2 b/templates/Homepage.jinja2 index 5d3316c..cad512e 100644 --- a/templates/Homepage.jinja2 +++ b/templates/Homepage.jinja2 @@ -1,8 +1,16 @@ -{% extends "layout.html" %} -{% block body %} - +{% extends "base.html" %} +{% block content %} +

{{ item[0] }}

+
+
    +
  • + Beer Parent: {{ item[1][0] }} +
  • +
  • + SubType: {{ item[1][1] }} +
  • +
+
+ How Blasted is I be: {{ item[2] }} +
{% endblock %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..9b8432b --- /dev/null +++ b/templates/base.html @@ -0,0 +1,22 @@ + + + + {% block head %} + + + + + {% block title %}{% endblock %} Similar Beers + {% endblock %} + + +
{% block content %}{% endblock %}
+ + + \ No newline at end of file -- cgit v1.2.3