diff --git a/app.py b/app.py new file mode 100644 index 0000000..826c99e --- /dev/null +++ b/app.py @@ -0,0 +1,20 @@ +from flask import Flask, render_template, redirect, url_for, request +app = Flask(__name__) + +@app.route('/login', methods=['GET', 'POST']) +def login(): + if(request.method == 'POST'): + return render_template('') + elif(request.method == 'GET'): + return render_template('login.html', error=None) + return 'ERROR: Invalid method.' + +@app.route("/", methods=['GET']) +def hello(): + homepage_text_file = open('static/assets/homepage.txt') + homepage_text = homepage_text_file.readlines() + homepage_text.remove('\n') + return render_template('homepage.html', homepage_text=homepage_text) + +def main(): + app.run(host='0.0.0.0', debug=True) \ No newline at end of file diff --git a/setup_app.sh b/setup_app.sh new file mode 100644 index 0000000..10fdfd4 --- /dev/null +++ b/setup_app.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export FLASK_APP=app.py +export FLASK_ENV=development \ No newline at end of file diff --git a/static/assets/homepage.txt b/static/assets/homepage.txt new file mode 100644 index 0000000..7fb37a5 --- /dev/null +++ b/static/assets/homepage.txt @@ -0,0 +1,3 @@ +This is a personal project meant to allow users to sign up and receive an "UwU" from guests and other users! + +Credit for the original concept for this was PleasePet. \ No newline at end of file diff --git a/static/css/index.css b/static/css/index.css index e69de29..f2fc1e9 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -0,0 +1,3 @@ +body { + background-color: #361653; +} \ No newline at end of file diff --git a/static/js/index.js b/static/js/index.js index e69de29..a8141d3 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/view.py b/templates/__init__.py similarity index 100% rename from view.py rename to templates/__init__.py diff --git a/templates/homepage.html b/templates/homepage.html new file mode 100644 index 0000000..d4a2265 --- /dev/null +++ b/templates/homepage.html @@ -0,0 +1,21 @@ +{% extends 'index.html' %} + +{% block homepage_header %} +
+
+

+ UwU Me!! +

+
+
+{% endblock %} + +{% block homepage_info %} +
+ {% for item in homepage_text %} +

+ {{ item }} +

+ {% endfor %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index e69de29..e878468 100644 --- a/templates/index.html +++ b/templates/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + + UwU Me! +
+ {% block homepage_header %}{% endblock %} + {% block homepage_info %}{% endblock %} +
+ +