Compare commits

..

17 Commits

Author SHA1 Message Date
haemka a12f61af11 Fix social-links margins being zeroed by the global ul[class] reset
The reset rule (body, h1, ..., ul[class], ol[class], ..., dd { margin:
0 }) matches via ul[class] at specificity (0,0,1,1), which beats plain
class selectors like .social-links/.social-links--large (0,0,1,0)
regardless of source order - so the margin-top values set for both the
sidebar gap and the About-me divider-to-icon gap were silently always
overridden back to 0. Prefixing both selectors with the ul type
selector ties the specificity, letting these (later in the file) win.
2026-08-13 17:38:49 +00:00
haemka 6a2e23d68b Increase social link spacing further, add About-me divider
Sidebar gap 6rem -> 10rem (previous doubling still read as too small).
About-me page: add a subtle .social-links-divider <hr> between the bio
text and the icon row (8rem gap above it, 3rem below to the icons) -
11rem total separation from the text, up from 3rem, plus a visual
break as requested.
2026-08-13 17:01:31 +00:00
haemka 4d49471633 Refine social link icon spacing/sizing per feedback
Sidebar: double the standard 3rem section gap above the icon row
(6rem), horizontally centered instead of left-aligned.
About-me page: new .social-links--large variant via a
social_links_variant template var - icons at 5rem (was 1.25rem),
centered, 3rem gap from the preceding text (standard section gap,
distinct from the normal 1rem paragraph gap), wider inter-icon gap
to match the larger size.
2026-08-13 16:54:53 +00:00
haemka 33428ae44f Add social link icons to sidebar and About-me page
Small monochrome icon row (GitHub, LinkedIn, ORCID, Mastodon, Bluesky,
Matrix) rendered from a SOCIAL config tuple via a shared Jinja
partial (templates/includes/social_links.html), included unconditionally
in the sidebar below the tag cloud and again on the About-me page only.
Icons are inline SVGs (templates/icons/*.svg) using fill=currentColor,
so they track the existing accent-color/dark-mode toggle for free via
--main-link-color, no JS needed.
2026-08-13 16:44:14 +00:00
haemka e6a6bcd87c Fixed captions for SVGs, added translations for captions 2026-08-13 16:00:24 +02:00
haemka 4e1ab6da3c Added color switching, moved scripts into dedicated files 2026-08-13 14:59:41 +02:00
haemka add49ba73c Added multilingual and theme switching support, fixed multiple
positioning issues, added articles to sidebar
2026-08-13 12:41:05 +02:00
hmk 29d24c0b7d update category display in menu 2023-04-03 16:13:56 +02:00
hmk 3a89c9f44f Fixed main content area 2023-03-30 18:44:26 +02:00
hmk 595c68add7 Merge branch 'master' of https://git.haemka.in/hmk/pelican-latex into HEAD 2022-09-23 17:45:04 +02:00
hmk 139baea987 Preparing for dark/light mode specific code highlighting 2022-09-23 17:42:41 +02:00
haemka ba1ca4b752 Fixed CSS counters in articles 2020-06-02 17:40:08 +02:00
haemka c0adb69632 Fixed CSS path 2020-05-31 22:19:15 +02:00
haemka ab3486d0e8 Added dark mode 2020-05-31 22:02:32 +02:00
haemka d1f2eb2e21 Revert "Relative links for everything"
This reverts commit ff484f854e.
2020-05-31 21:59:18 +02:00
haemka ff484f854e Relative links for everything 2020-05-31 20:16:32 +02:00
haemka 39c9433fb1 Initial commit 2020-05-31 15:15:28 +02:00
9 changed files with 12 additions and 39 deletions
+1 -27
View File
@@ -1,30 +1,4 @@
# Pelican LaTeX theme
A theme for [Pelican](https://getpelican.com/) that mimics the look and feel of a LaTeX-typeset document — serif typography (bundled Latin Modern webfonts), justified body text, and syntax-highlighted code blocks styled to match.
A theme for pelican which mimics the look of LaTeX documents.
## Features
- Light and dark mode, plus a choice of accent color, all switchable at runtime and remembered across visits
- A serif/sans-serif font toggle for readers who prefer either look
- Sidebar navigation with pages, recent articles, categories, and a weighted tag cloud
- Built-in support for multilingual sites built with Pelican's `i18n_subsites` plugin, including a language switcher and per-page translation links
- Lightbox viewer for images, and inline SVG handling that lets diagrams adapt their colors to the current light/dark theme
- A small, optional row of social/profile link icons
## Structure
- `templates/` — Jinja2 templates for articles, pages, listing views (archives, tags, categories, authors), and shared partials
- `static/css/` — the theme's stylesheet and Pygments syntax-highlighting themes
- `static/js/` — the theme/accent/font toggles, lightbox, and SVG handling
- `static/fonts/` — the bundled Latin Modern webfonts
To use the theme, point a Pelican site's `THEME` setting at this repository (or a submodule checkout of it).
## Configuration
Beyond Pelican's standard settings, the theme reads a few of its own from `pelicanconf.py`:
- `SOCIAL` — a tuple of `(name, url, icon_slug)` entries for the social/profile link row. `icon_slug` must match an SVG file in `templates/icons/<icon_slug>.svg`; currently bundled are `github`, `linkedin`, `orcid`, `mastodon`, `bluesky`, and `matrix`. Add more by dropping in another icon file with a matching slug. Leave `SOCIAL` unset to omit the row entirely.
- `SITE_COMMIT` and `SITE_BRANCH` — optional build identifiers shown as a small line in the footer (e.g. "Build abc1234 (main)"), linked to the commit on Gitea. Meant to be set from a CI environment rather than hand-written; the footer line is omitted if `SITE_COMMIT` is empty.
The sidebar sections can also be toggled individually, following the same convention as Pelican's default theme: `DISPLAY_PAGES_ON_MENU` and `DISPLAY_CATEGORIES_ON_MENU` (both off unless set to `True`), and `DISPLAY_RECENT_ARTICLES_ON_MENU`/`DISPLAY_TAG_CLOUD_ON_MENU` (both on by default). `RECENT_ARTICLES_COUNT` caps the recent-articles list (default 10).
+5 -3
View File
@@ -426,10 +426,12 @@ ul.social-links {
height: 1.25rem;
}
/* About-me page variant: bigger icons, even gap above/below the divider.
/* About-me page variant: bigger icons, distinct gap from the text above.
Spacing to the preceding text is handled by .social-links-divider's
own margins, so this only needs the gap from divider to icons.
"ul.social-links--large" for the same specificity reason as above. */
ul.social-links--large {
margin-top: 5rem;
margin-top: 3rem;
gap: 1.5rem;
}
@@ -442,7 +444,7 @@ ul.social-links--large {
border: none;
border-top: 1px solid var(--table-border-color);
width: 4rem;
margin: 5rem auto 0 auto;
margin: 8rem auto 0 auto;
}
-3
View File
@@ -124,9 +124,6 @@
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
{% if SITE_COMMIT %}
<span class="header-delimiter">·</span> Build <a href="https://git.haemka.in/hmk/haemka.de/commit/{{ SITE_COMMIT }}">{{ SITE_COMMIT }}</a> ({{ SITE_BRANCH }})
{% endif %}
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
+1 -1
View File
@@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" focusable="false"><title>Bluesky</title><path d="M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path fill="currentColor" d="M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.912 0 3.283 0 4.088c0 .805.444 6.578.734 7.552.96 3.213 4.373 4.303 7.53 3.95-4.579.664-8.639 2.284-3.307 8.598 6.03 6.828 8.269-1.463 9.438-5.594 1.17 4.13 2.65 12.185 9.339 5.594 5.05-5.594 1.32-7.934-3.259-8.598 3.157.353 6.57-.737 7.53-3.95.29-.974.734-6.746.734-7.552 0-.805-.14-2.176-.902-2.523-.66-.3-1.664-.622-4.301 1.24C16.046 4.747 13.087 8.686 12 10.8z"/></svg>

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 595 B

+1 -1
View File
@@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" focusable="false"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path fill="currentColor" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.469-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23a11.5 11.5 0 0 1 3-.405c1.02.005 2.047.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 859 B

+1 -1
View File
@@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" focusable="false"><title>LinkedIn</title><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path fill="currentColor" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 645 B

+1 -1
View File
@@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" focusable="false"><title>Mastodon</title><path d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path fill="currentColor" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.055c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.36V9.647c0-1.014-.427-1.53-1.29-1.53-.95 0-1.425.615-1.425 1.83v2.652h-2.346V9.947c0-1.215-.475-1.83-1.425-1.83-.863 0-1.29.516-1.29 1.53v4.861h-2.36V9.463c0-1.013.258-1.818.775-2.415.532-.598 1.23-.904 2.09-.904.994 0 1.746.383 2.246 1.146l.484.812.484-.812c.5-.763 1.252-1.146 2.246-1.146.86 0 1.558.306 2.09.904.518.597.775 1.402.775 2.415v5.045z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

+1 -1
View File
@@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" focusable="false"><title>Matrix</title><path d="M.632.55v22.9H2.28V24H0V0h2.28v.55zm7.043 7.26v1.157h.033c.309-.443.683-.784 1.117-1.024.433-.245.936-.365 1.5-.365.54 0 1.033.107 1.481.314.448.208.785.582 1.02 1.108.254-.374.6-.706 1.034-.992.434-.287.95-.43 1.546-.43.453 0 .872.056 1.26.167.388.11.716.286.993.53.276.245.489.559.646.951.152.392.23.863.23 1.417v5.728h-2.349V11.52c0-.286-.01-.559-.032-.812a1.755 1.755 0 0 0-.18-.66 1.106 1.106 0 0 0-.438-.448c-.194-.11-.457-.166-.785-.166-.332 0-.6.064-.803.189a1.38 1.38 0 0 0-.48.499 1.946 1.946 0 0 0-.231.696 5.56 5.56 0 0 0-.06.785v4.768h-2.35v-4.8c0-.254-.004-.503-.018-.752a2.074 2.074 0 0 0-.143-.688 1.052 1.052 0 0 0-.415-.503c-.194-.125-.476-.19-.854-.19-.111 0-.259.024-.439.074-.18.051-.36.143-.53.282-.171.138-.319.337-.439.595-.12.259-.18.6-.18 1.02v4.966H5.46V7.81zm15.693 15.64V.55H21.72V0H24v24h-2.28v-.55z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path fill="currentColor" d="M.632.55v22.9H2.28V24H0V0h2.28v.55zm7.043 7.26v1.157h.033c.309-.443.683-.784 1.117-1.024.433-.245.936-.365 1.5-.365.54 0 1.033.107 1.481.314.448.208.785.582 1.02 1.108.254-.374.6-.706 1.034-.992.434-.287.95-.43 1.546-.43.453 0 .872.056 1.26.167.388.11.716.286.993.53.276.245.489.559.646.951.152.392.23.863.23 1.417v5.145h-2.349V11.05c0-.286-.01-.559-.033-.812a1.755 1.755 0 0 0-.164-.66.983.983 0 0 0-.383-.44c-.169-.11-.397-.163-.688-.163-.291 0-.53.056-.712.173a1.23 1.23 0 0 0-.424.448 1.821 1.821 0 0 0-.202.634 5.342 5.342 0 0 0-.052.732v4.705h-2.35v-4.66c0-.253-.005-.503-.018-.751a2.055 2.055 0 0 0-.135-.696.988.988 0 0 0-.363-.494c-.169-.125-.416-.187-.74-.187-.093 0-.216.02-.365.06-.15.041-.298.117-.443.229a1.32 1.32 0 0 0-.374.501c-.104.222-.156.51-.156.865v4.133H6.32V7.81zM23.368.55H21.72V0H24v24h-2.28v-.55h1.648z"/></svg>

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 976 B

+1 -1
View File
@@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" focusable="false"><title>ORCID</title><path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM7.369 4.378c.525 0 .947.431.947.947s-.422.947-.947.947a.95.95 0 0 1-.947-.947c0-.525.422-.947.947-.947zm-.722 3.038h1.444v10.041H6.647V7.416zm3.562 0h3.9c3.712 0 5.344 2.653 5.344 5.025 0 2.578-2.016 5.025-5.325 5.025h-3.919V7.416zm1.444 1.303v7.444h2.297c3.272 0 4.022-2.484 4.022-3.722 0-2.016-1.284-3.722-4.097-3.722h-2.222z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path fill="currentColor" d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM7.369 4.378c.525 0 .947.431.947.947 0 .525-.422.947-.947.947-.525 0-.946-.422-.946-.947 0-.516.421-.947.946-.947zm-.722 3.038h1.444v10.041H6.647V7.416zm3.562 0h3.9c3.712 0 5.344 2.653 5.344 5.025 0 2.578-2.016 5.025-5.325 5.025h-3.919V7.416zm1.444 1.303v7.444h2.297c3.272 0 4.022-2.484 4.022-3.722 0-2.016-1.284-3.722-4.097-3.722h-2.222z"/></svg>

Before

Width:  |  Height:  |  Size: 566 B

After

Width:  |  Height:  |  Size: 556 B