diff --git a/assets/js/components/ContentHeader.js b/assets/js/components/ContentHeader.js index 9bb2b0fcb..3bd36f7e9 100644 --- a/assets/js/components/ContentHeader.js +++ b/assets/js/components/ContentHeader.js @@ -256,9 +256,13 @@ module.exports = class ContentHeader { if (newState === 'expanded') { this.$elm.querySelector('.content-header__author_list').classList .add('content-header__author_list--expanded'); + this.$elm.querySelector('.content-header__institution_list').classList + .add('content-header__institution_list--expanded'); } else { this.$elm.querySelector('.content-header__author_list').classList .remove('content-header__author_list--expanded'); + this.$elm.querySelector('.content-header__institution_list').classList + .remove('content-header__institution_list--expanded'); } } diff --git a/assets/sass/patterns/organisms/content-header.scss b/assets/sass/patterns/organisms/content-header.scss index 5f543903a..c7c11c790 100644 --- a/assets/sass/patterns/organisms/content-header.scss +++ b/assets/sass/patterns/organisms/content-header.scss @@ -466,17 +466,36 @@ $iconlist: cc oa; display: block; } -.content-header__author:after { - content: ", "; +.content-header__author_suffix { + white-space: nowrap; } -.content-header__author--last-non-excess:after { - content: ""; +.content-header__author_separator { + .content-header__author--last-non-excess & { + display: none; - .content-header__author_list--expanded & { - content: ", "; + .content-header__author_list--expanded & { + display: inline; + } } + li.content-header__author_list_item:last-child &, + li.content-header__author_list_item--last & { + display: none; + } +} +.content-header__institution_separator { + .content-header__institution--last-non-excess & { + display: none; + + .content-header__institution_list--expanded & { + display: inline; + } + } + li.content-header__institution_list_item:last-child &, + li.content-header__institution_list_item--last & { + display: none; + } } .content-header__author_link { @@ -494,10 +513,6 @@ $iconlist: cc oa; vertical-align: text-top; } -li.content-header__author_list_item--last .content-header__author:after { - content: ""; -} - .content-header__author--single { @include author-typeg(); } @@ -514,12 +529,8 @@ li.content-header__author_list_item--last .content-header__author:after { padding: 0; } -.content-header__institution:after { - content: "; "; -} - -li.content-header__institution_list_item--last .content-header__institution:after { - content: ""; +.content-header__item_toggle { + white-space: nowrap; } .content-header__item_toggle--author { @@ -538,8 +549,12 @@ li.content-header__institution_list_item--last .content-header__institution:afte @media only all and (min-width: #{get-rem-from-px($bkpt-site--medium)}em) { - .content-header__author--last-non-excess:after { - content: ""; + .content-header__author--last-non-excess .content-header__author_separator { + display: none; + } + + .content-header__institution--last-non-excess .content-header__institution_separator { + display: none; } .content-header__item_toggle { @@ -566,10 +581,6 @@ li.content-header__institution_list_item--last .content-header__institution:afte cursor: pointer; } - .content-header__institution--last-non-excess:after { - content: ""; - } - } .content-header__cta { diff --git a/source/_patterns/02-organisms/content-headers/content-header.mustache b/source/_patterns/02-organisms/content-headers/content-header.mustache index 35a8e2539..183b18670 100644 --- a/source/_patterns/02-organisms/content-headers/content-header.mustache +++ b/source/_patterns/02-organisms/content-headers/content-header.mustache @@ -121,13 +121,15 @@
    {{#authors.list}}
  1. - {{#url}}{{/url}}{{name}}{{#url}}{{/url}}{{#isCorresponding}} - + {{#url}}{{/url}}{{name}}{{#url}}{{/url}}{{#isCorresponding}} {{! + }} Is a corresponding author - {{/isCorresponding}} + {{/isCorresponding}}{{! + }} +
  2. {{/authors.list}}
@@ -136,7 +138,9 @@
    {{#institutions.list}}
  1. - {{{name}}} + {{{name}}}{{! + }} +
  2. {{/institutions.list}}