Refactor templates to be more structured

This commit is contained in:
Tim
2023-12-23 23:56:18 +01:00
parent be5e457d1b
commit a5619e2307
15 changed files with 46 additions and 45 deletions

View File

@ -1,6 +1,6 @@
{% extends 'base/base.html.twig' %}
{% extends 'base/single.column.html.twig' %}
{% block title %}Edit {{ snip }}{% endblock %}
{% set title %}Edit {{ snip }}{% endset %}
{% block body %}
{% if snip.id %}
@ -13,6 +13,5 @@
<i class="fa fa-list"></i>
Index
</a><br><br>
<h2>Editing {{ snip }}</h2>
{{ form(form) }}
{% endblock %}

View File

@ -1,9 +1,6 @@
{% extends 'base/base.html.twig' %}
{% block title %}{{ title }}{% endblock %}
{% extends 'base/single.column.html.twig' %}
{% block body %}
<h1>{{ title }}</h1>
<a class="btn btn-success" href="{{ path('snip_new') }}">
<i class="fa fa-plus"></i> Add
</a>

View File

@ -1,6 +1,6 @@
{% extends 'base/base.html.twig' %}
{% extends 'base/single.column.html.twig' %}
{% block title %}Snip {{ snip }}{% endblock %}
{% set title %}Snip {{ snip }}{% endset %}
{% block body %}
<a href="{{ path('snip_index') }}" class="btn btn-primary">