Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/OGPWEB-10753' into staging
Browse files Browse the repository at this point in the history
PaulaBannerman committed Jan 7, 2025

Verified

This commit was signed with the committer’s verified signature.
derekpierre Derek Pierre
2 parents 9115a90 + c6e9aef commit 768e32a
Showing 4 changed files with 41 additions and 0 deletions.
29 changes: 29 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
@@ -32,4 +32,33 @@

.margin-top{
margin-top: 2rem !important;
}




.external-link::after {
background-image: url('../images/icons/external-link.svg');
margin-left: 4px;
background-position: 50% 60%;
background-repeat: no-repeat;
background-size: 100%;
content: "";
display: inline;
margin-left: 5px;
padding-left: .65em;
}

#ogp-identifier.usa-identifier .external-link::after,
.usa-button.external-link::after,
.usa-nav__submenu-item .external-link::after {
background-image: url('../images/icons/launch--white.png');
margin-left: 4px;
background-position: 50% 60%;
background-repeat: no-repeat;
background-size: 100%;
content: "";
display: inline;
margin-left: 5px;
padding-left: .65em;
}
1 change: 1 addition & 0 deletions assets/images/icons/external-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icons/launch--white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
// Add your custom javascript here
console.log("Hi from Federalist");


document.addEventListener('DOMContentLoaded', function() {
const links = document.querySelectorAll('a');
links.forEach(link => {
const url = new URL(link.href);
if (url.origin !== window.location.origin && !link.querySelector('img')) {
link.classList.add('external-link');
link.setAttribute('target', '_blank');
}
});
});

0 comments on commit 768e32a

Please sign in to comment.