Add external link icon

Fixes #22.
This commit is contained in:
Florine W. Dekker 2022-11-19 00:03:47 +01:00
parent a5f43c6436
commit 11f66473f3
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
2 changed files with 21 additions and 0 deletions

View File

@ -24,6 +24,26 @@ main {
} }
/* External link icon */
a.external::after {
display: inline-block;
width: 1rem;
height: 1rem;
margin-left: 0.5rem;
/* Image from https://icons.getbootstrap.com/icons/box-arrow-up-right/. MIT License. */
mask-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg fill='currentColor' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z' fill-rule='evenodd'/%3E%3Cpath d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z' fill-rule='evenodd'/%3E%3C/svg%3E%0A");
mask-size: cover;
background-repeat: no-repeat no-repeat;
background-position: center center;
background-size: cover;
background-color: var(--fwdekker-theme-color);
content: "";
}
/* Noscript */ /* Noscript */
noscript.fwd-jsNotice img { noscript.fwd-jsNotice img {
position: absolute; position: absolute;

View File

@ -39,6 +39,7 @@
<section class="container"> <section class="container">
<div class="row"> <div class="row">
<div class="column column-75"> <div class="column column-75">
<p>This <a href="./" class="external">is an external link</a> in a sentence.</p>
<p>These are the page contents.</p> <p>These are the page contents.</p>
<p>These are some more contents.</p> <p>These are some more contents.</p>
<p>These are the page contents.</p> <p>These are the page contents.</p>