diff options
Diffstat (limited to 'web/templates')
-rw-r--r-- | web/templates/base.html | 38 | ||||
-rw-r--r-- | web/templates/event.html | 91 | ||||
-rw-r--r-- | web/templates/index.html | 26 | ||||
-rw-r--r-- | web/templates/registration/login.html | 1 |
4 files changed, 156 insertions, 0 deletions
diff --git a/web/templates/base.html b/web/templates/base.html new file mode 100644 index 0000000..d6ba2da --- /dev/null +++ b/web/templates/base.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>Korabo</title> + {% load static %} + {% load bootstrap5 %} + {% bootstrap_css %} + {% bootstrap_javascript %} +</head> +<body style="min-height: 100%"> + + <div class="container mt-4" style="min-height:85vh"> + + <h1 style="margin-bottom:-8px;">Korabo</h1> + <div style="float:left;"> + + <small>~make it easy with コラボ~</small> + </div> + <div style="float:right;"> + <a href="{% url 'index' %}">home</a> | + <a href="{% url 'logout' %}">logout</a> + + </div> + + <div style="clear:both;"></div> + <hr> + + <br> + {% block content %}{% endblock %} + </div> + + <div> + <small class="p-5">Version 1.0 | Created By <a href="https://www.domdit.com" target="_blank">Dominic DiTaranto</a> | Questions/Suggestions: me@domdit.com | Last Update 09/22/2024</small> + </div> + +</body> +</html>
\ No newline at end of file diff --git a/web/templates/event.html b/web/templates/event.html new file mode 100644 index 0000000..60535c7 --- /dev/null +++ b/web/templates/event.html @@ -0,0 +1,91 @@ +{% extends 'base.html' %} + +{% block content %} + +<h4>{{event.name}}</h4> +<form action="/event/{{event.id}}" method="post"> {% csrf_token %} + + <div class="table-responsive-lg"> + <table class="table"> + <thead> + <tr> + <th scope="col">#</th> + {% for datetime, day in morning.items %} + <td><small>{{ datetime }}</small></td> + {% endfor %} + </tr> + </thead> + <tbody> + <tr> + <th scope="row"><small>Morning</small></th> + {% for datetime, day in morning.items %} + <td> + <input id="{{day.0}}" type="checkbox" name="{{day.0}}"/><br> + {{ day.1 }} + </td> + + {% endfor %} + </tr> + <tr> + <th scope="row"><small>Afternoon</small></th> + {% for datetime, day in noon.items %} + <td> + <input id="{{day.0}}" type="checkbox" name="{{day.0}}"/><br> + {{ day.1 }} + </td> + {% endfor %} + </tr> + <tr> + <th scope="row"><small>Night</small></th> + {% for datetime, day in night.items %} + <td> + <input id="{{day.0}}" type="checkbox" name="{{day.0}}"/><br> + {{ day.1 }} + </td> + {% endfor %} + </tr> + </tbody> + </table> + </div> + + <div style="margin-top:10px;"> + <div style="float:left"> + Responses: {{user_responses}} / {{event.participants}} + </div> + <div style="float:right"> + <button class="btn btn-success" type="submit">Submit</button> + </div> + </div> + +</form> + +<div style="clear:both;"></div> +<hr> +<div> + <h4>Best Times</h4> + {{ no_overlap_message }} + {% for day, users in best_days.items %} + <div class="row"> + <div class="col-3" style="border: dotted black 1px;">{{day}}</div> + <div class="col-4" style="border: dotted black 1px;">{{users}}</div> + </div> + {% endfor %} +</div> + + + + + +<script> + active_dates = {{ active_dates|safe }}; + if (active_dates) { + for (let i = 0; i < active_dates.length; i++) { + document.getElementById(active_dates[i]).checked = true; + } + } +</script> + +<br><br> + + +{% endblock %} diff --git a/web/templates/index.html b/web/templates/index.html new file mode 100644 index 0000000..5f2150b --- /dev/null +++ b/web/templates/index.html @@ -0,0 +1,26 @@ +{% extends 'base.html' %} + +{% block content %} + +<table class="table"> + <thead> + <tr> + <td>Event Name</td> + <td>Already Responded</td> + <td>Start Date</td> + <td>End Date</td> + </tr> + </thead> + <tbody> + {% for event in events %} + <tr> + <td><a href="{% url 'event' event.id %}">{{event.name}}</a></td> + <td>{{event.responses}}</td> + <td>{{event.start_date}}</td> + <td>{{event.end_date}}</td> + </tr> + {% endfor %} + </tbody> +</table> + +{% endblock %} diff --git a/web/templates/registration/login.html b/web/templates/registration/login.html new file mode 100644 index 0000000..afdff9b --- /dev/null +++ b/web/templates/registration/login.html @@ -0,0 +1 @@ +{% extends "admin/login.html" %} |