Iterational commit.
This commit is contained in:
parent
1a4b11e6d9
commit
16e5fa891c
8 changed files with 72 additions and 0 deletions
20
app.py
Normal file
20
app.py
Normal file
|
@ -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)
|
4
setup_app.sh
Normal file
4
setup_app.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
export FLASK_APP=app.py
|
||||
export FLASK_ENV=development
|
3
static/assets/homepage.txt
Normal file
3
static/assets/homepage.txt
Normal file
|
@ -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.
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: #361653;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
console.log("Hello, world!");
|
21
templates/homepage.html
Normal file
21
templates/homepage.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends 'index.html' %}
|
||||
|
||||
{% block homepage_header %}
|
||||
<div class="card-panel grey darken-3">
|
||||
<header>
|
||||
<h1 class="blue-grey-text text-lighten-5 center">
|
||||
UwU Me!!
|
||||
</h1>
|
||||
</header>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block homepage_info %}
|
||||
<div class="card-panel grey darken-3">
|
||||
{% for item in homepage_text %}
|
||||
<p class="blue-grey-text text-lighten-5">
|
||||
{{ item }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
|
||||
/>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="static/css/index.css" />
|
||||
<script type="text/javascript" src="static/js/index.js"></script>
|
||||
</head>
|
||||
<body class="grey darken-4">
|
||||
<title>UwU Me!</title>
|
||||
<div class="container">
|
||||
{% block homepage_header %}{% endblock %}
|
||||
{% block homepage_info %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in a new issue