mirror of
https://github.com/offen/website.git
synced 2024-11-22 17:10:29 +01:00
Merge pull request #60 from offen/admin-bootstrap
Load bootstrap.css from CDN
This commit is contained in:
commit
3c732698e5
@ -15,7 +15,7 @@ import accounts.api
|
||||
|
||||
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(UserView(User, db.session))
|
||||
|
@ -1,9 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>offen accounts</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to offen accounts</h1>
|
||||
</body>
|
||||
</html>
|
||||
{% extends 'admin/base.html' %}
|
||||
|
||||
{% block head_css %}
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.3.5/flatly/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{ admin_static.url(filename='admin/css/bootstrap3/admin.css', v='1.1.1') }}" rel="stylesheet">
|
||||
<link href="{{ admin_static.url(filename='admin/css/bootstrap3/submenu.css') }}" rel="stylesheet">
|
||||
{% if admin_view.extra_css %}
|
||||
{% for css_url in admin_view.extra_css %}
|
||||
<link href="{{ css_url }}" rel="stylesheet">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<style>
|
||||
body {
|
||||
padding-top: 4px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user