Refactor templates to be more structured
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}SNIPS{% endblock %}</title>
|
||||
<title>{% if title is defined %}{{ title }}{% else %}SNIPS{% endif %}</title>
|
||||
<link rel="shortcut icon" type="image/jpg" href="/favicon.png">
|
||||
|
||||
{% block css %}
|
||||
@ -37,19 +37,7 @@
|
||||
</div>
|
||||
|
||||
{# body blocks #}
|
||||
{% block bodyraw %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm mx-auto">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
{% if block('body2') is defined %}
|
||||
<div class="col-sm mx-auto">
|
||||
{{ block('body2') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
{# javascript block #}
|
||||
|
8
templates/base/container.html.twig
Normal file
8
templates/base/container.html.twig
Normal file
@ -0,0 +1,8 @@
|
||||
{% extends 'base/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
{% block container %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
10
templates/base/single.column.html.twig
Normal file
10
templates/base/single.column.html.twig
Normal file
@ -0,0 +1,10 @@
|
||||
{% extends 'base/container.html.twig' %}
|
||||
|
||||
{% block container %}
|
||||
<div class="row">
|
||||
<div class="col-sm mx-auto">
|
||||
{% if title is defined %}<h3>{{ title }}</h3>{% endif %}
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user