From 4e566709f2b0bc4de29ad86d1910ed017dc51762 Mon Sep 17 00:00:00 2001 From: Keith Carangelo Date: Sat, 29 Aug 2020 11:40:04 -0400 Subject: [PATCH] Upgrade to version 12 --- css/shaarli.css | 10 ++++++++++ js/markdown.min.js | 1 + js/shaarli.min.js | 2 +- js/thumbnails_update.min.js | 2 +- linklist.html | 2 +- page.header.html | 2 +- sass/shaarli.scss | 16 ++++++++++++++++ 7 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 js/markdown.min.js diff --git a/css/shaarli.css b/css/shaarli.css index 4e89755..cbf5e28 100644 --- a/css/shaarli.css +++ b/css/shaarli.css @@ -4472,6 +4472,16 @@ pre { padding: 4px 12px; } .linklist-item-infos-controls-item a:hover { border: 1px solid #0b5ea6; } + .linklist-item-infos-controls-item a.fold-button { + border: none; } + .linklist-item-infos-controls-item a.fold-button .fa { + display: inline-block; + border-radius: 3px; + border: 1px solid #fff; + font-size: 24px; + padding: 4px 12px; } + .linklist-item-infos-controls-item a.fold-button .fa:hover { + border: 1px solid #0b5ea6; } .linkqrcode a:before { font-family: "ForkAwesome"; diff --git a/js/markdown.min.js b/js/markdown.min.js new file mode 100644 index 0000000..c6824d2 --- /dev/null +++ b/js/markdown.min.js @@ -0,0 +1 @@ +(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=11)})({11:function(){}}); \ No newline at end of file diff --git a/js/shaarli.min.js b/js/shaarli.min.js index 9f3b9ba..6d44e30 100644 --- a/js/shaarli.min.js +++ b/js/shaarli.min.js @@ -1 +1 @@ -(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=4)})([,,,,function(a,b,c){c(5),c(7),c(8),c(9),a.exports=c(10)},function(a,b,c){'use strict';function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b&]/gim,function(a){return'&#'+a.charCodeAt(0)+';'})}function j(a,b){var c=2new Date().getTime()&&(v.style.display='none'),null!=u&&u.addEventListener('click',function(){localStorage.setItem('newVersionDismiss',new Date().getTime().toString())});var w=document.getElementsByName('returnurl');null!=w&&(w.value=window.location.href);var x=document.querySelectorAll('.autofocus'),y=!1;[].forEach.call(x,function(a){''!==a.value||y||(a.focus(),y=!0)});var z=document.getElementsByClassName('subheader-opener');if(null!=z&&[].concat(d(z)).forEach(function(a){a.addEventListener('click',function(b){b.preventDefault();var c=a.getAttribute('data-open-id'),e=document.getElementById(c);null!=e&&([].concat(d(document.getElementsByClassName('subheader-form'))).forEach(function(a){a!==e&&p(a,'open')}),e.classList.toggle('open'))})}),''!==location.hash){var A=document.getElementById(location.hash.substr(1));if(null!=A){var B=A.clientHeight;window.scroll(0,window.scrollY-B),A.style.paddingTop='0'}}var C=document.getElementById('lf_description');null!=C&&(q(C),C.addEventListener('keydown',function(a){a.ctrlKey&&13===a.keyCode&&document.getElementById('button-save-edit').click()}));var D=document.querySelectorAll('.bookmarklet-link'),E=document.getElementById('bookmarklet-alert');[].forEach.call(D,function(a){a.addEventListener('click',function(a){a.preventDefault(),alert(E.value)})});var F=document.getElementById('continent'),G=document.getElementById('city');null!=F&&null!=G&&(F.addEventListener('change',function(){j(G,F.options[F.selectedIndex].value,!0)}),j(G,F.options[F.selectedIndex].value,!1));var H=document.querySelectorAll('.link-checkbox'),I=document.getElementById('actions');[].concat(d(H)).forEach(function(a){a.style.display='inline-block',a.addEventListener('change',function(){var a=document.querySelectorAll('.link-checkbox:checked'),b=[].concat(d(a)).length;0===b&&I.classList.contains('open')?I.classList.toggle('open'):0=this.minChars&&this._list&&0$&');return d.create('li',{innerHTML:e,"aria-selected":'false',id:'awesomplete_list_'+this.count+'_item_'+c})},g.REPLACE=function(a){this.input.value=a.value},g.DATA=function(a){return a},Object.defineProperty(b.prototype=Object.create(String.prototype),'length',{get:function(){return this.label.length}}),b.prototype.toString=b.prototype.valueOf=function(){return''+this.label};var h=Array.prototype.slice;return d.create=function(a,b){var c=document.createElement(a);for(var e in b){var f=b[e];if('inside'==e)d(f).appendChild(c);else if('around'==e){var g=d(f);g.parentNode.insertBefore(c,g),c.appendChild(g),null!=g.getAttribute('autofocus')&&g.focus()}else e in c?c[e]=f:c.setAttribute(e,f)}return c},d.bind=function(a,b){if(a)for(var c in b){var d=b[c];c.split(/\s+/).forEach(function(b){a.addEventListener(b,d)})}},d.unbind=function(a,b){if(a)for(var c in b){var d=b[c];c.split(/\s+/).forEach(function(b){a.removeEventListener(b,d)})}},d.fire=function(a,b,c){var d=document.createEvent('HTMLEvents');for(var e in d.initEvent(b,!0,!0),c)d[e]=c[e];return a.dispatchEvent(d)},d.regExpEscape=function(a){return a.replace(/[-\\^$*+?.()|[\]{}]/g,'\\$&')},d.siblingIndex=function(a){for(var b=0;a=a.previousElementSibling;b++);return b},'undefined'!=typeof self&&(self.Awesomplete=g),'undefined'!=typeof Document&&('loading'===document.readyState?document.addEventListener('DOMContentLoaded',f):f()),g.$=d,g.$$=e,'object'==typeof a&&a.exports&&(a.exports=g),g})()},function(){},function(a){a.exports='tpl/default/img/../img/apple-touch-icon.png'},function(a){a.exports='tpl/default/img/../img/favicon.png'},function(a){a.exports='tpl/default/img/../img/sad_star.png'}]); \ No newline at end of file +(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=4)})([,,,,function(a,b,c){c(5),c(7),c(8),c(9),a.exports=c(10)},function(a,b,c){'use strict';function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b&]/gim,function(a){return'&#'+a.charCodeAt(0)+';'})}function j(a,b){var c=2new Date().getTime()&&(w.style.display='none'),null!=v&&v.addEventListener('click',function(){localStorage.setItem('newVersionDismiss',new Date().getTime().toString())});var x=document.getElementsByName('returnurl');null!=x&&(x.value=window.location.href);var y=document.querySelectorAll('.autofocus'),z=!1;[].forEach.call(y,function(a){''!==a.value||z||(a.focus(),z=!0)});var A=document.getElementsByClassName('subheader-opener');if(null!=A&&[].concat(d(A)).forEach(function(a){a.addEventListener('click',function(b){b.preventDefault();var c=a.getAttribute('data-open-id'),e=document.getElementById(c);null!=e&&([].concat(d(document.getElementsByClassName('subheader-form'))).forEach(function(a){a!==e&&p(a,'open')}),e.classList.toggle('open'))})}),''!==location.hash){var B=document.getElementById(location.hash.substr(1));if(null!=B){var C=B.clientHeight;window.scroll(0,window.scrollY-C),B.style.paddingTop='0'}}var D=document.getElementById('lf_description');null!=D&&(q(D),D.addEventListener('keydown',function(a){a.ctrlKey&&13===a.keyCode&&document.getElementById('button-save-edit').click()}));var E=document.querySelectorAll('.bookmarklet-link'),F=document.getElementById('bookmarklet-alert');[].forEach.call(E,function(a){a.addEventListener('click',function(a){a.preventDefault(),alert(F.value)})});var G=document.getElementById('continent'),H=document.getElementById('city');null!=G&&null!=H&&(G.addEventListener('change',function(){j(H,G.options[G.selectedIndex].value,!0)}),j(H,G.options[G.selectedIndex].value,!1));var I=document.querySelectorAll('.link-checkbox'),J=document.getElementById('actions');[].concat(d(I)).forEach(function(a){a.style.display='inline-block',a.addEventListener('change',function(){var a=document.querySelectorAll('.link-checkbox:checked'),b=[].concat(d(a)).length;0===b&&J.classList.contains('open')?J.classList.toggle('open'):0=this.minChars&&this._list&&0$&');return d.create('li',{innerHTML:e,"aria-selected":'false',id:'awesomplete_list_'+this.count+'_item_'+c})},g.REPLACE=function(a){this.input.value=a.value},g.DATA=function(a){return a},Object.defineProperty(b.prototype=Object.create(String.prototype),'length',{get:function(){return this.label.length}}),b.prototype.toString=b.prototype.valueOf=function(){return''+this.label};var h=Array.prototype.slice;return d.create=function(a,b){var c=document.createElement(a);for(var e in b){var f=b[e];if('inside'==e)d(f).appendChild(c);else if('around'==e){var g=d(f);g.parentNode.insertBefore(c,g),c.appendChild(g),null!=g.getAttribute('autofocus')&&g.focus()}else e in c?c[e]=f:c.setAttribute(e,f)}return c},d.bind=function(a,b){if(a)for(var c in b){var d=b[c];c.split(/\s+/).forEach(function(b){a.addEventListener(b,d)})}},d.unbind=function(a,b){if(a)for(var c in b){var d=b[c];c.split(/\s+/).forEach(function(b){a.removeEventListener(b,d)})}},d.fire=function(a,b,c){var d=document.createEvent('HTMLEvents');for(var e in d.initEvent(b,!0,!0),c)d[e]=c[e];return a.dispatchEvent(d)},d.regExpEscape=function(a){return a.replace(/[-\\^$*+?.()|[\]{}]/g,'\\$&')},d.siblingIndex=function(a){for(var b=0;a=a.previousElementSibling;b++);return b},'undefined'!=typeof self&&(self.Awesomplete=g),'undefined'!=typeof Document&&('loading'===document.readyState?document.addEventListener('DOMContentLoaded',f):f()),g.$=d,g.$$=e,'object'==typeof a&&a.exports&&(a.exports=g),g})()},function(){},function(a){a.exports='tpl/default/img/../img/apple-touch-icon.png'},function(a){a.exports='tpl/default/img/../img/favicon.png'},function(a){a.exports='tpl/default/img/../img/sad_star.png'}]); \ No newline at end of file diff --git a/js/thumbnails_update.min.js b/js/thumbnails_update.min.js index b64847b..9f903cf 100644 --- a/js/thumbnails_update.min.js +++ b/js/thumbnails_update.min.js @@ -1 +1 @@ -(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)})({2:function(){'use strict';function a(b,c,d){var e=new XMLHttpRequest;e.open('POST','?do=ajax_thumb_update'),e.setRequestHeader('Content-Type','application/x-www-form-urlencoded'),e.responseType='json',e.onload=function(){if(200!==e.status)alert('An error occurred. Return code: '+e.status);else{var f=e.response;c+=1,d.progressBar.style.width=100*c/b.length+'%',d.current.innerHTML=c,d.title.innerHTML=f.title,!1!==f.thumbnail&&(d.thumbnail.innerHTML=''),c div'),current:document.querySelector('.progress-current'),thumbnail:document.querySelector('.thumbnail-placeholder'),title:document.querySelector('.thumbnail-link-title')};a(b,0,c)})()}}); \ No newline at end of file +(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)})({2:function(){'use strict';function a(b,c,d,e){var f=new XMLHttpRequest;f.open('PATCH',b+'/admin/shaare/'+c[d]+'/update-thumbnail'),f.setRequestHeader('Content-Type','application/x-www-form-urlencoded'),f.responseType='json',f.onload=function(){if(200!==f.status)alert('An error occurred. Return code: '+f.status);else{var g=f.response;d+=1,e.progressBar.style.width=100*d/c.length+'%',e.current.innerHTML=d,e.title.innerHTML=g.title,!1!==g.thumbnail&&(e.thumbnail.innerHTML=''),d div'),current:document.querySelector('.progress-current'),thumbnail:document.querySelector('.thumbnail-placeholder'),title:document.querySelector('.thumbnail-link-title')};a(b,c,0,d)})()}}); \ No newline at end of file diff --git a/linklist.html b/linklist.html index a660000..8a4fe3a 100644 --- a/linklist.html +++ b/linklist.html @@ -148,7 +148,7 @@

- + diff --git a/page.header.html b/page.header.html index 90aae90..979a59b 100644 --- a/page.header.html +++ b/page.header.html @@ -201,4 +201,4 @@ {/if} -
+
KAC {$links_per_page}
diff --git a/sass/shaarli.scss b/sass/shaarli.scss index a421014..8493813 100644 --- a/sass/shaarli.scss +++ b/sass/shaarli.scss @@ -936,6 +936,22 @@ pre { border: 1px solid $blue; } } + + // This is needed for the js to work correctly + a.fold-button { + border: none; + .fa { + display: inline-block; + border-radius: 3px; + border: 1px solid $white; + font-size: 24px; + padding: 4px 12px; + + &:hover { + border: 1px solid $blue; + } + } + } } // Replace QR Code png with icon