Browse Source

toc and article page layout

dependabot/npm_and_yarn/acorn-5.7.4
rdrew 6 years ago
parent
commit
74830a3bae
  1. 53
      css/style.css
  2. 73
      src/scss/_article-pages.scss
  3. 26
      src/scss/_lp-hero.scss
  4. 4
      src/scss/_toc.scss

53
css/style.css

File diff suppressed because one or more lines are too long

73
src/scss/_article-pages.scss

@ -1,14 +1,24 @@
//@format
.page-node-type-journal-article .main-content__section { .page-node-type-journal-article .main-content__section {
padding-top: 0; padding-top: 0;
} }
//hero bg-image
.article-title-banner { .article-title-banner {
//display:none; //display:none;
//border: 1px solid #ccc; //border: 1px solid #ccc;
.bg-image { height: 500px;
background-position: center;
height: 400px; background-repeat: no-repeat;
overflow:hidden; background-size: cover;
} position: relative;
}
//hero text
.article-info--wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
} }
.field--name-field-journal-article-abstract .field__label { .field--name-field-journal-article-abstract .field__label {
font-size: 2rem; font-size: 2rem;
@ -28,15 +38,15 @@
} }
} }
//footnotes //footnotes
a[id^="footnote"] { a[id^='footnote'] {
border: 1px solid #5d5d5d; border: 1px solid #5d5d5d;
background: #5d5d5d; background: #5d5d5d;
color: #fff; color: #fff;
border-radius: 4px; border-radius: 4px;
text-decoration: none; text-decoration: none;
padding: 2px 3px; padding: 2px 3px;
font-size:1.1rem; font-size: 1.1rem;
vertical-align:super; vertical-align: super;
} }
} }
@ -46,38 +56,33 @@ header.article-header {
//padding: 1rem; //padding: 1rem;
} }
.article-header--metadata { .article-header--metadata {
display:flex; display: flex;
justify-content:space-between; justify-content: space-between;
.left,.right { .left,
.right {
flex-direction: column; flex-direction: column;
align-items:flex-end; align-items: flex-end;
} }
.right { .right {
justify-content:flex-end; justify-content: flex-end;
text-align: right; text-align: right;
} }
} }
.article-title-banner { .article-title-banner {
position:relative;
} }
//.article-info--wrapper { //.article-info--wrapper {
//position: absolute; //position: absolute;
//top: 0; //top: 0;
//margin: 8rem; //margin: 8rem;
//} //}
.article-info--wrapper { .article-info--wrapper {
position: absolute;
margin: 0;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
.article { .article {
&--contributor { &--contributor {
font-size: 27px; font-size: 27px;
//line-height:36px; //line-height:36px;
font-family: 'Libre Baskerville', Georgia, Times New Roman, Serif; font-family: 'Libre Baskerville', Georgia, Times New Roman, Serif;
font-weight:bold; font-weight: bold;
font-style: italic; font-style: italic;
} }
&--contributor__affiliation { &--contributor__affiliation {
@ -87,39 +92,37 @@ header.article-header {
//font-style: italic; //font-style: italic;
} }
&--type { &--type {
font-size: 18px; font-size: 18px;
//line-height:18px; //line-height:18px;
text-transform: uppercase; text-transform: uppercase;
} }
&--date-published { &--date-published {
font-size: 18px; font-size: 18px;
text-transform: uppercase; text-transform: uppercase;
//line-height:18px; //line-height:18px;
margin-top:6px; margin-top: 6px;
} }
} }
//layout //layout
.article-title-banner {
padding: 0;
}
.node__main-content { .node__main-content {
grid-area: main; grid-area: main;
} }
.toc-sticky-wrapper { .toc-sticky-wrapper {
height: 100%;
height:100%;
grid-area: toc; grid-area: toc;
} }
.node__container { .node__container {
@include breakpoint($desktop-up) { @include breakpoint($desktop-up) {
display: grid; display: grid;
column-gap: 2rem; column-gap: 2rem;
grid-template-columns: 70% 30%; grid-template-columns: 70% 30%;
grid-template-rows: auto; grid-template-rows: auto;
grid-template-areas: grid-template-areas: 'main toc';
'main toc'
} }
} }

26
src/scss/_lp-hero.scss

@ -1,17 +1,17 @@
//@format
/*==========Landing Page Hero Image===========*/ /*==========Landing Page Hero Image===========*/
.hero { .hero {
background: blue; //background: blue;
background: url(../img/DS2_2648.jpg); //background: url(../img/DS2_2648.jpg);
background-size: cover; //background-size: cover;
background-repeat: no-repeat; //background-repeat: no-repeat;
background-position: center; //background-position: center;
position: relative; //position: relative;
height: 250px; //height: 250px;
display: flex; display: flex;
align-items: center; .header-top__container {
padding: 3rem 0 2rem 0;
}
align-items: center;
} }

4
src/scss/_toc.scss

@ -13,6 +13,10 @@ $toc_breakpoint: 768px;
} }
.toc-block--wide { .toc-block--wide {
position: -webkit-sticky; /* Safari */
position: sticky;
top: 100px;
margin-top: 2rem;
.toc--title { .toc--title {
&[aria-expanded='true'] h2::after { &[aria-expanded='true'] h2::after {
//content: "\f146";//square //content: "\f146";//square

Loading…
Cancel
Save