diff options
author | Sean Dolan <sed9182@rit.edu> | 2019-07-27 22:03:03 -0400 |
---|---|---|
committer | Sean Dolan <sed9182@rit.edu> | 2019-07-27 22:03:03 -0400 |
commit | a5a4efe60cb0878150ef5e5d19cd578ade757e60 (patch) | |
tree | 618e7bac955a04613649c9504f14439a8ba99e10 | |
parent | b32f17ec362e277ace95e461687e9e75e7300372 (diff) |
moar css moar problems
-rw-r--r-- | app.py | 3 | ||||
-rw-r--r-- | static/67416684_506601916548235_6755603739765112832_n.jpg | bin | 0 -> 14657 bytes | |||
-rw-r--r-- | static/favicon.ico | bin | 0 -> 1150 bytes | |||
-rw-r--r-- | static/ihatecss.css | 8 | ||||
-rw-r--r-- | templates/Homepage.jinja2 | 22 | ||||
-rw-r--r-- | templates/base.html | 22 |
6 files changed, 47 insertions, 8 deletions
@@ -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/<brewery_id>/') diff --git a/static/67416684_506601916548235_6755603739765112832_n.jpg b/static/67416684_506601916548235_6755603739765112832_n.jpg Binary files differnew file mode 100644 index 0000000..a0f27d6 --- /dev/null +++ b/static/67416684_506601916548235_6755603739765112832_n.jpg diff --git a/static/favicon.ico b/static/favicon.ico Binary files differnew file mode 100644 index 0000000..c3e306f --- /dev/null +++ b/static/favicon.ico 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 %} - <ul> - {% for user in users %} - <li><a href="{{ user.url }}">{{ user.username }}</a></li> - {% endfor %} - </ul> +{% extends "base.html" %} +{% block content %} +<h3> {{ item[0] }}</h3> +<div> + <ul> + <li> + Beer Parent: {{ item[1][0] }} + </li> + <li> + SubType: {{ item[1][1] }} + </li> + </ul> + <br/> + How Blasted is I be: {{ item[2] }} +</div> {% 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 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + {% block head %} + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> + <link rel="stylesheet" href="{{ url_for('static', filename='ihatecss.css') }}"> + <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico')}}" type="image/x-icon"> + <link rel="icon" href="{{ url_for('static', filename='favicon.ico')}}" type="image/x-icon"> + <title>{% block title %}{% endblock %} Similar Beers</title> + {% endblock %} +</head> +<body> + <div id="content">{% block content %}{% endblock %}</div> + <div id="footer"> + {% block footer %} + <p > + Please Drink responsibly... or don't I'm a website not a cop. + </p> + {% endblock %} + </div> +</body> +</html>
\ No newline at end of file |