Browse Source

various cosmetic tweaks

dependabot/npm_and_yarn/acorn-5.7.4
rdrew 5 years ago
parent
commit
78863ecad3
  1. 9
      css/style.css
  2. 2
      css/style.css.map
  3. 41
      js/js.js
  4. 20
      src/js/js.js
  5. 9
      src/scss/_cite-this.scss

9
css/style.css

@ -965,6 +965,15 @@ h3.field-group-format-toggler.accordion-item a {
.citeproc-title { .citeproc-title {
font-style: italic; } font-style: italic; }
.citeproc-title.no-italics {
font-style: normal; }
.bibcite-citation {
display: inline; }
span.endnote-text {
float: left; }
.article_attachment a { .article_attachment a {
line-height: calc(155% + 0.2vw); line-height: calc(155% + 0.2vw);
font-size: calc(0.9em + 0.3vw); font-size: calc(0.9em + 0.3vw);

2
css/style.css.map

File diff suppressed because one or more lines are too long

41
js/js.js

@ -2,6 +2,21 @@
Drupal.behaviors.footnote_popups = { Drupal.behaviors.footnote_popups = {
attach: function attach(context, settings) { 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) { $.each($(".footnote-list ul.footnotes a"), function(index, value) {
//find the footnotes at the bottom and extract the text //find the footnotes at the bottom and extract the text
@ -10,7 +25,7 @@
var _footnoteEndnote_ = $(this).siblings(".endnote-text").text(); var _footnoteEndnote_ = $(this).siblings(".endnote-text").text();
//find the href of the related anchor from the id of this //find the href of the related anchor from the id of this
var _id_ = $(this).attr("id"); var _id_ = $(this).attr("id");
var _footnoteText_ = _footnoteBibcite_.concat(_footnoteEndnote_); var _footnoteText_ = "test";
//console.log("start"); //console.log("start");
//console.log(_id_); //console.log(_id_);
//console.log(_footnoteBibcite_); //console.log(_footnoteBibcite_);
@ -19,9 +34,33 @@
//use the id to fing the links href and insert the text from the 1st var //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', ''); $('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 = { Drupal.behaviors.author_tasks_menu = {
attach: function attach(context, settings) { attach: function attach(context, settings) {
$.each($(".menu__author-tasks .menu-item a "), function(index, value) { $.each($(".menu__author-tasks .menu-item a "), function(index, value) {

20
src/js/js.js

@ -26,11 +26,11 @@
//find the href of the related anchor from the id of this //find the href of the related anchor from the id of this
var _id_ = $(this).attr("id"); var _id_ = $(this).attr("id");
var _footnoteText_ = "test"; var _footnoteText_ = "test";
console.log("start"); //console.log("start");
console.log(_id_); //console.log(_id_);
console.log(_footnoteBibcite_); //console.log(_footnoteBibcite_);
console.log(_footnoteEndnote_); //console.log(_footnoteEndnote_);
console.log("end"); //console.log("end");
//use the id to fing the links href and insert the text from the 1st var //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', ''); $('a[href$="' + _id_ + '"]').attr('data-toggle', 'tooltip').attr('data-original-title', _footnoteText_).attr('title', '');
}); });
@ -51,6 +51,16 @@
} }
}; };
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 = { Drupal.behaviors.author_tasks_menu = {
attach: function attach(context, settings) { attach: function attach(context, settings) {
$.each($(".menu__author-tasks .menu-item a "), function(index, value) { $.each($(".menu__author-tasks .menu-item a "), function(index, value) {

9
src/scss/_cite-this.scss

@ -22,4 +22,13 @@
} }
.citeproc-title { .citeproc-title {
font-style: italic; font-style: italic;
&.no-italics {
font-style: normal;
}
}
.bibcite-citation {
display:inline;
}
span.endnote-text {
float: left;
} }

Loading…
Cancel
Save