From f35a7b0e70032de2feec9f3bda09da44cf0e1073 Mon Sep 17 00:00:00 2001 From: srv Date: Mon, 28 Apr 2025 17:11:28 -0500 Subject: first commit --- libretube-theme/templates/article.html | 270 +++++++++++++++++++++++++++++++++ 1 file changed, 270 insertions(+) create mode 100644 libretube-theme/templates/article.html (limited to 'libretube-theme/templates/article.html') diff --git a/libretube-theme/templates/article.html b/libretube-theme/templates/article.html new file mode 100644 index 0000000..a29c95a --- /dev/null +++ b/libretube-theme/templates/article.html @@ -0,0 +1,270 @@ +{% extends "base.html" %} +{% block html_lang %}{{ article.lang }}{% 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.styles %} + {% for style in article.styles %} + {{ style }} + {% endfor %} + {% endif %} + {% block seo %} + {% set seo_description = article.summary|striptags %} + {% set SEO_DESC_LENGTH = 160 %} + {% 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 %} + + {% set article_image = "%s/%s/../wp-content/uploads/article/thumbnail/%s" % (SITEURL, THEME_STATIC_DIR, article.image) %} + + + + + + + + + + + + + {% if article.modified %} + + {% endif %} + + + + + + {% for tag in article.tags %} + + {% endfor %} + {% if article.og_video %} + + + + + + + + {% endif %} + + + + + + + {% endblock %} +{% endblock %} + +{% block menu_header %} {% endblock menu_header %} + +{%- block content -%} + +
+
+
+
+ + +
+ {{ article.content }} +
+ + + +
+
{{ _('Licencia') }}
+ {% if article.license == LICENSE['allrights']['name'] %} + + {{ article.license }} + + {% elif article.license == LICENSE['ccby4']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbysa4']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbynd4']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbync4']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbyncsa4']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbyncnd4']['name']%} + + {{ article.license }} + + {% elif article.license == LICENSE['ccby3']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbysa3']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbynd3']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbync3']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbyncsa3']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['ccbyncnd3']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['cc01']['name']%} + + {{ article.license }} + {% elif article.license == LICENSE['publicdomain']['name']%} + + {{ article.license }} + {% else %} + CC BY-SA 4.0 + {% endif %} +
+ + + +
+
+ +

+ {% if not HIDE_AUTHORS and article.authors %} + + + + + + {% for author in article.authors %} + {{ author }} + + + + + + + + {% endfor %} + {% endif %} +

+ + + {% set año = article.date|strftime('%Y') %} + {% set mes = article.date|strftime('%m') %} + {% set nombre_mes = article.date|strftime('%B') %} + + + +
+
+ + + +
+ + +
+ + +
+ + {% if SHOW_RECENT_POSTS %} + +
+ + + {% for article in articles[:SHOW_RECENT_POSTS] %} + + {% endfor %} + +
+ {% endif %} + +
+
+
+ +{%- endblock -%} + +{% block extend_js %} + + + + +{% endblock %} -- cgit v1.2.3