diff --git a/goathacks/__init__.py b/goathacks/__init__.py
index c383e88..1939b46 100644
--- a/goathacks/__init__.py
+++ b/goathacks/__init__.py
@@ -6,6 +6,7 @@ from flask_assets import Bundle, Environment
from flask_cors import CORS
from flask_mail import Mail, email_dispatched
from flask_bootstrap import Bootstrap5
+from flask_font_awesome import FontAwesome
from flask_qrcode import QRcode
@@ -17,6 +18,7 @@ environment = Environment()
cors = CORS()
mail = Mail()
bootstrap = Bootstrap5()
+font_awesome = FontAwesome()
qrcode = QRcode()
def create_app():
@@ -32,6 +34,7 @@ def create_app():
mail.init_app(app)
bootstrap.init_app(app)
qrcode.init_app(app)
+ font_awesome.init_app(app)
scss = Bundle('css/style.scss', filters='scss',
output='css/style.css')
diff --git a/goathacks/dashboard/__init__.py b/goathacks/dashboard/__init__.py
index d9ba207..c6d4699 100644
--- a/goathacks/dashboard/__init__.py
+++ b/goathacks/dashboard/__init__.py
@@ -19,6 +19,8 @@ def home():
current_user.accomodations = request.form.get('accomodations')
db.session.commit()
flash("Updated successfully")
+ else:
+ form = forms.ShirtAndAccomForm(obj=current_user)
return render_template("dashboard.html", form=form, resform=resform)
@bp.route("/resume", methods=["POST"])
diff --git a/goathacks/dashboard/forms.py b/goathacks/dashboard/forms.py
index 4f39717..cdf0969 100644
--- a/goathacks/dashboard/forms.py
+++ b/goathacks/dashboard/forms.py
@@ -1,10 +1,10 @@
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired, FileAllowed
-from wtforms import RadioField, TextAreaField, SubmitField
+from wtforms import SelectField, TextAreaField, SubmitField
from wtforms.validators import DataRequired
class ShirtAndAccomForm(FlaskForm):
- shirt_size = RadioField("Shirt size", choices=["XS", "S", "M", "L", "XL",
+ shirt_size = SelectField("Shirt size", choices=["XS", "S", "M", "L", "XL",
"None"],
validators=[DataRequired()])
accomodations = TextAreaField("Special needs and/or Accomodations")
diff --git a/goathacks/registration/__init__.py b/goathacks/registration/__init__.py
index 63b7888..2d482f2 100644
--- a/goathacks/registration/__init__.py
+++ b/goathacks/registration/__init__.py
@@ -1,7 +1,7 @@
from datetime import datetime, timedelta
from flask import Blueprint, abort, config, current_app, flash, redirect, render_template, request, url_for
import flask_login
-from flask_login import current_user
+from flask_login import current_user, login_required
from goathacks.registration.forms import LoginForm, PwResetForm, RegisterForm, ResetForm
from werkzeug.security import check_password_hash, generate_password_hash
from flask_mail import Message
@@ -97,6 +97,13 @@ def login():
return render_template("login.html", form=form)
+@bp.route("/logout")
+@login_required
+def logout():
+ flask_login.logout_user()
+ flash("See you later!")
+ return redirect(url_for("registration.login"))
+
@bp.route("/reset", methods=["GET", "POST"])
def reset():
form = ResetForm(request.form)
diff --git a/goathacks/static/css/style.css b/goathacks/static/css/style.css
index ffdd366..f6983a1 100644
--- a/goathacks/static/css/style.css
+++ b/goathacks/static/css/style.css
@@ -1,185 +1,18 @@
-@font-face {
- font-family: "Krungthep";
- src: url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.eot");
- src: url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.woff") format("woff"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.svg#Krungthep") format("svg");
+.navbar-dark, .modal-header, .table-header {
+ background-color: #974355;
+ color: #FFFFFF;
}
-html {
- height: 100%;
+.modal-header, .table-header {
+ color: #FFFFFF;
+}
+
+.container {
+ min-height: 100vh;
+ position: relative;
}
body {
+ min-height: 100vh;
background-color: #003049;
- font-family: 'Montserrat', sans-serif;
- font-size: 1.1rem;
- color: #eee;
- position: relative;
- min-height: 100%;
-}
-
-p {
- line-height: 2rem;
-}
-
-#logo-container {
- display: flex;
- justify-content: center;
- flex-direction: row;
- padding-top: 5px;
- padding-bottom: 5px;
- height: 100%;
- width: 100%;
-}
-
-#goat {
- height: 100%;
-}
-
-.button-collapse {
- color: #26a69a;
-}
-
-.parallax-container {
- min-height: 380px;
- line-height: 0;
- height: auto;
- color: rgba(255, 255, 255, 0.9);
-}
-
-.parallax-container .section {
- width: 100%;
-}
-
-label {
- color: white !important;
-}
-
-@media only screen and (max-width: 992px) {
- .parallax-container .section {
- top: 40%;
- }
- #index-banner .section {
- top: 10%;
- }
-}
-
-@media only screen and (max-width: 600px) {
- .parallax-container .section {
- height: auto;
- overflow: auto;
- }
- .container {
- height: auto;
- }
- #index-banner .section {
- top: 0;
- }
-}
-
-#tagline {
- font-weight: 600;
-}
-
-#event-info {
- font-weight: 400;
-}
-
-#registration-banner {
- min-height: 100px;
- max-height: 150px;
-}
-
-#registration-banner .section {
- top: auto;
-}
-
-.icon-block {
- padding: 0 15px;
-}
-
-.icon-block .material-icons {
- font-size: inherit;
-}
-
-.parallax img {
- display: inherit;
- max-width: 200%;
-}
-
-#mlh-trust-badge {
- display: block;
- max-width: 100px;
- min-width: 60px;
- position: fixed;
- right: 50px;
- top: 0;
- width: 10%;
- z-index: 10000;
-}
-
-nav {
- line-height: normal !important;
- font-family: "Jost", sans-serif;
- font-weight: 700;
-}
-
-/*
-.navbar-brand {
-} */
-.footer-nav {
- position: absolute;
- bottom: 0;
- width: 100%;
-}
-
-label {
- padding-bottom: 0.5rem;
-}
-
-form input {
- border-radius: 5px;
-}
-
-form input[type="submit"] {
- background: #26a69a;
- border-radius: 10px;
- border-color: #26a69a;
-}
-
-form input[type="radio"] {
- padding-right: 5px;
-}
-
-form input[type="checkbox"]:checked {
- visibility: visible;
- left: unset;
- position: unset;
-}
-
-form label {
- font-size: 1.1rem;
- padding-right: 10px;
- padding-left: 25px !important;
-}
-
-form select {
- display: unset;
- background: #974355;
- max-width: 11rem;
-}
-
-.flashes {
- list-style-type: none;
- display: flex;
- justify-content: center;
-}
-
-.message {
- width: 80%;
- justify-content: center;
- border: 1px solid #eee;
- background-color: #26a69a;
- padding: 0.2rem;
- font-size: large;
- color: #eee;
}
diff --git a/goathacks/static/css/style.scss b/goathacks/static/css/style.scss
index 872912d..1d4396e 100644
--- a/goathacks/static/css/style.scss
+++ b/goathacks/static/css/style.scss
@@ -1,185 +1,21 @@
+$color-nav-bg: #974355;
$color-bg: #003049;
-$color-fg: #eee;
-$color-section-bg: #974355;
-$color-accent: #26a69a;
-@font-face {font-family: "Krungthep"; src: url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.eot"); src: url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.woff") format("woff"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/736cf5b08b01082a3645e14038868e20.svg#Krungthep") format("svg"); }
+.navbar-dark, .modal-header, .table-header {
+ background-color: $color-nav-bg;
+ color: #FFFFFF;
+}
-html {
- height: 100%;
+.modal-header, .table-header {
+ color: #FFFFFF;
+}
+
+.container {
+ min-height: 100vh;
+ position: relative;
}
body {
+ min-height: 100vh;
background-color: $color-bg;
- font-family: 'Montserrat', sans-serif;
- font-size: 1.1rem;
- color: $color-fg;
- position: relative;
- min-height: 100%;
}
-
-p {
- line-height: 2rem;
-}
-
-#logo-container {
- display: flex;
- justify-content: center;
- flex-direction: row;
- padding-top: 5px;
- padding-bottom: 5px;
- height: 100%;
- width: 100%;
-}
-
-#goat {
- height: 100%;
-}
-
-.button-collapse {
- color: $color-accent;
-}
-
-
-.parallax-container {
- min-height: 380px;
- line-height: 0;
- height: auto;
- color: rgba(255,255,255,.9);
-}
-.parallax-container .section {
- width: 100%;
-}
-
-label {
- color: white !important;
-}
-
-@media only screen and (max-width : 992px) {
- .parallax-container .section {
- top: 40%;
- }
- #index-banner .section {
- top: 10%;
- }
-}
-
-@media only screen and (max-width : 600px) {
- .parallax-container .section {
- height: auto;
- overflow: auto;
- }
- .container {
- height: auto;
- }
- #index-banner .section {
- top: 0;
- }
-}
-
-#tagline {
- font-weight: 600;
-}
-
-#event-info {
- font-weight: 400;
-}
-
-#registration-banner {
- min-height: 100px;
- max-height: 150px;
-}
-
-#registration-banner .section{
- top: auto;
-}
-
-.icon-block {
- padding: 0 15px;
-}
-.icon-block .material-icons {
- font-size: inherit;
-}
-
-.parallax img {
- display: inherit;
- max-width: 200%;
-}
-
-#mlh-trust-badge {
- display: block;
- max-width: 100px;
- min-width: 60px;
- position: fixed;
- right: 50px;
- top: 0;
- width: 10%;
- z-index: 10000;
-}
-
-nav {
- line-height: normal !important;
- font-family: "Jost", sans-serif;
- font-weight: 700;
-}
-/*
-.navbar-brand {
-} */
-
-.footer-nav {
- position: absolute;
- bottom: 0;
- width: 100%;
-}
-
-
-// Forms
-label {
- padding-bottom: 0.5rem;
-}
-form {
- input {
- border-radius: 5px;
- }
- input[type="submit"] {
- background: $color-accent;
- border-radius: 10px;
- border-color: $color-accent;
- }
- input[type="radio"] {
- padding-right: 5px;
- }
- input[type="checkbox"]:checked {
- visibility: visible;
- left: unset;
- position: unset;
- }
- label {
- font-size: 1.1rem;
- padding-right: 10px;
- padding-left: 25px !important;
- }
- select {
- display: unset;
- background: $color-section-bg;
- max-width: 11rem;
- }
-}
-
-// Flashed messages
-.flashes {
- list-style-type: none;
- display: flex;
- justify-content: center;
-}
-
-.message {
- width: 80%;
- justify-content: center;
- border: 1px solid $color-fg;
- background-color: $color-accent;
- padding: 0.2rem;
- font-size: large;
- color: $color-fg;
-}
-
diff --git a/goathacks/static/img/banner.png b/goathacks/static/img/banner.png
new file mode 100644
index 0000000..d9df529
Binary files /dev/null and b/goathacks/static/img/banner.png differ
diff --git a/goathacks/static/img/logo.png b/goathacks/static/img/logo.png
new file mode 100644
index 0000000..3ac23a0
Binary files /dev/null and b/goathacks/static/img/logo.png differ
diff --git a/goathacks/templates/admin-layout.html b/goathacks/templates/admin-layout.html
new file mode 100644
index 0000000..bef14f1
--- /dev/null
+++ b/goathacks/templates/admin-layout.html
@@ -0,0 +1,38 @@
+{% extends 'layout.html' %}
+
+{% block navbar %}
+
+{% endblock %}
diff --git a/goathacks/templates/admin.html b/goathacks/templates/admin.html
index 8891a57..83d8879 100644
--- a/goathacks/templates/admin.html
+++ b/goathacks/templates/admin.html
@@ -1 +1,94 @@
-{% extends 'admin_base.html' %}
+{% extends 'admin-layout.html' %}
+
+{% block head %}
+{{super()}}
+
+
+
+
+
+
+
+{% endblock %}
+
+{% block app_content %}
+
+
+
Registered Users
+
+
+
+ Options |
+ Checked In? |
+ Waitlisted? |
+ Admin |
+ User ID |
+ Registration Time |
+ Email |
+ Name |
+ Phone |
+ Shirt |
+ Special |
+ School |
+
+
+
+ {% for hacker in hackers %}
+
+
+
+ |
+ {{ hacker.checked_in }} |
+ {{ hacker.waitlisted }} |
+ {{ hacker.is_admin }} |
+ {{ hacker.id }} |
+ {{ hacker.last_login }} |
+ {{ hacker.email }} |
+ {{ hacker.first_name + ' ' + hacker.last_name }} |
+ {{ hacker.phone }} |
+ {{ hacker.shirt_size }} |
+ {{ hacker.accomodations }} |
+ {{ hacker.school }} |
+
+ {% endfor %}
+
+
+
+
+{% endblock %}
+
diff --git a/goathacks/templates/admin_base.html b/goathacks/templates/admin_base.html
deleted file mode 100644
index 4aadb02..0000000
--- a/goathacks/templates/admin_base.html
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends 'base.html' %}
-
-{% block content %}
-
-
-{% block admin_content %}
-
- I'm still being worked on!
-
-{% endblock admin_content %}
-
-{% endblock %}
diff --git a/goathacks/templates/admin_old.html b/goathacks/templates/admin_old.html
deleted file mode 100644
index bb83a9c..0000000
--- a/goathacks/templates/admin_old.html
+++ /dev/null
@@ -1,280 +0,0 @@
-
-
-
-
- Hack @ WPI
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-