~cadence/bibliogram-devel

Add a(href=`#`) links around gallery images v1 PROPOSED

Byron Torres: 1
 Add a(href=`#`) links around gallery images

 1 files changed, 9 insertions(+), 8 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~cadence/bibliogram-devel/patches/24251/mbox | git am -3
Learn more about email & git

[PATCH] Add a(href=`#`) links around gallery images Export this patch

These links provide a target for accessibility or vimium users to set
focus on the post overlay image gallery, allowing one to scroll the
overlay, not the timeline, without a mouse click and scrollwheel or
touchscreen.
---

Additionally, there's a chance to add meaningful information onto the
link fragments for each entry, like a random or canonical id string, or
just ascending intergers. Perhaps Instagram has similar functionlity we
can match.  I don't know enough pug or of the data structure to
implement this myself.


 src/site/pug/includes/post.pug | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/site/pug/includes/post.pug b/src/site/pug/includes/post.pug
index 69e3acf..91ae68d 100644
--- a/src/site/pug/includes/post.pug
+++ b/src/site/pug/includes/post.pug
@@ -43,11 +43,12 @@ mixin post(post, headerWithNavigation)

		section.images-gallery
			for entry in post.children
				if entry.isVideo()
					video(src=entry.getVideoUrlP() controls preload="auto" width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-video
				else
					img(src=entry.getDisplayUrlP() alt=entry.getAlt() width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-image
				if willDisplayAltInGallery
					- let caption = entry.data.accessibility_caption
					if caption
						p.description.alt-in-gallery= caption
				a(href=`#`)
					if entry.isVideo()
						video(src=entry.getVideoUrlP() controls preload="auto" width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-video
					else
						img(src=entry.getDisplayUrlP() alt=entry.getAlt() width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-image
					if willDisplayAltInGallery
						- let caption = entry.data.accessibility_caption
						if caption
							p.description.alt-in-gallery= caption
-- 
2.32.0