Plantilla de pagina automatizada para servicios, verifica las paginas hijas de servicios contra los item de menu servicios
This commit is contained in:
67
views/page-servicios.twig
Normal file
67
views/page-servicios.twig
Normal file
@@ -0,0 +1,67 @@
|
||||
{% extends "base.twig" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="page" class="{{post.slug}}">
|
||||
|
||||
<div class="page-header mb-5 pb-5" style="background-image:url({% if post.thumbnail %}{{post.thumbnail|resize(1440,400)}}{% else %}{{site.theme.link}}/public/img/cabecera-provisional.jpg{% endif %}); background-repeat:no-repeat; background-position:center center; background-size:cover;">
|
||||
<div class="overlay bg-gradient-1">
|
||||
<div class="container pb-5 h-100">
|
||||
<div class="d-flex h-100 justify-content-center align-items-end">
|
||||
<h1 class="title text-white">{{post.title}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content pb-3">
|
||||
<div class="container">
|
||||
|
||||
{#{post.content}#}
|
||||
|
||||
{% set servicio = [] %}
|
||||
{% for item in menu_old.items %}
|
||||
{% if item.slug == 'servicios' %}
|
||||
{% for subitem in item.children %}
|
||||
{% set servicio = servicio|merge([subitem.slug]) %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for item in servicios %}
|
||||
{% set icon = '' %}
|
||||
{% if item.slug in servicio %}
|
||||
{% if 'investigacion' in item.slug %}
|
||||
{% set icon = 'icono_investigacion3x.png' %}
|
||||
{% else %}
|
||||
{% set icon = 'icono_' ~ item.slug ~ '3x.png' %}
|
||||
{% endif %}
|
||||
{#<div class="d-block border-bottom-0 mb-5" style="background:url('{{site.theme.link}}/public/img/{{ icon }}') no-repeat 0 bottom;">
|
||||
|
||||
<div class="pl-5 ml-5">
|
||||
<h3><a href="{{ item.url }}" class="d-block font-weight-bold border-bottom-0 mb-2">{{ item.title }}</a></h3>
|
||||
<p>{{ item.content|striptags }}</p>
|
||||
<a href="{{ item.url }}"><small>Más información sobre <em>{{ item.title }}</em></small></a>
|
||||
</div>
|
||||
</div>#}
|
||||
|
||||
<div class="row {% if not loop.last and not is_mobile %}border-bottom{% endif %} py-md-5">
|
||||
|
||||
<div class="d-none d-md-block col-md-3">
|
||||
<img src="{{site.theme.link}}/public/img/{{ icon }}" />
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<h3><a href="{{ item.link }}" class="d-block font-weight-bold border-bottom-0 mb-2">{{ item.title }}</a></h3>
|
||||
<p>{{ item.content|striptags }}</p>
|
||||
<a href="{{ item.link }}"><small>Más información sobre <em>{{ item.title }}</em></small></a>
|
||||
</div>
|
||||
<div class="col d-block d-md-none linea linea-{{ item.slug }} my-5"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user