tgal
2 years agomason/dhandler, mason/.perl-lib/TrivGal: Publish and use `$SRCURL'.
Mark Wooding [Thu, 12 May 2022 10:51:42 +0000 (11:51 +0100)]
mason/dhandler, mason/.perl-lib/TrivGal: Publish and use `$SRCURL'.

2 years agomason/dhandler: Add a `license' relationship to the AGPL link.
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.

2 years agomason/.perl-lib/TrivGal.pm: Handle EXIF `Orientation'.
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.

2 years agomason/.perl-lib/TrivGal.pm: Fix behaviour for `unreadable' directories.
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.

2 years agoIntroduce multiple thumbnail strips, and select one in a sensible way.
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.

2 years agomason/dhandler, static/tgal.css: Embrace idea of multiple thumbnail sets.
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.

2 years agomason/{.perl-lib/TrivGal,dhandler}: Make an image object.
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.

2 years agoEmbrace the idea of multiple thumbnail sizes.
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.)

2 years agomason/dhandler: Remove pointless `/' concatenation from `join_paths' call.
Mark Wooding [Wed, 22 Dec 2021 18:25:06 +0000 (18:25 +0000)]
mason/dhandler: Remove pointless `/' concatenation from `join_paths' call.

2 years agomason/.perl-lib/TrivGal.pm: Remove final `;' after `package' blocks.
Mark Wooding [Wed, 22 Dec 2021 18:19:06 +0000 (18:19 +0000)]
mason/.perl-lib/TrivGal.pm: Remove final `;' after `package' blocks.

2 years agomason/dhandler: Mark thumbnail images as loading lazily.
Mark Wooding [Sat, 18 Dec 2021 12:59:09 +0000 (12:59 +0000)]
mason/dhandler: Mark thumbnail images as loading lazily.

2 years agostatic/tgal.css: Use flex layout for folder galleries.
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.

2 years agostatic/tgal.css: Explicitly centre text in `figcaption'.
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.

2 years agomason/dhandler, static/tgal.css: Use `figure' and `figcaption' elements.
Mark Wooding [Sat, 18 Dec 2021 14:00:51 +0000 (14:00 +0000)]
mason/dhandler, static/tgal.css: Use `figure' and `figcaption' elements.

2 years agomason/dhandler, static/tgal.css: Use `thumb' class, not `pic'.
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.

2 years agostatic/tgal.css: Adjust the height of the arrows again.
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.

2 years agostatic/tgal.css: Centre the thumbstrip horizontally if it's short.
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.

2 years agostatic/tgal.css: Remove pointless `white-space: normal'.
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.

2 years agostatic/tgal.css: Use flex layout for the thumbnail strip.
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.

2 years agostatic/tgal.css: Enlarge the left/right arrow boxes.
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.

2 years agoInitial commit.
Mark Wooding [Wed, 15 Dec 2021 12:35:30 +0000 (12:35 +0000)]
Initial commit.