add external link indicator
parent
59643c2b78
commit
9caa7b67a0
|
@ -120,7 +120,6 @@ html {
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
/* approximately set up the layout of header, footer and main */
|
/* approximately set up the layout of header, footer and main */
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -139,6 +138,12 @@ body {
|
||||||
margin-bottom: var(--len-5);
|
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 { display: flex; flex-wrap: wrap; }
|
||||||
.main-wrapper > * { height: fit-content; }
|
.main-wrapper > * { height: fit-content; }
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,10 @@ document.querySelectorAll('a').forEach(function(element) {
|
||||||
link.setAttribute('href', prefetchUrl);
|
link.setAttribute('href', prefetchUrl);
|
||||||
link.setAttribute('as', 'document');
|
link.setAttribute('as', 'document');
|
||||||
document.head.appendChild(link);
|
document.head.appendChild(link);
|
||||||
|
element.classList.add("internal");
|
||||||
}else {
|
}else {
|
||||||
element.setAttribute("target", "_blank");
|
element.setAttribute("target", "_blank");
|
||||||
|
element.classList.add("external");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
Loading…
Reference in New Issue