<!DOCTYPE html>
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}">
    <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 %}

            <!-- Meta Base -->
            <meta charset="UTF-8"/>
            <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
            <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
            <meta name="HandheldFriendly" content="True"/>

            <!-- Feed -->
            {% if FEED_ALL_ATOM %}
                <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ _('Fuente completa de entradas Atom de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if FEED_ALL_RSS %}
                <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ _('Fuente completa de entradas RSS de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if FEED_ATOM %}
                <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ _('Fuente Atom de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if FEED_RSS %}
                <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ _('Fuente RSS de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if CATEGORY_FEED_ATOM and category %}
                <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ _('Fuente Atom de categorías de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if CATEGORY_FEED_RSS and category %}
                <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS.format(slug=category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ _('Fuente RSS de categorías de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if TAG_FEED_ATOM and tag %}
                <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM.format(slug=tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ _('Fuente Atom de etiquetas de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if TAG_FEED_RSS and tag %}
                <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS.format(slug=tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ _('Fuente RSS de etiquetas de %(sitename)s', sitename=SITENAME) }}"/>
            {% endif %}
            {% if TRANSLATION_FEED_ATOM %}
                {% for LANG in LANGS %}
                    {% set translation_feed = 'feeds/all-%s.atom.xml' % (LANG) %}
                    <link href="{{ FEED_DOMAIN }}/{{ translation_feed }}" type="application/atom+xml" rel="alternate" title="{{ _('Fuente Atom de idioma %(lang)s de %(sitename)s', lang=LANG, sitename=SITENAME) }}"/>
                {% endfor %}
            {% endif %}

            <!-- stylesheets -->
            <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bulma.css?v=0.7.4"/>
            <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/hover.css"/>
            <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.css?v=2.0.2"/>
            <!-- favicon -->
            <link rel="icon" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-16x16.png" sizes="16x16"/>
            <link rel="icon" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-32x32.png" sizes="32x32"/>
            <link rel="icon" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-96x96.png" sizes="96x96"/>
            <link rel="icon" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-192x192.png" sizes="192x192"/>
            <link rel="apple-touch-icon-precomposed" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-180x180.png"/>
        {% endblock head %}
    </head>
    <body>
        <!-- navigation -->
        <header class="navigation" itemscope itemtype="https://schema.org/WPHeader">
            <nav class="navbar">
                <div class="container">
                    <!-- nav site title -->
                    <!-- Input for menu-mobile with checkbox-->
                    <input id="navbar-toggle-cbox" type="checkbox">
                    <!-- End Input for menu-mobile with checkbox-->
                    <div class="navbar-brand">

                        <a class="navbar-item" href="{{ SITEURL }}/" rel="home">
                            <h3 class="title is-3 has-text-white">{{ SITENAME_SINGLE }}</h3>
                        </a>
                        <!-- this "navbar-burger" hamburger menu is only visible on mobile -->
                        <label class="nav__toggle" for="navbar-toggle-cbox">
                            <!-- Menu -->
                            <svg class="menu" viewBox="0 0 448 512" width="100">
                                <path
                                    d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"
                                />
                                <title>Bars</title>
                            </svg>
                            <!-- Close -->
                            <svg class="close" viewBox="0 0 384 512" width="100">
                                <path
                                    d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
                                />
                                <title>Close</title>
                            </svg>
                        </label>
                        <!-- end of burger -->
                    </div>

                    <!-- this "navbar-menu" is hidden on mobile -->
                    {% if DISPLAY_PAGES_ON_MENU %}
                        <div id="navMenu" class="navbar-menu">
                            <ul class="navbar-end">
                                <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 itemprop="url" href="{{ SITEURL }}/{{ p.url }}" class="navbar-item is-tab {% if p == page %} is-active{% endif %}">{{ p.title }}</a></li>
                                {% endfor %}
                                <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 %}
                    <!-- end of nav -->
                </div>
            </nav>
        </header>
        <!-- end navigation -->

        <!-- page header (title, etc) -->
        <div class="main-header">
            <section class="hero">
                <div class="hero-body">
                    <div class="container">
                        <div class="has-text-centered" itemscope itemtype="https://schema.org/Blog">
                            {%- block sitename -%}
                                <!-- header && subheader -->
                                <h1 class="title is-1 is-spaced" itemprop="name">{{ SITENAME }}</h1>
                                <p class="subtitle is-4">{{ SITESUBTITLE }}</p>
                            {%- endblock -%}

                            <!-- search form -->
                            <div class="column is-6 is-offset-3">
                                <div class="box has-background-black-ter">
                                    <form class="field has-addons" action="{{ SITEURL }}/buscar.php">
                                        <div class="control is-expanded">
                                            <input class="input has-text-centered"
                                                   type="search"
                                                   name="q" required
                                                   placeholder="{{ _('» » » » » » búscame « « « « « «') }}">
                                        </div>
                                        <input class="button is-dark" name="submit" value="{{ _('Buscar') }}" type="submit">
                                    </form>
                                </div>
                            </div>
                            <!-- end search form -->

                            <!-- end of header && subheader -->
                        </div>
                    </div>
                </div>
            </section>
        </div>
        <!-- end page header -->

        <!-- page content -->
        <main class="main-content">
            {%- block content -%}
                <div class="container">
                    <!-- start of posts -->
                    <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" 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 }}" itemprop="image">
                                                </figure>
                                            </a>
                                        </div>
                                    {% else %}
                                        <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" itemprop="image">
                                                </figure>
                                            </a>
                                        </div>
                                    {% endif %}
                                    <!-- end of image for post -->

                                    <!-- post header -->
                                    <div class="card-content-header">
                                        <h2 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></h2>
                                    </div>
                                    <!-- end of post header -->

                                    <!-- post content -->
                                    <div class="card-content">
                                        <div class="content social">
                                            <div class="navbar is-social-center">
                                                <a class="navbar-item" {% if article.gnusocial %}href="{{ article.gnusocial }}" rel="me noopener noreferrer" target="_blank" {% else %}href="#"{% endif %}>
                                                    <span class="soumaicon">
                                                        <svg>
                                                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#gnusocial" />
                                                            <title>GNUSocial</title>
                                                        </svg>
                                                    </span>
                                                </a>
                                                <a class="navbar-item" {% if article.diaspora %}href="{{ article.diaspora }}" rel="me noopener noreferrer" target="_blank" {% else %}href="#"{% endif %}>
                                                    <span class="soumaicon">
                                                        <svg>
                                                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#diaspora" />
                                                            <title>Diaspora</title>
                                                        </svg>
                                                    </span>
                                                </a>
                                                <a class="navbar-item" {% if article.mastodom %}href="{{ article.mastodom }}" rel="me noopener noreferrer" target="_blank" {% else %}href="#"{% endif %}>
                                                    <span class="soumaicon">
                                                        <svg>
                                                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#mastodon" />
                                                            <title>Mastodon</title>
                                                        </svg>
                                                    </span>
                                                </a>
                                            </div>
                                        </div>

                                        <!-- post footer -->
                                        {% include "base_info.html" %}
                                        <!-- end of post footer -->
                                    </div>
                                    <!-- end of post content -->
                                </div>
                            </article>
                        {% endfor %}
                        <!-- end of post -->
                    </div>
                    <!-- end of posts -->
                </div>
                <!-- pagination -->
                {% include "pagination.html" %}
                <!-- end of pagination -->
            {%- endblock -%}
        </main>
        <!-- end of page content -->
        <!-- .site-content -->

        <footer class="footer footer-top-shadow" itemscope itemtype="https://schema.org/WPFooter">

            <!-- header nav content -->
            <div class="navbar is-social-center" itemscope itemtype="https://schema.org/FollowAction">
                <a class="navbar-item" href="{{ SOCIAL['diaspora'] }}" itemprop="followee" rel="noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#diaspora"/>
                            <title>Diaspora</title>
                        </svg>
                    </span>
                </a>
                <a class="navbar-item" href="{{ SOCIAL['gnusocial'] }}" itemprop="followee" rel="noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#gnusocial"/>
                            <title>GNUSocial</title>
                        </svg>
                    </span>
                </a>
                <a class="navbar-item" href="{{ SOCIAL['pump'] }}" itemprop="followee" rel="noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#pump"/>
                            <title>Pump</title>
                        </svg>
                    </span>
                </a>
                <a class="navbar-item" href="{{ SOCIAL['mastodon'] }}" itemprop="followee" rel="me noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#mastodon"/>
                            <title>Mastodon</title>
                        </svg>
                    </span>
                </a>
                <a class="navbar-item" href="{{ SOCIAL['pixelfed'] }}" itemprop="followee" rel="noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#pixelfed"/>
                            <title>PixelFed</title>
                        </svg>
                    </span>
                </a>
                <a class="navbar-item" href="{{ SOCIAL['peertube'] }}" itemprop="followee" rel="noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#peertube"/>
                            <title>PeerTube</title>
                        </svg>
                    </span>
                </a>
                <a class="navbar-item" href="{{ SOCIAL['mediagoblin'] }}" itemprop="followee" rel="noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#mediagoblin"/>
                            <title>MediaGoblin</title>
                        </svg>
                    </span>
                </a>
                <a class="navbar-item" href="{{ SOCIAL['matrix'] }}" itemprop="followee" rel="noopener noreferrer" target="_blank">
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#matrix"/>
                            <title>Matrix</title>
                        </svg>
                    </span>
                </a>
                {% if FEED_ALL_ATOM %}
                    <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"/>
                                <title>RSS</title>
                            </svg>
                        </span>
                    </a>
                {% endif %}
            </div>
            <!-- end of header nav content -->
            <div class="container has-text-centered">
                <span class="soumaicon">
                    <svg>
                        <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#sourcehut"/>
                    </svg>
                </span>
                <p itemprop='author' itemscope itemtype="https://schema.org/Person">{{ _('Escrito por') }}
                    <a itemprop="url" href="https://git.sr.ht/~heckyel">git.sr.ht/~heckyel</a>
                </p>
                <p>{{ _('Este sitio es Software Libre') }}</p>
                <p>
                    <a href="{{ SOURCE_LINK }}" rel="noopener noreferrer" target="_blank">{{ _('Código fuente') }}</a>
                    <span class="soumaicon">
                        <svg>
                            <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#code"/>
                        </svg>
                    </span>
                </p>
                <p>
                    <a itemprop="license" href="{{ SITEURL }}/pages/librejs.html" data-jslicense="1">{{ _('Licencias de JavaScript') }}</a>
                </p>
                <p>{{ _('Versión actual:') }} {{ CURRENT_VERSION }} @ {{ CURRENT_BRANCH }}</p>
            </div>
        </footer>
        <!-- end of footer -->
        {% if article %}
            {% if article.js %}
                {% for script in article.js %}
                    {% if 'bottom' in script[-7:] %}
                        {{ script[:-8]|format(SITEURL) }}
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}

        {% if page %}
            {% if page.js %}
                {% for script in page.js %}
                    {% if 'bottom' in script[-7:] %}
                        {{ script[:-8]|format(SITEURL) }}
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </body>
</html>
