doc: open external links in new tab

As a UX improvement, use a separate tab when opening links to external
sites (use the same tab for internal links).  Also, use rel=noopener
attribute to improve security when linking to external sites.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder 2020-06-17 06:35:37 -07:00 committed by David Kinder
parent 91cbe6c984
commit 86eb68a1e7
2 changed files with 13 additions and 2 deletions

View File

@ -299,3 +299,10 @@ div.numbered-step h2::before {
.rst-content .toctree-l1 > a { .rst-content .toctree-l1 > a {
font-weight: bold; font-weight: bold;
} }
/* add icon on external links */
a.reference.external::after {
font-family: 'FontAwesome';
font-size: 80%;
content: " \f08e";
}

View File

@ -1,7 +1,11 @@
/* tweak logo link */ /* Extra acrn-specific javascript */
$(document).ready(function(){ $(document).ready(function(){
$( ".icon-home" ).attr("href", "https://projectacrn.org/"); /* tweak logo link to the marketing site instead of doc site */
$( ".icon-home" ).attr({href: "https://projectacrn.org/", target: "_blank"});
/* open external links in a new tab */
$('a[class*=external]').attr({target: '_blank', rel: 'noopener'});
}); });
/* Global site tag (gtag.js) - Google Analytics */ /* Global site tag (gtag.js) - Google Analytics */