2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 17:10:29 +01:00

load bootstrap.css from CDN

This commit is contained in:
Frederik Ring 2019-07-17 11:53:28 +02:00
parent d044d95b5b
commit 310594a345
2 changed files with 18 additions and 10 deletions

View File

@ -15,7 +15,7 @@ import accounts.api
app.config["FLASK_ADMIN_SWATCH"] = "flatly" app.config["FLASK_ADMIN_SWATCH"] = "flatly"
admin = Admin(app, name="offen admin", template_mode="bootstrap3") admin = Admin(app, name="offen admin", template_mode="bootstrap3", base_template="index.html")
admin.add_view(AccountView(Account, db.session)) admin.add_view(AccountView(Account, db.session))
admin.add_view(UserView(User, db.session)) admin.add_view(UserView(User, db.session))

View File

@ -1,9 +1,17 @@
<!DOCTYPE html> {% extends 'admin/base.html' %}
<html>
<head> {% block head_css %}
<title>offen accounts</title> <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.3.5/flatly/bootstrap.min.css" rel="stylesheet">
</head> <link href="{{ admin_static.url(filename='admin/css/bootstrap3/admin.css', v='1.1.1') }}" rel="stylesheet">
<body> <link href="{{ admin_static.url(filename='admin/css/bootstrap3/submenu.css') }}" rel="stylesheet">
<h1>Welcome to offen accounts</h1> {% if admin_view.extra_css %}
</body> {% for css_url in admin_view.extra_css %}
</html> <link href="{{ css_url }}" rel="stylesheet">
{% endfor %}
{% endif %}
<style>
body {
padding-top: 4px;
}
</style>
{% endblock %}