diff --git a/README.md b/README.md index a2c6c1d..324a7b3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -[](https://classroom.github.com/online_ide?assignment_repo_id=8703052&assignment_repo_type=AssignmentRepo) Flask Start OneFile ========================= diff --git a/static/img/maliny.jpg b/static/img/maliny.jpg new file mode 100644 index 0000000..5ad008e Binary files /dev/null and b/static/img/maliny.jpg differ diff --git a/static/styles.css b/static/styles.css index 05e75c2..e4b4043 100644 --- a/static/styles.css +++ b/static/styles.css @@ -1,5 +1,5 @@ body { - background-color: rgb(50, 182, 205); + background-color: #eeeeee; padding-left: 1em; padding-right: 1em; margin-left: 90px; @@ -10,14 +10,6 @@ h1, h2, h3 { margin-top: 3em; } -h1 { - color: green; -} - -h2 { - color: blue; -} - h1 a { color: #bb8800; } @@ -34,13 +26,13 @@ nav ul { } nav ul li a { display: block; - color: rgb(199, 18, 48); - background-color: #6fd80d; + color: white; + background-color: #324b79; border-radius: 25px 50px 0px; padding: 1ex 2ex; } nav ul li a:hover { color: #324b72; - background-color: rgb(175, 9, 9); + background-color: white; } nav img { float:left; diff --git a/templates/abc.html b/templates/abc.html index 241887c..fdd55c2 100644 --- a/templates/abc.html +++ b/templates/abc.html @@ -27,4 +27,3 @@
Startovací šablona pro webový framework Flask.
-{#{% endfilter %}#} +Lorem ipsum dolor sit amet consectetur adipisicing elit. +Laboriosam velit ut, ipsam sit a, quod et quia ducimus dolor vitae +recusandae! Exercitationem quae expedita cum delectus laboriosam +minus voluptatem rerum.
+ +BMI={{bmi}}
+ +{% if bmi < 18.5%} +0 až 18.5 podváha
+{% elif bmi < 25%} +18.5 až 25 normalni vaha
+{% elif bmi < 30%} +25 až 30 nadvaha
+{% elif bmi < 35%} +30 až 35 mirna obezita
+{% elif bmi < 40%} +35 až 40 obezita
+{% elif bmi > 40%} +více než 40 extrem obezita
+{% endif %} + + +{% else %} +je treba zadat dve nenulova cisla!
+{% endif %} + + +Maliny jsou nejlepší!
+{% endfor %} + + +{% endblock obsah %} diff --git a/webface.py b/webface.py index 5ce68a7..2dc3c19 100644 --- a/webface.py +++ b/webface.py @@ -1,4 +1,4 @@ -from crypt import methods +from decimal import DivisionByZero from flask import Flask, render_template, request, redirect, url_for, session import functools @@ -37,18 +37,23 @@ def info(): def abc(): return render_template("abc.html", slova=slova) -@app.route("/banan/", methods=["GET", "POST"]) -def banan(): - return render_template("banan.html") -@app.route("/text/") -def text(): - return """ +@app.route("/malina/", methods=['GET', 'POST']) +def malina(): + hmotnost = request.args.get('hmotnost') + vyska = request.args.get('vyska') -toto je text
- -""" + return render_template('malina.html', bmi=bmi) \ No newline at end of file