fix bugs
This commit is contained in:
parent
f6b06a6d6c
commit
f1bc0a3a8e
|
@ -46,7 +46,7 @@ function layoutDiv() {
|
|||
el += '</div>';
|
||||
el += '<div class="body">';
|
||||
el += '<div class="link"><input class="copy-area" readonly="true" id="copy-link" value="' + page.permalink + '" /></div>';
|
||||
el += '<div class="social-wrap">';
|
||||
el += '<div class="social-wrap dis-select">';
|
||||
theme.article.share.forEach((item, i) => {
|
||||
if (['wechat', 'weibo', 'email', 'link'].includes(item)) {
|
||||
el += '<a class="social share-item ' + item + '"';
|
||||
|
@ -86,8 +86,8 @@ function layoutDiv() {
|
|||
});
|
||||
el += '</div>';
|
||||
if (theme.article.share.includes('wechat')) {
|
||||
el += '<div class="qrcode" id="qrcode-wechat" style="display:none">';
|
||||
el += '<img no-lazy src="https://api.qrserver.com/v1/create-qr-code/?size=256x256&data=' + url + '"/>';
|
||||
el += '<div class="qrcode" id="qrcode-wechat" style="visibility:hidden;height:0">';
|
||||
el += '<img src="https://api.qrserver.com/v1/create-qr-code/?size=256x256&data=' + url + '"/>';
|
||||
el += '</div>';
|
||||
}
|
||||
el += '</div>';
|
||||
|
|
|
@ -22,11 +22,22 @@ hexo.extend.helper.register('popular_posts_wrapper', function(args){
|
|||
</section>
|
||||
<section class='body'>
|
||||
`;
|
||||
|
||||
const posts = this.site.posts;
|
||||
const root = this.config.root;
|
||||
function generateHTML(list){
|
||||
|
||||
var el = '';
|
||||
el += '<a class="item" href="' + list.path + '" title="' + list.title + '">';
|
||||
|
||||
var p = posts.filter(function(p) {
|
||||
return root + p.path == list.path;
|
||||
});
|
||||
if (p && p.length > 0) {
|
||||
p = p.data[0];
|
||||
}
|
||||
if (p && p.cover) {
|
||||
list.img = p.cover;
|
||||
}
|
||||
if (hexo.theme.config.default.cover) {
|
||||
el += '<div class="img">'
|
||||
if (list.img && list.img != "") {
|
||||
|
|
|
@ -4,8 +4,6 @@ article.md .highlight
|
|||
-webkit-font-smoothing: auto
|
||||
-moz-osx-font-smoothing: auto
|
||||
overflow: hidden
|
||||
// width: "calc(100% - 2px)"
|
||||
width: 100%
|
||||
background: var(--block)
|
||||
border: 1px solid var(--block-border)
|
||||
line-height: 1.5
|
|
@ -37,14 +37,17 @@
|
|||
margin: 0
|
||||
|
||||
.md .article-footer .qrcode
|
||||
margin: 2rem auto 1rem
|
||||
width: 128px
|
||||
padding: 4px
|
||||
background: white
|
||||
border-radius: 4px
|
||||
box-shadow: 0 4px 8px 0px rgba(0, 0, 0, 0.1), 0 0 32px 0px rgba(0, 0, 0, 0.1)
|
||||
overflow: hidden
|
||||
trans1 height
|
||||
img
|
||||
object-fit: contain
|
||||
|
||||
.md .article-footer .qrcode.display
|
||||
display: block !important
|
||||
margin: 2rem auto 1rem
|
||||
height: 128px !important
|
||||
visibility: visible !important
|
||||
|
|
Loading…
Reference in New Issue