Browse Source

various cosmetic tweaks

dependabot/npm_and_yarn/acorn-5.7.4
rdrew 5 years ago
parent
commit
6d992210a1
  1. 53
      css/style.css
  2. 2
      css/style.css.map
  3. 3
      js/js.js
  4. 3
      src/js/js.js
  5. 187
      src/js/js.js.bk
  6. 13
      src/scss/_article-pages.scss
  7. 12
      src/scss/_cite-this.scss
  8. 59
      src/scss/_typography.scss

53
css/style.css

@ -98,7 +98,7 @@ a.link--hover-style-2:before,
left: -15px;
top: 50%;
margin-top: -5px;
font-family: "FontAwesome";
font-family: 'FontAwesome';
font-size: 10px;
line-height: 1;
-webkit-transition: all 0.3s;
@ -111,7 +111,7 @@ a.link--hover-style-2:before,
transition-delay: 0s;
opacity: 0;
filter: alpha(opacity=0);
content: "\f105"; }
content: '\f105'; }
a.link--hover-style-2:hover,
.link--hover-style-2 a:hover {
@ -227,13 +227,13 @@ blockquote p {
line-height: 1.65; }
.paragraph-responsive-typography-enabled blockquote p {
font-size: calc(1.5*(0.9em + 0.3vw)); }
font-size: calc(1.5 * (0.9em + 0.3vw)); }
p + blockquote {
margin-top: 30px; }
blockquote:before {
content: "";
content: '';
width: 170px;
height: 5px;
background-color: #f4f4f4;
@ -242,7 +242,7 @@ blockquote:before {
left: 0; }
blockquote p:first-child:before {
content: "- "; }
content: '- '; }
blockquote footer {
font-style: normal;
@ -277,7 +277,7 @@ h3,
h4,
h5,
h6 {
line-height: 1.20;
line-height: 1.2;
padding: 0;
margin: 20px 0 15px 0;
font-weight: 400; }
@ -291,7 +291,11 @@ h6 {
letter-spacing: 0.2em;
text-transform: uppercase; }
h1, h2, h3, h4, h5 {
h1,
h2,
h3,
h4,
h5 {
margin: 2.75rem 0 1rem;
font-family: 'Libre Baskerville', serif;
font-weight: 400;
@ -299,7 +303,11 @@ h1, h2, h3, h4, h5 {
h1 {
margin-top: 0;
font-size: 2.441em; }
font-size: 2em; }
@media (min-width: 768px) {
h1 {
font-size: 2.441em; } }
h2 {
font-size: 1.953em; }
@ -614,6 +622,12 @@ figure.align-left {
background-size: cover;
position: relative; }
@media (min-width: 0px) and (max-width: 767px) {
h1.article--title {
text-align: center;
line-height: 1.2;
font-size: 1.8em; } }
.article-info--wrapper {
padding: 0;
position: absolute;
@ -662,17 +676,20 @@ h3 {
font-size: initial; }
.article-header--metadata {
text-align: center; }
@media (min-width: 768px) {
.article-header--metadata {
text-align: left;
display: flex;
justify-content: space-between; }
.article-header--metadata .left,
.article-header--metadata .right {
.article-header--metadata .left,
.article-header--metadata .right {
flex-direction: column;
align-items: flex-end; }
.article-header--metadata .right {
.article-header--metadata .right {
justify-content: flex-end;
text-align: right; }
text-align: right; } }
.article-title-banner .field--name-title {
color: #fff; }
@ -726,7 +743,7 @@ h3 {
grid-area: toc; }
@media (min-width: 992px) {
.node__container {
.page-node-type-journal-article .node__container {
display: grid;
column-gap: 2rem;
grid-template-columns: 70% 30%;
@ -968,12 +985,6 @@ h3.field-group-format-toggler.accordion-item a {
.citeproc-title.no-italics {
font-style: normal; }
.bibcite-citation {
display: inline; }
span.endnote-text {
float: left; }
.article_attachment a {
line-height: calc(155% + 0.2vw);
font-size: calc(0.9em + 0.3vw);

2
css/style.css.map

File diff suppressed because one or more lines are too long

3
js/js.js

@ -26,6 +26,7 @@
//find the href of the related anchor from the id of this
var _id_ = $(this).attr("id");
var _footnoteText_ = "test";
var _footnoteText_ = _footnoteEndnote_;
//console.log("start");
//console.log(_id_);
//console.log(_footnoteBibcite_);
@ -55,7 +56,7 @@
attach: function attach(context, settings) {
$.each($(".csl-entry"), function(index, value) {
if ($('.citeproc-container-title', this).length ){
console.log("yay");
//console.log("yay");
$('.citeproc-title', this).addClass("no-italics");
}
});

3
src/js/js.js

@ -26,6 +26,7 @@
//find the href of the related anchor from the id of this
var _id_ = $(this).attr("id");
var _footnoteText_ = "test";
var _footnoteText_ = _footnoteEndnote_;
//console.log("start");
//console.log(_id_);
//console.log(_footnoteBibcite_);
@ -55,7 +56,7 @@
attach: function attach(context, settings) {
$.each($(".csl-entry"), function(index, value) {
if ($('.citeproc-container-title', this).length ){
console.log("yay");
//console.log("yay");
$('.citeproc-title', this).addClass("no-italics");
}
});

187
src/js/js.js.bk

@ -0,0 +1,187 @@
(function ($, Drupal) {
Drupal.behaviors.footnote_popups = {
attach: function attach(context, settings) {
/*
//target he footnotes list
$.each($(".footnote-list ul.footnotes a"), function(index, value) {
//find the footnotes at the bottom and extract the text
var _footnoteText_ = $(this).siblings(".endnote-text").text();
//var _bibCiteText_ = $(this).siblings(".endnote-text").text();
console.log(_footnoteText_);
//find the href of the related anchor from the id of this
var _id_ = $(this).attr("id");
console.log(_id_);
//use the id to fing the links href and insert the text from the 1st var
$('a[href$="' + _id_ + '"]').attr('data-toggle', 'tooltip').attr('data-original-title', _footnoteText_).attr('title', '');
}); */
$.each($(".footnote-list ul.footnotes a"), function(index, value) {
//find the footnotes at the bottom and extract the text
//var _footnoteText_ = $(this).siblings(".csl-bib-body").text();
var _footnoteBibcite_ = $(this).siblings(".bibcite-citation").text();
var _footnoteEndnote_ = $(this).siblings(".endnote-text").text();
//find the href of the related anchor from the id of this
var _id_ = $(this).attr("id");
var _footnoteText_ = "test";
//console.log("start");
//console.log(_id_);
//console.log(_footnoteBibcite_);
//console.log(_footnoteEndnote_);
//console.log("end");
//use the id to fing the links href and insert the text from the 1st var
$('a[href$="' + _id_ + '"]').attr('data-toggle', 'tooltip').attr('data-original-title', _footnoteText_).attr('title', '');
});
//$.each($("li.footnote"), function(index, value) {
////find the footnotes at the bottom and extract the text
//var _footnoteText_ = $(value).text();
//console.log(_footnoteText_);
////find the href of the related anchor from the id of this
//var _id_ = $('.footnote-link', this).attr("id");
//console.log(_id_);
////use the id to fing the links href and insert the text from the 1st var
//$('a[href$="' + _id_ + '"]').attr('data-toggle', 'tooltip').attr('data-original-title', _footnoteText_).attr('title', '');
//});
}
};
Drupal.behaviors.citationItalics = {
attach: function attach(context, settings) {
$.each($(".csl-entry"), function(index, value) {
if ($('.citeproc-container-title', this).length ){
console.log("yay");
$('.citeproc-title', this).addClass("no-italics");
}
});
}
};
Drupal.behaviors.author_tasks_menu = {
attach: function attach(context, settings) {
$.each($(".menu__author-tasks .menu-item a "), function(index, value) {
var titleText = $(this).attr("title");
var linkInfo = '<span class="link-info">' +titleText+ '</span>';
console.log(titleText);
$(this).append(linkInfo);
});
}
};
Drupal.behaviors.stickyTOC = {
attach: function attach(context, settings) {
var container_height = $('.node__main-content').css("height");
//console.log(height);
//$('.toc-container .toc-sticky-wrapper').css('height', container_height);
//$( ".toc-block--wide" ).wrap( "<div class='new' />");
}
};
Drupal.behaviors.article_keyword_copier = {
attach: function attach(context, settings) {
$('.field--name-field-journal-article-keywords').appendTo("#toc-sections");
}
};
Drupal.behaviors.slickSliderInit = {
attach: function attach(context, settings) {
$('.lp-slideshow').slick({
fade: true,
cssEase: 'linear',
pauseOnHover: false,
autoplay: true,
autoplaySpeed: 5000
});
}
};
Drupal.behaviors.tocScroll = {
attach: function attach(context, settings) {
$('.toc a').on('click',function(e) {
e.preventDefault();
var offset = 100;
var target = this.hash;
if ($(this).data('offset') != undefined) offset = $(this).data('offset');
$('html, body').stop().animate({
'scrollTop': $(target).offset().top - offset
}, 500, 'swing', function() {
// window.location.hash = target;
});
});
}
};
Drupal.behaviors.footnoteScroll = {
attach: function attach(context, settings) {
$('.see-footnote').on('click',function(e) {
e.preventDefault();
var offset = 100;
var target = this.hash;
if ($(this).data('offset') != undefined) offset = $(this).data('offset');
$('html, body').stop().animate({
'scrollTop': $(target).offset().top - offset
}, 500, 'swing', function() {
// window.location.hash = target;
});
});
}
};
Drupal.behaviors.slideLink = {
attach: function attach(context, settings) {
$( ".slideshow-slide header" ).each(function( index ) {
let url = $("a.slide_link", this).attr("href");
$( this ).wrap('<a href="' + url + '"></a>');
});
}
};
})(jQuery, Drupal);

13
src/scss/_article-pages.scss

@ -45,7 +45,12 @@ figure.align-left {
position: relative;
}
//hero text
.article--title {
h1.article--title {
@include breakpoint($mobile-only) {
text-align: center;
line-height: 1.2;
font-size: 1.8em;
}
//font-size: 25px;
}
.article-info--wrapper {
@ -115,6 +120,9 @@ header.article-header {
//padding: 1rem;
}
.article-header--metadata {
text-align: center;
@include breakpoint($tablet-up) {
text-align: left;
display: flex;
justify-content: space-between;
.left,
@ -126,6 +134,7 @@ header.article-header {
justify-content: flex-end;
text-align: right;
}
}
}
.article-title-banner {
@ -199,7 +208,7 @@ header.article-header {
grid-area: toc;
}
.node__container {
.page-node-type-journal-article .node__container {
@include breakpoint($desktop-up) {
display: grid;
column-gap: 2rem;

12
src/scss/_cite-this.scss

@ -26,9 +26,9 @@
font-style: normal;
}
}
.bibcite-citation {
display:inline;
}
span.endnote-text {
float: left;
}
//.bibcite-citation {
//display:inline;
//}
//span.endnote-text {
//float: left;
//}

59
src/scss/_typography.scss

@ -1,4 +1,4 @@
//@format
/*
* @file
* Overall specifications for Magazine+.
@ -100,7 +100,7 @@ a.link--hover-style-2:before,
left: -15px;
top: 50%;
margin-top: -5px;
font-family: "FontAwesome";
font-family: 'FontAwesome';
font-size: 10px;
line-height: 1;
-webkit-transition: all 0.3s;
@ -112,7 +112,7 @@ a.link--hover-style-2:before,
transition-delay: 0s;
opacity: 0;
filter: alpha(opacity=0);
content: "\f105";
content: '\f105';
}
a.link--hover-style-2:hover,
.link--hover-style-2 a:hover {
@ -128,7 +128,9 @@ a.link--hover-style-2:hover:before,
transition-delay: 0.1s;
}
.region--light-typography.region--dark-background a.link--hover-style-2:before,
.region--light-typography.region--dark-background .link--hover-style-2 a:before {
.region--light-typography.region--dark-background
.link--hover-style-2
a:before {
color: #ffffff;
}
.region--light-typography.region--dark-background .text--dark,
@ -222,7 +224,7 @@ blockquote {
margin: 0 0 25px;
//border-left-width: 0px;
border-top: none;
border-left: 5px solid #eee;
border-left: 5px solid #eee;
position: relative;
font-style: italic;
}
@ -231,13 +233,13 @@ blockquote p {
line-height: 1.65;
}
.paragraph-responsive-typography-enabled blockquote p {
font-size: calc(1.5*(0.9em + 0.3vw));
font-size: calc(1.5 * (0.9em + 0.3vw));
}
p + blockquote {
margin-top: 30px;
}
blockquote:before {
content: "";
content: '';
width: 170px;
height: 5px;
background-color: #f4f4f4;
@ -246,7 +248,7 @@ blockquote:before {
left: 0;
}
blockquote p:first-child:before {
content: "- "
content: '- ';
}
blockquote footer {
font-style: normal;
@ -282,7 +284,7 @@ h3,
h4,
h5,
h6 {
line-height: 1.20;
line-height: 1.2;
padding: 0;
margin: 20px 0 15px 0;
font-weight: 400;
@ -296,7 +298,11 @@ h6 {
letter-spacing: 0.2em;
text-transform: uppercase;
}
h1, h2, h3, h4, h5 {
h1,
h2,
h3,
h4,
h5 {
margin: 2.75rem 0 1rem;
font-family: 'Libre Baskerville', serif;
font-weight: 400;
@ -305,34 +311,43 @@ h1, h2, h3, h4, h5 {
h1 {
margin-top: 0;
font-size: 2em;
@include breakpoint($tablet-up) {
font-size: 2.441em;
}
}
//h2 {font-size: 2.441em;}
h2 {font-size: 1.953em;}
h2 {
font-size: 1.953em;
}
h3 {font-size: 1.563em;}
h3 {
font-size: 1.563em;
}
h4 {font-size: 1.25em;}
h4 {
font-size: 1.25em;
}
//h1 {
//font-size: 40px;
//font-size: 40px;
//font-size: 40px;
//font-size: 40px;
//}
//h2 {
//font-size: 35px;
//font-size: 35px;
//}
//h3 {
//font-size: 30px;
//font-size: 30px;
//}
//h4 {
//font-size: 26px;
//font-size: 26px;
//}
//h5 {
//font-size: 24px;
//font-size: 24px;
//}
//h6 {
//font-size: 18px;
//font-size: 18px;
//}
h1.title {
margin-top: 0;
@ -401,7 +416,7 @@ h2.block-title {
font-weight: 400;
}
.region--light-typography h2.block-title {
border-bottom-color: rgba(255,255,255,0.1);
border-bottom-color: rgba(255, 255, 255, 0.1);
}
h2.title,
nav > h2,
@ -443,7 +458,7 @@ nav > h2,
.region--light-typography h2.title,
.region--light-typography nav > h2,
.region--light-typography .block-search > h2 {
border-color: rgba(255,255,255,0.1);
border-color: rgba(255, 255, 255, 0.1);
}
/*footer regions*/

Loading…
Cancel
Save