moved pygments, static and templates to the pelican/themes/Flex subdir
This commit is contained in:
parent
a17ebec50f
commit
7a465d81e3
155 changed files with 0 additions and 0 deletions
27
pelican/themes/Flex/templates/archives.html
Normal file
27
pelican/themes/Flex/templates/archives.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %} – {{ _('Archives') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="single">
|
||||
<header>
|
||||
<h1 id="archives">{{ _('Archives') }}</h1>
|
||||
</header>
|
||||
<div>
|
||||
<dl>
|
||||
{% set previous_date = False %}
|
||||
|
||||
{% for article in dates %}
|
||||
{% if article.locale_date != previous_date %}
|
||||
{% set previous_date = article.locale_date %}
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
{% endif %}
|
||||
|
||||
<dd>
|
||||
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
|
||||
</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
124
pelican/themes/Flex/templates/article.html
Normal file
124
pelican/themes/Flex/templates/article.html
Normal file
|
@ -0,0 +1,124 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block meta %}
|
||||
<meta name="author" content="{{ article.author.name }}" />
|
||||
<meta name="description" content="{{ article.summary|striptags|escape }}" />
|
||||
<meta name="keywords" content="{{ article.tags|join(', ')|escape }}">
|
||||
|
||||
{% if PLUGINS and 'pelican.plugins.activitypub' in PLUGINS %}<link rel="alternate" type="application/activity+json" href="{{ SITEURL }}/activitypub/posts/{{ article.slug }}">{% endif %}
|
||||
|
||||
{% if article.translations -%}
|
||||
<link rel="alternate" href="{{ SITEURL }}/{{ article.url }}" hreflang="{{ article.lang }}" />
|
||||
{% for a in article.translations %}
|
||||
<link rel="alternate" href="{{ SITEURL }}/{{ a.url }}" hreflang="{{ a.lang }}" />
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/og_article.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %} – {{ article.title|striptags|escape }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="single">
|
||||
<header>
|
||||
{% if not ARTICLE_HIDE_TRANSLATION %}
|
||||
{% import 'partial/translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
{% endif %}
|
||||
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
|
||||
<p>
|
||||
{{ _('Posted on %(when)s in %(category)s',
|
||||
when=article.locale_date,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
|
||||
{% if PLUGINS and 'post_stats' in PLUGINS %}
|
||||
• {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</header>
|
||||
|
||||
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.article_top %}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle ads-responsive"
|
||||
data-ad-client="{{ GOOGLE_ADSENSE.ca_id }}"
|
||||
data-ad-slot="{{ GOOGLE_ADSENSE.ads.article_top }}"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<div>
|
||||
{{ article.content }}
|
||||
</div>
|
||||
<div class="tag-cloud">
|
||||
<p>
|
||||
{% if article.tags %}
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% if ADD_THIS_ID %}
|
||||
<div class="center social-share">
|
||||
<p>{{ _('Like this article? Share it with your friends!') }}</p>
|
||||
<div class="addthis_native_toolbox"></div>
|
||||
<div class="addthis_sharing_toolbox"></div>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/neighbors.html" %}
|
||||
|
||||
{% if article.related_posts %}
|
||||
<div class="related-posts">
|
||||
<h4>{{ _('You might enjoy') }}</h4>
|
||||
<ul class="related-posts">
|
||||
{% for related_post in article.related_posts %}
|
||||
<li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% elif ADD_THIS_ID %}
|
||||
<div class="addthis_relatedposts_inline"></div>
|
||||
{% endif %}
|
||||
|
||||
{% if article.series %}
|
||||
<div class="related-posts">
|
||||
{% set text = SERIES_TEXT|default('Part %(index)s of the %(name)s series') %}
|
||||
<h4>{{ text|format(index=article.series.index, name=article.series.name) }}</h4>
|
||||
{% if article.series.all_previous %}
|
||||
<h5>Previous articles</h5>
|
||||
<ul>
|
||||
{% for article in article.series.all_previous %}
|
||||
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if article.series.all_next %}
|
||||
<h5>Next articles</h5>
|
||||
<ul>
|
||||
{% for article in article.series.all_next %}
|
||||
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.article_bottom %}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle ads-responsive"
|
||||
data-ad-client="{{ GOOGLE_ADSENSE.ca_id }}"
|
||||
data-ad-slot="{{ GOOGLE_ADSENSE.ads.article_bottom }}"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/disqus.html" %}
|
||||
{% include "partial/isso.html" %}
|
||||
</article>
|
||||
{% endblock %}
|
8
pelican/themes/Flex/templates/author.html
Normal file
8
pelican/themes/Flex/templates/author.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block meta %}
|
||||
{% if PLUGINS and 'pelican.plugins.activitypub' in PLUGINS %}<link rel="alternate" type="application/activity+json" href="{{ SITEURL }}/activitypub/users/{{ author }}">{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %} – {{ _('Posts by %(name)s', name=author) }}:{% endblock %}
|
||||
{% set summarise = True %}
|
18
pelican/themes/Flex/templates/authors.html
Normal file
18
pelican/themes/Flex/templates/authors.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %} – {{ _('Authors') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="single">
|
||||
<header>
|
||||
<h1 id="authors">{{ _('Authors') }}</h1>
|
||||
</header>
|
||||
<div>
|
||||
<ul class="list">
|
||||
{% for author, articles in authors|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
193
pelican/themes/Flex/templates/base.html
Normal file
193
pelican/themes/Flex/templates/base.html
Normal file
|
@ -0,0 +1,193 @@
|
|||
{% if 'jinja2.ext.i18n' not in JINJA_ENVIRONMENT.extensions %}
|
||||
{%- macro _(msg) -%}
|
||||
{{ msg % kwargs }}
|
||||
{%- endmacro -%}
|
||||
{% endif %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
{% if page in hidden_pages %}
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
{% else %}
|
||||
<meta name="robots" content="{{ ROBOTS }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if USE_GOOGLE_FONTS != False %}
|
||||
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,400&family=Source+Sans+Pro:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet">
|
||||
{% endif %}
|
||||
|
||||
{% if USE_LESS %}
|
||||
<link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.less">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script>
|
||||
{% else %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.min.css">
|
||||
{% endif %}
|
||||
|
||||
{# DARK THEME STYLES #}
|
||||
{% if THEME_COLOR == "dark" or THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE or THEME_COLOR_ENABLE_USER_OVERRIDE %}
|
||||
<link id="dark-theme-style" rel="stylesheet" type="text/css"
|
||||
{% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}
|
||||
{% if THEME_COLOR|default("light") == "dark" %}
|
||||
media="(prefers-color-scheme: dark), (prefers-color-scheme: no-preference)"
|
||||
{% else %}
|
||||
media="(prefers-color-scheme: dark)"
|
||||
{% endif %}
|
||||
{% elif THEME_COLOR_ENABLE_USER_OVERRIDE and THEME_COLOR|default("light") == "light" %}
|
||||
disabled="disabled"
|
||||
{% endif %}
|
||||
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/dark-theme.min.css">
|
||||
{% endif %}
|
||||
|
||||
{# PYGMENTS STYLES #}
|
||||
{% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE or THEME_COLOR_ENABLE_USER_OVERRIDE or THEME_COLOR == "dark" %}
|
||||
<link id="pygments-dark-theme" rel="stylesheet" type="text/css"
|
||||
{% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}
|
||||
{% if THEME_COLOR|default("light") == "dark" %}
|
||||
media="(prefers-color-scheme: dark), (prefers-color-scheme: no-preference)"
|
||||
{% else %}
|
||||
media="(prefers-color-scheme: dark)"
|
||||
{% endif %}
|
||||
{% elif THEME_COLOR_ENABLE_USER_OVERRIDE and THEME_COLOR|default("light") == "light" %}
|
||||
disabled="disabled"
|
||||
{% endif %}
|
||||
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE_DARK or PYGMENTS_STYLE or 'monokai' }}.min.css">
|
||||
{% endif %}
|
||||
{% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE or not THEME_COLOR or THEME_COLOR == "light" %}
|
||||
<link id="pygments-light-theme" rel="stylesheet" type="text/css"
|
||||
{% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}
|
||||
{% if THEME_COLOR|default("light") == "dark" %}
|
||||
media="(prefers-color-scheme: light)"
|
||||
{% else %}
|
||||
media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css">
|
||||
{% endif %}
|
||||
|
||||
{% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %}
|
||||
{% if USE_GOOGLE_FONTS != False %}
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather:300,400|Open+Sans" rel="stylesheet">
|
||||
{% endif %}
|
||||
<link rel="stylesheet"
|
||||
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.css" />
|
||||
{% endif %}
|
||||
|
||||
{% if 'pelican.plugins.search' in PLUGINS %}
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork.css" />
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/fontawesome.css">
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/brands.css">
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/solid.css">
|
||||
|
||||
{% if CUSTOM_CSS %}
|
||||
<link rel="stylesheet" type="text/css" href="{% if main_siteurl is defined %}{{ main_site }}{% else %}{{ SITEURL }}{% endif %}/{{ CUSTOM_CSS }}">
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/icon.html" %}
|
||||
|
||||
{% include "partial/color.html" %}
|
||||
|
||||
{% include "partial/feed.html" %}
|
||||
|
||||
{% include "partial/ga.html" %}
|
||||
{% include "partial/ggst.html" %}
|
||||
|
||||
|
||||
{% include "partial/plausible.html" %}
|
||||
|
||||
{% if PGP_KEY %}
|
||||
<link rel="pgpkey" type="application/pgp-keys" href="{{ SITEURL }}/{{ PGP_KEY }}">
|
||||
{% endif %}
|
||||
|
||||
{% if WEBMENTION_URL %}
|
||||
<link rel="webmention" href="{{ WEBMENTION_URL }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if PINGBACK_URL %}
|
||||
<link rel="pingback" href="{{ PINGBACK_URL }}" />
|
||||
{% endif %}
|
||||
|
||||
{% for _, link in SOCIAL%}
|
||||
<link rel="me" href="{{ link }}" />
|
||||
{% endfor %}
|
||||
|
||||
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||
{% if REL_CANONICAL %}
|
||||
{% if page %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ page.url }}">
|
||||
{% elif article %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ article.url }}">
|
||||
{% elif page_name == 'index' and not articles_previous_page %}
|
||||
<link rel="canonical" href="{{ SITEURL }}">
|
||||
{% elif author or category or tag or page_name == 'index' %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ articles_page.url }}">
|
||||
{% else %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% block meta %}
|
||||
<meta name="author" content="{{ AUTHOR }}" />
|
||||
<meta name="description" content="{{ SITEDESCRIPTION }}" />
|
||||
{% include "partial/og.html" %}
|
||||
{% endblock %}
|
||||
|
||||
<title>{{ SITENAME }}{% block title %}{% endblock %}</title>
|
||||
|
||||
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.page_level_ads %}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({
|
||||
google_ad_client: "{{ GOOGLE_ADSENSE.ca_id }}",
|
||||
enable_page_level_ads: true
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/gtm.html" %}
|
||||
{% include "partial/clarity.html" %}
|
||||
</head>
|
||||
<body {% if not THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}class="{{ THEME_COLOR|default('light') }}-theme"{% endif %}>
|
||||
{% include "partial/gtm_noscript.html" %}
|
||||
|
||||
{% include "partial/sidebar.html" %}
|
||||
|
||||
<main>
|
||||
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.main_menu %}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle ads-responsive"
|
||||
data-ad-client="{{ GOOGLE_ADSENSE.ca_id }}"
|
||||
data-ad-slot="{{ GOOGLE_ADSENSE.ads.main_menu }}"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% include "partial/nav.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "partial/footer.html" %}
|
||||
</main>
|
||||
|
||||
{% include "partial/jsonld.html" %}
|
||||
{% include "partial/guages.html" %}
|
||||
{% include "partial/addthis.html" %}
|
||||
{% include "partial/matomo.html" %}
|
||||
{% include 'partial/github.html' %}
|
||||
{% include 'partial/stork.html' %}
|
||||
{% include 'partial/cf_analytics.html' %}
|
||||
|
||||
{% block additional_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
20
pelican/themes/Flex/templates/categories.html
Normal file
20
pelican/themes/Flex/templates/categories.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %} – {{ _('Categories') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="single">
|
||||
<header>
|
||||
<h1 id="categories">{{ _('Categories') }}</h1>
|
||||
</header>
|
||||
<div>
|
||||
<ul class="list">
|
||||
{% for category, articles in categories|sort %}
|
||||
<li>
|
||||
<a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
3
pelican/themes/Flex/templates/category.html
Normal file
3
pelican/themes/Flex/templates/category.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %} – {{ _('Category %(name)s', name=category) }}{% endblock %}
|
||||
{% set summarise = True %}
|
71
pelican/themes/Flex/templates/index.html
Normal file
71
pelican/themes/Flex/templates/index.html
Normal file
|
@ -0,0 +1,71 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.index_top %}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle ads-responsive"
|
||||
data-ad-client="{{ GOOGLE_ADSENSE.ca_id }}"
|
||||
data-ad-slot="{{ GOOGLE_ADSENSE.ads.index_top }}"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% for article in articles_page.object_list %}
|
||||
<article>
|
||||
<header>
|
||||
<h2><a href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ article.title }}</a></h2>
|
||||
<p>
|
||||
{{ _('Posted on %(when)s in %(category)s',
|
||||
when=article.locale_date,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
|
||||
{% if article.tags and not HOME_HIDE_TAGS %}
|
||||
• {{ _('Tagged with') }}
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if PLUGINS and 'post_stats' in PLUGINS %}
|
||||
• {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</header>
|
||||
<div>
|
||||
{% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
|
||||
{% if article.featured_image %}
|
||||
<img src="{{ article.featured_image }}">
|
||||
{% endif %}
|
||||
<div>{{ article.summary }}</div>
|
||||
{% if article.content != article.summary %}
|
||||
<br>
|
||||
<a class="btn"
|
||||
href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">
|
||||
{{ _('Continue reading') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ article.content }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not loop.last %}
|
||||
<hr />
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
{% include "partial/pagination.html" %}
|
||||
|
||||
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.index_bottom %}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle ads-responsive"
|
||||
data-ad-client="{{ GOOGLE_ADSENSE.ca_id }}"
|
||||
data-ad-slot="{{ GOOGLE_ADSENSE.ads.index_bottom }}"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
29
pelican/themes/Flex/templates/page.html
Normal file
29
pelican/themes/Flex/templates/page.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block meta %}
|
||||
{{ super() }}
|
||||
|
||||
{% if page.translations -%}
|
||||
<link rel="alternate" href="{{ SITEURL }}/{{ page.url }}" hreflang="{{ page.lang }}" />
|
||||
{% for p in page.translations %}
|
||||
<link rel="alternate" href="{{ SITEURL }}/{{ p.url }}" hreflang="{{ p.lang }}" />
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %} – {{ page.title|striptags|escape }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="single">
|
||||
<header>
|
||||
{% import 'partial/translations.html' as translations with context %}
|
||||
{{ translations.translations_for(page) }}
|
||||
<h1 id="{{ page.slug }}">{{ page.title }}</h1>
|
||||
</header>
|
||||
<div>
|
||||
{% block before_content %}{% endblock %}
|
||||
{% block page_content %}{{ page.content }}{% endblock %}
|
||||
{% block after_content %}{% endblock %}
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
3
pelican/themes/Flex/templates/partial/addthis.html
Normal file
3
pelican/themes/Flex/templates/partial/addthis.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% if ADD_THIS_ID %}
|
||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ ADD_THIS_ID }}" async="async"></script>
|
||||
{% endif %}
|
31
pelican/themes/Flex/templates/partial/cc_license.html
Normal file
31
pelican/themes/Flex/templates/partial/cc_license.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<p>
|
||||
{% set cc_slug = CC_LICENSE['slug'] %}
|
||||
{% set cc_name = CC_LICENSE['name'] %}
|
||||
{% set cc_version = CC_LICENSE['version'] %}
|
||||
{% set cc_lang = CC_LICENSE['language'] or "en_US" %}
|
||||
{% set cc_url = "http://creativecommons.org/licenses/{}/{}/deed.{}".format(cc_slug, cc_version, cc_lang) %}
|
||||
© {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }} - {{ _('This work is licensed under a %(cc)s',
|
||||
cc='<a rel="license" href="{}" target="_blank">{}</a>'.format(cc_url, cc_name)|safe) }}
|
||||
</p>
|
||||
{% include "partial/flex.html" %}
|
||||
<p>
|
||||
{% if CC_LICENSE['icon'] != False %}
|
||||
<a rel="license"
|
||||
href="http://creativecommons.org/licenses/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/"
|
||||
target="_blank">
|
||||
<img alt="Creative Commons License"
|
||||
title="Creative Commons License"
|
||||
style="border-width:0"
|
||||
{% if CC_LICENSE['local_icons'] %}
|
||||
src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/cc/{{ CC_LICENSE['slug'] }}.png"
|
||||
{% else %}
|
||||
src="https://i.creativecommons.org/l/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/80x15.png"
|
||||
{% endif %}
|
||||
width="80"
|
||||
height="15"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if STATUSCAKE %}
|
||||
{% include "partial/statuscake.html" %}
|
||||
{% endif %}
|
||||
</p>
|
6
pelican/themes/Flex/templates/partial/cf_analytics.html
Normal file
6
pelican/themes/Flex/templates/partial/cf_analytics.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% if CLOUDFLARE_WEB_ANALYTICS_TOKEN %}
|
||||
<script defer
|
||||
src='https://static.cloudflareinsights.com/beacon.min.js'
|
||||
data-cf-beacon='{"token": "{{ CLOUDFLARE_WEB_ANALYTICS_TOKEN }}"}'>
|
||||
</script>
|
||||
{% endif %}
|
9
pelican/themes/Flex/templates/partial/clarity.html
Normal file
9
pelican/themes/Flex/templates/partial/clarity.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% if MICROSOFT_CLARITY %}
|
||||
<script type="text/javascript">
|
||||
(function(c,l,a,r,i,t,y){
|
||||
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
||||
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
||||
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
||||
})(window, document, "clarity", "script", "{{ MICROSOFT_CLARITY }}");
|
||||
</script>
|
||||
{% endif %}
|
11
pelican/themes/Flex/templates/partial/color.html
Normal file
11
pelican/themes/Flex/templates/partial/color.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% if BROWSER_COLOR %}
|
||||
<!-- Chrome, Firefox OS and Opera -->
|
||||
<meta name="theme-color" content="{{ BROWSER_COLOR }}">
|
||||
<!-- Windows Phone -->
|
||||
<meta name="msapplication-navbutton-color" content="{{ BROWSER_COLOR }}">
|
||||
<!-- iOS Safari -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<!-- Microsoft EDGE -->
|
||||
<meta name="msapplication-TileColor" content="{{ BROWSER_COLOR }}">
|
||||
{% endif %}
|
5
pelican/themes/Flex/templates/partial/copyright.html
Normal file
5
pelican/themes/Flex/templates/partial/copyright.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<p>© {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }}</p>
|
||||
{% include "partial/flex.html" %}
|
||||
{% if STATUSCAKE %}
|
||||
{% include "partial/statuscake.html" %}
|
||||
{% endif %}
|
16
pelican/themes/Flex/templates/partial/disqus.html
Normal file
16
pelican/themes/Flex/templates/partial/disqus.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% if DISQUS_SITENAME %}
|
||||
<!-- Disqus -->
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}';
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
{{ _('Please enable JavaScript to view comments.') }}
|
||||
</noscript>
|
||||
<!-- End Disqus -->
|
||||
{% endif %}
|
7
pelican/themes/Flex/templates/partial/feed.html
Normal file
7
pelican/themes/Flex/templates/partial/feed.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% if FEED_ALL_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom">
|
||||
{% endif %}
|
||||
|
||||
{% if FEED_ALL_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS">
|
||||
{% endif %}
|
22
pelican/themes/Flex/templates/partial/flex.html
Normal file
22
pelican/themes/Flex/templates/partial/flex.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<p>
|
||||
{{
|
||||
_('Built with %(pelican_url)s using %(flex_url)s theme',
|
||||
pelican_url='<a href="http://getpelican.com" target="_blank">Pelican</a>',
|
||||
flex_url='<a href="http://bit.ly/flex-pelican" target="_blank">Flex</a>'|safe)
|
||||
}}
|
||||
{% if THEME_COLOR_ENABLE_USER_OVERRIDE %}
|
||||
<span class="footer-separator">|</span>
|
||||
{{
|
||||
_('Switch to the %(dark_url)s | %(light_url)s | %(browser_url)s theme',
|
||||
dark_url='<a href="javascript:void(0)" onclick="theme.switch(`dark`)">dark</a>',
|
||||
light_url='<a href="javascript:void(0)" onclick="theme.switch(`light`)">light</a>',
|
||||
browser_url='<a href="javascript:void(0)" onclick="theme.switch(`browser`)">browser</a>'|safe)
|
||||
}}
|
||||
<script id="dark-theme-script"
|
||||
src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/dark-theme/dark-theme.min.js"
|
||||
data-enable-auto-detect-theme="{{ THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE|default('false') }}"
|
||||
data-default-theme="{{ THEME_COLOR|default('light') }}"
|
||||
type="text/javascript">
|
||||
</script>
|
||||
{% endif %}
|
||||
</p>
|
7
pelican/themes/Flex/templates/partial/footer.html
Normal file
7
pelican/themes/Flex/templates/partial/footer.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<footer>
|
||||
{% if CC_LICENSE %}
|
||||
{% include "partial/cc_license.html" %}
|
||||
{% else %}
|
||||
{% include "partial/copyright.html" %}
|
||||
{% endif %}
|
||||
</footer>
|
11
pelican/themes/Flex/templates/partial/ga.html
Normal file
11
pelican/themes/Flex/templates/partial/ga.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% if GOOGLE_ANALYTICS %}
|
||||
<script type="text/javascript">
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ GOOGLE_ANALYTICS }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
10
pelican/themes/Flex/templates/partial/ggst.html
Normal file
10
pelican/themes/Flex/templates/partial/ggst.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{% if GOOGLE_GLOBAL_SITE_TAG %}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ GOOGLE_GLOBAL_SITE_TAG }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ GOOGLE_GLOBAL_SITE_TAG }}');
|
||||
</script>
|
||||
{% endif %}
|
20
pelican/themes/Flex/templates/partial/github.html
Normal file
20
pelican/themes/Flex/templates/partial/github.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% if GITHUB_CORNER_URL %}
|
||||
<a href="{{ GITHUB_CORNER_URL }}" target="_blank" class="github-corner" aria-label="View source on Github">
|
||||
<svg width="80"
|
||||
height="80"
|
||||
viewBox="0 0 250 250"
|
||||
style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;"
|
||||
aria-hidden="true">
|
||||
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
||||
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
|
||||
fill="currentColor"
|
||||
style="transform-origin: 130px 106px;"
|
||||
class="octo-arm">
|
||||
</path>
|
||||
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
|
||||
fill="currentColor"
|
||||
class="octo-body">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
12
pelican/themes/Flex/templates/partial/gtm.html
Normal file
12
pelican/themes/Flex/templates/partial/gtm.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% if GOOGLE_TAG_MANAGER %}
|
||||
<script>
|
||||
(function(w,d,s,l,i){
|
||||
w[l]=w[l]||[];
|
||||
w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});
|
||||
var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
|
||||
j.async=true;
|
||||
j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
|
||||
f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','{{ GOOGLE_TAG_MANAGER }}');
|
||||
</script>
|
||||
{% endif %}
|
5
pelican/themes/Flex/templates/partial/gtm_noscript.html
Normal file
5
pelican/themes/Flex/templates/partial/gtm_noscript.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% if GOOGLE_TAG_MANAGER %}
|
||||
<noscript>
|
||||
<iframe src="https://www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER }}" height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||
</noscript>
|
||||
{% endif %}
|
17
pelican/themes/Flex/templates/partial/guages.html
Normal file
17
pelican/themes/Flex/templates/partial/guages.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% if GUAGES %}
|
||||
<script type="text/javascript">
|
||||
var _gauges = _gauges || [];
|
||||
(function() {
|
||||
var t = document.createElement('script');
|
||||
t.type = 'text/javascript';
|
||||
t.async = true;
|
||||
t.id = 'gauges-tracker';
|
||||
t.setAttribute('data-site-id', '{{ GUAGES }}');
|
||||
t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif');
|
||||
t.src = 'https://track.gaug.es/track.js';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(t, s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
4
pelican/themes/Flex/templates/partial/icon.html
Normal file
4
pelican/themes/Flex/templates/partial/icon.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{% if FAVICON %}
|
||||
<link rel="shortcut icon" href="{{ FAVICON }}" type="image/x-icon">
|
||||
<link rel="icon" href="{{ FAVICON }}" type="image/x-icon">
|
||||
{% endif %}
|
23
pelican/themes/Flex/templates/partial/isso.html
Normal file
23
pelican/themes/Flex/templates/partial/isso.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% if ISSO_URL %}
|
||||
<!-- Isso -->
|
||||
<section id="isso-thread" data-title="{{ article.title|e }}"></section>
|
||||
<script
|
||||
type="text/javascript"
|
||||
{% if ISSO_EMBED_JS_PATH %}
|
||||
src="{{ ISSO_EMBED_JS_PATH }}"
|
||||
{% else %}
|
||||
src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/isso/isso.min.js"
|
||||
{% endif %}
|
||||
|
||||
{% if ISSO_URL %}
|
||||
data-isso="{{ ISSO_URL }}"
|
||||
{% endif %}
|
||||
{% for opt, val in ISSO_OPTIONS.items() %}
|
||||
data-isso-{{ opt }}="{{ val }}"
|
||||
{% endfor %}
|
||||
></script>
|
||||
<noscript>
|
||||
{{ _('Please enable JavaScript to view comments.') }}
|
||||
</noscript>
|
||||
<!-- End Isso -->
|
||||
{% endif %}
|
10
pelican/themes/Flex/templates/partial/jsonld.html
Normal file
10
pelican/themes/Flex/templates/partial/jsonld.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@context" : "http://schema.org",
|
||||
"@type" : "Blog",
|
||||
"name": " {{ SITENAME }} ",
|
||||
"url" : "{{ SITEURL }}",
|
||||
"image": "{{ SITELOGO }}",
|
||||
"description": "{{ SITEDESCRIPTION }}"
|
||||
}
|
||||
</script>
|
25
pelican/themes/Flex/templates/partial/jsonld_article.html
Normal file
25
pelican/themes/Flex/templates/partial/jsonld_article.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% if not PLUGINS or 'seo' not in PLUGINS or 'pelican.plugins.seo' not in PLUGINS%}
|
||||
{% if SITELOGO %}
|
||||
{% set default_cover = SITELOGO %}
|
||||
{% else %}
|
||||
{% set default_cover = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png' %}
|
||||
{% endif %}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"name": "{{ article.title|striptags }}",
|
||||
"headline": "{{ article.title|striptags }}",
|
||||
"datePublished": "{{ article.date }}",
|
||||
"dateModified": "{{ article.modified }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ article.author.name }}",
|
||||
"url": "{{ SITEURL }}/{{ article.author.url }}"
|
||||
},
|
||||
"image": "{{ article.metadata.get('cover', default_cover) }}",
|
||||
"url": "{{ SITEURL }}/{{ article.url }}",
|
||||
"description": "{{ article.summary|striptags }}"
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
15
pelican/themes/Flex/templates/partial/matomo.html
Normal file
15
pelican/themes/Flex/templates/partial/matomo.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% if (PIWIK_URL and PIWIK_SITE_ID) or (MATOMO_URL and MATOMO_SITE_ID) %}
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="https://{{ MATOMO_URL or PIWIK_URL }}/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', {{ MATOMO_SITE_ID or PIWIK_SITE_ID }}]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="https://{{ MATOMO_URL or PIWIK_URL }}/matomo.php?idsite={{ MATOMO_SITE_ID or PIWIK_SITE_ID }}&rec=1" style="border:0" alt="" /></p></noscript>
|
||||
{% endif %}
|
17
pelican/themes/Flex/templates/partial/nav.html
Normal file
17
pelican/themes/Flex/templates/partial/nav.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% if MAIN_MENU %}
|
||||
<nav>
|
||||
<a href="{{ SITEURL }}/">{{ _('Home') }}</a>
|
||||
|
||||
{% for title, link in MENUITEMS %}
|
||||
<a href="{{ link }}">{{ _(title) }}</a>
|
||||
{% endfor %}
|
||||
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">{{ _('Atom') }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if FEED_ALL_RSS %}
|
||||
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">{{ _('RSS') }}</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
14
pelican/themes/Flex/templates/partial/neighbors.html
Normal file
14
pelican/themes/Flex/templates/partial/neighbors.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% if PLUGINS and ('neighbors' in PLUGINS or 'pelican.plugins.neighbors' in PLUGINS) %}
|
||||
<div class="neighbors">
|
||||
{% if article.prev_article %}
|
||||
<a class="btn float-left" href="{{ SITEURL }}/{{ article.prev_article.url }}" title="{{ article.prev_article.title|striptags }}">
|
||||
<i class="fa fa-angle-left"></i> {{ _('Previous Post') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if article.next_article %}
|
||||
<a class="btn float-right" href="{{ SITEURL }}/{{ article.next_article.url }}" title="{{ article.next_article.title|striptags }}">
|
||||
{{ _('Next Post') }} <i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
16
pelican/themes/Flex/templates/partial/og.html
Normal file
16
pelican/themes/Flex/templates/partial/og.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% if not PLUGINS or 'seo' not in PLUGINS or 'pelican.plugins.seo' not in PLUGINS %}
|
||||
{% if OG_LOCALE %}
|
||||
{% set default_locale = OG_LOCALE %}
|
||||
{% else %}
|
||||
{% set default_locale = 'en_US' %}
|
||||
{% endif %}
|
||||
<meta property="og:site_name" content="{{ SITENAME }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITENAME }}"/>
|
||||
<meta property="og:description" content="{{ SITEDESCRIPTION }}"/>
|
||||
<meta property="og:locale" content="{{ default_locale }}"/>
|
||||
<meta property="og:url" content="{{ SITEURL }}"/>
|
||||
{% if SITELOGO %}
|
||||
<meta property="og:image" content="{{ SITELOGO }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
25
pelican/themes/Flex/templates/partial/og_article.html
Normal file
25
pelican/themes/Flex/templates/partial/og_article.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% if not PLUGINS or 'seo' not in PLUGINS or 'pelican.plugins.seo' not in PLUGINS %}
|
||||
{% if OG_LOCALE %}
|
||||
{% set default_locale = OG_LOCALE %}
|
||||
{% else %}
|
||||
{% set default_locale = 'en_US' %}
|
||||
{% endif %}
|
||||
<meta property="og:site_name" content="{{ SITENAME }}"/>
|
||||
<meta property="og:title" content="{{ article.title|striptags|escape }}"/>
|
||||
<meta property="og:description" content="{{ article.summary|striptags|escape }}"/>
|
||||
<meta property="og:locale" content="{{ article.metadata.get('og_locale', default_locale) }}"/>
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
|
||||
<meta property="og:type" content="article"/>
|
||||
<meta property="article:published_time" content="{{ article.date }}"/>
|
||||
<meta property="article:modified_time" content="{{ article.modified }}"/>
|
||||
<meta property="article:author" content="{{ SITEURL }}/{{ article.author.url }}">
|
||||
<meta property="article:section" content="{{ article.category.name }}"/>
|
||||
{% for tag in article.tags %}
|
||||
<meta property="article:tag" content="{{ tag.name|escape }}"/>
|
||||
{% endfor %}
|
||||
{% if 'cover' in article.metadata %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.metadata['cover'] }}">
|
||||
{% else %}
|
||||
<meta property="og:image" content="{{ SITELOGO }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
14
pelican/themes/Flex/templates/partial/pagination.html
Normal file
14
pelican/themes/Flex/templates/partial/pagination.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% if DEFAULT_PAGINATION %}
|
||||
<div class="pagination">
|
||||
{% if articles_page.has_next() %}
|
||||
<a class="btn float-left" href="{{ SITEURL }}/{{ articles_next_page.url }}">
|
||||
<i class="fa fa-angle-left"></i> {{ _('Older Posts') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if articles_page.has_previous() %}
|
||||
<a class="btn float-right" href="{{ SITEURL }}/{{ articles_previous_page.url }}">
|
||||
{{ _('Newer Posts') }} <i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
3
pelican/themes/Flex/templates/partial/plausible.html
Normal file
3
pelican/themes/Flex/templates/partial/plausible.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% if PLAUSIBLE_DOMAIN %}
|
||||
<script defer data-domain="{{ PLAUSIBLE_DOMAIN }}" src="https://plausible.io/js/plausible.js"></script>
|
||||
{% endif %}
|
97
pelican/themes/Flex/templates/partial/sidebar.html
Normal file
97
pelican/themes/Flex/templates/partial/sidebar.html
Normal file
|
@ -0,0 +1,97 @@
|
|||
<aside>
|
||||
<div>
|
||||
<a href="{{ SITEURL }}/">
|
||||
{% if SITELOGO %}
|
||||
<img src="{{ SITELOGO }}" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
|
||||
{% else %}
|
||||
<img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
<h1>
|
||||
<a href="{{ SITEURL }}/">{{ SITETITLE }}</a>
|
||||
</h1>
|
||||
|
||||
{% if SITESUBTITLE %}
|
||||
<p>{{ SITESUBTITLE }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if PLUGINS %}
|
||||
{% if ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %}
|
||||
<form class="navbar-search" action="{{ SITEURL }}/search.html" role="search">
|
||||
<input type="text" name="q" id="tipue_search_input" placeholder="{{ _('Search...') }}">
|
||||
</form>
|
||||
{% elif 'pelican.plugins.search' in PLUGINS %}
|
||||
<div class="stork">
|
||||
<input class="stork-input" type="text" autocomplete="off" name="q" data-stork="sitesearch" placeholder="{{ _('Search...') }}" onclick="loadStorkIndex()"/>
|
||||
<div class="stork-output" data-stork="sitesearch-output"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if (pages and DISPLAY_PAGES_ON_MENU) or LINKS %}
|
||||
<nav>
|
||||
<ul class="list">
|
||||
{# Open links in new window depending on the LINKS_IN_NEW_TAB setting #}
|
||||
{% macro get_target(link) -%}
|
||||
{%- if LINKS_IN_NEW_TAB in ('all', true) -%}
|
||||
_blank
|
||||
{%- elif LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL) -%}
|
||||
_blank
|
||||
{%- else -%}
|
||||
_self
|
||||
{%- endif -%}
|
||||
{%- endmacro %}
|
||||
|
||||
{% if PAGES_SORT_ATTRIBUTE -%}
|
||||
{% set pages = pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %}
|
||||
{%- endif %}
|
||||
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for page in pages %}
|
||||
<li>
|
||||
<a target="{{ get_target(SITEURL) }}"
|
||||
href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">
|
||||
{{ page.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% for name, link in LINKS %}
|
||||
<li>
|
||||
<a target="{{ get_target(link) }}" href="{{ link }}" >{{ name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
{% if SOCIAL %}
|
||||
{% set solid = ['at', 'envelope', 'mailbox', 'rss'] %}
|
||||
{% set relme = ['at', 'envelope', 'mailbox', 'mastodon'] %}
|
||||
<ul class="social">
|
||||
{% for name, link in SOCIAL %}
|
||||
<li>
|
||||
<a class="sc-{{ name }}"
|
||||
{% if name in relme %}rel="me"{% endif %}
|
||||
href="{{ link }}"
|
||||
target="_blank">
|
||||
<i class="{% if name in solid %}fa-solid{% else %}fa-brands{% endif %} fa-{{ name }}"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.aside %}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle ads-aside"
|
||||
data-ad-client="{{ GOOGLE_ADSENSE.ca_id }}"
|
||||
data-ad-slot="{{ GOOGLE_ADSENSE.ads.aside }}"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
{% endif %}
|
||||
</aside>
|
12
pelican/themes/Flex/templates/partial/statuscake.html
Normal file
12
pelican/themes/Flex/templates/partial/statuscake.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!-- StatusCake -->
|
||||
{% if STATUSCAKE['trackid'] %}
|
||||
<a href="https://www.statuscake.com" title="{{ SITENAME }} Uptime">
|
||||
<img src="https://app.statuscake.com/button/index.php?Track={{ STATUSCAKE['trackid'] }}&Days={{ STATUSCAKE['days'] }}&Design={{ STATUSCAKE['design'] }}" alt="{{ SITENAME }} Uptime"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if STATUSCAKE['rumid'] %}
|
||||
<script type="text/javascript">var SC_RumID = {{ STATUSCAKE['rumid'] }};</script>
|
||||
<script type="text/javascript" async src="https://www.statuscake.com/App/RUM/embed.js"></script>
|
||||
{% endif %}
|
||||
<!-- End StatusCake -->
|
15
pelican/themes/Flex/templates/partial/stork.html
Normal file
15
pelican/themes/Flex/templates/partial/stork.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% if 'pelican.plugins.search' in PLUGINS %}
|
||||
<script>
|
||||
window.loadStorkIndex = function () {
|
||||
{% if not STORK_VERSION %}
|
||||
stork.initialize("{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork.wasm")
|
||||
{% endif %}
|
||||
stork.register("sitesearch", "{{ SITEURL }}/search-index.st", { showProgress: false });
|
||||
}
|
||||
</script>
|
||||
{% if STORK_VERSION %}
|
||||
<script src="https://files.stork-search.net/releases/v{{ STORK_VERSION }}/stork.js"></script>
|
||||
{% else %}
|
||||
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork.js"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
10
pelican/themes/Flex/templates/partial/translations.html
Normal file
10
pelican/themes/Flex/templates/partial/translations.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{% macro translations_for(article) %}
|
||||
{% if article.translations %}
|
||||
<div class="translations">
|
||||
<a class="active" href="{{ SITEURL }}/{{ article.url }}">{{article.lang}}</a>
|
||||
{% for translation in article.translations %}
|
||||
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
24
pelican/themes/Flex/templates/period_archives.html
Normal file
24
pelican/themes/Flex/templates/period_archives.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %} – {{ _('Archives') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="single">
|
||||
<header>
|
||||
<h1 id="archives">{{ _('Archives') }}</h1>
|
||||
</header>
|
||||
<div>
|
||||
<dl>
|
||||
{% set previous_date = False %}
|
||||
|
||||
{% for article in dates %}
|
||||
{% if article.locale_date != previous_date %}
|
||||
{% set previous_date = article.locale_date %}
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
{% endif %}
|
||||
|
||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
26
pelican/themes/Flex/templates/search.html
Normal file
26
pelican/themes/Flex/templates/search.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %}
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
|
||||
{% block content %}
|
||||
|
||||
<article class="single">
|
||||
<header>
|
||||
<h1 id="categories">{{ _('Search Results') }}</h1>
|
||||
</header>
|
||||
<div id="tipue_search_content"></div>
|
||||
</article>
|
||||
{% endblock content %} {% block additional_js %}
|
||||
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/jquery.min.js"></script>
|
||||
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script>
|
||||
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.min.js"></script>
|
||||
<script src="{{ SITEURL }}/tipuesearch_content.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#tipue_search_input").tipuesearch({
|
||||
show: 10,
|
||||
mode: "json",
|
||||
contentLocation: "{{ SITEURL }}/tipuesearch_content.js",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %} {% endif %}
|
8
pelican/themes/Flex/templates/tag.html
Normal file
8
pelican/themes/Flex/templates/tag.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block meta %}
|
||||
{% if PLUGINS and 'pelican.plugins.activitypub' in PLUGINS %}<link rel="alternate" type="application/activity+json" href="{{ SITEURL }}/activitypub/tags/{{ tag }}">{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %} – {{ _('Tag %(name)s', name=tag) }}{% endblock %}
|
||||
{% set summarise = True %}
|
18
pelican/themes/Flex/templates/tags.html
Normal file
18
pelican/themes/Flex/templates/tags.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %} – {{ _('Tags') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="single">
|
||||
<header>
|
||||
<h1 id="tags">{{ _('Tags') }}</h1>
|
||||
</header>
|
||||
<div>
|
||||
<ul class="list">
|
||||
{%- for tag, articles in tags|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue