Now using bootstrap 4 beta

Refs #16
This commit is contained in:
Simon Willison 2017-11-05 18:49:07 -08:00
commit 7e0cedae3d
3 changed files with 13 additions and 0 deletions

View file

@ -438,7 +438,9 @@ def app_factory(files, num_threads=3):
]) ])
) )
app.add_route(IndexView.as_view(files, jinja, executor), '/') app.add_route(IndexView.as_view(files, jinja, executor), '/')
# TODO: /favicon.ico and /-/static/ deserve far-future cache expires
app.add_route(favicon, '/favicon.ico') app.add_route(favicon, '/favicon.ico')
app.static('/-/static/', str(app_root / 'immutabase' / 'static'))
app.add_route( app.add_route(
DatabaseView.as_view(files, jinja, executor), DatabaseView.as_view(files, jinja, executor),
'/<db_name:[^/\.]+?><as_json:(.jsono?)?$>' '/<db_name:[^/\.]+?><as_json:(.jsono?)?$>'

File diff suppressed because one or more lines are too long

View file

@ -2,6 +2,7 @@
<html> <html>
<head> <head>
<title>{% block title %}{% endblock %}</title> <title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="/-/static/bootstrap-4.0.0-beta.2.min.css">
<style> <style>
th { th {
text-align: left; text-align: left;
@ -10,10 +11,12 @@ th {
{% block extra_head %}{% endblock %} {% block extra_head %}{% endblock %}
</head> </head>
<body> <body>
<div class="container">
{% if error %} {% if error %}
<div style="padding: 1em; margin: 1em; border: 3px solid red;">{{ error }}</div> <div style="padding: 1em; margin: 1em; border: 3px solid red;">{{ error }}</div>
{% endif %} {% endif %}
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</div>
</body> </body>
</html> </html>