From 19ac80e11ab70218adc70d7f3ad64669a90aab70 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 14 Jan 2017 13:51:29 +0100 Subject: [PATCH] Use latest feedbacks --- inc/plugin_admin.js | 22 ++++--- tpl/default/configure.html | 5 +- tpl/default/css/shaarli.css | 86 +++++++++++++-------------- tpl/default/img/noise.png | Bin 4275 -> 0 bytes tpl/default/js/shaarli.js | 10 ++++ tpl/default/linklist.html | 49 ++++++++++----- tpl/default/linklist.paging.html | 99 +++++++++++++++---------------- tpl/default/pluginsadmin.html | 10 ++-- 8 files changed, 155 insertions(+), 126 deletions(-) delete mode 100644 tpl/default/img/noise.png diff --git a/inc/plugin_admin.js b/inc/plugin_admin.js index 134ffb33..055ac285 100644 --- a/inc/plugin_admin.js +++ b/inc/plugin_admin.js @@ -22,14 +22,22 @@ function changePos(elem, toPos) function changeOrder(pos, move) { var newpos = parseInt(pos) + move; - var line = document.querySelector('[data-order="'+ pos +'"]'); - var changeline = document.querySelector('[data-order="'+ newpos +'"]'); - var parent = changeline.parentNode; + var lines = document.querySelectorAll('[data-order="'+ pos +'"]'); + var changelines = document.querySelectorAll('[data-order="'+ newpos +'"]'); + + // If we go down reverse lines to preserve the rows order + if (move > 0) { + lines = [].slice.call(lines).reverse(); + } + + for (var i = 0 ; i < lines.length ; i++) { + var parent = changelines[0].parentNode; + changePos(lines[i], newpos); + changePos(changelines[i], parseInt(pos)); + var changeItem = move < 0 ? changelines[0] : changelines[changelines.length - 1].nextSibling; + parent.insertBefore(lines[i], changeItem); + } - changePos(line, newpos); - changePos(changeline, parseInt(pos)); - var changeItem = move < 0 ? changeline : changeline.nextSibling; - parent.insertBefore(line, changeItem); } /** diff --git a/tpl/default/configure.html b/tpl/default/configure.html index b959a91b..450fe4ca 100644 --- a/tpl/default/configure.html +++ b/tpl/default/configure.html @@ -13,8 +13,8 @@
-
-
+
+

{'Configure'|t}

@@ -76,6 +76,7 @@
+
diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css index 6b073437..63cf68ac 100644 --- a/tpl/default/css/shaarli.css +++ b/tpl/default/css/shaarli.css @@ -2,7 +2,7 @@ * General */ body { - background: url(../img/noise.png) #c5c5c5; + background: #c5c5c5; } .strong { @@ -87,7 +87,7 @@ pre { } .anchor:target { - padding-top: 35px; + padding-top: 40px; } /** * MENU @@ -96,10 +96,11 @@ pre { position: fixed; top: 0; width: 100%; + --height: 50px; background: #1b926c; -webkit-font-smoothing: antialiased; /* Hack to transition with auto height: http://stackoverflow.com/a/8331169/1484919 */ - max-height: 2.1em; + max-height: 45px; transition: max-height 0.5s; overflow: hidden; z-index: 999; @@ -107,7 +108,7 @@ pre { /* Chrome bugfix: with 100% height, it only displays the first element. */ .pure-menu-item { - height: inherit; + height: 45px; } .shaarli-menu.open { @@ -124,6 +125,7 @@ pre { .pure-menu-link:visited, .pure-menu-selected .pure-menu-link, .pure-menu-selected .pure-menu-link:visited { + padding: 0.8em 1em; color: #f5f5f5; } @@ -132,14 +134,22 @@ pre { .pure-menu-selected .pure-menu-link:focus { color: #fff; background: transparent; +} +.pure-menu-item:hover::after { + margin: -4px auto 0 auto; + display: block; + content:""; + background: #fff; + height: 4px; + width: 100%; } .menu-toggle { width: 34px; - height: 34px; + height: 45px; position: absolute; - top: 0; + top: 5px; right: 0; display: none; } @@ -183,6 +193,13 @@ pre { font-size: 0.8em; } +@media screen and (min-width: 64em) { + #linkcount { + position: absolute; + right: 5px; + } +} + #search, #search-linklist { text-align: center; width: 100%; @@ -219,12 +236,9 @@ pre { color: #252525; } -#search button:hover { - color: #fff; -} - +#search button:hover, #search-linklist button:hover { - color: #000; + color: #fff; } #search-linklist { @@ -261,7 +275,7 @@ pre { text-align: center; background: #1b926c; display: block; - z-index: 9999; + z-index: 999; height: 30px; padding: 5px 0; } @@ -328,18 +342,7 @@ pre { #content { position: relative; z-index: 2; -} - -@media screen and (max-width: 64em) { - #content { - margin: 2.1em 0 0 0; - } -} - -@media screen and (min-width: 64em) { - #content { - margin-top: 33px; - } + margin-top: 45px; } /** @@ -393,7 +396,7 @@ pre { } .linklist-filters a { - padding: 2px 5px; + padding: 5px 8px; text-decoration: none; } @@ -430,7 +433,7 @@ pre { } .linksperpage a { - padding: 2px 5px; + padding: 5px 5px; text-decoration: none; color: #252525; background: #f5f5f5; @@ -447,9 +450,9 @@ pre { } .linksperpage input[type="text"] { - height: 15px; + height: 20px; margin: 0; - padding: 3px 5px 3px 8px; + padding: 4px 5px 3px 8px; background: #f5f5f5; border: medium none currentColor; color: #252525; @@ -483,13 +486,14 @@ pre { content:""; background: #F89406; height: 95%; - width: 3px; + width: 2px; margin-top: 3px; + z-index: 1; } .linklist-item-title h2 { padding: 3px 10px 0 10px; - line-height: 25px; + line-height: 30px; } .linklist-item-title a { @@ -525,18 +529,9 @@ pre { display: none; } -.linklist-item-title:after { - display: block; - content:""; - background: linear-gradient(to right, #f5f5f5, #8e8e8e, #f5f5f5); - height: 1px; - width: 90%; - margin: 1px auto 0 auto; -} - .linklist-item-editbuttons { float: right; - padding: 5px; + padding: 8px 5px; } .linklist-item-editbuttons * { @@ -555,7 +550,7 @@ pre { } .delete-link { - font-size: 1.1em; + font-size: 1.3em; color: #ac2925 !important; } @@ -566,6 +561,7 @@ pre { font-family: Roboto Slab, Arial, sans-serif; word-wrap: break-word; color: #252525; + line-height: 1.3em; } .linklist-item.private .linklist-item-description::before { @@ -576,9 +572,8 @@ pre { content:""; background: #F89406; height: 95%; - width: 3px; - z-index: 9999; - #margin: 0; + width: 2px; + z-index: 1; } .linklist-item-description a { @@ -807,7 +802,7 @@ pre { .page-form-complete .form-label, .page-form-complete .form-input { position: relative; - height: 60px; + min-height: 60px; } .page-form-complete .form-label label, @@ -1128,6 +1123,7 @@ pre { padding: 5px 5px 0 5px; font-size: 0.9em; text-align: justify; + word-wrap: break-word; } .daily-entry .daily-entry-tags { diff --git a/tpl/default/img/noise.png b/tpl/default/img/noise.png deleted file mode 100644 index 8f7fa660b698d82adfa413c89df2266049a12ae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WOWd3E<%*F5Mpf7ovzpQI5 zCISwap+9U&x_{)rNNE!!IArVJbW>2=OwR~i!~Pa+nPQZJc_P%hqbBqo=+G^Vv4SRK RegCEh09;c~qgD+O^*^tsff4`! diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index ebe0b521..925f6ce7 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -212,3 +212,13 @@ if (openers != null) { function removeClass(element, classname) { element.className = element.className.replace(new RegExp('(?:^|\\s)'+ classname + '(?:\\s|$)'), ' '); } + +/** + * Remove CSS target padding (for fixed bar) + */ +var anchor = document.querySelector('.anchor:target'); +if (anchor != null) { + var padsize = anchor.clientHeight; + this.window.scroll(0, this.window.scrollY - padsize); + anchor.style.paddingTop = 0; +} diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index 5bd8a12e..5a601d82 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html @@ -6,7 +6,17 @@ {include="page.header"} +
+ {if="!empty($linkcount)"} + {$linkcount} {function="t('shaare', 'shaares', $linkcount)"} + {if="$privateLinkcount>0"} +
{$privateLinkcount} {function="t('private link', 'private links', $privateLinkcount)"} + {/if} + {/if} +
+