From b5a7653bfe7299a29d2323933fc355ae210df759 Mon Sep 17 00:00:00 2001 From: daudix Date: Wed, 11 Sep 2024 19:22:38 +0300 Subject: [PATCH] Allow opening original attachment by clicking --- CHANGELOG.md | 7 ++++--- content/blog/the-quill-of-duck/index.md | 6 ++++++ templates/partials/comments.html | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa8c9bc..86eb2e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `--disabled` CSS variable for setting opacity of disabled elements. - Add `--hover` CSS variable for setting zoom on hover. - Add `external` class to comment timestamp. +- Add `h1` with page/section title by default. - Add active state to footer's "Powered by" links. - Add active state to footnotes' go back button. - Add active state to slider thumb. - Add fading on top/bottom of the search results container. - Add loading animation to "Load Comments" button. +- Add margin between comment author name and timestamp. +- Add missing edge highlight to active footer navbar links. - Add special `switch` class for checkboxes (#70). - Add spoiler styles. - Add zoom-on-hover to custom comment emojis. @@ -28,10 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **[BREAKING]** Change the `--active` CSS variable to include `scale()` as well. - **[BREAKING]** Change the way `--bg-color` works. See [Tricks](https://duckquill.daudix.one/tricks/#background-image) page to see how to make background images work. -- Add `h1` with page/section title by default. -- Add margin between comment author name and timestamp. -- Add missing edge highlight to active footer navbar links. - Allow enabling table of contents on all pages and sections except for the homepage. +- Allow opening original comment attachment by clicking on it. - Allow overriding the `body` block of `base.html. - Allow statements on all sections except for the homepage. - Change the way 404 image is resized (#74). diff --git a/content/blog/the-quill-of-duck/index.md b/content/blog/the-quill-of-duck/index.md index fc38d56..f3ff778 100644 --- a/content/blog/the-quill-of-duck/index.md +++ b/content/blog/the-quill-of-duck/index.md @@ -28,6 +28,12 @@ disclaimer = """ # host = "mastodon.blaede.family" # user = "cassidy" # id = "112774854109302186" +# +# Post on GoToSocial +# +# host = "alpha.polymaths.social" +# user = "orbitalmartian" +# id = "01J7ETKJ19FGBDQGS1ZWZ3KEPP" host = "toot.community" user = "sungsphinx" id = "111789185826519979" diff --git a/templates/partials/comments.html b/templates/partials/comments.html index 3e74215..fb8b1cc 100644 --- a/templates/partials/comments.html +++ b/templates/partials/comments.html @@ -288,6 +288,13 @@ media.appendChild(mediaElement); break; } + + let mediaLink = document.createElement("a"); + mediaLink.setAttribute("href", attachment.url); + mediaLink.setAttribute("rel", "{{ rel_attributes }}"); + mediaLink.appendChild(mediaElement); + + media.appendChild(mediaLink); } }); }