moved pygments, static and templates to the pelican/themes/Flex subdir

This commit is contained in:
Tobias Schmidl 2024-11-07 16:51:46 +01:00
parent a17ebec50f
commit 7a465d81e3
155 changed files with 0 additions and 0 deletions

View 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 %}

View 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) %}
&copy; {{ 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>

View 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 %}

View 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 %}

View 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 %}

View file

@ -0,0 +1,5 @@
<p>&copy; {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }}</p>
{% include "partial/flex.html" %}
{% if STATUSCAKE %}
{% include "partial/statuscake.html" %}
{% endif %}

View 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 %}

View 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 %}

View 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>

View file

@ -0,0 +1,7 @@
<footer>
{% if CC_LICENSE %}
{% include "partial/cc_license.html" %}
{% else %}
{% include "partial/copyright.html" %}
{% endif %}
</footer>

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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>

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View file

@ -0,0 +1,3 @@
{% if PLAUSIBLE_DOMAIN %}
<script defer data-domain="{{ PLAUSIBLE_DOMAIN }}" src="https://plausible.io/js/plausible.js"></script>
{% endif %}

View 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>

View 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'] }}&amp;Days={{ STATUSCAKE['days'] }}&amp;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 -->

View 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 %}

View 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 %}