1
0
Fork 0
forked from github/pelican

pre-commit filter auto-indents templates, css, js

This commit is contained in:
boxydog 2024-05-31 07:34:01 -05:00
commit 4af40e8077
159 changed files with 12034 additions and 12034 deletions

View file

@ -3,12 +3,12 @@
{% block title %}{{ SITENAME|striptags }} - Archives{% endblock %}
{% block content %}
<h2>Archives for {{ SITENAME }}</h2>
<h2>Archives for {{ SITENAME }}</h2>
<dl>
{% for article in dates %}
<dt>{{ article.locale_date }}</dt>
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
<dl>
{% for article in dates %}
<dt>{{ article.locale_date }}</dt>
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
{% endblock %}

View file

@ -22,44 +22,44 @@
{% endblock %}
{% block content %}
<article>
<header>
<h2>
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }}
</header>
{{ article.content }}
<footer>
<p>Published: <time datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time></p>
{% if article.modified %}
<p>Last updated: <time datetime="{{ article.modified.isoformat() }}">
{{ article.locale_modified }}
</time></p>
{% endif %}
{% if article.authors %}
<address>
By {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %}
</address>
{% endif %}
{% if article.category %}
<p>
Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
</p>
{% endif %}
{% if article.tags %}
<p>
Tags:
{% for tag in article.tags %}
<article>
<header>
<h2>
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }}
</header>
{{ article.content }}
<footer>
<p>Published: <time datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time></p>
{% if article.modified %}
<p>Last updated: <time datetime="{{ article.modified.isoformat() }}">
{{ article.locale_modified }}
</time></p>
{% endif %}
{% if article.authors %}
<address>
By {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %}
</address>
{% endif %}
{% if article.category %}
<p>
Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
</p>
{% endif %}
{% if article.tags %}
<p>
Tags:
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
{% endfor %}
</p>
{% endif %}
</footer>
{% endfor %}
</p>
{% endif %}
</footer>
</article>
{% endblock %}

View file

@ -3,5 +3,5 @@
{% block title %}{{ SITENAME|striptags }} - Articles by {{ author }}{% endblock %}
{% block content_title %}
<h2>Articles by {{ author }}</h2>
<h2>Articles by {{ author }}</h2>
{% endblock %}

View file

@ -5,8 +5,8 @@
{% block content %}
<h2>Authors on {{ SITENAME }}</h2>
<ul>
{% for author, articles in authors|sort %}
<li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
{% endfor %}
{% for author, articles in authors|sort %}
<li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
{% endblock %}

View file

@ -1,50 +1,50 @@
<!DOCTYPE html>
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
<head>
{% block head %}
<title>{% block title %}{{ SITENAME|striptags }}{% endblock title %}</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if SITESUBTITLE %}
<head>
{% block head %}
<title>{% block title %}{{ SITENAME|striptags }}{% endblock title %}</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if SITESUBTITLE %}
<meta name="description" content="{{ SITESUBTITLE }}" />
{% endif %}
{% if STYLESHEET_URL %}
{% endif %}
{% if STYLESHEET_URL %}
<link rel="stylesheet" type="text/css" href="{{ STYLESHEET_URL }}" />
{% endif %}
{% if FEED_ALL_ATOM %}
{% endif %}
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Full Atom Feed" />
{% endif %}
{% if FEED_ALL_RSS %}
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} Full RSS Feed" />
{% endif %}
{% if FEED_ATOM %}
{% endif %}
{% if FEED_ATOM %}
<link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Atom Feed" />
{% endif %}
{% if FEED_RSS %}
{% endif %}
{% if FEED_RSS %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} RSS Feed" />
{% endif %}
{% if CATEGORY_FEED_ATOM and category %}
{% endif %}
{% if CATEGORY_FEED_ATOM and category %}
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Categories Atom Feed" />
{% endif %}
{% if CATEGORY_FEED_RSS and category %}
{% endif %}
{% if CATEGORY_FEED_RSS and category %}
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_RSS.format(slug=category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} Categories RSS Feed" />
{% endif %}
{% if TAG_FEED_ATOM and tag %}
{% endif %}
{% if TAG_FEED_ATOM and tag %}
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_ATOM.format(slug=tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Tags Atom Feed" />
{% endif %}
{% if TAG_FEED_RSS and tag %}
{% endif %}
{% if TAG_FEED_RSS and tag %}
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} Tags RSS Feed" />
{% endif %}
{% endblock head %}
</head>
{% endif %}
{% endblock head %}
</head>
<body>
<header>
<hgroup><h1><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1>{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}</hgroup>
<nav><ul>
<body>
<header>
<hgroup><h1><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1>{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}</hgroup>
<nav><ul>
{% for title, link in MENUITEMS %}
<li><a href="{{ link }}">{{ title }}</a></li>
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in pages %}
@ -56,17 +56,17 @@
<li><a href="{{ SITEURL }}/{{ cat.url }}" {% if cat==category %} aria-current="page" {% endif %}>{{ cat}}</a></li>
{% endfor %}
{% endif %}
</ul></nav>
</header>
<main>
{% block content %}
{% endblock %}
</main>
<footer>
<address>
Proudly powered by <a rel="nofollow" href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a rel="nofollow" href="https://www.python.org/">Python</a>.
</address>
</footer>
</body>
</ul></nav>
</header>
<main>
{% block content %}
{% endblock %}
</main>
<footer>
<address>
Proudly powered by <a rel="nofollow" href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a rel="nofollow" href="https://www.python.org/">Python</a>.
</address>
</footer>
</body>
</html>

View file

@ -5,8 +5,8 @@
{% block content %}
<h2>Categories on {{ SITENAME }}</h2>
<ul>
{% for category, articles in categories|sort %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
{% endfor %}
{% for category, articles in categories|sort %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
{% endblock %}

View file

@ -3,5 +3,5 @@
{% block title %}{{ SITENAME|striptags }} - {{ category }} category{% endblock %}
{% block content_title %}
<h2>Articles in the {{ category }} category</h2>
<h2>Articles in the {{ category }} category</h2>
{% endblock %}

View file

@ -1,27 +1,27 @@
{% extends "base.html" %}
{% block content %}
{% block content_title %}
<h2>All articles</h2>
{% endblock %}
{% block content_title %}
<h2>All articles</h2>
{% endblock %}
{% for article in articles_page.object_list %}
{% for article in articles_page.object_list %}
<article>
<header> <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
<section>{{ article.summary }}</section>
<footer>
<p>Published: <time datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time></p>
<address>By
<header> <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
<section>{{ article.summary }}</section>
<footer>
<p>Published: <time datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time></p>
<address>By
{% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %}
</address>
</footer>
</address>
</footer>
</article>
{% endfor %}
{% endfor %}
{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %}
{% endif %}
{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %}
{% endif %}
{% endblock content %}

View file

@ -13,10 +13,10 @@
{% endblock %}
{% block content %}
<article>
<header>
<h2>{{ page.title }}</h2>
</header>
<article>
<header>
<h2>{{ page.title }}</h2>
</header>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(page) }}
@ -25,9 +25,9 @@
{% if page.modified %}
<footer>
<p>
Last updated: {{ page.locale_modified }}
Last updated: {{ page.locale_modified }}
</p>
</footer>
{% endif %}
</article>
</article>
{% endblock %}

View file

@ -1,17 +1,17 @@
{% if DEFAULT_PAGINATION %}
{% set first_page = articles_paginator.page(1) %}
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
<nav>
<ul>
{% if articles_page.has_previous() %}
{% set first_page = articles_paginator.page(1) %}
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
<nav>
<ul>
{% if articles_page.has_previous() %}
<li><a href="{{ SITEURL }}/{{ first_page.url }}">&Lang;</a></li>
<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&lang;</a></li>
{% endif %}
<li>Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</li>
{% if articles_page.has_next() %}
{% endif %}
<li>Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</li>
{% if articles_page.has_next() %}
<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">&rang;</a></li>
<li><a href="{{ SITEURL }}/{{ last_page.url }}">&Rang;</a></li>
{% endif %}
</ul>
</nav>
{% endif %}
</ul>
</nav>
{% endif %}

View file

@ -3,12 +3,12 @@
{% block title %}{{ SITENAME|striptags }} - {{ period | reverse | join(' ') }} archives{% endblock %}
{% block content %}
<h2>Archives for {{ period | reverse | join(' ') }}</h2>
<h2>Archives for {{ period | reverse | join(' ') }}</h2>
<dl>
{% for article in dates %}
<dt>{{ article.locale_date }}</dt>
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
<dl>
{% for article in dates %}
<dt>{{ article.locale_date }}</dt>
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
{% endblock %}

View file

@ -3,5 +3,5 @@
{% block title %}{{ SITENAME|striptags }} - {{ tag }} tag{% endblock %}
{% block content_title %}
<h2>Articles tagged with {{ tag }}</h2>
<h2>Articles tagged with {{ tag }}</h2>
{% endblock %}

View file

@ -5,8 +5,8 @@
{% block content %}
<h2>Tags for {{ SITENAME }}</h2>
<ul>
{% for tag, articles in tags|sort %}
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
{% endfor %}
{% for tag, articles in tags|sort %}
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
{% endblock %}

View file

@ -1,16 +1,16 @@
{% macro translations_for(article) %}
{% if article.translations %}
Translations:
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}
{% if article.translations %}
Translations:
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}
{% endmacro %}
{% macro entry_hreflang(entry) %}
{% if entry.translations %}
{% for translation in entry.translations %}
<link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
{% endfor %}
{% endif %}
{% if entry.translations %}
{% for translation in entry.translations %}
<link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
{% endfor %}
{% endif %}
{% endmacro %}