From b2c8f3a77af1e6eceb0f4201f9a3fe572eeebe23 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 13 Jan 2023 18:06:16 -0500 Subject: [PATCH 1/7] bootstrap5-ify the dashboard and participant-facing pages except login don't merge to master yet! --- goathacks/__init__.py | 3 + goathacks/dashboard/forms.py | 5 +- goathacks/static/css/style.scss | 1 + goathacks/templates/base.html | 12 +--- goathacks/templates/dashboard.html | 101 +++++++++++++---------------- goathacks/templates/footer.html | 2 +- goathacks/templates/header.html | 6 +- goathacks/templates/login.html | 14 +--- goathacks/templates/register.html | 4 ++ requirements.txt | 1 + 10 files changed, 68 insertions(+), 81 deletions(-) diff --git a/goathacks/__init__.py b/goathacks/__init__.py index d11608c..e98a28e 100644 --- a/goathacks/__init__.py +++ b/goathacks/__init__.py @@ -5,6 +5,7 @@ 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 db = SQLAlchemy() @@ -13,6 +14,7 @@ login = LoginManager() environment = Environment() cors = CORS() mail = Mail() +bootstrap = Bootstrap5() def create_app(): app = Flask(__name__) @@ -25,6 +27,7 @@ def create_app(): environment.init_app(app) cors.init_app(app) mail.init_app(app) + bootstrap.init_app(app) scss = Bundle('css/style.scss', filters='scss', output='css/style.css') diff --git a/goathacks/dashboard/forms.py b/goathacks/dashboard/forms.py index ebfad2d..4f39717 100644 --- a/goathacks/dashboard/forms.py +++ b/goathacks/dashboard/forms.py @@ -1,6 +1,6 @@ from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileRequired, FileAllowed -from wtforms import RadioField, TextAreaField +from wtforms import RadioField, TextAreaField, SubmitField from wtforms.validators import DataRequired class ShirtAndAccomForm(FlaskForm): @@ -8,9 +8,12 @@ class ShirtAndAccomForm(FlaskForm): "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/static/css/style.scss b/goathacks/static/css/style.scss index 590d65f..872912d 100644 --- a/goathacks/static/css/style.scss +++ b/goathacks/static/css/style.scss @@ -4,6 +4,7 @@ $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%; } diff --git a/goathacks/templates/base.html b/goathacks/templates/base.html index 1442c25..c556c8b 100644 --- a/goathacks/templates/base.html +++ b/goathacks/templates/base.html @@ -1,15 +1,9 @@ {% include 'header.html' %} +{% from 'bootstrap5/utils.html' import render_messages %}
- {% with messages = get_flashed_messages() %} - {% if messages %} - - {% endif %} - {% endwith %} + {{ render_messages() }} + {% block content %} This content block is still being worked on! diff --git a/goathacks/templates/dashboard.html b/goathacks/templates/dashboard.html index 26680c6..ccea485 100644 --- a/goathacks/templates/dashboard.html +++ b/goathacks/templates/dashboard.html @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% from 'bootstrap5/form.html' import render_form %} {% block content %} @@ -16,74 +17,62 @@ } -
-
-
-

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. +
+
+ +

Hi {{ current_user.first_name }}!


+ +
+ {% if current_user.waitlisted %} +

You're currently waitlisted, keep checking your email to see if space + opens up!

+ {% else %} +

Your registration is confirmed! We're looking forward to seeing you at + GoatHacks!

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

Make sure you join the Discord and add your shirt size as well as any + needed accomodations below

+
+
+ +
+ +
+
+
+
+ {{ render_form(form) }} +
+
-
-
Make sure to join the Discord and enter your shirt size below!
-

(Please note that due to COVID-19 constraints, we can't guarantee that all participants will receive Hack@WPI t-shirts this year but we are trying to find a way!)

- Discord -
-
-
- {{ 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 %} -
- - {% endif %} -
-
-
-

Drop Application if you can't make it :(

+ {% endif %} + {% if current_user.is_admin %} + + {% endif %}
- - - - - - - - - - - - - -
-
-
-
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:

- - - - - - - - - - - - - - - - - - - {% for hacker in hackers %} - - - - - - - - - - - - - - - {% endfor %} - -
OptionsChecked In?Waitlisted?AdminMLH IDTime RegisteredEmailNamePhoneShirtSpecialSchool
-
- - -
-
{{ 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'] }}
-
-
-
- - - - - - +{% extends 'admin_base.html' %} diff --git a/goathacks/templates/admin_base.html b/goathacks/templates/admin_base.html new file mode 100644 index 0000000..4aadb02 --- /dev/null +++ b/goathacks/templates/admin_base.html @@ -0,0 +1,24 @@ +{% 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 new file mode 100644 index 0000000..bb83a9c --- /dev/null +++ b/goathacks/templates/admin_old.html @@ -0,0 +1,280 @@ + + + + + Hack @ WPI + + + + + + + + + + + + + + + + + +
+
+
+
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:

+ + + + + + + + + + + + + + + + + + + {% for hacker in hackers %} + + + + + + + + + + + + + + + {% endfor %} + +
OptionsChecked In?Waitlisted?AdminMLH IDTime RegisteredEmailNamePhoneShirtSpecialSchool
+
+ + +
+
{{ 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'] }}
+
+
+
+ + + + + + diff --git a/goathacks/templates/base.html b/goathacks/templates/base.html index c556c8b..e86ee39 100644 --- a/goathacks/templates/base.html +++ b/goathacks/templates/base.html @@ -1,7 +1,8 @@ {% include 'header.html' %} {% from 'bootstrap5/utils.html' import render_messages %} -
+
{{ render_messages() }} {% block content %} diff --git a/goathacks/templates/dashboard.html b/goathacks/templates/dashboard.html index ccea485..6f199cc 100644 --- a/goathacks/templates/dashboard.html +++ b/goathacks/templates/dashboard.html @@ -22,21 +22,27 @@

Hi {{ current_user.first_name }}!


-
+
+
{% if current_user.waitlisted %}

You're currently waitlisted, keep checking your email to see if space opens up!

{% else %} +
+

Your registration is confirmed! We're looking forward to seeing you at GoatHacks!

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

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


Make sure you join the Discord and add your shirt size as well as any needed accomodations below

+ - {% endif %}
+ + + + + + +{% endblock %} + +{% block app_content %} +
+
+

Registered Users

+ + + + + + + + + + + + + + + + + + + {% for hacker in hackers %} + + + + + + + + + + + + + + + {% endfor %} + +
OptionsChecked In?Waitlisted?AdminUser IDRegistration TimeEmailNamePhoneShirtSpecialSchool
+ + {{ 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/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 - - - - - - - - - - - - - - - - - -
-
-
-
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:

- - - - - - - - - - - - - - - - - - - {% for hacker in hackers %} - - - - - - - - - - - - - - - {% endfor %} - -
OptionsChecked In?Waitlisted?AdminMLH IDTime RegisteredEmailNamePhoneShirtSpecialSchool
-
- - -
-
{{ 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'] }}
-
-
-
- - - - - - diff --git a/goathacks/templates/base.html b/goathacks/templates/base.html deleted file mode 100644 index e86ee39..0000000 --- a/goathacks/templates/base.html +++ /dev/null @@ -1,15 +0,0 @@ -{% include 'header.html' %} -{% from 'bootstrap5/utils.html' import render_messages %} - -
- {{ render_messages() }} - -{% 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 6f199cc..649ec80 100644 --- a/goathacks/templates/dashboard.html +++ b/goathacks/templates/dashboard.html @@ -1,89 +1,50 @@ -{% extends 'base.html' %} -{% from 'bootstrap5/form.html' import render_form %} +{% extends 'layout.html' %} +{% from 'bootstrap5/form.html' import render_field %} -{% block content %} - - +

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

-
-
- -

Hi {{ current_user.first_name }}!


- -
-
- {% if current_user.waitlisted %} -

You're currently waitlisted, keep checking your email to see if space - opens up!

- {% else %} -
-
-

Your registration is confirmed! We're looking forward to seeing you at - GoatHacks!

-
-
-

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

-
-
-
-

Make sure you join the Discord and add your shirt size as well as any - needed accomodations below

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

Optional Info

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

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

-
-
- - -
- +
+ {{ 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) }} +
+
+
- {% endif %}
- - {% 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 45d62a6..0000000 --- a/goathacks/templates/footer.html +++ /dev/null @@ -1,17 +0,0 @@ - -
- - {{ bootstrap.load_js() }} - - diff --git a/goathacks/templates/header.html b/goathacks/templates/header.html deleted file mode 100644 index c3b5d78..0000000 --- a/goathacks/templates/header.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - {{ bootstrap.load_css() }} - - - - - - - - - diff --git a/goathacks/templates/home b/goathacks/templates/home deleted file mode 160000 index e0fb69c..0000000 --- a/goathacks/templates/home +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e0fb69c0be54c6cce7391ccb86a9bf14b80f432b 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 dfcbc43..a59533f 100644 --- a/goathacks/templates/login.html +++ b/goathacks/templates/login.html @@ -1,24 +1,34 @@ -{% extends 'base.html' %} -{% from 'bootstrap5/form.html' import render_form %} +{% 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) }} +
-
-
- {{ render_form(form) }} -

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..f58fef7 100644 --- a/goathacks/templates/mail.html +++ b/goathacks/templates/mail.html @@ -99,3 +99,4 @@ + 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 b1d28ad..0dfb90f 100644 --- a/goathacks/templates/register.html +++ b/goathacks/templates/register.html @@ -1,62 +1,69 @@ -{% extends 'base.html' %} -{% from 'bootstrap5/form.html' import render_form %} +{% 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) }} +
-
-
- - {{ render_form(form) }} - -

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 0e70b19..57c7e1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,3 +24,4 @@ Werkzeug==2.2.2 WTForms==3.0.1 ulid bootstrap-flask +Font-Awesome-Flask From 24384b2a351a5b6d242d243c63cfb933acf527d7 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 23 Feb 2024 14:40:07 -0500 Subject: [PATCH 5/7] Update bulk mailer tool Use new admin site theme, allow for tinyMCE api key to be input to config.py --- goathacks/admin/__init__.py | 6 ++++-- goathacks/templates/mail.html | 35 +++++++++++++++++------------------ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/goathacks/admin/__init__.py b/goathacks/admin/__init__.py index 3d2eeba..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,10 @@ 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 diff --git a/goathacks/templates/mail.html b/goathacks/templates/mail.html index f58fef7..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,7 +95,7 @@ // }) } - - - +
+
+{% endblock %} From 476966bef504e2dac384d26b93e91c5e2bfb4505 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 23 Feb 2024 14:47:14 -0500 Subject: [PATCH 6/7] fix checkin/waitlist --- goathacks/templates/admin.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/goathacks/templates/admin.html b/goathacks/templates/admin.html index 83d8879..410c36a 100644 --- a/goathacks/templates/admin.html +++ b/goathacks/templates/admin.html @@ -73,8 +73,8 @@
- {{ hacker.checked_in }} - {{ hacker.waitlisted }} + {{ hacker.checked_in }} + {{ hacker.waitlisted }} {{ hacker.is_admin }} {{ hacker.id }} {{ hacker.last_login }} From 6b48c30395ab9b1a443d746e9091fe10f4c41628 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 23 Feb 2024 16:30:35 -0500 Subject: [PATCH 7/7] Re-add index page --- .gitmodules | 2 +- goathacks/templates/home | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 160000 goathacks/templates/home diff --git a/.gitmodules b/.gitmodules index 807cb70..24175f7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "goathacks/templates/home"] path = goathacks/templates/home url = https://github.com/WPI-ACM/Hack-WPI-Static - branch = 2023-dev + branch = master diff --git a/goathacks/templates/home b/goathacks/templates/home new file mode 160000 index 0000000..8d8a691 --- /dev/null +++ b/goathacks/templates/home @@ -0,0 +1 @@ +Subproject commit 8d8a691aad1cea4037bb9d33ddf7230d8d272597