diff --git a/.gitignore b/.gitignore index b6e4761..93e5ecb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.webassets-cache/ + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/app.py b/app.py new file mode 100644 index 0000000..322e16c --- /dev/null +++ b/app.py @@ -0,0 +1,19 @@ +from flask import Flask, render_template, request, jsonify +from flask_assets import Bundle, Environment +import random +app = Flask(__name__) + +assets = Environment(app) +css = Bundle("src/style.css", output="dist/main.css") + +assets.register("css", css) +css.build() + + +@app.route("/") +def homepage(): + return render_template("index.html", text="bye") + + +if __name__ == "__main__": + app.run(debug=True) \ No newline at end of file diff --git a/static/src/style.css b/static/src/style.css new file mode 100644 index 0000000..03d0aca --- /dev/null +++ b/static/src/style.css @@ -0,0 +1,3 @@ +h1 { + color: blue; +} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..444b5e4 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,16 @@ + + + + + + + {% assets 'css' %} + + {% endassets %} + Document + + +

html text

+

{{ text }}

+ +