{"version":3,"sources":["../src/backtotop.js"],"names":["define","$","str","initBackToTop","get_string","then","string","after","window","scroll","document","scrollTop","fadeIn","fadeOut","click","event","preventDefault","animate","init"],"mappings":"AAyBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,UAAX,CAAD,CAAyB,SAASC,CAAT,CAAYC,CAAZ,CAAiB,CAC5C,aAKA,QAASC,CAAAA,CAAT,EAAyB,CAErBD,CAAG,CAACE,UAAJ,CAAe,WAAf,CAA4B,oBAA5B,EAAkDC,IAAlD,CAAuD,SAAUC,CAAV,CAAkB,CAErEL,CAAC,CAAC,cAAD,CAAD,CAAkBM,KAAlB,CAAwB,mFACcD,CADd,CACuB,SAD/C,CAEH,CAJD,EAQAL,CAAC,CAACO,MAAD,CAAD,CAAUC,MAAV,CAAiB,UAAW,CACxB,GAA8B,GAA1B,CAAAR,CAAC,CAACS,QAAD,CAAD,CAAYC,SAAZ,EAAJ,CAAmC,CAC/BV,CAAC,CAAC,cAAD,CAAD,CAAkBW,MAAlB,CAAyB,GAAzB,CACH,CAFD,IAEO,CACHX,CAAC,CAAC,cAAD,CAAD,CAAkBY,OAAlB,CAA0B,GAA1B,CACH,CACJ,CAND,EASAZ,CAAC,CAAC,cAAD,CAAD,CAAkBa,KAAlB,CAAwB,SAASC,CAAT,CAAgB,CACpCA,CAAK,CAACC,cAAN,GACAf,CAAC,CAAC,YAAD,CAAD,CAAgBgB,OAAhB,CAAwB,CAACN,SAAS,CAAE,CAAZ,CAAxB,CAAwC,GAAxC,CACH,CAHD,CAIH,CAED,MAAO,CACHO,IAAI,CAAE,eAAW,CACbf,CAAa,EAChB,CAHE,CAKV,CApCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Theme Boost Campus - JS code back to top button\n *\n * @package theme_boost_campus\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n\n\ndefine(['jquery', 'core/str'], function($, str) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initBackToTop() {\n // Get the string backtotop from language file.\n str.get_string('backtotop', 'theme_boost_campus').then(function (string) {\n // Add a fontawesome icon after the footer as the back to top button.\n $('#page-footer').after('<i class=\"fa fa-chevron-up fa-2x d-print-none\"' +\n 'id=\"back-to-top\" aria-label=\"' + string + '\"></i>');\n });\n\n // This function fades the button in when the page is scrolled down or fades it out\n // if the user is at the top of the page.\n $(window).scroll(function() {\n if ($(document).scrollTop() > 220) {\n $('#back-to-top').fadeIn(300);\n } else {\n $('#back-to-top').fadeOut(100);\n }\n });\n\n // This function scrolls the page to top with a duration of 500ms.\n $('#back-to-top').click(function(event) {\n event.preventDefault();\n $('html, body').animate({scrollTop: 0}, 500);\n });\n }\n\n return {\n init: function() {\n initBackToTop();\n }\n };\n});\n"],"file":"backtotop.min.js"}
\ No newline at end of file
{"version":3,"sources":["../src/backtotop.js"],"names":["define","$","str","initBackToTop","get_string","then","string","after","window","scroll","document","scrollTop","fadeIn","fadeOut","click","event","preventDefault","animate","init"],"mappings":"AAyBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,UAAX,CAAD,CAAyB,SAASC,CAAT,CAAYC,CAAZ,CAAiB,CAC5C,aAKA,QAASC,CAAAA,CAAT,EAAyB,CAErBD,CAAG,CAACE,UAAJ,CAAe,WAAf,CAA4B,oBAA5B,EAAkDC,IAAlD,CAAuD,SAAUC,CAAV,CAAkB,CAErEL,CAAC,CAAC,cAAD,CAAD,CAAkBM,KAAlB,CAAwB,mFACcD,CADd,CACuB,SAD/C,EAKAL,CAAC,CAACO,MAAD,CAAD,CAAUC,MAAV,CAAiB,UAAW,CACxB,GAA8B,GAA1B,CAAAR,CAAC,CAACS,QAAD,CAAD,CAAYC,SAAZ,EAAJ,CAAmC,CAC/BV,CAAC,CAAC,cAAD,CAAD,CAAkBW,MAAlB,CAAyB,GAAzB,CACH,CAFD,IAEO,CACHX,CAAC,CAAC,cAAD,CAAD,CAAkBY,OAAlB,CAA0B,GAA1B,CACH,CACJ,CAND,EASAZ,CAAC,CAAC,cAAD,CAAD,CAAkBa,KAAlB,CAAwB,SAASC,CAAT,CAAgB,CACpCA,CAAK,CAACC,cAAN,GACAf,CAAC,CAAC,YAAD,CAAD,CAAgBgB,OAAhB,CAAwB,CAACN,SAAS,CAAE,CAAZ,CAAxB,CAAwC,GAAxC,CACH,CAHD,CAIH,CApBD,CAqBH,CAED,MAAO,CACHO,IAAI,CAAE,eAAW,CACbf,CAAa,EAChB,CAHE,CAKV,CApCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Theme Boost Campus - JS code back to top button\n *\n * @package theme_boost_campus\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n\n\ndefine(['jquery', 'core/str'], function($, str) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initBackToTop() {\n // Get the string backtotop from language file.\n str.get_string('backtotop', 'theme_boost_campus').then(function (string) {\n // Add a fontawesome icon after the footer as the back to top button.\n $('#page-footer').after('<i class=\"fa fa-chevron-up fa-2x d-print-none\"' +\n 'id=\"back-to-top\" aria-label=\"' + string + '\"></i>');\n\n // This function fades the button in when the page is scrolled down or fades it out\n // if the user is at the top of the page.\n $(window).scroll(function() {\n if ($(document).scrollTop() > 220) {\n $('#back-to-top').fadeIn(300);\n } else {\n $('#back-to-top').fadeOut(100);\n }\n });\n\n // This function scrolls the page to top with a duration of 500ms.\n $('#back-to-top').click(function(event) {\n event.preventDefault();\n $('html, body').animate({scrollTop: 0}, 500);\n });\n });\n }\n\n return {\n init: function() {\n initBackToTop();\n }\n };\n});\n"],"file":"backtotop.min.js"}