diff --git a/flaskex/app.py b/flaskex/app.py index a1b3ae9..44c6073 100644 --- a/flaskex/app.py +++ b/flaskex/app.py @@ -1,6 +1,6 @@ from pathlib import Path -from flask import Flask, url_for +from flask import Flask, url_for, render_template from markupsafe import escape app = Flask(__name__) @@ -10,9 +10,10 @@ TEMPLATES_DIR = Path("./flaskex/templates/") @app.route("/") def index(): - f = open(TEMPLATES_DIR / "base.jinja") - raw = f.read() - return raw + context = { + "number": 1337 + } + return render_template("index.jinja", context=context) @app.route('/user/') diff --git a/flaskex/static/img/tomatos.jpg b/flaskex/static/img/tomatos.jpg new file mode 100644 index 0000000..44e23c2 Binary files /dev/null and b/flaskex/static/img/tomatos.jpg differ diff --git a/flaskex/templates/base.jinja b/flaskex/templates/base.jinja index 2819214..6882f3c 100644 --- a/flaskex/templates/base.jinja +++ b/flaskex/templates/base.jinja @@ -8,6 +8,9 @@ + + {% block head %} + {% endblock %} @@ -75,7 +78,7 @@ From: "transform opacity-100 scale-100" To: "transform opacity-0 scale-95" --> -
-
-
- - - -
-
-

Work with us

-

Anim aute id - magna aliqua ad ad non deserunt sunt. Qui irure qui lorem cupidatat commodo. Elit sunt - amet fugiat veniam occaecat fugiat.

-
-
- -
-
-
Offices worldwide
-
12
-
-
-
Full-time colleagues
-
300+
-
-
-
Hours per week
-
40
-
-
-
Paid time off
-
Unlimited
-
-
-
-
-
- -
+ {% block main %} + {% endblock %}
diff --git a/flaskex/templates/index.jinja b/flaskex/templates/index.jinja new file mode 100644 index 0000000..06b6ac8 --- /dev/null +++ b/flaskex/templates/index.jinja @@ -0,0 +1,67 @@ +{% extends "base.jinja" %} +{% block main %} +
+
+

+ sogar deine mamer kauft meine geilen {{ context.number }} tomaten +

+

Anim aute id magna aliqua ad + ad non deserunt sunt. Qui irure qui lorem cupidatat commodo. Elit sunt amet fugiat veniam occaecat. +

+ +
+
+
+
+
+

Collections

+ +
+
+ Desk with leather desk pad, walnut desk organizer, wireless keyboard and mouse, and porcelain mug. +

+ + + Desk and Office + +

+

Work from home accessories

+
+
+ Wood table with porcelain mug, leather journal, brass pen, leather key ring, and a houseplant. +

+ + + Self-Improvement + +

+

Journals and note-taking

+
+
+ Collection of four insulated travel bottles on wooden shelf. +

+ + + Travel + +

+

Daily commute essentials

+
+
+
+
+
+ +{{ number }} +{% endblock %}