From 7240b0303395a997885ba22034669a2d4f9ff94a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 10 Jul 2023 11:43:56 +0300 Subject: [heading-anchor] Reworked heading anchors to use the font character Added aria-hidden, because icon fonts don't work on screen readers --- awk-edits/Heading-anchors.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'awk-edits') diff --git a/awk-edits/Heading-anchors.awk b/awk-edits/Heading-anchors.awk index 34c8104..2877fde 100644 --- a/awk-edits/Heading-anchors.awk +++ b/awk-edits/Heading-anchors.awk @@ -8,5 +8,5 @@ /[ \t]*\"🔗\"") + gsub(/$/, ORS "\\") } -- cgit v1.3.1-26-gb76a From 39046928831442180ce89cd6941c6d1aac8400b4 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 10 Jul 2023 16:12:09 +0300 Subject: (icons) Moved most icons to non-PUA --- FontForge-helper.ff | 36 +++++++++++++++++++++++++++++++++++- awk-edits/Heading-anchors.awk | 2 +- src/_header.html | 2 +- src/font/tabler-icons-subset.ttf | Bin 6900 -> 6836 bytes src/scripts/expand-navbar.js | 6 +++--- 5 files changed, 40 insertions(+), 6 deletions(-) (limited to 'awk-edits') diff --git a/FontForge-helper.ff b/FontForge-helper.ff index 81c87bc..85e7a05 100755 --- a/FontForge-helper.ff +++ b/FontForge-helper.ff @@ -15,7 +15,7 @@ Open($1) Select("uea19") # arrow-left -SelectMore("uea1c") # arrow-right +SelectMore("uea1f") # arrow-right SelectMore("uf7d6") # arrow-badge-down-filled SelectMore("uf7d9") # arrow-badge-up-filled SelectMore("uf1e2") # article @@ -34,4 +34,38 @@ SelectMore("ueb0e") # printer SelectInvert() DetachAndRemoveGlyphs() + +# +# Move characters from PUA to established glyphs +# This "makes" sure the character is useable even if font fails +# Only done to functional characters +# + +# arrow-left to ← leftwards arrow +Select("uea19"); Cut(); Select("u2190"); Paste() + +# arrow-right to → rightwards arrow +Select("uea1f"); Cut(); Select("u2192"); Paste() + +# arrow-badge-down-filled to ▼ black down-pointing triangle +Select("uf7d6"); Cut(); Select("u25BC"); Paste() + +# arrow-badge-up-filled to ▲ black up-pointing triangle +Select("uf7d9"); Cut(); Select("u25B2"); Paste() + +# article to ☲ trigram for fire +Select("uf1e2"); Cut(); Select("u2632"); Paste() + +# chevrons-up to ︽ presentation form for vertical left double angle bracket +Select("uea66"); Cut(); Select("uFE3D"); Paste() + +# link to § section sign +Select("ueade"); Cut(); Select("u00A7"); Paste() + +# presentation to ⎚ clear screen +Select("ueb70"); Cut(); Select("u239A"); Paste() + +# printer to ⎙ print screen symbol +Select("ueb0e"); Cut(); Select("u2399"); Paste() + Generate("./src/font/tabler-icons-subset.ttf") diff --git a/awk-edits/Heading-anchors.awk b/awk-edits/Heading-anchors.awk index 2877fde..56e522e 100644 --- a/awk-edits/Heading-anchors.awk +++ b/awk-edits/Heading-anchors.awk @@ -8,5 +8,5 @@ /[ \t]*\\") + gsub(/$/, ORS "\\§") } diff --git a/src/_header.html b/src/_header.html index 9f5d0d3..0b7b1a6 100644 --- a/src/_header.html +++ b/src/_header.html @@ -27,7 +27,7 @@

" ORS \ " " diff --git a/src/scripts/presentation.js b/src/scripts/presentation.js index ba7dd66..1a9b42c 100644 --- a/src/scripts/presentation.js +++ b/src/scripts/presentation.js @@ -65,11 +65,15 @@ presentBtn.addEventListener('click', function() { document.body.classList.toggle('body-bg-color'); // Show the slide controller presentCont.classList.toggle('absolute-cont'); - prevSlideBtn.classList.toggle('nodisplay'); - slideIndexShow.classList.toggle('nodisplay'); - nextSlideBtn.classList.toggle('nodisplay'); - articleBtn.classList.toggle('nodisplay'); - printBtn.classList.toggle('nodisplay'); + for (var i = presentCont.children.length - 1; i >= 0; i--) { + if (i == 4) continue; // presentBtn + presentCont.children[i].classList.toggle('nodisplay'); + } + presentBtn.classList.toggle('setting-btn'); + if (presentBtn.innerHTML[0] === 'P') + presentBtn.innerHTML = presentBtn.innerHTML.substr(8); + else + presentBtn.innerHTML = 'Present ' + presentBtn.innerHTML; // Show the first slide slides[slideIndex].classList.toggle('absolute-slide'); // Alignment of presentation to screen diff --git a/src/styles.css b/src/styles.css index 2a14de5..a8fd245 100644 --- a/src/styles.css +++ b/src/styles.css @@ -334,13 +334,13 @@ dt, dd { line-height: 1em; } .setting-btn { - font-size: 0.5em; text-align: center; display: inline-block; line-height: 1em; border: 1px solid var(--border-color); padding: 0.2em 0.3em 0.4em; } + #settingsWrapper > .setting-btn { font-size: 0.5em; } #footer { font-size: 0.7em; overflow-x: hidden; -- cgit v1.3.1-26-gb76a From bf40ef165bce33462efdab0fab03de207d099ed0 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 11 Jul 2023 16:35:30 +0300 Subject: [Syntax-highlighting] Fixed bash number matching not working if line ends with the number --- awk-edits/Syntax-highlighting.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'awk-edits') diff --git a/awk-edits/Syntax-highlighting.awk b/awk-edits/Syntax-highlighting.awk index 884871b..d608f38 100644 --- a/awk-edits/Syntax-highlighting.awk +++ b/awk-edits/Syntax-highlighting.awk @@ -129,7 +129,7 @@ syntaxhighlighting == 3 { hi(@/\$[[:alnum:]]+/, "structure"); $0 = hil(@/[^[:alnum:]#\$]/, @/[[:digit:]]+/, - @/[^[:alnum:]]/, + @/([^[:alnum:]]|$)/, "number"); $0 = hil(@/[[:blank:]]+/, @/-[-_[:alnum:]]+/, "", "operator"); $0 = hil(@/(^|[^[:alnum:]])/, -- cgit v1.3.1-26-gb76a