diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-23 15:50:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 15:50:23 +0200 |
commit | cdb96276c1f4a1b3484ac4a1729fa5c9cdff38a5 (patch) | |
tree | cdc10640a45daab543c25debe4a193cb3d98c8c4 /assets | |
parent | 5baafe5001ef2fbe88d3fcdcc225ec12edd3fef1 (diff) | |
parent | 9192a48be300fcfd2a6ede927b0611c66f250012 (diff) | |
download | Shaarli-cdb96276c1f4a1b3484ac4a1729fa5c9cdff38a5.tar.gz Shaarli-cdb96276c1f4a1b3484ac4a1729fa5c9cdff38a5.tar.zst Shaarli-cdb96276c1f4a1b3484ac4a1729fa5c9cdff38a5.zip |
Merge pull request #1561 from ArthurHoaro/feature/front-deps-upgrade
Diffstat (limited to 'assets')
-rw-r--r-- | assets/default/js/base.js | 19 | ||||
-rw-r--r-- | assets/default/scss/shaarli.scss | 38 | ||||
-rw-r--r-- | assets/vintage/css/shaarli.css | 2 |
3 files changed, 30 insertions, 29 deletions
diff --git a/assets/default/js/base.js b/assets/default/js/base.js index 27938823..d9933152 100644 --- a/assets/default/js/base.js +++ b/assets/default/js/base.js | |||
@@ -10,7 +10,7 @@ import Awesomplete from 'awesomplete'; | |||
10 | * @returns Found element or null. | 10 | * @returns Found element or null. |
11 | */ | 11 | */ |
12 | function findParent(element, tagName, attributes) { | 12 | function findParent(element, tagName, attributes) { |
13 | const parentMatch = key => attributes[key] !== '' && element.getAttribute(key).indexOf(attributes[key]) !== -1; | 13 | const parentMatch = (key) => attributes[key] !== '' && element.getAttribute(key).indexOf(attributes[key]) !== -1; |
14 | while (element) { | 14 | while (element) { |
15 | if (element.tagName.toLowerCase() === tagName) { | 15 | if (element.tagName.toLowerCase() === tagName) { |
16 | if (Object.keys(attributes).find(parentMatch)) { | 16 | if (Object.keys(attributes).find(parentMatch)) { |
@@ -101,7 +101,7 @@ function updateAwesompleteList(selector, tags, instances) { | |||
101 | * @see http://stackoverflow.com/questions/18749591/encode-html-entities-in-javascript | 101 | * @see http://stackoverflow.com/questions/18749591/encode-html-entities-in-javascript |
102 | */ | 102 | */ |
103 | function htmlEntities(str) { | 103 | function htmlEntities(str) { |
104 | return str.replace(/[\u00A0-\u9999<>&]/gim, i => `&#${i.charCodeAt(0)};`); | 104 | return str.replace(/[\u00A0-\u9999<>&]/gim, (i) => `&#${i.charCodeAt(0)};`); |
105 | } | 105 | } |
106 | 106 | ||
107 | /** | 107 | /** |
@@ -194,8 +194,8 @@ function removeClass(element, classname) { | |||
194 | function init(description) { | 194 | function init(description) { |
195 | function resize() { | 195 | function resize() { |
196 | /* Fix jumpy resizing: https://stackoverflow.com/a/18262927/1484919 */ | 196 | /* Fix jumpy resizing: https://stackoverflow.com/a/18262927/1484919 */ |
197 | const scrollTop = window.pageYOffset || | 197 | const scrollTop = window.pageYOffset |
198 | (document.documentElement || document.body.parentNode || document.body).scrollTop; | 198 | || (document.documentElement || document.body.parentNode || document.body).scrollTop; |
199 | 199 | ||
200 | description.style.height = 'auto'; | 200 | description.style.height = 'auto'; |
201 | description.style.height = `${description.scrollHeight + 10}px`; | 201 | description.style.height = `${description.scrollHeight + 10}px`; |
@@ -490,9 +490,10 @@ function init(description) { | |||
490 | }); | 490 | }); |
491 | }); | 491 | }); |
492 | 492 | ||
493 | const ids = links.map(item => item.id); | 493 | const ids = links.map((item) => item.id); |
494 | window.location = | 494 | window.location = ( |
495 | `${basePath}/admin/shaare/visibility?token=${token.value}&newVisibility=${visibility}&id=${ids.join('+')}`; | 495 | `${basePath}/admin/shaare/visibility?token=${token.value}&newVisibility=${visibility}&id=${ids.join('+')}` |
496 | ); | ||
496 | }); | 497 | }); |
497 | }); | 498 | }); |
498 | } | 499 | } |
@@ -575,7 +576,7 @@ function init(description) { | |||
575 | .setAttribute('href', `${basePath}/admin/tags?fromtag=${encodeURIComponent(totag)}`); | 576 | .setAttribute('href', `${basePath}/admin/tags?fromtag=${encodeURIComponent(totag)}`); |
576 | 577 | ||
577 | // Refresh awesomplete values | 578 | // Refresh awesomplete values |
578 | existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag)); | 579 | existingTags = existingTags.map((tag) => (tag === fromtag ? totag : tag)); |
579 | awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes); | 580 | awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes); |
580 | } | 581 | } |
581 | }; | 582 | }; |
@@ -614,7 +615,7 @@ function init(description) { | |||
614 | xhr.send(encodeURI(`deletetag=1&fromtag=${tag}&token=${refreshedToken}`)); | 615 | xhr.send(encodeURI(`deletetag=1&fromtag=${tag}&token=${refreshedToken}`)); |
615 | refreshToken(basePath); | 616 | refreshToken(basePath); |
616 | 617 | ||
617 | existingTags = existingTags.filter(tagItem => tagItem !== tag); | 618 | existingTags = existingTags.filter((tagItem) => tagItem !== tag); |
618 | awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes); | 619 | awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes); |
619 | } | 620 | } |
620 | }); | 621 | }); |
diff --git a/assets/default/scss/shaarli.scss b/assets/default/scss/shaarli.scss index 7ab09d3f..f3782875 100644 --- a/assets/default/scss/shaarli.scss +++ b/assets/default/scss/shaarli.scss | |||
@@ -69,20 +69,22 @@ pre { | |||
69 | font-family: 'Roboto'; | 69 | font-family: 'Roboto'; |
70 | font-weight: 400; | 70 | font-weight: 400; |
71 | font-style: normal; | 71 | font-style: normal; |
72 | src: local('Roboto'), | 72 | src: |
73 | local('Roboto-Regular'), | 73 | local('Roboto'), |
74 | url('../fonts/Roboto-Regular.woff2') format('woff2'), | 74 | local('Roboto-Regular'), |
75 | url('../fonts/Roboto-Regular.woff') format('woff'); | 75 | url('../fonts/Roboto-Regular.woff2') format('woff2'), |
76 | url('../fonts/Roboto-Regular.woff') format('woff'); | ||
76 | } | 77 | } |
77 | 78 | ||
78 | @font-face { | 79 | @font-face { |
79 | font-family: 'Roboto'; | 80 | font-family: 'Roboto'; |
80 | font-weight: 700; | 81 | font-weight: 700; |
81 | font-style: normal; | 82 | font-style: normal; |
82 | src: local('Roboto'), | 83 | src: |
83 | local('Roboto-Bold'), | 84 | local('Roboto'), |
84 | url('../fonts/Roboto-Bold.woff2') format('woff2'), | 85 | local('Roboto-Bold'), |
85 | url('../fonts/Roboto-Bold.woff') format('woff'); | 86 | url('../fonts/Roboto-Bold.woff2') format('woff2'), |
87 | url('../fonts/Roboto-Bold.woff') format('woff'); | ||
86 | } | 88 | } |
87 | 89 | ||
88 | body, | 90 | body, |
@@ -375,7 +377,7 @@ body, | |||
375 | } | 377 | } |
376 | 378 | ||
377 | @media screen and (max-width: 64em) { | 379 | @media screen and (max-width: 64em) { |
378 | .header-search , | 380 | .header-search, |
379 | .header-search * { | 381 | .header-search * { |
380 | visibility: hidden; | 382 | visibility: hidden; |
381 | } | 383 | } |
@@ -554,7 +556,6 @@ body, | |||
554 | color: $dark-grey; | 556 | color: $dark-grey; |
555 | font-size: .9em; | 557 | font-size: .9em; |
556 | 558 | ||
557 | |||
558 | a { | 559 | a { |
559 | display: inline-block; | 560 | display: inline-block; |
560 | margin: 3px 0; | 561 | margin: 3px 0; |
@@ -620,7 +621,7 @@ body, | |||
620 | &.selected { | 621 | &.selected { |
621 | background: var(--main-color); | 622 | background: var(--main-color); |
622 | color: $white; | 623 | color: $white; |
623 | } | 624 | } |
624 | } | 625 | } |
625 | 626 | ||
626 | input { | 627 | input { |
@@ -1609,13 +1610,14 @@ form { | |||
1609 | 1610 | ||
1610 | > div { | 1611 | > div { |
1611 | border-radius: 10px; | 1612 | border-radius: 10px; |
1612 | background: repeating-linear-gradient( | 1613 | background: |
1613 | -45deg, | 1614 | repeating-linear-gradient( |
1614 | $almost-white, | 1615 | -45deg, |
1615 | $almost-white 6px, | 1616 | $almost-white, |
1616 | var(--background-color) 6px, | 1617 | $almost-white 6px, |
1617 | var(--background-color) 12px | 1618 | var(--background-color) 6px, |
1618 | ); | 1619 | var(--background-color) 12px |
1620 | ); | ||
1619 | width: 0%; | 1621 | width: 0%; |
1620 | height: 10px; | 1622 | height: 10px; |
1621 | } | 1623 | } |
diff --git a/assets/vintage/css/shaarli.css b/assets/vintage/css/shaarli.css index 87c440c8..1688dce0 100644 --- a/assets/vintage/css/shaarli.css +++ b/assets/vintage/css/shaarli.css | |||
@@ -746,8 +746,6 @@ a.bigbutton, #pageheader a.bigbutton { | |||
746 | text-align: left; | 746 | text-align: left; |
747 | background-color: transparent; | 747 | background-color: transparent; |
748 | background-color: rgba(0, 0, 0, 0.4); | 748 | background-color: rgba(0, 0, 0, 0.4); |
749 | /* FF3+, Saf3+, Opera 10.10+, Chrome, IE9 */ | ||
750 | filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#66000000, endColorstr=#66000000); | ||
751 | /* IE6IE9 */ | 749 | /* IE6IE9 */ |
752 | text-shadow: 2px 2px 1px #000000; | 750 | text-shadow: 2px 2px 1px #000000; |
753 | } | 751 | } |