{% extends 'base.html.twig' %}
{% block opengraph %}
<meta property="og:title" content="{{ post.title }}" />
<meta property="og:url" content="{{ app.request.getSchemeAndHttpHost() ~ path('show_post', {'slug': post.slug, 'year': post.date.format('Y'), 'month': post.date.format('m'), 'day': post.date.format('d') }) }}" />
<meta property="og:image" content="{{ app.request.getSchemeAndHttpHost() ~ '/assets/blog/' ~ post.imageName }}" />
<meta property="og:type" content="article" />
<meta property="og:description" content="{{ post.content | striptags | truncate(100, true) | raw }}" />
<meta property="og:locale" content="{{ app.request.locale == 'es' ? 'es_ES' : 'en_GB' }}" />
<meta property="fb:app_id" content="173823370450020" />
{% endblock opengraph %}
{% block header %}
<!-- Header -->
<header class="header text-white pt-8 mt-10 h-250" style="background-image: url(/img/bg/fondo-hojas.png);" data-overlay="8">
<div class="container text-center">
<div class="row">
{#<div class="col-md-8 mx-auto">#}
{# <h1>Blog</h1>#}
{#</div>#}
</div>
</div>
</header><!-- /.header -->
{% endblock %}
{% block body %}
<div class="section">
<img style="position: absolute; height: 20%; top: 0;" src="/img/bg/degradado.png" alt="Degradado decorativo">
<div class="container">
<div class="text-center mt-8">
<h2 style="font-weight: 600; color: #4A4A4A; text-align: center;">{{ post.title }}</h2>
<p>{{ post.date | localizeddate('full', 'none', app.request.locale ) }} en {{ categoriesHtml | raw }} por {{ post.author }}</p>
</div>
<div class="text-center my-8">
<img class="rounded-md" style="max-width: 500px;" src="{{ asset('/assets/blog/'~ post.imageName) | imagine_filter('mode_image') }}" alt="Imagen relacionada con la publicación">
</div>
<div class="row">
<div class="col-lg-12 mx-auto">
<p class="lead">{{ post.excerpt }}</p>
<hr class="w-100px">
{{ post.content | raw }}
{% if post.galleries | length > 0 %}
<div class="media-meta">
<strong>Galeria(s):</strong>
<ul class="popup-gallery">
{% for gallery in post.galleries %}
<li>
{% set i = 1 %}
{% for image in gallery.images %}
{% if i == 1 %}
<a href="{{ asset('/assets/gallery/'~image.imageName ) }}" alt="{{ image.altText }}" title="{{ image.title }}">{{ gallery.title }}</a>
{% else %}
<a href="{{ asset('/assets/gallery/'~image.imageName ) }}" alt="{{ image.altText }}" title="{{ image.title }}" style="display: none;"></a>
{% endif %}
{% set i = i + 1 %}
{% endfor %}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if post.videos | length > 0 %}
<div class="media-meta">
<strong>Vídeo(s):</strong>
<ul>
{% for video in post.videos %}
<li><a href="{{ video.videoUrl }}" class="popup-{{ video.provider }}">{{ video.title }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div>
</div>
<img style="position: absolute; height: 20%; bottom: 0; right: 0; rotate: 180deg;" src="/img/bg/degradado.png" alt="Degradado decorativo">
</div>
{#<div class="section bg-gray">#}
{# <div class="container">#}
{# <div class="row">#}
{# <div class="col-lg-11 mx-auto">#}
{# {{ render(controller('App\\Controller\\Blog\\DefaultController::commentsAction', { 'post': post })) }}#}
{# {{ form_start(commentForm) }}#}
{# <div class="row">#}
{# <div class="form-group col-12 col-md-6">#}
{# {{ form_widget(commentForm.name) }}#}
{# {{ form_errors(commentForm.name) }}#}
{# </div>#}
{# <div class="form-group col-12 col-md-6">#}
{# {{ form_widget(commentForm.email) }}#}
{# {{ form_errors(commentForm.email) }}#}
{# </div>#}
{# </div>#}
{# <div class="form-group">#}
{# {{ form_widget(commentForm.message) }}#}
{# {{ form_errors(commentForm.message) }}#}
{# </div>#}
{# {{ form_widget(commentForm.submit, {'attr': {'class': 'btn-primary btn-block'}}) }}#}
{# {{ form_end(commentForm) }}#}
{# <form action="#" method="POST">#}
{# <div class="row">#}
{# <div class="form-group col-12 col-md-6">#}
{# <input class="form-control" type="text" placeholder="Name">#}
{# </div>#}
{# <div class="form-group col-12 col-md-6">#}
{# <input class="form-control" type="text" placeholder="Email">#}
{# </div>#}
{# </div>#}
{# <div class="form-group">#}
{# <textarea class="form-control" placeholder="Comment" rows="4"></textarea>#}
{# </div>#}
{# <button class="btn btn-primary btn-block" type="submit">Submit your comment</button>#}
{# </form> #}
{# </div>#}
{# </div>#}
{# </div>#}
{#</div>#}
{# <div id="blog_post" style="margin-top: 140px;">
<div class="container">
<div class="section_header" style="padding-bottom: 30px;">
<h3>Blog</h3>
</div>
<div class="row">
<div class="col-sm-8">
<img class="post_pic img-responsive" src="{{ asset('/assets/blog/'~ post.imageName) | imagine_filter('mode_image') }}" />
<div class="post_content">
<h2>{{ post.title }}</h2>
<span class="date">{{ post.date | localizeddate('full', 'none', app.request.locale ) }}</span>
<div class="meta"><strong>Publicado en:</strong> {{ categoriesHtml | raw }}</div>
<p><strong>{{ post.excerpt }}</strong></p>
{{ post.content | raw }}
<div class="author_box">
<div class="author">{{ post.author }}</div>
</div>
{% if post.galleries | length > 0 %}
<div class="media-meta">
<strong>Galeria(s):</strong>
<ul class="popup-gallery">
{% for gallery in post.galleries %}
<li>
{% set i = 1 %}
{% for image in gallery.images %}
{% if i == 1 %}
<a href="{{ asset('/assets/gallery/'~image.imageName ) }}" alt="{{ image.altText }}" title="{{ image.title }}">{{ gallery.title }}</a>
{% else %}
<a href="{{ asset('/assets/gallery/'~image.imageName ) }}" alt="{{ image.altText }}" title="{{ image.title }}" style="display: none;"></a>
{% endif %}
{% set i = i + 1 %}
{% endfor %}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if post.videos | length > 0 %}
<div class="media-meta">
<strong>Vídeo(s):</strong>
<ul>
{% for video in post.videos %}
<li><a href="{{ video.videoUrl }}" class="popup-{{ video.provider }}">{{ video.title }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="share-meta"><a href="javascript:void(0);" data-network="twitter" class="st-custom-button twitter" data-url="{{ app.request.uri }}" data-title="{{ post.title }} via @TenerifeBlueTra">Twitter</a><a href="javascript:void(0);" data-network="facebook" class="st-custom-button facebook" data-title="Entra en el Equipo Cajamar Tenerife Bluetrail 2017">Facebook</a><a href="javascript:void(0);" data-network="linkedin" class="st-custom-button linkedin" data-title="Entra en el Equipo Cajamar Tenerife Bluetrail 2017">LinkedIn</a><a href="javascript:void(0);" data-network="googleplus" class="st-custom-button googleplus" data-title="Entra en el Equipo Cajamar Tenerife Bluetrail 2017">Google +</a></div>
</div>
{{ render(controller('App\\Controller\\Blog\\DefaultController::commentsAction', { 'post': post })) }}
<div class="new_comment">
<h4>Añadir Comentario</h4>
{{ form_start(commentForm) }}
<div class="row">
<div class="col-sm-6">
{{ form_widget(commentForm.name) }}
{{ form_errors(commentForm.name) }}
</div>
<div class="col-sm-6">
{{ form_widget(commentForm.email) }}
{{ form_errors(commentForm.email) }}
</div>
</div>
<div class="row">
<div class="col-sm-12">
{{ form_widget(commentForm.message) }}
{{ form_errors(commentForm.message) }}
</div>
</div>
<div class="row">
<div class="col-sm-12">
{{ form_widget(commentForm.submit) }}
</div>
</div>
{{ form_end(commentForm) }}
</div>
</div>
<!-- SideBar -->
{% include 'blog/sidebar.html.twig' %}
</div>
</div>
</div> #}
{% endblock body %}
{% block background %} style="background: url('{{ asset('/assets/mode/'~mode.headerImageName) }}');"{% endblock background %}