summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Mark Wooding [Mon, 12 Jun 2023 10:33:57 +0000 (11:33 +0100)]
mason/dhandler (.thumbnail + callers): Pass in pre-scaled thumbnail.
The objective here is to give the caller control over the order in which
image scaling occurs. In particular, by loading an image once and
generating the required scaled versions, we can potentially save a lot
of memory, which is a significant factor when dealing with full-size
DSLR images.
Mark Wooding [Mon, 12 Jun 2023 10:30:35 +0000 (11:30 +0100)]
mason/dhandler (.contact): Recurse into first folder to find index image.
This isn't always the best choice, but it's better than the plain folder
icon.
Mark Wooding [Mon, 12 Jun 2023 10:25:28 +0000 (11:25 +0100)]
mason/.perl-lib/TrivGal.pm (listdir): Delete redundant package qualifier.
Mark Wooding [Sun, 11 Jun 2023 17:47:45 +0000 (18:47 +0100)]
mason/dhandler (.image): Compare references rather than filenames.
... for determining whether this is the focus image.
Mark Wooding [Sun, 11 Jun 2023 17:42:02 +0000 (18:42 +0100)]
mason/.perl-lib/TrivGal.pm (Image::scale): Return encoded URL.
Also, apply HTML-encoding as necessary, because I'd failed to do that.
Mark Wooding [Sun, 11 Jun 2023 17:07:08 +0000 (18:07 +0100)]
mason/dhandler (.contact): Strip out the multiple-size machinery.
Also, use the same size consistently throughout.
Mark Wooding [Sun, 11 Jun 2023 16:58:27 +0000 (17:58 +0100)]
mason/dhandler (.contact): Reformat a overly-long line.
Mark Wooding [Sun, 11 Jun 2023 16:55:33 +0000 (17:55 +0100)]
mason/dhandler (.contact): Slightly reformat trailing-`/' redirect code.
Mark Wooding [Sun, 11 Jun 2023 16:51:46 +0000 (17:51 +0100)]
mason/.perl-lib/TrivGal.pm: Append `/' to folder names.
Probably pedantically technical. I was considering doing this anyway,
and then noticed that folders listed in an index file (a) must have a
trailing `/' to be recognized as a folder, and (b) this doesn't get
removed in the generated contact page.
Mark Wooding [Sun, 11 Jun 2023 16:48:42 +0000 (17:48 +0100)]
mason/.perl-lib/TrivGal.pm (Image::scale): Put `-' in temporary file name.
After all, this what `clean_temp_files' is looking for.
Mark Wooding [Sun, 11 Jun 2023 16:45:31 +0000 (17:45 +0100)]
mason/.perl-lib/TrivGal.pm (listdir): Set item before setting index.
Otherwise we set the index to the /previous/ item, which doesn't go so
well. I don't know why I never noticed this before.
Mark Wooding [Sun, 11 Jun 2023 15:35:10 +0000 (16:35 +0100)]
mason/.perl-lib/TrivGal.pm: Expand a couple of compicated regices.
Yes, that is the correct plural. Fight me.
Mark Wooding [Sun, 11 Jun 2023 15:29:37 +0000 (16:29 +0100)]
mason/.perl-lib/TrivGal.pm (listdir): Anchor regex to line start.
I don't think this is actually a problem, because the pattern
irrefutably matches at the start of the line anyway. But for form's
sake, it should be properly anchored.
Mark Wooding [Sun, 11 Jun 2023 15:26:49 +0000 (16:26 +0100)]
mason/.perl-lib/TrivGal.pm: Settle on `#' as the emergency regex delimiter.
Mark Wooding [Sun, 11 Jun 2023 10:06:47 +0000 (11:06 +0100)]
mason/.perl-lib/TrivGal.pm: Remove spurious `$e'.
Must have been a copy-and-paste from below.
Mark Wooding [Sun, 11 Jun 2023 10:05:33 +0000 (11:05 +0100)]
mason/.perl-lib/TrivGal.pm: Fix image flipping again, but properly.
Brown paper bag time.
Mark Wooding [Fri, 9 Jun 2023 21:12:00 +0000 (22:12 +0100)]
mason/dhandler: Add a `scale' parameter to images.
Just ensures that a cached thumbnail of the requested size exists and
redirects to it. Useful for references from other pages.
Mark Wooding [Fri, 9 Jun 2023 21:10:55 +0000 (22:10 +0100)]
mason/dhandler: Build the image a little earlier.
Just in case we have another use for it in mind. Maybe.
Mark Wooding [Fri, 9 Jun 2023 21:11:46 +0000 (22:11 +0100)]
mason/dhandler: Pass arguments to the subcomponent.
Mark Wooding [Fri, 9 Jun 2023 21:11:28 +0000 (22:11 +0100)]
mason/dhandler: Delete stray debugging code.
Mark Wooding [Fri, 9 Jun 2023 21:09:39 +0000 (22:09 +0100)]
mason/.perl-lib/TrivGal.pm: Flip the image correctly when asked.
Mark Wooding [Thu, 12 May 2022 10:52:07 +0000 (11:52 +0100)]
mason/dhandler: Announce source code through `X-AGPL-Source' HTTP header.
Mark Wooding [Thu, 12 May 2022 10:51:42 +0000 (11:51 +0100)]
mason/dhandler, mason/.perl-lib/TrivGal: Publish and use `$SRCURL'.
Mark Wooding [Thu, 12 May 2022 10:44:26 +0000 (11:44 +0100)]
mason/dhandler: Add a `license' relationship to the AGPL link.
There's also a `license' relation on the Creative Commons link in my
custom footer. Let's hope this isn't too confusing.
Mark Wooding [Fri, 29 Apr 2022 16:50:33 +0000 (17:50 +0100)]
mason/.perl-lib/TrivGal.pm: Handle EXIF `Orientation'.
Apparently Imlib2 doesn't do this for me. :-( OpenCamera hard-rotates
its images rather than using EXIF metadata, so I didn't notice before,
but my Nikon cameras don't do this.
Mark Wooding [Fri, 29 Apr 2022 16:49:44 +0000 (17:49 +0100)]
mason/.perl-lib/TrivGal.pm: Fix behaviour for `unreadable' directories.
They can be listed in the parent, but their contents is secret.
Mark Wooding [Fri, 24 Dec 2021 17:50:56 +0000 (17:50 +0000)]
Introduce multiple thumbnail strips, and select one in a sensible way.
Significantly, there are now multiple thumbnail strips and `focus'
thumbnails, so we need to be more intelligent about scrolling them.
Mark Wooding [Fri, 24 Dec 2021 17:32:57 +0000 (17:32 +0000)]
mason/dhandler, static/tgal.css: Embrace idea of multiple thumbnail sets.
Rather than a single row of thumbnails, the code is now structured so
that it might have several at the same time, with different sizes. CSS
media queries can control which one actually gets displayed.
Internally, we make two passes over a directory, fetching the images the
first time through, and making scaled thumbnails afterwards, and
introduce loops over the available sizes (though currently there's only
the one).
We're actually just making the same display as before, so there's still
no functional change.
Mark Wooding [Fri, 24 Dec 2021 17:28:03 +0000 (17:28 +0000)]
mason/{.perl-lib/TrivGal,dhandler}: Make an image object.
The objective here is to separate image loading from scaling, so that we
can make several scaled output images without having to load and decode
the original image each time.
The `.thumbnail' module now takes an image object rather than a
pathname. There's no functional change.
Mark Wooding [Thu, 23 Dec 2021 19:53:43 +0000 (19:53 +0000)]
Embrace the idea of multiple thumbnail sizes.
This is all prep work for a forthcoming change.
* Rename the `thumb' sized to be `bigthumb', contemplating other
thumbnail sizes.
* Pass a `$size' argument to the `.thumbnail' module.
* Attach the thumbnail size name as an additional class to the
`figure' and `figcaption' classes. (We'll add it to `thumbstrip'
and `gallery' too, later.)
Mark Wooding [Wed, 22 Dec 2021 18:25:06 +0000 (18:25 +0000)]
mason/dhandler: Remove pointless `/' concatenation from `join_paths' call.
Mark Wooding [Wed, 22 Dec 2021 18:19:06 +0000 (18:19 +0000)]
mason/.perl-lib/TrivGal.pm: Remove final `;' after `package' blocks.
Mark Wooding [Sat, 18 Dec 2021 12:59:09 +0000 (12:59 +0000)]
mason/dhandler: Mark thumbnail images as loading lazily.
Mark Wooding [Thu, 23 Dec 2021 21:59:36 +0000 (21:59 +0000)]
static/tgal.css: Use flex layout for folder galleries.
Space the elements evenly in each row. Alas, it's hard to arrange for
lines to be broken so that each row has about the same number of items,
so that's a project for later.
Mark Wooding [Thu, 23 Dec 2021 21:51:56 +0000 (21:51 +0000)]
static/tgal.css: Explicitly centre text in `figcaption'.
Don't rely on this being set up in some parent element -- 'cos it won't
be.
Mark Wooding [Sat, 18 Dec 2021 14:00:51 +0000 (14:00 +0000)]
mason/dhandler, static/tgal.css: Use `figure' and `figcaption' elements.
Mark Wooding [Sat, 18 Dec 2021 13:59:34 +0000 (13:59 +0000)]
mason/dhandler, static/tgal.css: Use `thumb' class, not `pic'.
I don't know what I was thinking.
Mark Wooding [Sat, 25 Dec 2021 16:07:01 +0000 (16:07 +0000)]
static/tgal.css: Adjust the height of the arrows again.
*sigh*. I really want a better approach for this.
Mark Wooding [Thu, 23 Dec 2021 21:57:16 +0000 (21:57 +0000)]
static/tgal.css: Centre the thumbstrip horizontally if it's short.
Using `justify-content' clips thumbnails on the left, if there are too
many to fit. Instead, (a) set `max-width' rather than `width', and use
`align-self' to centre in the outer flex box.
Mark Wooding [Thu, 23 Dec 2021 20:44:24 +0000 (20:44 +0000)]
static/tgal.css: Remove pointless `white-space: normal'.
No longer neended now that `thumbstrip' uses flex layout.
Mark Wooding [Thu, 16 Dec 2021 02:32:33 +0000 (02:32 +0000)]
static/tgal.css: Use flex layout for the thumbnail strip.
Using flow layout respects the whitespace between the thumbnails, which
leaves me with an annoying choice between strictly-correct rendering and
moderately well-formatted source text.
Mark Wooding [Thu, 16 Dec 2021 01:11:09 +0000 (01:11 +0000)]
static/tgal.css: Enlarge the left/right arrow boxes.
I wish I could arrange to have them centred automatically, but I don't
know how to do that. I've tried the obvious things, and they cause the
buttons to come out near the centre, but slightly offset -- by an amount
dependent on the font. Making the arrows be images won't work properly
with Dark Reader or similar extensions.
Mark Wooding [Wed, 15 Dec 2021 12:35:30 +0000 (12:35 +0000)]
Initial commit.