diff --git a/libretube-theme/templates/archives.html b/libretube-theme/templates/archives.html index d099ed3..8374a58 100644 --- a/libretube-theme/templates/archives.html +++ b/libretube-theme/templates/archives.html @@ -1,63 +1,54 @@ {% extends "base.html" %} -{% block extra_head %} - - - - - - +{% block head %} + {% block title %} + {{ _('Archivos de %(sitename)s', sitename=SITENAME) }} + {% endblock %} + {{ super() }} + {% block seo %} + + + + {% endblock %} {% endblock %} -{% block title %}{% trans %}Archivos de {{ SITENAME }}{% endtrans %}{% endblock %} {% block content %} - - -
diff --git a/libretube-theme/templates/article.html b/libretube-theme/templates/article.html index 9d23e80..d2450c4 100644 --- a/libretube-theme/templates/article.html +++ b/libretube-theme/templates/article.html @@ -1,72 +1,76 @@ {% extends "base.html" %} - {% block html_lang %}{{ article.lang }}{% endblock %} -{% block extra_head %} - - -{% endblock %} - -{% block extra_comment %} - -{% endblock %} - {% block head %} + {% block title %} + {{ article.title }} - {{SITENAME}} + {% endblock %} {{ super() }} {% import 'translations.html' as translations with context %} {% if translations.entry_hreflang(article) %} {{ translations.entry_hreflang(article) }} {% endif %} - - - - - - - {% if article.modified %} - - {% endif %} - - {% 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 %} - - - {% if article.image %} - - - {% elif OPEN_GRAPH_IMAGE %} - - {% endif %} - - {% if article.og_video %} - - - - - - {% endif %} - - {% for tag in article.tags %} - - {% endfor %} - + + + {% if article.styles %} {% for style in article.styles %} {{ style }} {% endfor %} {% endif %} - + {% block seo %} + {% set seo_description = article.summary|striptags %} + {% set SEO_DESC_LENGTH = 175 %} + {% if seo_description|length >= SEO_DESC_LENGTH %} + {# Quita la última palabra para no dejarla incompleta #} + {% set seo_description = seo_description[:SEO_DESC_LENGTH].split(' ')[:-1]|join(' ') %} + {% if not seo_description[-1] in ['.', '?', ':', '!'] %} + {% set seo_more = seo_description + '…' %} + {% set seo_description = seo_more|replace('"','') %} + {% endif %} + {% endif %} + + + + + + + {% if article.modified %} + + {% endif %} + + + + + + + + + + + + {% for tag in article.tags %} + + {% endfor %} + {% if article.og_video %} + + + + + + + + {% endif %} + + + + + + + {% endblock %} {% endblock %} -{% block title %}{{ article.title|striptags }}{% endblock %} -{% block menu_header %}{% endblock menu_header %} +{% block menu_header %} {% endblock menu_header %} {%- block content -%} diff --git a/libretube-theme/templates/author.html b/libretube-theme/templates/author.html index 7672f30..ba1b2d9 100644 --- a/libretube-theme/templates/author.html +++ b/libretube-theme/templates/author.html @@ -1,17 +1,23 @@ -{% extends "index.html" %} +{% extends "base.html" %} -{% block extra_head %} - - - - +{% block head %} + {% block title %} + {{ _('Artículos escritos por %(author)s en %(sitename)s', author=author, sitename=SITENAME) }} + {% endblock %} + {{ super() }} + {% block seo %} + + + + + + {% endblock %} {% endblock %} -{% block title %}{{ SITENAME }} - {{ author }}{% endblock %} {% block menu_header %}{% endblock menu_header %} {% block content %} diff --git a/libretube-theme/templates/authors.html b/libretube-theme/templates/authors.html index 146ad20..f7428b6 100644 --- a/libretube-theme/templates/authors.html +++ b/libretube-theme/templates/authors.html @@ -1,11 +1,26 @@ {% extends "base.html" %} -{% block extra_head %} - - -{% endblock %} +{% block head %} + {% block title %} + {{ _('Créditos de %(sitename)s', sitename=SITENAME) }} + {% endblock %} + {{ super() }} + {% block seo %} + + -{% block title %}{% trans %}Autores de {{ SITENAME }}{% endtrans %}{% endblock %} + + + + + + + + + + + {% endblock %} +{% endblock %} {% block content %} diff --git a/libretube-theme/templates/base.html b/libretube-theme/templates/base.html index 952fa5f..6c8780a 100644 --- a/libretube-theme/templates/base.html +++ b/libretube-theme/templates/base.html @@ -2,35 +2,24 @@ {% block head %} - - - - {% block title %}{{ SITENAME }}{% endblock title %} + + + + + {% block extra_head %} - {% set SITE_DESCRIPTION = _('Videoteca de software libre brindando avance tecnológico') %} - - - - - {% endblock %} - - + - - - - - - - {% block extra_comment %} - {% endblock %} - + + + + {% endblock head %} @@ -70,7 +59,6 @@
{% block menu_header %} - {% if DISPLAY_PAGES_ON_MENU %}

{% endif %} - {% endblock menu_header %} - {%- block content -%} diff --git a/libretube-theme/templates/index.html b/libretube-theme/templates/index.html index 659f7b4..8a1d5ad 100644 --- a/libretube-theme/templates/index.html +++ b/libretube-theme/templates/index.html @@ -1,15 +1,36 @@ {% extends "base.html" %} -{% block extra_head %} +{% block head %} + {% block title %} + {% if articles_page.number != 1 %}{{ _('Página') }} {{ articles_page.number }} | {% endif %}{{ SITENAME }} + {% endblock %} {{ super() }} {% if lang_siteurls and articles_page.number == 1 %} {% for lang, url in lang_siteurls.items() %} {% endfor %} {% endif %} + + {% block seo %} + {% set SITE_DESCRIPTION = _('Videoteca de software libre brindando avance tecnológico') %} + + + + + + + + + + + + + + + + {% endblock %} {% endblock %} -{% block title %}{{ SITENAME }}{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %} {% block sitename %}

{{ SITENAME }}

{{ SITESUBTITLE }}

diff --git a/libretube-theme/templates/page.html b/libretube-theme/templates/page.html index 1f769a2..47db027 100644 --- a/libretube-theme/templates/page.html +++ b/libretube-theme/templates/page.html @@ -2,25 +2,36 @@ {% block html_lang %}{{ page.lang }}{% endblock%} -{% block extra_head %} +{% block head %} + {% block title %} + {{ page.title }} - {{SITENAME}} + {% endblock %} {% import 'translations.html' as translations with context %} {% if translations.entry_hreflang(page) %} {{ translations.entry_hreflang(page) }} {% endif %} - -{% endblock %} - -{% block title %}{{ page.title }}{% endblock %} - -{% block head %} {{ super() }} - {% if page.styles %} {% for style in page.styles %} {{ style }} {% endfor %} {% endif %} - + {% block seo %} + + + + + + + + + + + + + + + {% endblock %} {% endblock head %} {%- block content -%} diff --git a/libretube-theme/templates/period_archives.html b/libretube-theme/templates/period_archives.html index 94b382a..3ff1ca2 100644 --- a/libretube-theme/templates/period_archives.html +++ b/libretube-theme/templates/period_archives.html @@ -1,5 +1,19 @@ {% extends "base.html" %} +{% block head %} + {% block title %} + {% set len_period = period|length %} + {%- if len_period == 1 -%} + {{ _('Archivos de %(año)d', año=period[0]) }} - {{SITENAME}} + {%- elif len_period == 2 -%} + {{ _('Archivos de %(mes)s de %(año)d', año=period[0], mes=period[1]) }} - {{SITENAME}} + {%- elif len_period == 3 -%} + {{ _('Archivos del %(dia)d de %(mes)s de %(año)d', año=period[0], mes=period[1], dia=period[2]) }} - {{SITENAME}} + {%- endif -%} + {% endblock %} + {{ super() }} +{% endblock %} + {% block menu_header %}{% endblock menu_header %} {% block content %}