Skip to content

Commit a07fcd9

Browse files
authored
CHEMH-317: Fix to opportunity CTA button with external link (#112)
1 parent 61d41d7 commit a07fcd9

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

dist/css/chem_h_subtheme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/chem_h_subtheme.behaviors.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
// Replace <a> tag for news node news topics taxonomy with <p>
4848
$('.news.node .layout--section-news-header .section-header .su-news-topics a').contents().unwrap().wrap('<p/>');
4949

50+
// If external link on Opp node, move the class name.
51+
$(function() {
52+
const oppNodeCTA = $('.node-stanford-opportunity-su-opp-cta-url .su-button .su-link--external')
53+
$(oppNodeCTA).parent().addClass('su-link--external');
54+
$(oppNodeCTA).removeClass('su-link--external');
55+
});
5056
}
5157
};
5258

src/scss/theme/_opportunity.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@charset "UTF-8";
2+
3+
.su-opp-cta-url {
4+
&.su-link--external {
5+
&::after {
6+
background-color: $su-color-black;
7+
}
8+
}
9+
}

src/scss/theme/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
@import 'headings';
2121
@import 'links';
2222
@import 'list-paragraphs';
23+
@import 'opportunity';
2324
@import 'wysiwyg';

0 commit comments

Comments
 (0)