aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates/base.html
diff options
context:
space:
mode:
authorPedro H <5179251+pedrohdz@users.noreply.github.com>2017-04-29 17:23:42 +0800
committerPedro H <pedro.codez@gmail.com>2018-04-01 12:09:17 +0200
commit39972edd5aecddf0595633a31a357f90572c0a98 (patch)
treef42e82825c24c5663e6994f3cc44437e3cececa4 /pelican-bootstrap3/templates/base.html
parent319c5ffe1652a8e34a04a4cdafd299ce0793326a (diff)
downloadpelican-themes-39972edd5aecddf0595633a31a357f90572c0a98.tar.gz
Added PADDED_SINGLE_COLUMN_STYLE setting
The `PADDED_SINGLE_COLUMN_STYLE` allows the main page content to be centered with padding on the sides. This setting takes precidence over `HIDE_SIDEBAR`, `ABOUT_ME`, and `AVATAR`, hiding the sidebar completely when `PADDED_SINGLE_COLUMN_STYLE` is set to `True`. Also cleaned up how the `class`es are assigned in the main content div. Things were starting to get unreadable in there IMHO.
Diffstat (limited to 'pelican-bootstrap3/templates/base.html')
-rw-r--r--pelican-bootstrap3/templates/base.html43
1 files changed, 25 insertions, 18 deletions
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html
index 28e592a..c80d84b 100644
--- a/pelican-bootstrap3/templates/base.html
+++ b/pelican-bootstrap3/templates/base.html
@@ -108,7 +108,7 @@
<body>
<div class="navbar {% if BOOTSTRAP_NAVBAR_INVERSE %}navbar-inverse{% else %}navbar-default{% endif %} navbar-fixed-top" role="navigation">
- <div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
+ <div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
<div class="navbar-header">
{% if MENUITEMS or (pages and DISPLAY_PAGES_ON_MENU) or (categories and DISPLAY_CATEGORIES_ON_MENU) %}
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
@@ -164,6 +164,7 @@
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar -->
+
<!-- Banner -->
{% if BANNER and BANNER_ALL_PAGES %}
{% include 'includes/banner.html' %}
@@ -171,32 +172,38 @@
{% block banner %}{% endblock %}
{% endif %}
<!-- End Banner -->
+
+<!-- Content Container -->
+{% if PADDED_SINGLE_COLUMN_STYLE %}
+ {% set content_class='col-md-8 col-md-offset-2' %}
+{% elif not HIDE_SIDEBAR or ABOUT_ME or AVATAR %}
+ {% set content_class='col-sm-9' + (' col-sm-push-3' if SIDEBAR_ON_LEFT else '') %}
+ {% set sidebar_class='col-sm-3' + (' col-sm-pull-9' if SIDEBAR_ON_LEFT else '') %}
+{% else %}
+ {% set content_class='col-lg-12' %}
+{% endif %}
<div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
<div class="row">
- {% if not HIDE_SIDEBAR or ABOUT_ME or AVATAR %}
- <div class="col-sm-9{% if SIDEBAR_ON_LEFT %} col-sm-push-3{% endif %}">
- {% else %}
- <div class="col-lg-12">
- {% endif %}
- {% block breadcrumbs %}
- {% endblock %}
- {% block content %}
- {% endblock %}
+ <div class="{{ content_class }}">
+ {% block breadcrumbs %}{% endblock %}
+ {% block content %}{% endblock %}
</div>
- {% if not HIDE_SIDEBAR or ABOUT_ME or AVATAR %}
- <div class="col-sm-3{% if SIDEBAR_ON_LEFT %} col-sm-pull-9{% endif %}" id="sidebar">
+ {% if sidebar_class %}
+ <div class="{{ sidebar_class }}" id="sidebar">
<aside>
- {% if ABOUT_ME or AVATAR %}
- {% include 'includes/aboutme.html' %}
- {% endif %}
- {% if not HIDE_SIDEBAR %}
- {% include 'includes/sidebar.html' %}
- {% endif %}
+ {% if ABOUT_ME or AVATAR %}
+ {% include 'includes/aboutme.html' %}
+ {% endif %}
+ {% if not HIDE_SIDEBAR %}
+ {% include 'includes/sidebar.html' %}
+ {% endif %}
</aside>
</div>
{% endif %}
</div>
</div>
+<!-- End Content Container -->
+
{% include 'includes/footer.html' %}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/jquery.min.js"></script>