diff --git a/grandnational-dashboard/app/dashboard.py b/grandnational-dashboard/app/dashboard.py new file mode 100644 index 0000000..dc5a14e --- /dev/null +++ b/grandnational-dashboard/app/dashboard.py @@ -0,0 +1,31 @@ +from starlette.applications import Starlette +from starlette.templating import Jinja2Templates +from starlette.routing import Route, Mount +from starlette.staticfiles import StaticFiles + + +templates = Jinja2Templates(directory='templates') + + +async def home(request): + return templates.TemplateResponse( + 'index.html', + {'request': request}, + ) + +routes = [ + Route('/', endpoint=home), + Mount('/static', StaticFiles(directory='../static'), name='static'), + Mount( + '/node_modules', + StaticFiles(directory='../node_modules'), + name='node_modules', + ), + Mount( + '/bower_components', + StaticFiles(directory='../bower_components'), + name='bower_components', + ), +] + +app = Starlette(debug=True, routes=routes) diff --git a/grandnational-dashboard/grandnational_dashboard/main.py b/grandnational-dashboard/grandnational_dashboard/main.py new file mode 100644 index 0000000..dc5a14e --- /dev/null +++ b/grandnational-dashboard/grandnational_dashboard/main.py @@ -0,0 +1,31 @@ +from starlette.applications import Starlette +from starlette.templating import Jinja2Templates +from starlette.routing import Route, Mount +from starlette.staticfiles import StaticFiles + + +templates = Jinja2Templates(directory='templates') + + +async def home(request): + return templates.TemplateResponse( + 'index.html', + {'request': request}, + ) + +routes = [ + Route('/', endpoint=home), + Mount('/static', StaticFiles(directory='../static'), name='static'), + Mount( + '/node_modules', + StaticFiles(directory='../node_modules'), + name='node_modules', + ), + Mount( + '/bower_components', + StaticFiles(directory='../bower_components'), + name='bower_components', + ), +] + +app = Starlette(debug=True, routes=routes) diff --git a/grandnational-dashboard/grandnational_dashboard/templates/index.html b/grandnational-dashboard/grandnational_dashboard/templates/index.html index ae1c34a..32cf095 100644 --- a/grandnational-dashboard/grandnational_dashboard/templates/index.html +++ b/grandnational-dashboard/grandnational_dashboard/templates/index.html @@ -6,7 +6,7 @@ - + diff --git a/grandnational-dashboard/manual-jq.toml b/grandnational-dashboard/manual-jq.toml new file mode 100644 index 0000000..51a3ff8 --- /dev/null +++ b/grandnational-dashboard/manual-jq.toml @@ -0,0 +1,8 @@ +[letteringjs] +url = "https://github.com/davatron5000/Lettering.js" +jq = "https://github.com/davatron5000/Lettering.js/blob/master/jquery.lettering.js" + +[textillate] +url = "https://github.com/jschr/textillate" +jq = "https://github.com/jschr/textillate/blob/master/jquery.textillate.js" +dependencies = ["animate.css", "lettering.js"] diff --git a/grandnational-dashboard/static/assets/favicon/favicon-192x192-wh.png b/grandnational-dashboard/static/assets/favicon/favicon-192x192.png similarity index 100% rename from grandnational-dashboard/static/assets/favicon/favicon-192x192-wh.png rename to grandnational-dashboard/static/assets/favicon/favicon-192x192.png