all repos — h3rald @ c5c924080e2ffa2f0b867f2eb2e224f99e3d9587

The sources of https://h3rald.com

Improved icon accessibility.
h3rald h3rald@h3rald.com
Sat, 17 Feb 2024 15:57:07 +0100
commit

c5c924080e2ffa2f0b867f2eb2e224f99e3d9587

parent

ebc530cb0e2b549dcda0f98639c61c2eb8890ac3

1 files changed, 8 insertions(+), 2 deletions(-)

jump to
M rules.minrules.min

@@ -113,7 +113,14 @@ match 1 get :icon

"assets/images/entypo/$#.svg" (icon) =% :path (path file?) ( - path fread from-xml "svg" xquery to-xml :svg + path fread from-xml "svg" xquery :svgx + ; Add title tag + "<title>$#</title>" (icon) =% from-xml :svg-title + svgx dup /children svg-title swap prepend %children @svgx + ; Add role="img" + svgx /attributes :svg-attrs + svgx svg-attrs "img" %role %attributes @svgx + svgx to-xml :svg "<span class=\"icon\">$#</span>" (svg) =% @content ) (

@@ -214,7 +221,6 @@ "" puts!

; Create aggregator pages create-projects-page -create-archives-page create-articles-page ; Generate home page