Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions pyansys_sphinx_theme/static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -413,5 +413,15 @@ I do not think we will be able to call this class.
}




/*
########################
ReST :download: links
########################
*/
a > code.download
{
font-family: var(--pst-font-family-base);
color: var(--pst-color-link);
text-decoration: none;
font-weight: normal;
}
6 changes: 6 additions & 0 deletions pyansys_sphinx_theme/static/js/download_target_blank.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* Add target="_blank" attribute to all hyperlinks generated by the ReST :download: directive.
* This will ensure the links open in a new tab. */

$(document).ready(function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clever!

$('a.download').attr('target', '_blank');
});