From d538f38d0cc35c47dcab8c3481d6502964c0fb34 Mon Sep 17 00:00:00 2001 From: Conway Date: Sun, 19 Nov 2023 21:03:04 +0800 Subject: [PATCH] Add heading permalinks --- about/index.cmd | 4 ++-- about/index.html | 4 ++-- res/common.cmdr | 12 ++++++++++++ res/mahjong.css | 8 ++++++++ res/permalink.svg | 7 +++++++ scores/index.html | 4 ++-- 6 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 res/permalink.svg diff --git a/about/index.cmd b/about/index.cmd index fb65ed6..2e4ce41 100644 --- a/about/index.cmd +++ b/about/index.cmd @@ -3,7 +3,7 @@ OrdinaryDictionaryReplacement: #.boilerplate-properties-override - queue_position: BEFORE #boilerplate-properties * %title --> About -* %date-modified --> 2023-07-09 +* %date-modified --> 2023-11-19 %%% @@ -16,7 +16,7 @@ from a group chat into an actual gathering. -- -## Established 2023-06-25 +##{#established} Established 2023-06-25 -- Whereas certain people of Perth thought it good diff --git a/about/index.html b/about/index.html index 5d415d4..1eef4a3 100644 --- a/about/index.html +++ b/about/index.html @@ -34,7 +34,7 @@

About the Perth Mahjong Society

Credit to Felicia for progressing things from a group chat into an actual gathering.

-

Established 2023-06-25

+

Established 2023-06-25

Whereas certain people of Perth thought it good to assemble players of all abilities in a fine venue @@ -50,7 +50,7 @@

Established 2023-06-25

diff --git a/res/common.cmdr b/res/common.cmdr index 87ce277..cb59451 100644 --- a/res/common.cmdr +++ b/res/common.cmdr @@ -37,3 +37,15 @@ RegexDictionaryReplacement: #.common.footer Last modified: . " + +RegexDictionaryReplacement: #.heading-permalinks +- queue_position: BEFORE #headings +* (?P + [#]{2,6} + \{ + [#] (?P [\S]+ ) + \} + [\s]+ + ) + --> + \g []{.permalink aria-label=Permalink}(#\g) diff --git a/res/mahjong.css b/res/mahjong.css index fe74f59..54c47e2 100644 --- a/res/mahjong.css +++ b/res/mahjong.css @@ -90,6 +90,14 @@ th, td { } +.permalink { + background-image: url(permalink.svg); + background-position: center left; + background-repeat: no-repeat; + background-size: 1em; + padding-left: 1.5em; +} + .wide { overflow-x: auto; } diff --git a/res/permalink.svg b/res/permalink.svg new file mode 100644 index 0000000..50ecbab --- /dev/null +++ b/res/permalink.svg @@ -0,0 +1,7 @@ + + + diff --git a/scores/index.html b/scores/index.html index a2d2e9d..c72b9dc 100644 --- a/scores/index.html +++ b/scores/index.html @@ -34,7 +34,7 @@

Perth Mahjong Society Scores

Compiled from scores.txt using mahjongscore.py. Rows are sorted by Net Score Per Game.

-

Latest meet (2023-11-19)

+

Latest meet (2023-11-19)

@@ -135,7 +135,7 @@

Latest meet (2023-11-19)

-

All time

+

All time