6
0
Fork 0

add external link indicator

master
Dirk Heilig 2024-01-09 13:24:44 +01:00
parent 59643c2b78
commit 9caa7b67a0
2 changed files with 8 additions and 1 deletions

View File

@ -120,7 +120,6 @@ html {
/**************************************************************/
/* approximately set up the layout of header, footer and main */
/**************************************************************/
body {
display: flex;
flex-direction: column;
@ -139,6 +138,12 @@ body {
margin-bottom: var(--len-5);
}
a.external:after{
/*edd external icon to external link as :after with unicode symbol*/
content: "⮺";
}
.main-wrapper { display: flex; flex-wrap: wrap; }
.main-wrapper > * { height: fit-content; }

View File

@ -11,8 +11,10 @@ document.querySelectorAll('a').forEach(function(element) {
link.setAttribute('href', prefetchUrl);
link.setAttribute('as', 'document');
document.head.appendChild(link);
element.classList.add("internal");
}else {
element.setAttribute("target", "_blank");
element.classList.add("external");
}
})
});