diff --git a/goathacks/__init__.py b/goathacks/__init__.py
index be0773b..1939b46 100644
--- a/goathacks/__init__.py
+++ b/goathacks/__init__.py
@@ -5,15 +5,20 @@ from flask_login import LoginManager
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
+
db = SQLAlchemy()
migrate = Migrate()
login = LoginManager()
environment = Environment()
cors = CORS()
mail = Mail()
+bootstrap = Bootstrap5()
+font_awesome = FontAwesome()
qrcode = QRcode()
def create_app():
@@ -27,7 +32,9 @@ def create_app():
environment.init_app(app)
cors.init_app(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/admin/__init__.py b/goathacks/admin/__init__.py
index 4536cf2..7f567fc 100644
--- a/goathacks/admin/__init__.py
+++ b/goathacks/admin/__init__.py
@@ -1,4 +1,4 @@
-from flask import Blueprint, jsonify, redirect, render_template, request, url_for
+from flask import Blueprint, current_app, jsonify, redirect, render_template, request, url_for
from flask_login import current_user, login_required
from flask_mail import Message
@@ -62,8 +62,20 @@ def mail():
return redirect(url_for("dashboard.home"))
total_count = len(db.session.execute(db.select(User)).scalars().all())
+ api_key = current_app.config["MCE_API_KEY"]
- return render_template("mail.html", NUM_HACKERS=total_count)
+ return render_template("mail.html", NUM_HACKERS=total_count,
+ MCE_API_KEY=api_key)
+
+@bp.route("/users")
+@login_required
+def users():
+ if not current_user.is_admin:
+ return redirect(url_for("dashboard.home"))
+
+ users = User.query.all()
+
+ return render_template("users.html", users=users)
@bp.route("/send", methods=["POST"])
@login_required
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 ebfad2d..cdf0969 100644
--- a/goathacks/dashboard/forms.py
+++ b/goathacks/dashboard/forms.py
@@ -1,16 +1,19 @@
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired, FileAllowed
-from wtforms import RadioField, TextAreaField
+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")
+ submit = SubmitField("Save")
class ResumeForm(FlaskForm):
resume = FileField("Resume", validators=[FileRequired(),
FileAllowed(['pdf', 'docx', 'doc',
'txt', 'rtf'],
"Documents only!")])
+
+ submit = SubmitField("Submit")
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 590d65f..1d4396e 100644
--- a/goathacks/static/css/style.scss
+++ b/goathacks/static/css/style.scss
@@ -1,184 +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"); }
-html {
- height: 100%;
+.navbar-dark, .modal-header, .table-header {
+ background-color: $color-nav-bg;
+ color: #FFFFFF;
+}
+
+.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 bb83a9c..410c36a 100644
--- a/goathacks/templates/admin.html
+++ b/goathacks/templates/admin.html
@@ -1,213 +1,29 @@
-
-
-
-
- Hack @ WPI
-
-
-
-
+{% extends 'admin-layout.html' %}
+{% block head %}
+{{super()}}
-
-
-
+
+
+{% endblock %}
-
-
-
-