aboutsummaryrefslogtreecommitdiffstats
path: root/cl-theme/templates/base.html
blob: 483d35fc866c357d611fe5b21ebb33b926950b6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!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.1"/>
            <!-- 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" role="button" 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="navbar-burger" for="navbar-toggle-cbox" data-target="navMenu">
                            <span></span>
                            <span></span>
                            <span></span>
                        </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" href="{{ SOCIAL['gnusocial'] }}">
                                                    <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['diaspora'] }}">
                                                    <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['mastodon'] }}">
                                                    <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 -->
        <!-- navbar-burger -->
        <script src="{{ SITEURL}}/{{ THEME_STATIC_DIR }}/js/navbar-burger.js"></script>
        <!-- end of navbar-burger -->
        {% 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>