优化友链标签
This commit is contained in:
parent
bc19be4066
commit
90b31903ef
|
@ -15,7 +15,6 @@ if (page.sidebar == undefined) {
|
||||||
} else if (page.layout == 'page') {
|
} else if (page.layout == 'page') {
|
||||||
page.sidebar = theme.sidebar.widget_layout.page;
|
page.sidebar = theme.sidebar.widget_layout.page;
|
||||||
} else {
|
} else {
|
||||||
console.log('page.layout: ', page.layout);
|
|
||||||
page.sidebar = [];
|
page.sidebar = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,9 @@ hexo.extend.tag.register('friends', function(args) {
|
||||||
}
|
}
|
||||||
if (groupId in friends) {
|
if (groupId in friends) {
|
||||||
let group = friends[groupId];
|
let group = friends[groupId];
|
||||||
|
if ((typeof group == 'object') && group.constructor == Array) {
|
||||||
|
group = {items: group};
|
||||||
|
}
|
||||||
if (group.title || group.description) {
|
if (group.title || group.description) {
|
||||||
el += groupHeader(group);
|
el += groupHeader(group);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
display: flex
|
display: flex
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
align-items: stretch
|
align-items: stretch
|
||||||
margin-bottom: 2rem
|
&+.group-header
|
||||||
|
margin-top: 2rem
|
||||||
.friendsjs-wrap
|
.friendsjs-wrap
|
||||||
display: block
|
display: block
|
||||||
.loading-wrap
|
.loading-wrap
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
.group-body
|
.group-body
|
||||||
width: 100%
|
width: 100%
|
||||||
margin-bottom: 2rem
|
&+.group-header
|
||||||
|
margin-top: 2rem
|
||||||
.sitesjs-wrap
|
.sitesjs-wrap
|
||||||
display: block
|
display: block
|
||||||
.loading-wrap
|
.loading-wrap
|
||||||
|
@ -29,7 +30,6 @@
|
||||||
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
|
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
|
||||||
@media screen and (max-width: $device-mobile)
|
@media screen and (max-width: $device-mobile)
|
||||||
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
|
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
|
||||||
margin-bottom: 2rem
|
|
||||||
|
|
||||||
.sites-wrap .group-body .site-card .card-link
|
.sites-wrap .group-body .site-card .card-link
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
align-items: flex-start
|
align-items: flex-start
|
||||||
max-width: 100%
|
max-width: 'calc(100% - %s)' % 1rem
|
||||||
>.header, >.body
|
>.header, >.body
|
||||||
max-width: @max-width
|
max-width: @max-width
|
||||||
&[highlight] .header:before
|
&[highlight] .header:before
|
||||||
|
|
Loading…
Reference in New Issue