Browse Source

update page subTitle

develop
Simon Vieille 1 week ago
parent
commit
4fa4a235a0
  1. 10
      templates/base.html.twig
  2. 42
      templates/page/category/default.html.twig
  3. 6
      templates/page/post/default.html.twig
  4. 6
      templates/page/simple/default.html.twig
  5. 6
      templates/page/titled/default.html.twig

10
templates/base.html.twig

@ -84,9 +84,13 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
</h1>
{% block page_subtitle %}
<p class="h3">
{{- 'DevOp animé par la culture du libre et du hacking' -}}
</p>
{% set pageSubTitle = pageSubTitle ?? null %}
{% if pageSubTitle %}
<p class="h3">
{{- pageSubTitle|raw -}}
</p>
{% endif %}
{% endblock %}
</div>
</div>

42
templates/page/category/default.html.twig

@ -5,7 +5,7 @@
{% endblock %}
{% block meta_description %}
{{- parent()|build_string(post) -}}
{{- parent()|build_string(category) -}}
{% endblock %}
{% block page_title %}
@ -13,18 +13,34 @@
{% endblock %}
{% block page_subtitle %}
{{- parent()|build_string(category) -}}
{% set pageSubTitle = _page.subTitle.value|build_string(category) %}
{{- parent() -}}
{% endblock %}
{% block pager %}
{{ include('module/_pager.html.twig', {
route: _node.routeName,
routeParams: {
category: category.id,
slug: category.slug,
_domain: _domain,
},
pages: pager.paginationData.endPage,
currentPage: pager.paginationData.current
}) }}
{% block body %}
{% for post in pager %}
{% if not loop.first %}
<hr class="col-12">
{% endif %}
{{ include('page/post/_post.html.twig', {post: post}) }}
{% endfor %}
{% if pager.getPaginationData.pageCount > 1 %}
<div class="col-12">
<div class="body">
<div class="pager align-right">
{% block pager %}
{{ include('module/_pager.html.twig', {
route: _node.routeName,
routeParams: {_domain: _domain},
pages: pager.paginationData.endPage,
currentPage: pager.paginationData.current
}) }}
{% endblock %}
</div>
</div>
</div>
{% endif %}
{% endblock %}

6
templates/page/post/default.html.twig

@ -1,14 +1,14 @@
{% extends "page/titled/default.html.twig" %}
{%- block meta_title -%}
{%- block page_title -%}
{{- parent()|build_string(post) -}}
{% endblock %}
{% block meta_description %}
{%- block meta_title -%}
{{- parent()|build_string(post) -}}
{% endblock %}
{% block page_title %}
{% block meta_description %}
{{- parent()|build_string(post) -}}
{% endblock %}

6
templates/page/simple/default.html.twig

@ -4,12 +4,6 @@
{{- _page.title.value -}}
{% endblock %}
{% block page_subtitle %}
<p class="h3">
{{- _page.subTitle.value -}}
</p>
{% endblock %}
{% block body %}
<div class="col-12">
<div class="body">

6
templates/page/titled/default.html.twig

@ -5,9 +5,9 @@
{% endblock %}
{% block page_subtitle %}
<p class="h3">
{{- _page.subTitle.value -}}
</p>
{% set pageSubTitle = pageSubTitle ?? _page.subTitle.value %}
{{- parent() -}}
{% endblock %}
{% block body %}

Loading…
Cancel
Save