diff options
author | Jesús <heckyel@hyperbola.info> | 2019-11-24 19:41:06 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-11-24 19:41:06 -0500 |
commit | cc258652834dab6676e1ca09ea529f16833c0e05 (patch) | |
tree | edf75a59442dfcc882d5001b81ed8821fd98667c | |
parent | 0802d06a2284d67a3473482ae03c43960a2b370a (diff) | |
download | cl-cc258652834dab6676e1ca09ea529f16833c0e05.tar.lz cl-cc258652834dab6676e1ca09ea529f16833c0e05.tar.xz cl-cc258652834dab6676e1ca09ea529f16833c0e05.zip |
Add single Schema
-rw-r--r-- | cl-theme/static/css/style.css | 7 | ||||
-rw-r--r-- | cl-theme/templates/article.html | 6 | ||||
-rw-r--r-- | cl-theme/templates/article_info.html | 33 | ||||
-rw-r--r-- | cl-theme/templates/base.html | 50 | ||||
-rw-r--r-- | cl-theme/templates/base_info.html | 45 | ||||
-rw-r--r-- | cl-theme/templates/index.html | 2 | ||||
-rw-r--r-- | cl-theme/templates/page.html | 4 |
7 files changed, 90 insertions, 57 deletions
diff --git a/cl-theme/static/css/style.css b/cl-theme/static/css/style.css index 889ef99..f9da1f6 100644 --- a/cl-theme/static/css/style.css +++ b/cl-theme/static/css/style.css @@ -578,6 +578,13 @@ h4 > a:hover { } } +/* hidden text more */ +.hidden-more { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + /* aplaylist */ .play-menu { height: 200px; diff --git a/cl-theme/templates/article.html b/cl-theme/templates/article.html index 92c91ba..9636ebc 100644 --- a/cl-theme/templates/article.html +++ b/cl-theme/templates/article.html @@ -68,12 +68,12 @@ <!-- start of posts --> <div class="columns is-multiline is-centered"> <!-- start of post --> - <article class="column is-10"> + <article class="column is-10" itemscope itemtype="https://schema.org/CreativeWork"> <div class="card"> <!-- post header --> <div class="card-content-header"> - <h2 class="title is-4 has-text-centered" id="titulo">{{ article.title }}</h2> + <h2 class="title is-4 has-text-centered" id="titulo" itemprop="name">{{ article.title }}</h2> </div> <!-- end of post header --> @@ -82,7 +82,7 @@ <div class="content"> <div class="card-inner-wrapper"> <!-- post text --> - <div class="card-content-text has-text-justified"> + <div class="card-content-text has-text-justified" itemprop="text"> {% if article.toc %} <nav class="toc"> {{ article.toc }} diff --git a/cl-theme/templates/article_info.html b/cl-theme/templates/article_info.html index 16e5d2f..02e1e83 100644 --- a/cl-theme/templates/article_info.html +++ b/cl-theme/templates/article_info.html @@ -3,7 +3,26 @@ <div class="column has-text-left"> <a class="button is-small is-button-grey" href="{{ SITEURL }}/">{{ _('Regresar al Inicio') }}</a> </div> - <div class="column has-text-right"> + + {% if article.modified %} + <div class="column has-text-centered"> + <p> + <span class="soumaicon"> + <svg> + <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar"></use> + </svg> + </span> + <span class="edit-link" title="{{ _('Fecha de modificación') }}"> + <small class="screen-reader-text">{{ _('Modificado el') }} </small> + <time class="updated" datetime="{{ article.modified.isoformat() }}" itemprop="dateModified"> + <small>{{ article.locale_modified }}</small> + </time> + </span> + </p> + </div> + {% endif %} + + <div class="column has-text-right hidden-more"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" /> @@ -12,7 +31,7 @@ {% set año = article.date|strftime('%Y') %} {% set mes = article.date|strftime('%m') %} {% set nombre_mes = article.date|strftime('%B') %} - <time class="entry-date published" + <time class="entry-date published" itemprop="datePublished" datetime="{{ article.date.isoformat() }}"> <small> {{ article.date|strftime('%a %-d') }} @@ -33,10 +52,12 @@ </svg> </span> {% for author in article.authors %} - <small> - <a href="{{ SITEURL }}/{{ author.url }}" - title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %} - </small> + <span itemprop='author' itemscope itemtype="https://schema.org/Person" > + <small itemprop="name"> + <a href="{{ SITEURL }}/{{ author.url }}" itemprop="url" + title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %} + </small> + </span> {% endfor %} {% endif %} diff --git a/cl-theme/templates/base.html b/cl-theme/templates/base.html index 5749808..e2ae996 100644 --- a/cl-theme/templates/base.html +++ b/cl-theme/templates/base.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}"> - <head prefix="og: http://ogp.me/ns# {% if article %}article: http://ogp.me/ns/article#{% endif%}"> + <head prefix="og: https://ogp.me/ns#{% if article %} article: https://ogp.me/ns/article#{% endif%}"> {% set SITESUBTITLE = _('Sitio de información sobre Software Libre') %} {% block head %} @@ -56,7 +56,7 @@ </head> <body> <!-- navigation --> - <header class="navigation"> + <header class="navigation" itemscope itemtype="https://schema.org/WPHeader"> <nav class="navbar"> <div class="container"> <!-- nav site title --> @@ -82,12 +82,12 @@ {% if DISPLAY_PAGES_ON_MENU %} <div id="navMenu" class="navbar-menu"> <ul class="navbar-end"> - <li><a href="{{ SITEURL }}/" class="navbar-item is-tab {% if output_file == 'index.html' %} is-active{% endif %}">{{ _('Inicio') }}</a></li> + <li><a itemprop="url" href="{{ SITEURL }}/" class="navbar-item is-tab {% if output_file == 'index.html' %} is-active{% endif %}">{{ _('Inicio') }}</a></li> {% for p in pages %} - <li><a href="{{ SITEURL }}/{{ p.url }}" class="navbar-item is-tab {% if p == page %} is-active{% endif %}">{{ p.title }}</a></li> + <li><a itemprop="url" href="{{ SITEURL }}/{{ p.url }}" class="navbar-item is-tab {% if p == page %} is-active{% endif %}">{{ p.title }}</a></li> {% endfor %} - <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL }}" class="navbar-item is-tab {% if output_file == ARCHIVES_SAVE_AS %} is-active {% endif %}">{{ _('Archivos') }}</a></li> - <li><a href="{{ SITEURL }}/{{ AUTHORS_URL }}" class="navbar-item is-tab {% if output_file == AUTHORS_SAVE_AS %} is-active{% endif %}">{{ _('Créditos') }}</a></li> + <li><a itemprop="url" href="{{ SITEURL }}/{{ ARCHIVES_URL }}" class="navbar-item is-tab {% if output_file == ARCHIVES_SAVE_AS %} is-active {% endif %}">{{ _('Archivos') }}</a></li> + <li><a itemprop="url" href="{{ SITEURL }}/{{ AUTHORS_URL }}" class="navbar-item is-tab {% if output_file == AUTHORS_SAVE_AS %} is-active{% endif %}">{{ _('Créditos') }}</a></li> </ul> </div> {% endif %} @@ -102,10 +102,10 @@ <section class="hero"> <div class="hero-body"> <div class="container"> - <div class="has-text-centered"> + <div class="has-text-centered" itemscope itemtype="https://schema.org/Blog"> {%- block sitename -%} <!-- header && subheader --> - <h1 class="title is-1 is-spaced">{{ SITENAME }}</h1> + <h1 class="title is-1 is-spaced" itemprop="name">{{ SITENAME }}</h1> <p class="subtitle is-4">{{ SITESUBTITLE }}</p> {%- endblock -%} @@ -141,14 +141,14 @@ <div class="columns is-multiline is-centered has-text-centered"> <!-- start of post --> {% for article in articles_page.object_list %} - <article class="column is-4"> + <article class="column is-4" itemscope itemtype="https://schema.org/CreativeWork"> <div class="card"> <!-- image for post --> {% if article.image %} <div class="card-image"> <a href="{{ SITEURL }}/{{ article.url }}#titulo"> <figure class="image ihover circle3"> - <img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}" alt="{{ article.title }}"> + <img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}" alt="{{ article.title }}" itemprop="image"> </figure> </a> </div> @@ -156,7 +156,7 @@ <div class="card-image"> <a href="{{ SITEURL }}/{{ article.url }}#titulo"> <figure class="image ihover circle3"> - <img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/background/745x372.png" alt="Image"> + <img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/background/745x372.png" alt="Image" itemprop="image"> </figure> </a> </div> @@ -165,7 +165,7 @@ <!-- post header --> <div class="card-content-header"> - <h4 class="title is-4"><a href="{{ SITEURL }}/{{ article.url }}#titulo" rel="bookmark" title="{{ _('Enlace a %(articulo)s', articulo=article.title|striptags) }}">{{ article.title }}</a></h4> + <h4 class="title is-4" itemprop="headline"><a href="{{ SITEURL }}/{{ article.url }}#titulo" rel="bookmark" title="{{ _('Enlace a %(articulo)s', articulo=article.title|striptags) }}">{{ article.title }}</a></h4> </div> <!-- end of post header --> @@ -220,11 +220,11 @@ <!-- end of page content --> <!-- .site-content --> - <footer class="footer footer-top-shadow"> + <footer class="footer footer-top-shadow" itemscope itemtype="https://schema.org/WPFooter"> <!-- header nav content --> - <div class="navbar is-social-center"> - <a class="navbar-item" href="{{ SOCIAL['diaspora'] }}"> + <div class="navbar is-social-center" itemscope itemtype="https://schema.org/FollowAction"> + <a class="navbar-item" href="{{ SOCIAL['diaspora'] }}" itemprop="followee"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#diaspora"/> @@ -232,7 +232,7 @@ </svg> </span> </a> - <a class="navbar-item" href="{{ SOCIAL['gnusocial'] }}"> + <a class="navbar-item" href="{{ SOCIAL['gnusocial'] }}" itemprop="followee"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#gnusocial"/> @@ -240,7 +240,7 @@ </svg> </span> </a> - <a class="navbar-item" href="{{ SOCIAL['pump'] }}"> + <a class="navbar-item" href="{{ SOCIAL['pump'] }}" itemprop="followee"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#pump"/> @@ -248,7 +248,7 @@ </svg> </span> </a> - <a class="navbar-item" href="{{ SOCIAL['pixelfed'] }}"> + <a class="navbar-item" href="{{ SOCIAL['pixelfed'] }}" itemprop="followee"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#pixelfed"/> @@ -256,7 +256,7 @@ </svg> </span> </a> - <a class="navbar-item" href="{{ SOCIAL['peertube'] }}"> + <a class="navbar-item" href="{{ SOCIAL['peertube'] }}" itemprop="followee"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#peertube"/> @@ -264,7 +264,7 @@ </svg> </span> </a> - <a class="navbar-item" href="{{ SOCIAL['mediagoblin'] }}"> + <a class="navbar-item" href="{{ SOCIAL['mediagoblin'] }}" itemprop="followee"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#mediagoblin"/> @@ -272,7 +272,7 @@ </svg> </span> </a> - <a class="navbar-item" href="{{ SOCIAL['matrix'] }}"> + <a class="navbar-item" href="{{ SOCIAL['matrix'] }}" itemprop="followee"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#matrix"/> @@ -281,7 +281,7 @@ </span> </a> {% if FEED_ALL_ATOM %} - <a class="navbar-item" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" rel="alternate" type="application/atom+xml"> + <a class="navbar-item" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" rel="alternate" type="application/atom+xml" itemprop="url"> <span class="soumaicon"> <svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#rss"/> @@ -298,8 +298,8 @@ <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#libregit"/> </svg> </span> - <p>{{ _('Escrito por') }} - <a href="https://libregit.org/heckyel">libregit.org/heckyel</a> + <p itemprop='author' itemscope itemtype="https://schema.org/Person">{{ _('Escrito por') }} + <a itemprop="url" href="https://libregit.org/heckyel">libregit.org/heckyel</a> </p> <p>{{ _('Este sitio es Software Libre') }}</p> <p> @@ -311,7 +311,7 @@ </span> </p> <p> - <a href="{{ SITEURL }}/pages/librejs.html" data-jslicense="1">{{ _('Licencias de JavaScript') }}</a> + <a itemprop="license" href="{{ SITEURL }}/pages/librejs.html" data-jslicense="1">{{ _('Licencias de JavaScript') }}</a> </p> </div> </footer> diff --git a/cl-theme/templates/base_info.html b/cl-theme/templates/base_info.html index 29470b2..568dabb 100644 --- a/cl-theme/templates/base_info.html +++ b/cl-theme/templates/base_info.html @@ -8,7 +8,7 @@ {% set año = article.date|strftime('%Y') %} {% set mes = article.date|strftime('%m') %} {% set nombre_mes = article.date|strftime('%B') %} - <time class="entry-date published" + <time class="entry-date published" itemprop="datePublished" datetime="{{ article.date.isoformat() }}"> <small> {{ article.date|strftime('%a %-d') }} @@ -23,29 +23,34 @@ </time> {% if article.modified %} - <span class="soumaicon"> - <svg> - <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" /> - </svg> - </span> - <span class="edit-link" - title="{{ _('Fecha de modificación') }}"> - <small class="screen-reader-text">{{ _('Modificado el %(fecha)s'|format(fecha='</small> - <time class="updated" datetime="%s"><small>%s</small></time>')|format(article.modified.isoformat(), article.locale_modified)) }} - </span> + <p> + <span class="soumaicon"> + <svg> + <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar"></use> + </svg> + </span> + <span class="edit-link" title="{{ _('Fecha de modificación') }}"> + <small class="screen-reader-text">{{ _('Modificado el') }} </small> + <time class="updated" datetime="{{ article.modified.isoformat() }}" itemprop="dateModified"> + <small>{{ article.locale_modified }}</small> + </time> + </span> + </p> {% endif %} {% if not HIDE_AUTHORS and article.authors %} - <span class="soumaicon"> - <svg> - <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#user" /> - </svg> - </span> {% for author in article.authors %} - <small> - <a href="{{ SITEURL }}/{{ author.url }}" - title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %} - </small> + <p itemprop='author' itemscope itemtype="https://schema.org/Person"> + <span class="soumaicon"> + <svg> + <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#user" /> + </svg> + </span> + <small itemprop="name"> + <a href="{{ SITEURL }}/{{ author.url }}" itemprop="url" + title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %} + </small> + </p> {% endfor %} {% endif %} diff --git a/cl-theme/templates/index.html b/cl-theme/templates/index.html index 21ea3a0..bc1f217 100644 --- a/cl-theme/templates/index.html +++ b/cl-theme/templates/index.html @@ -33,6 +33,6 @@ {% endblock %} {% block sitename %} - <h1 class="title is-1 is-spaced">{{ SITENAME }}</h1> + <h1 class="title is-1 is-spaced" itemprop="name">{{ SITENAME }}</h1> <p class="subtitle is-4">{{ SITESUBTITLE }}</p> {% endblock %} diff --git a/cl-theme/templates/page.html b/cl-theme/templates/page.html index 31e8bf0..0f74eec 100644 --- a/cl-theme/templates/page.html +++ b/cl-theme/templates/page.html @@ -48,11 +48,11 @@ <!-- start of pages --> <div class="columns is-multiline is-centered"> <!-- start of page --> - <div class="column is-7"> + <div class="column is-7" itemscope itemtype="https://schema.org/CreativeWork"> <div class="card"> <!-- post header --> <div class="card-content-header"> - <h4 class="title is-4 has-text-centered">{{ page.title }}</h4> + <h2 class="title is-4 has-text-centered" itemprop="name">{{ page.title }}</h2> </div> <!-- end of post header --> <!-- post content --> |