Skip to content

Commit

Permalink
make templates more flexible, improve markup
Browse files Browse the repository at this point in the history
  • Loading branch information
Yulka Plekhanova committed Aug 24, 2015
1 parent 03aba72 commit 8be68bd
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 53 deletions.
94 changes: 49 additions & 45 deletions pinax_theme_bootstrap/templates/theme_bootstrap/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,55 +22,59 @@
{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}" id="{% block body_id %}{% endblock %}" {% block body_extra_attributes %}{% endblock %}>
<div class="{% block wrapper_class %}{% endblock %}">

{% block topbar_base %}
<header>
<div class="navbar navbar-default {% block navbar_class %}navbar-fixed-top{% endblock %}">
<div class="container">
{% block topbar %}
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="fa fa-bars"></span>
</button>
{% block site_brand %}<a class="navbar-brand" href="{% url "home" %}">{{ SITE_NAME }}</a>{% endblock %}
</div>
<div class="collapse navbar-collapse navbar-responsive-collapse">
{% block nav %}
{% comment %}
<ul class="nav navbar-nav">
<li><a href="#tab_one">One</a></li>
<li><a href="#tab_two">Two</a></li>
</ul>
{% endcomment %}
{% endblock %}
{% block account_bar %}{% include "_account_bar.html" %}{% endblock %}
</div>
{% block wrapper %}
<section class="{% block wrapper_class %}{% endblock %}">
{% block page %}
<section class="{% block page_class %}page{% endblock %}">
{% block header_base %}
<header class="{% block header_class %}header{% endblock %}">
<nav class="navbar navbar-default {% block navbar_class %}navbar-fixed-top{% endblock %}">
<div class="container">
{% block header %}
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="fa fa-bars"></span>
</button>
{% block site_brand %}<a class="navbar-brand" href="{% url "home" %}">{{ SITE_NAME }}</a>{% endblock %}
</div>
<div class="collapse navbar-collapse navbar-responsive-collapse">
{% block nav %}
{% comment %}
<ul class="nav navbar-nav">
<li><a href="#tab_one">One</a></li>
<li><a href="#tab_two">Two</a></li>
</ul>
{% endcomment %}
{% endblock %}
{% block account_bar %}{% include "_account_bar.html" %}{% endblock %}
</div>
{% endblock %}
</div>
</nav>
</header>
{% endblock %}
</div>
</div>
</header>
{% endblock %}

{% block body_base %}
<section id="content_body">
<div class="container">
{% include "_messages.html" %}
{% block body %}
{% block body_base %}
<section class="content">
<div class="container">
{% include "_messages.html" %}
{% block body %}
{% endblock %}
</div>
</section>
{% endblock %}
</div>
</section>
{% endblock %}
</section>
{% endblock %}

{% block footer_base %}
<hr />
<footer>
<div class="container">
{% block footer %}{% endblock %}
</div>
</footer>
{% endblock %}
</div>
{% block footer_base %}
<footer class="{% block footer_class %}footer{% endblock %}">
<div class="container">
{% block footer %}{% endblock %}
</div>
</footer>
{% endblock %}
</section>
{% endblock %}

{% block scripts %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
{% load i18n %}

{% block body_base %}
<section id="content_body">
<section class="content">
<div class="container">
{% include "_messages.html" %}
<div class="row">
<div class="col-md-3 columns">
{% block subnav %}
<section class="row">
<aside class="sidebar">
{% block sidebar %}
{% endblock %}
</div>
<div class="col-md-9 columns">
</aside>
<section class="main-content">
{% block body %}
{% endblock %}
</div>
</div>
</section>
</section>
</div>
</section>
{% endblock %}

0 comments on commit 8be68bd

Please sign in to comment.