123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- {% extends "base.html" %}
- {% block html_lang %}{{ article.lang }}{% endblock %}
- {% block extra_head %}
- <meta name="author" content="{{ article.author }}">
- <meta name="keywords" content="{{ article.tags|join(',')|escape }}">
- <script src="/hashover-next/api/count-link.php{% if article.lang != 'es' %}?nodefault{% endif%}"></script>
- {% endblock %}
- {% block head %}
- {{ super() }}
- {% import 'translations.html' as translations with context %}
- {% if translations.entry_hreflang(article) %}
- {{ translations.entry_hreflang(article) }}
- {% endif %}
- <meta property="og:title" content="{{ article.title|striptags }}">
- <meta property="og:type" content="article">
- <meta property="og:url" content="{{ SITEURL }}/{{ article.url }}">
- <meta property="article:published_time" content="{{ article.date.isoformat() }}">
- {% if article.modified %}
- <meta property="article:modified_time" content="{{ article.modified.isoformat() }}">
- {% endif %}
- <meta property="article:section" content="{{ article.category }}">
- {% set og_description = article.summary.split(ANOTHER_READ_MORE_LINK_FORMAT[:6])[0][3:]|striptags|escape %}
- {% set OG_DESC_LENGTH = 175 %}
- {% if og_description|length >= OG_DESC_LENGTH %}
- {# Quita la última palabra para no dejarla incompleta #}
- {% set og_description = og_description[:OG_DESC_LENGTH].split(' ')[:-1]|join(' ') %}
- {% if not og_description[-1] in ['.', '?', ':', '!'] %}
- {% set og_description = og_description + '…' %}
- {% endif %}
- {% endif %}
- <meta property="og:description" content="{{ og_description }}">
- {% if article.image %}
- <meta property="og:image" content="{{ article.image.split('"')[1] }}">
- {% endif %}
- {% for tag in article.tags %}
- <meta property="og:tag" content="{{ tag | escape }}">
- {% endfor %}
- {% if article.styles %}
- {% for style in article.styles %}
- {{ style|format(SITEURL) }}
- {% endfor %}
- {% endif %}
- {% if article.js %}
- {% for script in article.js %}
- {% if 'top' in script[-7:] %}
- {{ script[:-5]|format(SITEURL) }}
- {% endif %}
- {% endfor %}
- {% endif %}
- {% if (article.next_article and article.next_article.image) or (article.prev_article and article.prev_article.image) %}
- <style>
- {% if article.next_article.image %}
- .post-navigation .nav-next { background-image: url({{ article.next_article.image.split('"')[1] if article.next_article.image }}); border-top: 0; }
- .post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; }
- .post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); }
- {% endif %}
- {% if article.prev_article.image %}
- .post-navigation .nav-previous { background-image: url({{ article.prev_article.image.split('"')[1] if article.prev_article.image }}); }
- .post-navigation .nav-previous .post-title, .post-navigation .nav-previous a:hover .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; }
- .post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); }
- {% endif %}
- </style>
- {% endif %}
- {% endblock %}
- {% block title %}{{ article.title|striptags }}{% endblock %}
- {% block content %}
- {% if article.image %}
- <article class="has-post-thumbnail post type-post status-publish format-standard hentry">
- <a class="post-thumbnail" href="{{ SITEURL }}/{{ article.url }}" aria-hidden="true">
- {{ article.image }}
- </a>
- {% else %}
- <article class="post type-post status-publish format-standard hentry">
- {% endif %}
- <header class="entry-header">
- <h1 class="entry-title" id="titulo">{{ article.title }}</h1>
- </header>
- <div class="entry-content">
- {{ article.content }}
- </div><!-- /.entry-content -->
- {% include 'article_info.html' %}
- </article>
- {% if article.prev_article or article.next_article %}
- <div class="navigation post-navigation" role="navigation">
- <h2 class="screen-reader-text">{{ _('Navegación de entradas') }} </h2>
- <div class="nav-links">
- {% if article.prev_article %}
- <div class="nav-previous">
- <a accesskey="A" href="{{ SITEURL }}/{{ article.prev_article.url }}" rel="prev">
- <span class="meta-nav" aria-hidden="true">{{ _('Anterior') }}</span>
- <span class="screen-reader-text">{{ _('Entrada anterior:') }}</span>
- <span class="post-title">{{ article.prev_article.title }}</span>
- </a>
- </div>
- {% endif %}
- {% if article.next_article %}
- <div class="nav-next">
- <a accesskey="S" href="{{ SITEURL }}/{{ article.next_article.url }}" rel="next">
- <span class="meta-nav" aria-hidden="true">{{ _('Siguiente') }}</span>
- <span class="screen-reader-text">{{ _('Entrada siguiente:') }}</span>
- <span class="post-title">{{ article.next_article.title }}</span>
- </a>
- </div>
- {% endif %}
- </div>
- </div>
- {% endif %}
- <div id="hashover" class="comments-area">
- <h2>{{ _('Comentarios') }}</h2>
- {% if DEFAULT_LANG == 'es' %}
- <script src="/hashover-next/comments.php"></script>
- {% else %}
- <script src="/hashover-next/loader.php"></script>
- <script>
- var hashover = new HashOver ('hashover', {
- settings: {
- language: '{{ HASHOVER_LANG }}',
- }
- });
- var countLink = new HashOverCountLink ({
- language: '{{ HASHOVER_LANG }}',
- });
- </script>
- {% endif %}
- <noscript>
- <p>{% trans trimmed abre_enlace='<a href="mailto:jorgesumle@freakspot.net?subject=Comentario_«%(titulo_art)s»">'|format(titulo_art=article.title|striptags|replace(' ', '%20')), cierra_enlace='</a>' %}
- Lo siento, el sistema de comentarios no funciona sin JavaScript. Si
- quieres, puedes {{ abre_enlace }}enviar tu comentario por correo
- electrónico{{ cierra_enlace }}. El comentario será publicado en el espacio
- reservado a comentarios de esta página.{% endtrans %}</p>
- </noscript>
- </div>
- {% endblock %}
|