commit 10aae8962c20c4a200b6b64bd99cbe3524e7ee30
parent f37a573f9377a4426c530e479d36543e8ed75f9a
Author: Brennen T. Mazur <brennen@madis.cool>
Date: Sat, 3 Dec 2022 23:48:25 -0700
rough outline of app structure
Diffstat:
5 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/app.py b/app.py
@@ -0,0 +1,8 @@
+import datetime
+from flask import Flask, render_template, abort
+
+app = Flask(__name__)
+
+@app.route('/')
+def hello():
+ return render_template('index.html', currenttime=datetime.datetime.utcnow())
diff --git a/templates/base.html b/templates/base.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>{% block title %} {% endblock %} - {% block orgname %} {% endblock %}</title>
+ <link rel="stylesheet" href="/style.css"
+</head>
+<body>
+ <section class="appview">
+ {% block content %} {% endblock %}
+ </section>
+ <nav>
+ {% block navigation %} {% endblock %}
+ </nav>
+</body>
+</html>
+
diff --git a/templates/index.html b/templates/index.html
@@ -0,0 +1,8 @@
+{% 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>
+{% endblock %}
diff --git a/templates/punchclock/widget.html b/templates/punchclock/widget.html
@@ -0,0 +1,11 @@
+{% extends 'index.html' %}
+
+{% block items %}
+ <h2>{{ currenttime }}</h2>
+ <button href="#">Modify Hours</button><!--routes to userhours.html-->
+ <form>
+ <select name="Project Name">
+ <option value="#">$#</option><!-- for/while loop displaying each $projectName user has permission for -->
+ </select>
+ </form>
+{% endblock %}
diff --git a/templates/style.css b/templates/style.css
@@ -0,0 +1,7 @@
+.base-grid {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 3rem;
+ grid-auto-rows: minmax(500px, auto);
+}
+