Add static site

This commit is contained in:
Cara Salter 2022-12-09 16:03:48 -05:00
parent a1f2be21ba
commit 4fec7f7da6
No known key found for this signature in database
GPG key ID: 90C66610C82B29CA
3 changed files with 11 additions and 2 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "templates/home"] [submodule "templates/home"]
path = templates/home path = templates/home
url = https://github.com/wpi-acm/hack-wpi-static.git url = https://github.com/wpi-acm/hack-wpi-static.git
[submodule "goathacks/templates/home"]
path = goathacks/templates/home
url = https://github.com/WPI-ACM/Hack-WPI-Static

View file

@ -1,4 +1,4 @@
from flask import Flask, render_template from flask import Flask, render_template, send_from_directory
from flask_sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate from flask_migrate import Migrate
from flask_login import LoginManager from flask_login import LoginManager
@ -47,7 +47,12 @@ def create_app():
# Homepage # Homepage
@app.route("/") @app.route("/")
def index(): def index():
return render_template("index.html") return render_template("home/index.html")
# homepage assets
@app.route("/assets/<path:path>")
def assets(path):
return send_from_directory('templates/home/assets', path)
return app return app

@ -0,0 +1 @@
Subproject commit d24d276382d7b50f5a2bdbdc661567ab102f7971