Browse Source

Add local staticfiles, add theme

master
Burathar 4 years ago
parent
commit
bbf64e053e
  1. 1
      biscd/biscd/config_default.yaml
  2. 2
      biscd/biscd/errors.py
  3. 7
      biscd/biscd/static/css/bootstrap-4.6.0.min.css
  4. 13
      biscd/biscd/static/css/bootstrap.min.css
  5. 3
      biscd/biscd/static/css/custom.css
  6. 7
      biscd/biscd/static/js/bootstrap.bundle.min.js
  7. 1
      biscd/biscd/static/js/bootstrap.bundle.min.js.map
  8. 7
      biscd/biscd/static/js/bootstrap.min.js
  9. 1
      biscd/biscd/static/js/bootstrap.min.js.map
  10. 2
      biscd/biscd/static/js/jquery.min.js
  11. 5
      biscd/biscd/static/js/popper.min.js
  12. 64
      biscd/biscd/templates/base.html
  13. 10
      biscd/biscd/templates/index.html

1
biscd/biscd/config_default.yaml

@ -10,3 +10,4 @@ logging: @@ -10,3 +10,4 @@ logging:
logfile: info.log
SECRET_KEY: this-should-be-very-secret
BOOTSTRAP_SERVE_LOCAL: True

2
biscd/biscd/errors.py

@ -6,7 +6,7 @@ def bad_request(error): @@ -6,7 +6,7 @@ def bad_request(error):
return render_template('400.html', title='400', error=error), 400
@app.errorhandler(404)
def not_found_error():
def not_found_error(error):
return render_template('404.html', title='404'), 404
@app.errorhandler(500)

7
biscd/biscd/static/css/bootstrap-4.6.0.min.css vendored

File diff suppressed because one or more lines are too long

13
biscd/biscd/static/css/bootstrap.min.css vendored

File diff suppressed because one or more lines are too long

3
biscd/biscd/static/css/custom.css

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
.container {
padding-top: 30px
}

7
biscd/biscd/static/js/bootstrap.bundle.min.js vendored

File diff suppressed because one or more lines are too long

1
biscd/biscd/static/js/bootstrap.bundle.min.js.map

File diff suppressed because one or more lines are too long

7
biscd/biscd/static/js/bootstrap.min.js vendored

File diff suppressed because one or more lines are too long

1
biscd/biscd/static/js/bootstrap.min.js.map

File diff suppressed because one or more lines are too long

2
biscd/biscd/static/js/jquery.min.js vendored

File diff suppressed because one or more lines are too long

5
biscd/biscd/static/js/popper.min.js vendored

File diff suppressed because one or more lines are too long

64
biscd/biscd/templates/base.html

@ -1,14 +1,51 @@ @@ -1,14 +1,51 @@
{% extends 'bootstrap/base.html' %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="{{url_for('static', filename = 'css/bootstrap.min.css')}}" rel="stylesheet">
<link href="{{url_for('static', filename = 'css/custom.css')}}" rel="stylesheet">
{% block styles %}
{{ super() }}
{% endblock %}
<title>
{% if title %}{{ title }} - Biscd 🍪{% else %}Biscd 🍪{% endif %}
</title>
</head>
<body>
<div class="bs-component">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor02">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
</div>
{% block title %}
{% if title %}{{ title }} - Biscd 🍪{% else %}Biscd 🍪{% endif %}
{% endblock %}
{% block content %}
<div class="container">
{% with messages = get_flashed_messages() %}
{% if messages %}
@ -21,8 +58,11 @@ @@ -21,8 +58,11 @@
{# application content needs to be provided in the app_content block #}
{% block app_content %}{% endblock %}
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
{% endblock %}
<script src="{{url_for('static', filename='js/jquery.min.js')}}"></script>
<script src="{{url_for('static', filename='js/popper.min.js')}}" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="{{url_for('static', filename='js/bootstrap.min.js')}}"></script>
</body>
</html>

10
biscd/biscd/templates/index.html

@ -2,7 +2,15 @@ @@ -2,7 +2,15 @@
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
<h1>Biscd, what else would you like with your Gitea?</h1>
<div class="page-header">
<div class="row">
<div class="col-lg-8 col-md-7 col-sm-6">
<h1>Biscd</h1>
<p class="lead">What else would you like with your Gitea?</p>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table">
<tbody>

Loading…
Cancel
Save