Templates
django-bootstrap-ui enables you to quickly prepare your page for Bootstrap and provide your content through a set of predefined templates.
HTML5 skeleton
This is our root template (html5-skeleton.html
) with a minimalistic and clean HTML5 skeleton. It comes with a well-thought-out block structure as follows, but is not meant to be extended directly, at least not if you want to use Bootstrap.
head-meta
Provide additional meta tags within the <head>
. Example:
{% block head-meta %}
<meta name="keywords" content="wood, furniture, garden, garden-table, etc.">
{% endblock %}
head-title
Provide your content for <title>
. Example:
head-css
Provide additional <link>
tags with css references. Example:
{% block head-css %}
<link href="css/your-theme.css" media="screen" rel="stylesheet" type="text/css">
{% endblock %}
head-javascript
Provide additional <script>
tags with javascript source references or inline code. Example:
{% block head-javascript %}
<script src="js/your-script.js" type="text/javascript"></script>
{% endblock %}
head-extension
Provide other content within the <head>
. Example:
body-content
All your page content in <body>
. Example:
body-javascript
Provide additional <script>
tags with javascript source references or inline code just before <body>
ends. Example:
{% block body-javascript %}
<script src="js/your-lately-embedded-script.js" type="text/javascript"></script>
{% endblock %}
Bootstrap skeletons
The templates bootstrap5-skeleton.html
, bootstrap4-skeleton.html
and bootstrap3-skeleton.html
extend our html5-skeleton.html
and provide Bootstrap support. Extend them to get a working, bootstraped page layout.
There are no additional blocks besides the above, the following ones are sensibly used by this template:
head-meta
head-css
head-javascript
body-javascript
Be careful when you are going to use these blocks with your own stuff. Remember to apply {{ block.super }}
so you won't overwrite existing and necessary Bootstrap resources. Example: