A working demo of the pop-up can be found here.
I wanted a modal pop-up for images on my new Hugo site, and couldn't find one that worked with the styling that I do to the image path name.
I'm new to Hugo, but I feel that the solution is simple and effective. The close button has been optimzed for accessibility as it is named close
, but
displays only ×
(×).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import math | |
import textwrap | |
from datetime import timedelta | |
DURATIONS = {"s": 1, "m": 60, "h": 3600, "d": 86400, "w": 604800} | |
ERROR_RATES = [ | |
0.0001, | |
0.0005, | |
0.001, |
Everyone does it differently 😭 and most query string parsers don't support LHS or RHS parsing or building. Prefer RHS for clarity and simplicity of parsing. I don't like the -
or +
operators because It's easy to over look.
- ChatGPT
/users?sort=email,asc
- RHS Single Field
/users?sort=email:ASC
- RHS Multiple Fields
/users?sort=email:asc,name:desc
- RHS Multiple Fields Keyed
/users?sort=email:asc&sort=name:desc
- LHS
/users?sort=[asc]email
- LHS Multiple Fields
/users?sort=[asc]email,[desc]name