💄 Fixed the waline reaction icon pixes in mobile driver.
This commit is contained in:
parent
525c8a7cf5
commit
9160a33053
@ -2,16 +2,13 @@
|
||||
.wl-actions>button:nth-child(3) {
|
||||
display: none
|
||||
}
|
||||
|
||||
.wl-reaction-img {
|
||||
@include mobile() {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
||||
@include mobile() {
|
||||
.wl-reaction-img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.wl-reaction-votes {
|
||||
@include mobile() {
|
||||
.wl-reaction-votes {
|
||||
padding: 0.85px;
|
||||
font-weight: 500;
|
||||
font-size: .65em;
|
||||
|
2
assets/js/third-party/comments/waline.js
vendored
2
assets/js/third-party/comments/waline.js
vendored
@ -33,7 +33,7 @@ NexT.plugins.comments.waline = function() {
|
||||
NexT.utils.lazyLoadComponent(element, function () {
|
||||
NexT.utils.getScript(waline_js, function(){
|
||||
const waline_css = NexT.utils.getCDNResource(NexT.CONFIG.waline.css);
|
||||
NexT.utils.getStyle(waline_css);
|
||||
NexT.utils.getStyle(waline_css, 'before');
|
||||
|
||||
Waline.init({
|
||||
locale,
|
||||
|
@ -515,13 +515,19 @@ NexT.utils = {
|
||||
});
|
||||
},
|
||||
|
||||
getStyle: function (src, parent) {
|
||||
getStyle: function (src, position='after', parent) {
|
||||
const link = document.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('type', 'text/css');
|
||||
link.setAttribute('href', src);
|
||||
|
||||
(parent || document.head).appendChild(link);
|
||||
const head = (parent || document.head);
|
||||
console.log(head)
|
||||
if (position === 'before') {
|
||||
head.prepend(link);
|
||||
} else {
|
||||
head.append(link);
|
||||
}
|
||||
},
|
||||
|
||||
getScript: function (src, options = {}, legacyCondition) {
|
||||
@ -595,26 +601,5 @@ NexT.utils = {
|
||||
});
|
||||
intersectionObserver.observe(element);
|
||||
});
|
||||
},
|
||||
|
||||
loadComments: function (selector, legacyCallback) {
|
||||
if (legacyCallback) {
|
||||
return this.loadComments(selector).then(legacyCallback);
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
const element = document.querySelector(selector);
|
||||
if (!element) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
const intersectionObserver = new IntersectionObserver((entries, observer) => {
|
||||
const entry = entries[0];
|
||||
if (!entry.isIntersecting) return;
|
||||
|
||||
resolve();
|
||||
observer.disconnect();
|
||||
});
|
||||
intersectionObserver.observe(element);
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user