commit b375dfc7df89bab957019a091e65f44edf83afc5
parent 2b02235edc0c8a0179517e6dfc88ce812f54ee28
Author: Brennen T. Mazur <brennen@madis.cool>
Date: Wed, 14 Dec 2022 23:10:09 -0700
cleaned up base.html, added dashboard/index.html, created login page, minor css modifications
Diffstat:
7 files changed, 46 insertions(+), 26 deletions(-)
diff --git a/.README.planfor.swp b/.README.planfor.swp
Binary files differ.
diff --git a/app.py b/app.py
@@ -5,15 +5,11 @@ app = Flask(__name__)
@app.route('/')
def hello():
- return render_template('index.html',currenttime=datetime.datetime.utcnow())
-
-@app.route("/signup")
-def signup():
- return render_template('signup/index.html')
+ return render_template('index.html')
@app.route("/dashboard")
def dashboard():
- return render_template('dashboard/index.html')
+ return render_template('dashboard/index.html',currenttime=datetime.datetime.utcnow())
@app.route("/crewlist")
def crewlist():
diff --git a/static/css/main.css b/static/css/main.css
@@ -1,3 +1,22 @@
+html,body {margin:0;padding:0;}
+.appview {margin:0;padding:0;}
+
+.login-grid {
+ display: grid;
+ grid-template-rows: repeat(3, 33vh);
+ grid-template-columns: repeat(3, 1fr);
+}
+
+.login {
+ display: grid;
+ align-items: center;
+ justify-items: center;
+ grid-row-start: 2;
+ grid-row-end: 3;
+ grid-column-start: 2;
+ grid-column-end: 3;
+}
+
.base-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
diff --git a/templates/base.html b/templates/base.html
@@ -7,20 +7,10 @@
</head>
<body>
<section class="appview">
- <!-- start temp full page blocks -->
- {% block hours %} {% endblock %}
- <!-- end temp full page blocks -->
-
- <!-- functioncall for checking role -->
- <!-- while/for loop adding blocks for permissive widgets -->
-
- <!-- temporary call all blocks for general 'wireframing' -->
- <!-- start temp widget blocks WHEN DONE MOVE TO DASHBOARD/INDEX PAGE-->
- {% include 'punchclock/widget.html' %}
- {% include 'activeusers/widget.html' %}
- {% include 'fleet/widget.html' %}<!-- might need to be block to allow changing between check out and check in vehicle buttons... Or Ifstatements... -->
- <!-- end temp widget blocks -->
+ {% block content %} {% endblock %}
+ <!-- functioncall for checking role IF logged in route /dashboard else LOGIN(templates/index.html) -->
</section>
+
<nav>
<!-- functioncall for inserting <a> for permissive pages -->
</nav>
diff --git a/templates/dashboard/index.html b/templates/dashboard/index.html
@@ -0,0 +1,10 @@
+{% extends 'base.html' %}
+
+{% block content %}
+ <div class="base-grid">
+ <!-- for loop or while loop displaying each 'widget' the logged in user has permission to access -->
+ {% include 'punchclock/widget.html' %}
+ {% include 'activeusers/widget.html' %}
+ {% include 'fleet/widget.html' %}
+ </div>
+{% endblock %}
diff --git a/templates/index.html b/templates/index.html
@@ -1,8 +1,13 @@
{% extends 'base.html' %}
{% block content %}
- <div class="base-grid">
- <!-- for loop or while loop displaying each 'widget' the logged in user has permission to access -->
- {% block items %} {% endblock %}
- </div>
+ <section class="login-grid">
+ <form class="login">
+ <label for="username">Login: </label>
+ <input type="text" id="username" name="username"><br>
+ <label for="password">Password: </label>
+ <input type="password" id="password" name="password"><br>
+ <input type="submit" value="Login">
+ </form>
+ </section>
{% endblock %}
diff --git a/templates/punchclock/index.html b/templates/punchclock/index.html
@@ -1,7 +1,7 @@
{% extends 'base.html' %}
-{% block hours %}
- <div class="hours-grid">
+{% block content %}
+ <section class="hours-grid">
<h3>username</h3><!-- abstract to 'welcome' function more like python var insert. IF logged in user has permission allow this username section to be a dropdown for modifying user time sheets. -->
<div><!-- abstract to payPeriod() -->
<h6>$payperiod range</h6>
@@ -43,5 +43,5 @@
</tr>
</table>
</form>
- </div>
+ </section>
{% endblock %}