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 %} - - - -
-
-
-
JSON object of users from MLH (Including dropped applications):
-

Do NOT share this URL.

-
Get registered hackers only:
-

JSON CSV

-
-
-
-

Gender:

- - -
-
-

Schools:

- - -
-
-

Majors:

- - -
-
-
-

Counts:

- - - - - - - - - - - - - - - - - -
TotalAttendeesWaitlistChecked In
{{ total_count }}{{ (total_count - waitlist_count) }}{{ waitlist_count }}{{ check_in_count }}
- -

Shirts:

- - - - - - - - - - - - - - - - - - - - - - - -
XXSXSSMLXLXXL
{{ shirt_count['XXS'] }}{{ shirt_count['XS'] }}{{ shirt_count['S'] }}{{ shirt_count['M'] }}{{ shirt_count['L'] }}{{ shirt_count['XL'] }}{{ shirt_count['XXL'] }}
- -

Hackers:

- - +{% block app_content %} +
+
+

Registered Users

+
+ - - + + @@ -215,66 +31,64 @@ - - + + {% for hacker in hackers %} - - - - - - - - - - - - - - + + + + + + + + + + + + + + + {% endfor %} - -
Options Checked In? Waitlisted? AdminMLH IDTime RegisteredUser IDRegistration Time Email Name PhoneSpecial School
-
- +
+ - {{ 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'] }}
{{ 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 }}
-
+ +
+{% endblock %} - - - - - diff --git a/goathacks/templates/base.html b/goathacks/templates/base.html deleted file mode 100644 index 1442c25..0000000 --- a/goathacks/templates/base.html +++ /dev/null @@ -1,20 +0,0 @@ -{% include 'header.html' %} - -
- {% with messages = get_flashed_messages() %} - {% if messages %} - - {% endif %} - {% endwith %} -{% block content %} - -This content block is still being worked on! - -{% endblock %} -
- -{% include 'footer.html' %} diff --git a/goathacks/templates/bootstrap-base.html b/goathacks/templates/bootstrap-base.html new file mode 100644 index 0000000..04b47e6 --- /dev/null +++ b/goathacks/templates/bootstrap-base.html @@ -0,0 +1,44 @@ + +{% from 'bootstrap5/nav.html' import render_nav_item %} +{% from 'bootstrap5/utils.html' import render_messages %} + + + + + {% block head %} + {% if title %} + {{ title }} - GoatHacks + {% else %} + GoatHacks + {% endif %} + + + + {% block styles %} + + {{ bootstrap.load_css() }} + {% endblock %} + + {% endblock %} + + + + {% block navbar %}{% endblock %} + + +
+
+ {{ render_messages(container=False, dismissible=True, dismiss_animate=True) }} +
+ + {% block app_content %}{% endblock %} + +
+ + {% block scripts %} + + {{ bootstrap.load_js() }} + {% endblock %} + + + diff --git a/goathacks/templates/dashboard.html b/goathacks/templates/dashboard.html index 44c9656..649ec80 100644 --- a/goathacks/templates/dashboard.html +++ b/goathacks/templates/dashboard.html @@ -1,104 +1,50 @@ -{% extends 'base.html' %} +{% extends 'layout.html' %} +{% from 'bootstrap5/form.html' import render_field %} -{% block content %} - - - -
-
-
-

Hi {{ current_user.first_name }}!

- {% if current_user.waitlisted %} -

You are waitlisted, if space opens up we will let you know

- {% else %} -

You are fully registered! We look forward to seeing you!

- Let us know if you have any questions by sending them to hack@wpi.edu -
-
- Forgot to upload your resume while registering? No worries, submit it below. -
-
- {% if config['DISCORD_LINK'] is defined %} -
Make sure to join the Discord and enter your shirt size below!
- Discord - {% else %} -
Our discord is still under construction! We'll send out an email when it's ready.
- {% endif %} -
-
-
- {{ form.csrf_token }} -
-

Optional Info:

-
-

Shirt Size (Currently selected: {{current_user.shirt_size}})

- {% for subfield in form.shirt_size %} - {{subfield}}{{subfield.label}} - {% endfor %} -

Special Needs/Accommodations:

- -
-

- -


-
-
-
-
- {{ resform.csrf_token }} -

If you'd like, add your resume to send to sponsors...

-
-
- File - - -
-
- -
-
- -
- {% endif %} -
-
- {% if current_user.is_admin %} -
- +{% block app_content %} +
+
+

Hi {{current_user.first_name}}!

+ {% if current_user.waitlisted %} +

You're currently waitlisted. If space + opens up, we'll let you know!

+ {% else %} +

You are fully registered! We look forward to seeing you!

{% endif %} -
+ +

Let us know if you have any questions by sending + them to hack@wpi.edu

+ +
+
+ {{ form.csrf_token() }} +

Optional Info

+
+ {{ form.shirt_size(class="form-control", selected=current_user.shirt_size) }} + {{ form.shirt_size.label() }} +
+
+ {{ form.accomodations(class="form-control") }} + {{ form.accomodations.label() }} +
+ {{ render_field(form.submit) }} + +
+
+
+
+
+ {{ resform.csrf_token() }} +

If you'd like, add your resume to send to + sponsors...

+
+ {{ resform.resume(class="form-control") }} +
+ {{ render_field(resform.submit) }} +
+
+
-
-
-

Drop Application if you can't make it :(

- - {% endblock %} diff --git a/goathacks/templates/events/list.html b/goathacks/templates/events/list.html index 2aae898..1a62336 100644 --- a/goathacks/templates/events/list.html +++ b/goathacks/templates/events/list.html @@ -1,8 +1,9 @@ -{% extends 'base.html' %} +{% extends 'admin-layout.html' %} -{% block content %} +{% block app_content %} +
-
+

Events

Get a JSON readout of events here @@ -39,5 +40,5 @@
- +
{% endblock %} diff --git a/goathacks/templates/events/new_event.html b/goathacks/templates/events/new_event.html index caba4bb..a4930d6 100644 --- a/goathacks/templates/events/new_event.html +++ b/goathacks/templates/events/new_event.html @@ -1,6 +1,7 @@ -{% extends 'base.html' %} +{% extends 'admin-layout.html' %} -{% block content %} +{% block app_content %} +
@@ -9,30 +10,39 @@
-
{{ form.csrf_token }} -
- {{ form.name}}
{{ form.name.label }} +
+ {{ form.name(class="form-control") }} + {{ form.name.label }}
-
- {{ form.description}}
{{form.description.label}} +
+ {{ form.description(class="form-control") }} + {{form.description.label}}
-
- {{ form.location}}
{{form.location.label}} +
+ {{ form.location(class="form-control")}} + {{form.location.label}}
-
- {{form.start_time}}
{{form.start_time.label}} +
+
+
+ {{form.start_time(class="form-control")}} + {{form.start_time.label}}
-
- {{form.end_time}}
{{form.end_time.label}} +
+
+
+ {{form.end_time(class="form-control")}} + {{form.end_time.label}}
-
- {{form.category}}
{{form.category.label}} +
+
+
+ {{form.category(class="form-control")}} + {{form.category.label}}
-
{{form.submit}} -
diff --git a/goathacks/templates/footer.html b/goathacks/templates/footer.html deleted file mode 100644 index 4263f50..0000000 --- a/goathacks/templates/footer.html +++ /dev/null @@ -1,16 +0,0 @@ - -
- - - - diff --git a/goathacks/templates/header.html b/goathacks/templates/header.html deleted file mode 100644 index 845cfb8..0000000 --- a/goathacks/templates/header.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - {% assets 'scss' %} - - {% endassets %} - - - - - - - - diff --git a/goathacks/templates/home b/goathacks/templates/home index e0fb69c..8d8a691 160000 --- a/goathacks/templates/home +++ b/goathacks/templates/home @@ -1 +1 @@ -Subproject commit e0fb69c0be54c6cce7391ccb86a9bf14b80f432b +Subproject commit 8d8a691aad1cea4037bb9d33ddf7230d8d272597 diff --git a/goathacks/templates/index.html b/goathacks/templates/index.html deleted file mode 100755 index e403835..0000000 --- a/goathacks/templates/index.html +++ /dev/null @@ -1,195 +0,0 @@ -{% include 'header.html' %} - -
- - -
- Attention! Due to the road conditions, we have delayed the schedule by an hour. We will still have live presentations, but submissions have been extended until 9am, and judging will take place at 10am. -
- -
- -
- - -
-

A HACKATHON FOR ALL COLLEGE STUDENTS

-
- - -

WPI Campus Center

-

100 Institute Road

-

Worcester, MA 01609

-
- - - - -

OUR SPONSORS FOR 2020

- -
-
-
-
-
-

WPI Computer Science Department

-
- -
- - - - -
- -
- -
- -
- - - - - -
- -
-
- - -
-
-

FAQs

- -
-

Who can attend?

-
Our event is open to any college student! You don’t need any experience to participate. However, due to legal issues, anyone under 18 must have a legal guardian present and cannot win prizes
-
- -
-

What is the max team size?

-
The maximum is 5 people per team. Minimum is 1 :P
-
- -
-

What are the awards for?

-
The categories this year are:
-
Best Overall Project -
Best Game
-
Best Software
-
Best Hardware
-
Company Favorite
-
Best Use of the Bose API/SDK
-
Best Meme
-
Best Rookie
-
- -
-

What should I bring?

-
Bring devices, chargers, sleeping bags, toiletries, basically anything you need to be comfortable. We will provide showers at certain time slots during the weekend. Food will also be provided.
-
- -
-

What if I don't have a team?

-
You don’t need a team to register! We will have a team formation session right after the opening ceremony for those who would like to work with a team. If you prefer to stay solo, that’s also great.
-
- -
-

How should I prepare beforehand?

-
Make sure you have travel plans in place, especially in case of random snowfalls. Unfortunately, we do not provide travel reimbursements. - It’s also nice to have an idea in mind beforehand. However, we ask that you do not bring any pre-made materials to keep the competition fair.
-
- -
-

What is the schedule?

-
Here it is! Keep in mind that this is tentative.
-
-
- -
- -{% include 'footer.html' %} diff --git a/goathacks/templates/layout.html b/goathacks/templates/layout.html new file mode 100644 index 0000000..e346a1d --- /dev/null +++ b/goathacks/templates/layout.html @@ -0,0 +1,56 @@ +{% extends 'bootstrap-base.html' %} + +{% block html_attribs %} lang="en"{% endblock %} + +{% block title %}{% if title %}{{ title }} - GoatHacks{% else %}GoatHacks{% +endif %}{% endblock %} + +{% block head %} +{{super()}} +{{ font_awesome.load_css() }} +{% endblock %} + +{% block styles %} +{{super()}} +{% assets 'scss' %} + +{% endassets %} +{% endblock %} + +{% block navbar %} + +{% endblock %} diff --git a/goathacks/templates/login.html b/goathacks/templates/login.html index 57a3abe..a59533f 100644 --- a/goathacks/templates/login.html +++ b/goathacks/templates/login.html @@ -1,34 +1,34 @@ -{% extends 'base.html' %} +{% extends 'layout.html' %} +{% from 'bootstrap5/form.html' import render_field %} -{% block content %} -
-
-
-

Login

+{% block app_content %} +
+
+ GoatHacks 2024 Banner +

Welcome back to GoatHacks!

+

If you've already registered, please use this page + to access your participant dashboard. Otherwise, please use the + registration page to register!

+ +
+
+ {{ form.csrf_token() }} +
+ {{ form.email(class="form-control") }} + {{ form.email.label() }} +
+
+ {{ form.password(class="form-control") }} + {{ form.password.label() }} +
+ {{ render_field(form.submit) }} +
-
-
-
- {{ form.csrf_token }} -
- {{form.email}}
{{ form.email.label}} -
-
- {{form.password}}
{{form.password.label}} -
-
- {{form.submit}} -
-
-

Don't have an account? Register - here.

- -

Forgot your password? Head over here - to reset it.

-
-
{% endblock %} diff --git a/goathacks/templates/mail.html b/goathacks/templates/mail.html index e25143b..a85567f 100644 --- a/goathacks/templates/mail.html +++ b/goathacks/templates/mail.html @@ -1,23 +1,20 @@ - - - - 🍪CookieMailer +{% extends 'admin-layout.html' %} + + {% block head %} + {{super()}} - - - -
-
-
-
-

🍪CookieMailer

+ {% endblock %} + {% block app_content %} +
+
+

🍪CookieMailer


- @@ -26,7 +23,8 @@

- +



- +
@@ -77,6 +75,7 @@ ]; if((rec != "all" && window.confirm("Send test email?")) || (rec == "all" && window.confirm("Send email to {{NUM_HACKERS}} recipients?"))) { + console.log(`Sending email to ${rec}`) fetch('/admin/send', {method: 'POST', body: JSON.stringify(body), headers: headers}).then(async (res) => { window.alert(await res.text()); }).catch((err) => { @@ -96,6 +95,7 @@ // }) } - +
+
+{% endblock %} - diff --git a/goathacks/templates/password_reset.html b/goathacks/templates/password_reset.html deleted file mode 100644 index 582fb82..0000000 --- a/goathacks/templates/password_reset.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends 'base.html' %} - -{% block content %} -
-
-
-

Reset Password

-
-
-
-
-
-
- {{ form.csrf_token }} -
- {{form.password}}
{{form.password.label}} -
-
- {{form.password_confirm}}
{{form.password_confirm.label}} -
-
- {{form.submit}} -
-
-
-
-{% endblock %} diff --git a/goathacks/templates/pw_reset.html b/goathacks/templates/pw_reset.html deleted file mode 100644 index 15722ab..0000000 --- a/goathacks/templates/pw_reset.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends 'base.html' %} - -{% block content %} -
-
-
-

Reset Password

-
-
-
-
-
-
- {{ form.csrf_token }} -
- {{ form.email }}
{{ form.email.label}} -
-
- {{form.submit}} -
-
-
-
-{% endblock %} diff --git a/goathacks/templates/register.html b/goathacks/templates/register.html index 17f334b..0dfb90f 100644 --- a/goathacks/templates/register.html +++ b/goathacks/templates/register.html @@ -1,58 +1,69 @@ -{% extends 'base.html' %} +{% extends 'layout.html' %} +{% from 'bootstrap5/form.html' import render_field %} -{% block content %} -
-
-
-

Registration

+{% block app_content %} +
+
+ GoatHacks Banner +

Welcome to GoatHacks!

+

Please use this page to register for this year's + Hackathon. Accounts from prior years are not carried over!

+ +
+
+ {{ form.csrf_token() }} +
+ {{ form.email(class="form-control") }} + {{ form.email.label() }} +
+
+
+
+ {{ form.password(class="form-control") }} + {{ form.password.label() }} +
+
+
+
+ {{ form.password_confirm(class="form-control") }} + {{ form.password_confirm.label() }} +
+
+
+
+
+
+ {{ form.first_name(class="form-control") }} + {{ form.first_name.label() }} +
+
+
+
+ {{ form.last_name(class="form-control") }} + {{ form.last_name.label() }} +
+
+
+
+ {{ form.school(class="form-control") }} + {{ form.school.label() }} +
+
+ {{ form.phone_number(class="form-control") }} + {{ form.phone_number.label() }} +
+
+ {{ form.gender(class="form-control") }} + {{ form.gender.label() }} +
+
+ {{ form.agree_coc }} + {{ form.agree_coc.label() }} +
+ {{ render_field(form.submit) }} +
-
-
-
- {{ form.csrf_token }} -
- {{ form.email}}
{{ form.email.label }} -
-
- {{ form.password}}
{{form.password.label}} -
-
- {{ form.password_confirm}}
{{form.password_confirm.label}} -
-
- {{form.first_name}}
{{form.first_name.label}} -
-
- {{form.last_name}}
{{form.last_name.label}} -
-
-

Miscellaneous Information

-
- {{form.phone_number}}
{{form.phone_number.label}} -
-
- {{form.school}}
{{form.school.label}} -
-
- {{form.gender.label}}{{form.gender}} -
-
-
- - -
-
- {{form.submit}} -
-
- -

You may also want to - log in.

-
-
{% endblock %} - diff --git a/goathacks/templates/register_step2.html b/goathacks/templates/register_step2.html deleted file mode 100644 index bcd68eb..0000000 --- a/goathacks/templates/register_step2.html +++ /dev/null @@ -1,69 +0,0 @@ -{% include 'header.html' %} - - - -
-
-
-

Registration

-
-
background
-
-
-
-

Hi {{ name }}, just a few more steps!

-
-
-
-

If you'd like, add your resume to send to sponsors...

-
-
- File - -
-
- -
-
-
-

No worries if you don't have one on hand, you can come back and upload it later via the Hack@WPI dashboard!

-

Please take a moment to review the following policies and check all the boxes below so we can finalize your registration:

-

-

Hack@WPI's Terms and Conditions
-

-

-

MLH's Data Sharing Notice
-

-

-

MLH's Privacy Policy
-

-

-

MLH's - Contest Terms and Conditions
-

-

-

MLH's Code of Conduct
-

-
- - - - - -

-
-
-
-
-
-{% include 'footer.html' %} diff --git a/goathacks/templates/tos.html b/goathacks/templates/tos.html deleted file mode 100644 index 09c3da5..0000000 --- a/goathacks/templates/tos.html +++ /dev/null @@ -1,16 +0,0 @@ -{% include 'header.html' %} - -
-

- I agree to hold harmless the organizers of HACK@WPI and WPI’s Chapter of the Association of Computing Machinery (ACM) from any and all claims, lawsuits, demands, causes of action, liability, loss, damage and/or injury of any kind whatsoever (including without limitation all claims for monetary loss, property damager, equitable relief, personal injury and/or wrongful death), whether brought by an individual or other entity. The indemnification applies to and includes, without limitation, the payment of all penalties, fines, judgments, awards, decrees, attorneys’ fees, and related costs or expenses, and any reimbursements to ACM for all legal fees, expenses, and costs incurred by it. -

- -

- I also acknowledge the organizers of HACK@WPI will be recording the event using video, photographs, audio recordings, and other media and give them permission to use said media in marketing/promotional materials. -

-
- - -
- {% include 'footer.html' %} -
diff --git a/requirements.txt b/requirements.txt index 8c7a041..8bdb0d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,4 +23,6 @@ uWSGI==2.0.21 Werkzeug==2.2.2 WTForms==3.0.1 ulid +bootstrap-flask +Font-Awesome-Flask tabulate