forked from github/pelican
feat: add work in progress state
This commit is contained in:
parent
84db21c724
commit
de5b3aec04
14 changed files with 2537 additions and 37 deletions
|
|
@ -3,7 +3,9 @@
|
|||
{% block title %}{{ SITENAME|striptags }} - Archives{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Archives for {{ SITENAME }}</h2>
|
||||
<h2>Blog post archive</h2>
|
||||
|
||||
All blog posts ever published.
|
||||
|
||||
<dl>
|
||||
{% for article in dates %}
|
||||
|
|
|
|||
20
pelican/themes/simple/templates/article.html
vendored
20
pelican/themes/simple/templates/article.html
vendored
|
|
@ -24,13 +24,27 @@
|
|||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
|
||||
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
|
||||
|
||||
|
||||
{% if not article.image %}
|
||||
<h2>{{ article.title }}</h2>
|
||||
{% endif %}
|
||||
{% if article.image %}
|
||||
<div class="relative overflow-hidden h-[350px]">
|
||||
<img class="w-full h-full object-cover object-center rounded-lg opacity-65" src="/img/banner/{{ article.image }}" alt="" />
|
||||
<div class="absolute bottom-8 left-0 text-green-300">
|
||||
<h2><span class="leading-relaxed bg-gray-700 p-2"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}" class="no-underline text-green-300">{{ article.title }}</a></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
</header>
|
||||
<div class="leading-relaxed">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
<footer>
|
||||
<p>Published: <time datetime="{{ article.date.isoformat() }}">
|
||||
{{ article.locale_date }}
|
||||
|
|
|
|||
66
pelican/themes/simple/templates/base.html
vendored
66
pelican/themes/simple/templates/base.html
vendored
|
|
@ -36,37 +36,67 @@
|
|||
{% 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 %}
|
||||
<link href="https://api.fontshare.com/v2/css?f[]=recia@400&f[]=erode@600&display=swap" rel="stylesheet" />
|
||||
{% endblock head %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<hgroup><h1><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1>{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}</hgroup>
|
||||
<nav><ul>
|
||||
<div class="grid grid-cols-5">
|
||||
<div class="col-span-3 bg-green-400 p-8">
|
||||
<header>
|
||||
<hgroup>
|
||||
<h1 class="font-bold"><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1>
|
||||
{% if SITESUBTITLE %}
|
||||
<p class="text-3xl font-bold text-slate-500 italic">{{ SITESUBTITLE }}</p>
|
||||
{% endif %}
|
||||
</hgroup>
|
||||
</header>
|
||||
</div>
|
||||
<div class="col-span-2">
|
||||
<nav class="bg-green-700/95 p-4 text-2xl">
|
||||
<ul class="list-none">
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
<li><a href="{{ link }}" class="no-underline">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% for title, link in LINKS %}
|
||||
<li><a href="{{ link }}" class="no-underline">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for p in pages %}
|
||||
<li><a href="{{ SITEURL }}/{{ p.url }}" {% if p==page %} aria-current="page" {% endif %}>{{ p.title }}</a></li>
|
||||
<li class="hover:bg-red-800"><a href="{{ SITEURL }}/{{ p.url }}" class="no-underline" {% if p==page %} aria-current="page" {% endif %}>{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU %}
|
||||
{% for cat, null in categories %}
|
||||
<li><a href="{{ SITEURL }}/{{ cat.url }}" {% if cat==category %} aria-current="page" {% endif %}>{{ cat}}</a></li>
|
||||
<li class="target:border-blue-400 hover:bg-blue-800"><a href="{{ SITEURL }}/{{ cat.url }}" class="no-underline" {% 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>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="bg-green-200">
|
||||
</div>
|
||||
<div class="col-span-3 bg-green-200 p-4">
|
||||
<main>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
<div class="bg-green-200">
|
||||
</div>
|
||||
<div class="bg-gradient-to-b from-green-200 from-10% to-green-400/95">
|
||||
</div>
|
||||
<div class="col-span-3 pt-20 pb-60 bg-gradient-to-b from-green-200 from-10% to-green-400/95">
|
||||
<footer>
|
||||
<div class="flex justify-between text-center">
|
||||
<div>Generated by <a href="https://github.com/getpelican/pelican" target="_blank">Pelican</a></div>
|
||||
<div>100% organic content licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display: inline-block">CC BY-SA 4.0</a></div>
|
||||
<div><a href="https://buymeacoffee.com/lugh" target="_blank">Buy me a coffee?</a></div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<div class="bg-gradient-to-b from-green-200 from-10% to-green-400/95">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
|
|
|||
3
pelican/themes/simple/templates/index.html
vendored
3
pelican/themes/simple/templates/index.html
vendored
|
|
@ -4,18 +4,19 @@
|
|||
<h2>All articles</h2>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% 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>
|
||||
{% if article.authors %}
|
||||
<address>By
|
||||
{% for author in article.authors %}
|
||||
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
</address>
|
||||
{% endif %}
|
||||
</footer>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
|
|
|||
17
pelican/themes/simple/templates/page.html
vendored
17
pelican/themes/simple/templates/page.html
vendored
|
|
@ -15,12 +15,27 @@
|
|||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
{% if not page.image %}
|
||||
<h2>{{ page.title }}</h2>
|
||||
{% endif %}
|
||||
{% if page.image %}
|
||||
|
||||
|
||||
<div class="relative overflow-hidden h-[350px]">
|
||||
<img class="w-full h-full object-cover object-center rounded-lg opacity-65" src="/img/banner/{{ page.image }}" alt="" />
|
||||
<div class="absolute bottom-8 left-0 text-green-300">
|
||||
<h2><span class="leading-relaxed bg-gray-700 p-2"><a href="{{ SITEURL }}/{{ page.url }}" rel="bookmark" title="Permalink to {{ page.title|striptags }}" class="no-underline text-green-300">{{ page .title }}</a></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</header>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(page) }}
|
||||
|
||||
<div class="leading-relaxed">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
|
||||
{% if page.modified %}
|
||||
<footer>
|
||||
|
|
|
|||
28
pelican/themes/simple/templates/pagination.html
vendored
28
pelican/themes/simple/templates/pagination.html
vendored
|
|
@ -1,17 +1,21 @@
|
|||
{% 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() %}
|
||||
{% if DEFAULT_PAGINATION %} {% set first_page = articles_paginator.page(1) %} {%
|
||||
set last_page = articles_paginator.page(articles_paginator.num_pages) %}
|
||||
<nav>
|
||||
<ul class="list-none">
|
||||
{% if articles_page.has_previous() %}
|
||||
<li><a href="{{ SITEURL }}/{{ first_page.url }}">⟪</a></li>
|
||||
<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">⟨</a></li>
|
||||
{% endif %}
|
||||
<li>Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</li>
|
||||
{% if articles_page.has_next() %}
|
||||
<li>
|
||||
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">⟨</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
Page {{ articles_page.number }} of {{ articles_paginator.num_pages
|
||||
}}
|
||||
</li>
|
||||
{% if articles_page.has_next() %}
|
||||
<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">⟩</a></li>
|
||||
<li><a href="{{ SITEURL }}/{{ last_page.url }}">⟫</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue