Updated layouts

This commit is contained in:
Oliver Davies 2015-11-27 21:20:46 +00:00
parent b016f82673
commit 964e8713a6
3 changed files with 46 additions and 0 deletions

View file

@ -60,7 +60,9 @@
<div class="row"> <div class="row">
{% block content_wrapper %} {% block content_wrapper %}
<main class="col-md-9"> <main class="col-md-9">
{% block content_top %}{% endblock %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
{% block content_bottom %}{% endblock %}
</main> </main>
{% endblock %} {% endblock %}

View file

@ -0,0 +1,5 @@
{% extends 'default' %}
{% block content_top %}
<h1>{{ page.title }}</h1>
{% endblock %}

View file

@ -0,0 +1,39 @@
{% extends 'page' %}
{% block content_wrapper %}
<main class="col-md-9">
{{ page.blocks.content_top|raw }}
{{ page.blocks.content|raw }}
{{ page.blocks.content_bottom|raw }}
</main>
{% endblock %}
{% block content_top %}
{{ parent() }}
{% if page.company %}
<div class="project--company">
<em>{% spaceless %}{% set company = site.companies[page.company] %}
Developed on behalf of
{% if company.website %}
<a href="{{ company.website }}">{{ company.title }}</a>
{% else %}
{{ company.title }}
{% endif %}{% endspaceless %}.</em>
</div>
{% endif %}
{% endblock %}
{% block content_bottom %}
{% if page.website %}
<div class="project--website">
<a href="{{ page.website }}" class="btn btn-primary">View the website</a>
</div>
{% endif %}
{% if page.image %}
<div class="project--image">
<img src="/images/projects/{{ page.image }}" alt="The {{ page.title }} website.">
</div>
{% endif %}
{% endblock %}