Updated layouts
This commit is contained in:
parent
b016f82673
commit
964e8713a6
|
@ -60,7 +60,9 @@
|
|||
<div class="row">
|
||||
{% block content_wrapper %}
|
||||
<main class="col-md-9">
|
||||
{% block content_top %}{% endblock %}
|
||||
{% block content %}{% endblock %}
|
||||
{% block content_bottom %}{% endblock %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
|
|
5
source/_layouts/page.html.twig
Normal file
5
source/_layouts/page.html.twig
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends 'default' %}
|
||||
|
||||
{% block content_top %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% endblock %}
|
39
source/_layouts/project.html.twig
Normal file
39
source/_layouts/project.html.twig
Normal 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 %}
|
Reference in a new issue