From 841e45c113b8eae02dd398fcefa0b42b70f317c3 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Thu, 12 May 2022 16:45:11 -0600 Subject: [PATCH] Style external links with an icon --- pelicanconf.py | 1 + requirements.txt | 1 + themes/theme/templates/index.html | 26 +++++++++++++------------- themes/theme/templates/style.css | 7 +++++++ 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/pelicanconf.py b/pelicanconf.py index 51ef4c4..95fa482 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -36,6 +36,7 @@ MARKDOWN = { PLUGINS = [ 'obsidian', + 'linkclass', ] STATIC_PATHS = ['media', 'extra'] diff --git a/requirements.txt b/requirements.txt index eeca423..89be57b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,7 @@ Jinja2==3.1.2 Markdown==3.3.6 MarkupSafe==2.1.1 pelican==4.7.2 +pelican-linkclass==2.0.2 pelican-obsidian @ git+https://git.tannercollin.com/tanner/pelican-obsidian.git@41dd1d649127ae2833f5a4b1c3b6b6cb571117d8 Pygments==2.12.0 python-dateutil==2.8.2 diff --git a/themes/theme/templates/index.html b/themes/theme/templates/index.html index a189670..537e2da 100644 --- a/themes/theme/templates/index.html +++ b/themes/theme/templates/index.html @@ -40,10 +40,10 @@

Resume

@@ -55,39 +55,39 @@

- QotNews - — source code + QotNews + — source code

Hacker News, Reddit, Lobsters, and Tildes articles pre-rendered in reader mode. Optimized for speed and distraction-free reading.

- Notica - — source code + Notica + — source code

Send browser notifications from your terminal. No installation. No registration.

- Spaceport - — source code + Spaceport + — source code

Makerspace members' portal for Calgary Protospace. It tracks membership, courses, training, access cards, and more.

- t0txt - — source code + t0txt + — source code

Minimal command line pastebin. Allows you to upload text notes from a bash pipe or web browser.

- standardnotes-fs + standardnotes-fs

A filesystem that mounts your Standard Notes account as a directory of text files that you can edit.

diff --git a/themes/theme/templates/style.css b/themes/theme/templates/style.css index 0526cf7..7e25a77 100644 --- a/themes/theme/templates/style.css +++ b/themes/theme/templates/style.css @@ -12,6 +12,13 @@ a { outline: none; } +a.external { + background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23fff' stroke='%23000' d='M1.5 4.518h5.982V10.5H1.5z'/%3E%3Cpath fill='%23000' d='M5.765 1H11v5.39L9.427 7.937l-1.31-1.31L5.393 9.35l-2.69-2.688 2.81-2.808L4.2 2.544z'/%3E%3Cpath fill='%23fff' d='m9.995 2.004.022 4.885L8.2 5.07 5.32 7.95 4.09 6.723l2.882-2.88-1.85-1.852z'/%3E%3C/svg%3E%0A"); + background-position: center right; + background-repeat: no-repeat; + padding-right: 15px; +} + .info h1 { font: 1.1rem/1.0 sans-serif; }