1
0
Fork 0
forked from github/pelican

feat: add work in progress state

This commit is contained in:
Oliver Ladner 2024-10-21 07:53:36 +02:00
commit de5b3aec04
14 changed files with 2537 additions and 37 deletions

1
pelican/themes/simple/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules/

View file

@ -0,0 +1,19 @@
# lugh Pelican theme
Heavy work in progress
## Docs
### Pelican: how to create your own theme
https://docs.getpelican.com/en/stable/themes.html
### Tailwind CSS quick start
https://tailwindcss.com/docs/installation
## My requirements for this theme
- WCAG 2.2 :construction:
- Light and dark mode :construction:
- Code highlighting :construction:

1500
pelican/themes/simple/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,5 @@
{
"devDependencies": {
"tailwindcss": "^3.4.13"
}
}

View file

@ -0,0 +1,42 @@
@tailwind base; /* Preflight will be injected here */
@tailwind components;
@tailwind utilities;
@layer base {
html {
/* use serif font style as default */
/*@apply font-serif;*/
@apply font-sans;
}
a {
@apply text-green-600 hover:text-green-300 underline decoration-2 underline-offset-4;
}
h1 {
@apply font-sans text-7xl;
}
h2 {
@apply font-sans text-5xl mb-6 mt-4;
}
h3 {
@apply font-sans text-4xl mb-6 mt-4;
}
h4 {
@apply font-sans text-3xl mb-6 mt-4;
}
h5 {
@apply font-sans text-2xl mb-6 mt-4;
}
h6 {
@apply font-sans text-xl mb-6 mt-4;
}
ul {
@apply list-disc list-inside;
}
dd {
@apply pl-8;
}
}
.highlight {
@apply bg-gray-300 font-mono m-5 p-5;
/*@apply bg-gray-300 font-mono m-5 p-5 block;*/
}

View file

@ -0,0 +1,838 @@
*, ::before, ::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
::backdrop {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
/*
! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box;
/* 1 */
border-width: 0;
/* 2 */
border-style: solid;
/* 2 */
border-color: #e5e7eb;
/* 2 */
}
::before,
::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
-moz-tab-size: 4;
/* 3 */
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 4 */
font-feature-settings: normal;
/* 5 */
font-variation-settings: normal;
/* 6 */
-webkit-tap-highlight-color: transparent;
/* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
margin: 0;
/* 1 */
line-height: inherit;
/* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
height: 0;
/* 1 */
color: inherit;
/* 2 */
border-top-width: 1px;
/* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
color: inherit;
text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
/* 1 */
font-feature-settings: normal;
/* 2 */
font-variation-settings: normal;
/* 3 */
font-size: 1em;
/* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
text-indent: 0;
/* 1 */
border-color: inherit;
/* 2 */
border-collapse: collapse;
/* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-feature-settings: inherit;
/* 1 */
font-variation-settings: inherit;
/* 1 */
font-size: 100%;
/* 1 */
font-weight: inherit;
/* 1 */
line-height: inherit;
/* 1 */
letter-spacing: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
/* 2 */
padding: 0;
/* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
-webkit-appearance: button;
/* 1 */
background-color: transparent;
/* 2 */
background-image: none;
/* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
margin: 0;
padding: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
input::placeholder,
textarea::placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
/* 1 */
vertical-align: middle;
/* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
max-width: 100%;
height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden] {
display: none;
}
html {
/* use serif font style as default */
/*@apply font-serif;*/
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
a {
--tw-text-opacity: 1;
color: rgb(22 163 74 / var(--tw-text-opacity));
text-decoration-line: underline;
text-decoration-thickness: 2px;
text-underline-offset: 4px;
}
a:hover {
--tw-text-opacity: 1;
color: rgb(134 239 172 / var(--tw-text-opacity));
}
h1 {
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 4.5rem;
line-height: 1;
}
h2 {
margin-bottom: 1.5rem;
margin-top: 1rem;
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 3rem;
line-height: 1;
}
h3 {
margin-bottom: 1.5rem;
margin-top: 1rem;
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 2.25rem;
line-height: 2.5rem;
}
h4 {
margin-bottom: 1.5rem;
margin-top: 1rem;
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1.875rem;
line-height: 2.25rem;
}
h5 {
margin-bottom: 1.5rem;
margin-top: 1rem;
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1.5rem;
line-height: 2rem;
}
h6 {
margin-bottom: 1.5rem;
margin-top: 1rem;
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1.25rem;
line-height: 1.75rem;
}
ul {
list-style-position: inside;
list-style-type: disc;
}
dd {
padding-left: 2rem;
}
/* Preflight will be injected here */
.absolute {
position: absolute;
}
.relative {
position: relative;
}
.bottom-8 {
bottom: 2rem;
}
.left-0 {
left: 0px;
}
.col-span-2 {
grid-column: span 2 / span 2;
}
.col-span-3 {
grid-column: span 3 / span 3;
}
.block {
display: block;
}
.inline-block {
display: inline-block;
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.h-\[350px\] {
height: 350px;
}
.h-full {
height: 100%;
}
.w-full {
width: 100%;
}
.list-none {
list-style-type: none;
}
.grid-cols-5 {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
.justify-between {
justify-content: space-between;
}
.overflow-hidden {
overflow: hidden;
}
.rounded-lg {
border-radius: 0.5rem;
}
.bg-gray-700 {
--tw-bg-opacity: 1;
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}
.bg-green-200 {
--tw-bg-opacity: 1;
background-color: rgb(187 247 208 / var(--tw-bg-opacity));
}
.bg-green-400 {
--tw-bg-opacity: 1;
background-color: rgb(74 222 128 / var(--tw-bg-opacity));
}
.bg-green-700\/95 {
background-color: rgb(21 128 61 / 0.95);
}
.bg-gradient-to-b {
background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}
.from-green-200 {
--tw-gradient-from: #bbf7d0 var(--tw-gradient-from-position);
--tw-gradient-to: rgb(187 247 208 / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.from-10\% {
--tw-gradient-from-position: 10%;
}
.to-green-400\/95 {
--tw-gradient-to: rgb(74 222 128 / 0.95) var(--tw-gradient-to-position);
}
.object-cover {
-o-object-fit: cover;
object-fit: cover;
}
.object-center {
-o-object-position: center;
object-position: center;
}
.p-2 {
padding: 0.5rem;
}
.p-4 {
padding: 1rem;
}
.p-8 {
padding: 2rem;
}
.pb-60 {
padding-bottom: 15rem;
}
.pt-20 {
padding-top: 5rem;
}
.text-center {
text-align: center;
}
.text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
.text-3xl {
font-size: 1.875rem;
line-height: 2.25rem;
}
.font-bold {
font-weight: 700;
}
.italic {
font-style: italic;
}
.leading-relaxed {
line-height: 1.625;
}
.text-green-300 {
--tw-text-opacity: 1;
color: rgb(134 239 172 / var(--tw-text-opacity));
}
.text-slate-500 {
--tw-text-opacity: 1;
color: rgb(100 116 139 / var(--tw-text-opacity));
}
.no-underline {
text-decoration-line: none;
}
.opacity-65 {
opacity: 0.65;
}
.highlight {
margin: 1.25rem;
--tw-bg-opacity: 1;
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
padding: 1.25rem;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
/*@apply bg-gray-300 font-mono m-5 p-5 block;*/
}
.target\:border-blue-400:target {
--tw-border-opacity: 1;
border-color: rgb(96 165 250 / var(--tw-border-opacity));
}
.hover\:bg-blue-800:hover {
--tw-bg-opacity: 1;
background-color: rgb(30 64 175 / var(--tw-bg-opacity));
}
.hover\:bg-red-800:hover {
--tw-bg-opacity: 1;
background-color: rgb(153 27 27 / var(--tw-bg-opacity));
}

View file

@ -0,0 +1,29 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./templates/*.html"],
theme: {
//spacing: {},
//fontSize: {
// sm: "0.8rem",
// base: "1.2rem",
// xl: "1.25rem",
// "2xl": "1.563rem",
// "3xl": "1.953rem",
// "4xl": "2.441rem",
// "5xl": "3.052rem",
// "6xl": "4.052rem",
// "7xl": "5.052rem",
//},
//fontFamily: {
//sans: ["Erode", "sans-serif"],
//serif: ["Recia", "serif"],
//},
// We don't use extend as we want to limit certain things like colors,
// fontsize to our own liking
extend: {},
},
plugins: [],
//corePlugins: {
// preflight: false,
//},
};

View file

@ -3,7 +3,9 @@
{% block title %}{{ SITENAME|striptags }} - Archives{% endblock %} {% block title %}{{ SITENAME|striptags }} - Archives{% endblock %}
{% block content %} {% block content %}
<h2>Archives for {{ SITENAME }}</h2> <h2>Blog post archive</h2>
All blog posts ever published.
<dl> <dl>
{% for article in dates %} {% for article in dates %}

View file

@ -24,13 +24,27 @@
{% block content %} {% block content %}
<article> <article>
<header> <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 %} {% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }} {{ translations.translations_for(article) }}
</header> </header>
<div class="leading-relaxed">
{{ article.content }} {{ article.content }}
</div>
<footer> <footer>
<p>Published: <time datetime="{{ article.date.isoformat() }}"> <p>Published: <time datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }} {{ article.locale_date }}

View file

@ -36,37 +36,67 @@
{% if TAG_FEED_RSS and tag %} {% 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" /> <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 %} {% endif %}
<link href="https://api.fontshare.com/v2/css?f[]=recia@400&f[]=erode@600&display=swap" rel="stylesheet" />
{% endblock head %} {% endblock head %}
</head> </head>
<body> <body>
<header> <div class="grid grid-cols-5">
<hgroup><h1><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1>{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}</hgroup> <div class="col-span-3 bg-green-400 p-8">
<nav><ul> <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 %} {% 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 %} {% endfor %}
{% if DISPLAY_PAGES_ON_MENU %} {% if DISPLAY_PAGES_ON_MENU %}
{% for p in pages %} {% 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 %} {% endfor %}
{% endif %} {% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU %} {% if DISPLAY_CATEGORIES_ON_MENU %}
{% for cat, null in categories %} {% 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 %} {% endfor %}
{% endif %} {% endif %}
</ul></nav> </ul>
</header> </nav>
<main> </div>
{% block content %} <div class="bg-green-200">
{% endblock %} </div>
</main> <div class="col-span-3 bg-green-200 p-4">
<footer> <main>
<address> {% block content %}
Proudly powered by <a rel="nofollow" href="https://getpelican.com/">Pelican</a>, {% endblock %}
which takes great advantage of <a rel="nofollow" href="https://www.python.org/">Python</a>. </main>
</address> </div>
</footer> <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> </body>
</html> </html>

View file

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

View file

@ -4,18 +4,19 @@
<h2>All articles</h2> <h2>All articles</h2>
{% endblock %} {% endblock %}
{% for article in articles_page.object_list %} {% for article in articles_page.object_list %}
<article> <article>
<header> <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header> <header> <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
<section>{{ article.summary }}</section> <section>{{ article.summary }}</section>
<footer> <footer>
<p>Published: <time datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time></p> <p>Published: <time datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time></p>
{% if article.authors %}
<address>By <address>By
{% for author in article.authors %} {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> <a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %} {% endfor %}
</address> </address>
{% endif %}
</footer> </footer>
</article> </article>
{% endfor %} {% endfor %}

View file

@ -15,12 +15,27 @@
{% block content %} {% block content %}
<article> <article>
<header> <header>
{% if not page.image %}
<h2>{{ page.title }}</h2> <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> </header>
{% import 'translations.html' as translations with context %} {% import 'translations.html' as translations with context %}
{{ translations.translations_for(page) }} {{ translations.translations_for(page) }}
<div class="leading-relaxed">
{{ page.content }} {{ page.content }}
</div>
{% if page.modified %} {% if page.modified %}
<footer> <footer>

View file

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