diff --git a/CHANGELOG.md b/CHANGELOG.md index 81dc4bc..1144d16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Upgrade to Python 3.12 and Node.JS 22, adopt new openZIM practices, upgrade all dependencies (including zimscraperlib 5.0.0), add support for 'legacy' browsers (#43) +- Add clearer visual indication of external links (#70) ### Fixed diff --git a/zimui/index.html b/zimui/index.html index 09543a0..ec07d92 100644 --- a/zimui/index.html +++ b/zimui/index.html @@ -1,8 +1,9 @@ - + + freeCodeCamp on Kiwix diff --git a/zimui/public/custom.css b/zimui/public/custom.css new file mode 100644 index 0000000..407e154 --- /dev/null +++ b/zimui/public/custom.css @@ -0,0 +1,28 @@ +a[href^="http://"], +a[href^="https://"] +{ + /* modify all tag so that the :after is centered */ + display: inline-flex; + align-items: center; + color: #df2121; +} + +a[href^="http://"]:hover, +a[href^="https://"]:hover +{ + color: #df2121; +} + +a[href^="http://"]:after, +a[href^="https://"]:after +{ + /* add an external link icon to all external links (not relative after HTML rewriting) */ + content: ''; + display: inline-block; + width: 10px; + height: 10px; + background-image: url('external-link.svg'); + background-size: contain; + background-repeat: no-repeat; + margin-left: 5px; +} diff --git a/zimui/public/external-link.svg b/zimui/public/external-link.svg new file mode 100644 index 0000000..f06102f --- /dev/null +++ b/zimui/public/external-link.svg @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/zimui/public/vite.svg b/zimui/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/zimui/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file