This commit is contained in:
xaoxuu 2021-07-07 01:18:13 +08:00
parent 2c206fb72c
commit 29f4a671c2
5 changed files with 55 additions and 13 deletions

View File

@ -40,7 +40,16 @@ function layoutDiv() {
}
if (md_text(theme.sidebar.logo.title)) {
el += '<a class="title" href="' + url_for(md_link(theme.sidebar.logo.title) || "/") + '">';
el += md_text(theme.sidebar.logo.title);
el += '<div class="main">' + md_text(theme.sidebar.logo.title) + '</div>';
if (config.subtitle) {
let arr = config.subtitle.split('|');
if (arr.length > 0) {
el += '<div class="sub normal cap">' + arr[0] + '</div>';
if (arr.length > 1) {
el += '<div class="sub hover cap" style="opacity:0">' + arr[1] + '</div>';
}
}
}
el += '</a>';
}
}

View File

@ -22,11 +22,22 @@ function layoutDiv() {
el += '<a class="reveal" href="' + url_for(post.link || post.path) + '">';
el += '<div class="cap">';
el += '<time>' + date(post.updated, config.date_format) + '</time>';
if (post.layout === 'wiki') {
el += '<span>';
let proj = theme.wiki.projects[post.wiki];
if (proj && proj.title) {
el += proj.title;
} else if (post.wiki) {
el += post.wiki;
}
el += '</span>';
} else {
post.categories.limit(1).forEach((cat, i) => {
el += '<span>' + cat.name + '</span>';
});
}
el += '</div>';
el += '<span class="title">';
if (post.wiki && (post.title.toUpperCase().includes(post.wiki.toUpperCase()) == false)) {
el += post.wiki + ': ';
}
el += post.title;
el += '</span>';
el += '</a>';

View File

@ -53,7 +53,7 @@ function layoutDiv() {
el += ' target="_blank" rel="external nofollow noopener noreferrer"';
el += '>';
el += item.icon;
el += item.text;
el += '<span>' + item.text + '</span>';
el += '</a></div>';
});
el += '</div>';

View File

@ -1,18 +1,19 @@
.widget-wrap#repo-info
.widget-body
.item
margin: .25rem 0
margin: 4px 0
a
color: var(--text-p2)
font-weight: 500
display: inline-flex
align-items: center
line-height: 1.8
padding: 0 .5rem
padding: 0.25rem .5rem
border-radius: 4px
font-size: $fs-13
svg
margin-right: .5rem
width: 1rem
width: 1em
height: 1em
a:hover
color: var(--text-p1)
background: var(--block-hover)

View File

@ -59,12 +59,30 @@
animation: spin infinite 1s
animation-timing-function: linear
.title
a.title
font-size: 1.75rem
font-weight: 900
color: inherit
line-height: 1;
line-height: 1
font-family: $ff-logo
display: block
position: relative
.sub
color: var(--text-p1)
trans2 opacity transform
.hover
position: absolute
bottom: 0
transform: translateY(8px)
&:hover
.normal
opacity: 0
transform: translateY(-8px)
.hover
transform: translateY(0)
opacity: 1 !important
a.avatar+a.title
txt-ellipsis()
.logo-wrap.wiki
@ -72,14 +90,15 @@
flex-direction: column
align-items: flex-start
a.wiki-home
margin-bottom: .75rem
margin-bottom: .5rem
color: var(--text-p2)
svg
margin-right: 2px
&:hover
color: $color-hover
filter: unset !important
a.title
line-height: inherit
nav.menu
margin: 1rem 0 .5rem
@ -174,6 +193,8 @@ nav.menu
div.cap
margin-bottom: 0.25rem
color: var(--text-p4)
display: flex
justify-content: space-between
&:hover
color: $color-hover
background: var(--card)