init
This commit is contained in:
commit
c828a45aa8
30 changed files with 1204 additions and 0 deletions
11
blue-penguin-dark/templates/analytics.html
Normal file
11
blue-penguin-dark/templates/analytics.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% if GOOGLE_ANALYTICS %}
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-74711B8E5H"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{GOOGLE_ANALYTICS}}');
|
||||
</script>
|
||||
{% endif %}
|
||||
22
blue-penguin-dark/templates/archives.html
Normal file
22
blue-penguin-dark/templates/archives.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} | Archives{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<h1>Archives</h1>
|
||||
|
||||
{# based on http://stackoverflow.com/questions/12764291/jinja2-group-by-month-year #}
|
||||
|
||||
{% for year, year_group in dates|groupby('date.year')|reverse %}
|
||||
{% for month, month_group in year_group|groupby('date.month')|reverse %}
|
||||
<h4 class="date">{{ (month_group|first).date|strftime('%b %Y') }}</h4>
|
||||
<div class="post archives">
|
||||
<ul>
|
||||
{% for article in month_group %}
|
||||
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
17
blue-penguin-dark/templates/article.html
Normal file
17
blue-penguin-dark/templates/article.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% if article.tags %}
|
||||
<meta name="keywords" content="{{ article.tags|join(",") }}" />
|
||||
{% endif %}
|
||||
{% if article.description %}
|
||||
<meta name="description" content="{{ article.description }}" />
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{{ SITENAME }} | {{ article.title|striptags }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "article_stub.html" %}
|
||||
{% endblock %}
|
||||
46
blue-penguin-dark/templates/article_stub.html
Normal file
46
blue-penguin-dark/templates/article_stub.html
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{% if not articles_page or first_article_of_day %}
|
||||
<h4 class="date">{{ article.era }}</h4>
|
||||
{% endif %}
|
||||
|
||||
<article class="post">
|
||||
{% if article.title %}
|
||||
<h2 class="title">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permanent Link to "{{ article.title|striptags }}"">{{ article.title }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if not articles_page %}
|
||||
{% include "translations.html" %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if articles_page %}
|
||||
{% if '<!-- more -->' in article.content %}
|
||||
{{ article.content.split('<!-- more -->')[0] }}
|
||||
<p><a href="{{ SITEURL }}/{{ article.url }}">{{ article.read_more if article.read_more is defined else 'Read more →' }}</a></p>
|
||||
{% else %}
|
||||
{{ article.summary }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ article.content }}
|
||||
{% endif %}
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="info">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}">posted on {{ article.date.strftime("%b %d, %Y") }}</a>
|
||||
{% if article.category.name != "misc" %}
|
||||
· <a href="{{ SITEURL }}/{{ article.category.url }}" rel="tag">{{ article.category }}</a>
|
||||
{% endif %}
|
||||
{% if article.tags %}
|
||||
·
|
||||
{% for t in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ t.url }}" class="tags{% if tag and tag.name == t.name %} selected{% endif %}">{{ t }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if articles_page and DISQUS_SITENAME %}
|
||||
<a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">Click to read and post comments</a>
|
||||
{% else %}
|
||||
{% include "disqus.html" %}
|
||||
{% endif %}
|
||||
</article>
|
||||
7
blue-penguin-dark/templates/author.html
Normal file
7
blue-penguin-dark/templates/author.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} | Articles by {{ author }}{% endblock %}
|
||||
{% block ephemeral_nav %}
|
||||
|
||||
{{ ephemeral_nav_link(author, output_file, True) }}
|
||||
{% endblock %}
|
||||
119
blue-penguin-dark/templates/base.html
Normal file
119
blue-penguin-dark/templates/base.html
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
{% macro ephemeral_nav_link(what, where, selected=False) -%}
|
||||
<li class="ephemeral{% if selected %} selected{% endif %}"><a href="{{ SITEURL }}/{{ where }}">{{what}}</a></li>
|
||||
{%- endmacro -%}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
|
||||
{# favicon #}
|
||||
<link rel="shortcut icon" type="image/png" href="{{ SITEURL }}/favicon.png">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ SITEURL }}/favicon.ico">
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ALL_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
|
||||
{% 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="{{ SITENAME }} Categories Atom Feed" />
|
||||
{% 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="{{ SITENAME }} Categories RSS Feed" />
|
||||
{% 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="{{ SITENAME }} Tags Atom Feed" />
|
||||
{% 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="{{ SITENAME }} Tags RSS Feed" />
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/main.css" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/pygments.css" type="text/css" />
|
||||
{% if DARK_LIGHT_SWITCHING_OFF == False %}
|
||||
<style>
|
||||
@media (prefers-color-scheme: light) {
|
||||
/* Catppuccin Latte */
|
||||
:root {
|
||||
--main-bg-color: #eff1f5; /* Latte Base */
|
||||
--accent-color: #8839ef; /* Latte Mauve */
|
||||
--tab-bg-hover: #ccd0da; /* Latte Surface0 */
|
||||
--info-bg-color: #bcc0cc; /* Latte Surface1 */
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
<meta name="generator" content="Pelican" />
|
||||
<meta name="description" content="{{ SITEDESCRIPTION }}" />
|
||||
<meta name="author" content="{{ AUTHOR }}" />
|
||||
{% include 'analytics.html' %}
|
||||
{% endblock head %}
|
||||
</head>
|
||||
<body>
|
||||
{% if DISPLAY_HEADER or DISPLAY_HEADER is not defined %}
|
||||
<header>
|
||||
{% if DISPLAY_MENU or DISPLAY_MENU is not defined %}
|
||||
<nav style="overflow: hidden;">
|
||||
<ul>
|
||||
{% block ephemeral_nav %}{% endblock %}
|
||||
{% if DISPLAY_HOME or DISPLAY_HOME is not defined %}
|
||||
<li{% if output_file == "index.html" %} class="selected"{% endif %}><a href="{{ SITEURL }}/">Home</a></li>
|
||||
{% endif %}
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for p in pages %}
|
||||
<li{% if p == page %} class="selected"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% for name, link, file in MENU_INTERNAL_PAGES %}
|
||||
<li{% if output_file == file %} class="selected"{% endif %}><a href="{{ SITEURL }}/{{ link }}">{{ name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
<div class="header_box" style="height: 50px">
|
||||
<h1><a href="{{ SITEURL }}/">
|
||||
<image src='{{ SITELOGO }}' class="avatar" width="50px" /><span class="site_title">{{ SITENAME }}</span>
|
||||
</a></h1></div>
|
||||
{% if SITE_SUBTITLE %}
|
||||
<h2>{{ SITE_SUBTITLE }}</h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
{% endif %}
|
||||
<div id="wrapper">
|
||||
<div id="content">
|
||||
{%- block content -%}{%- endblock %}
|
||||
|
||||
{% if DISPLAY_FOOTER or DISPLAY_FOOTER is not defined %}
|
||||
<div class="clear"></div>
|
||||
<footer>
|
||||
<p>
|
||||
<a href="https://github.com/tcarwash/blue-penguin-dark">Blue Penguin Dark</a> Theme
|
||||
·
|
||||
Powered by <a href="http://getpelican.com">Pelican</a>
|
||||
{% if FEED_ALL_ATOM %}
|
||||
·
|
||||
<a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" rel="alternate">Atom Feed</a>
|
||||
{% endif %}
|
||||
{% if FEED_ALL_RSS %}
|
||||
·
|
||||
<a href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" rel="alternate">Rss Feed</a>
|
||||
{% endif %}
|
||||
</footer>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
6
blue-penguin-dark/templates/category.html
Normal file
6
blue-penguin-dark/templates/category.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %}{{ SITENAME }} | articles in the "{{ category }}" category{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %}
|
||||
{% block ephemeral_nav %}
|
||||
|
||||
{{ ephemeral_nav_link(category, output_file, True) }}
|
||||
{% endblock %}
|
||||
12
blue-penguin-dark/templates/disqus.html
Normal file
12
blue-penguin-dark/templates/disqus.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% if DISQUS_SITENAME %}
|
||||
<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 the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
||||
{% endif %}
|
||||
17
blue-penguin-dark/templates/index.html
Normal file
17
blue-penguin-dark/templates/index.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }}{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %}
|
||||
{% block content %}
|
||||
{% set date = None %}
|
||||
{% for article in articles_page.object_list %}
|
||||
{% if date != article.date.date() %}
|
||||
{% set first_article_of_day = True %}
|
||||
{% else %}
|
||||
{% set first_article_of_day = False %}
|
||||
{% endif %}
|
||||
{% set date = article.date.date() %}
|
||||
{% include "article_stub.html" %}
|
||||
{% endfor %}
|
||||
|
||||
{% include "pagination.html" %}
|
||||
{% endblock %}
|
||||
11
blue-penguin-dark/templates/page.html
Normal file
11
blue-penguin-dark/templates/page.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} | {{ page.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<article class="post">
|
||||
<h2 class="title">{{ page.title }}</h2>
|
||||
{{ page.content }}
|
||||
</article>
|
||||
{% endblock %}
|
||||
17
blue-penguin-dark/templates/pagination.html
Normal file
17
blue-penguin-dark/templates/pagination.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{# Use PAGINATION_PATTERNS or pagination may break #}
|
||||
{% if DEFAULT_PAGINATION and (articles_page.has_previous() or articles_page.has_next()) %}
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="pages">
|
||||
|
||||
{% if articles_page.has_previous() %}
|
||||
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}" class="prev_page">← Previous</a>
|
||||
{% endif %}
|
||||
|
||||
{% if articles_page.has_next() %}
|
||||
<a href="{{ SITEURL }}/{{ articles_next_page.url }}" class="next_page">Next →</a>
|
||||
{% endif %}
|
||||
|
||||
<span>Page {{ articles_page.number }} of {{ articles_paginator.num_pages }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
5
blue-penguin-dark/templates/tag.html
Normal file
5
blue-penguin-dark/templates/tag.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %}{{ SITENAME }} | articles tagged "{{ tag }}"{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %}
|
||||
{% block ephemeral_nav %}
|
||||
{{ ephemeral_nav_link(tag, output_file, True) }}
|
||||
{% endblock %}
|
||||
8
blue-penguin-dark/templates/tags.html
Normal file
8
blue-penguin-dark/templates/tags.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for tag, articles in tags %}
|
||||
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
6
blue-penguin-dark/templates/translations.html
Normal file
6
blue-penguin-dark/templates/translations.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{% if article.translations %}
|
||||
Translations:
|
||||
{% for translation in article.translations %}
|
||||
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue