From e550959a095b52d4702bd0140a7c2a6a69c5da91 Mon Sep 17 00:00:00 2001 From: rdrew Date: Wed, 3 Oct 2018 13:48:17 -0300 Subject: [PATCH] footnote popups --- css/style.css | 26 +++++++++++++++++++++++++- js/js.js | 18 +++++++++--------- src/js/js.js | 18 +++++++++--------- src/scss/_tooltips.scss | 26 ++++++++++++++++++++++++++ src/scss/style.scss | 1 + 5 files changed, 70 insertions(+), 19 deletions(-) create mode 100644 src/scss/_tooltips.scss diff --git a/css/style.css b/css/style.css index 64e9cb2..00b532e 100644 --- a/css/style.css +++ b/css/style.css @@ -60,6 +60,30 @@ font-size: 1.1rem; vertical-align: super; } +/* popup container */ +.popup { + position: relative; + display: inline-block; + border-bottom: 1px dotted black; + /* If you want dots under the hoverable text */ } + +/* popup text */ +.popup .popuptext { + visibility: hidden; + width: 120px; + background-color: black; + color: #fff; + text-align: center; + padding: 5px 0; + border-radius: 6px; + /* Position the popup text - see examples below! */ + position: absolute; + z-index: 1; } + +/* Show the popup text when you mouse over the popup container */ +.popup:hover .popuptext { + visibility: visible; } + /*on-scroll menu */ .fixed-header-enabled.onscroll .header-container ul.menu { text-align: right; } @@ -142,4 +166,4 @@ details#journal-article-text-tab img, .site-name { font-size: 12rem; } -/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlcyI6WyJzdHlsZS5zY3NzIiwiX2xwLXByZXZpZXctZ3JpZC5zY3NzIiwiX2xwLWhlcm8uc2NzcyIsIl9hcnRpY2xlLXBhZ2VzLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLy9pbXBvcnRzXG5AaW1wb3J0ICdscC1wcmV2aWV3LWdyaWQnO1xuQGltcG9ydCAnbHAtaGVybyc7XG5AaW1wb3J0ICdhcnRpY2xlLXBhZ2VzJztcblxuLypvbi1zY3JvbGwgbWVudSAqL1xuLmZpeGVkLWhlYWRlci1lbmFibGVkLm9uc2Nyb2xsIC5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CLEdBQ3hDOztBQUNELEFBQUEsK0JBQStCLENBQUMsYUFBYSxDQUFDO0VBQzVDLFdBQVcsRUFBRSxPQUFPO0VBQ3BCLFdBQVcsRUFBRSxPQUFPLEdBQ3JCOztBQUNELEFBQUEsZUFBZSxDQUFDLHVCQUF1QixDQUFDO0VBQ3RDLE9BQU8sRUFBRSxVQUFVO0VBQ25CLGFBQWEsRUFBRSxJQUFJLEdBQ3BCOztBQUdELEFBQUEsS0FBSyxDQUFDO0VBQ0osS0FBSyxFQUFDLEtBQUssR0FDWjs7QUFDRCxZQUFZO0FBQ1osQUFBQSxPQUFPLENBQUMsRUFBRTtBQUNWLE9BQU8sQ0FBQyxFQUFFO0FBQ1YsT0FBTyxDQUFDLEVBQUU7QUFDVixPQUFPLENBQUMsRUFBRTtBQUNWLE9BQU8sQ0FBQyxFQUFFO0FBQ1YsT0FBTyxDQUFDLEVBQUU7QUFDVixPQUFPLENBQUMsa0JBQWtCO0FBQzFCLE9BQU8sQ0FBQyxxQkFBcUI7QUFDN0IsT0FBTyxDQUFDLFVBQVU7QUFDbEIsUUFBUSxDQUFDLFlBQVk7QUFDckIsT0FBTyxDQUFDLGVBQWUsQ0FBQztFQUN0QixXQUFXLEVBQUUsb0RBQW9ELEdBQ2xFOztBQUNELEFBQUEsVUFBVSxDQUFDO0VBQ1QsU0FBUyxFQUFDLEtBQUssR0FDaEIifQ== */ diff --git a/js/js.js b/js/js.js index a36b634..d4276fb 100644 --- a/js/js.js +++ b/js/js.js @@ -1,14 +1,14 @@ (function ($, Drupal) { - Drupal.behaviors.footnote_tooltips = { - attach: function attach(context, settings) { - //js goes here - //$('.menu').remove(); - var footnote_link = $("a[id^='footnote']"); - var footnote_link = $("li[id^='footnote']"); - - } - }; + Drupal.behaviors.footnote_popups = { + attach: function attach(context, settings) { + $.each($("li[id^='footnote']"), function(index, value) { + var _footnoteText_ = $(value).text(); + var _id_ = $(this).attr("id"); + $('a[href$="' + _id_ + '"]').attr('data-toggle', 'tooltip').attr('data-original-title', _footnoteText_).attr('title', ''); + }); + } + }; diff --git a/src/js/js.js b/src/js/js.js index a36b634..d4276fb 100644 --- a/src/js/js.js +++ b/src/js/js.js @@ -1,14 +1,14 @@ (function ($, Drupal) { - Drupal.behaviors.footnote_tooltips = { - attach: function attach(context, settings) { - //js goes here - //$('.menu').remove(); - var footnote_link = $("a[id^='footnote']"); - var footnote_link = $("li[id^='footnote']"); - - } - }; + Drupal.behaviors.footnote_popups = { + attach: function attach(context, settings) { + $.each($("li[id^='footnote']"), function(index, value) { + var _footnoteText_ = $(value).text(); + var _id_ = $(this).attr("id"); + $('a[href$="' + _id_ + '"]').attr('data-toggle', 'tooltip').attr('data-original-title', _footnoteText_).attr('title', ''); + }); + } + }; diff --git a/src/scss/_tooltips.scss b/src/scss/_tooltips.scss new file mode 100644 index 0000000..b93c99b --- /dev/null +++ b/src/scss/_tooltips.scss @@ -0,0 +1,26 @@ +/* popup container */ +.popup { + position: relative; + display: inline-block; + border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ +} + +/* popup text */ +.popup .popuptext { + visibility: hidden; + width: 120px; + background-color: black; + color: #fff; + text-align: center; + padding: 5px 0; + border-radius: 6px; + + /* Position the popup text - see examples below! */ + position: absolute; + z-index: 1; +} + +/* Show the popup text when you mouse over the popup container */ +.popup:hover .popuptext { + visibility: visible; +} diff --git a/src/scss/style.scss b/src/scss/style.scss index 21a4858..e3014f6 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -2,6 +2,7 @@ @import 'lp-preview-grid'; @import 'lp-hero'; @import 'article-pages'; +@import 'tooltips'; /*on-scroll menu */ .fixed-header-enabled.onscroll .header-container ul.menu {