diff --git a/_config.yml b/_config.yml index 6605cc17e2f9e55b1dc451ca1d3c5d2e4b14662e..beed146de4fae16c7dda0816a54b9a30968db4d4 100644 --- a/_config.yml +++ b/_config.yml @@ -101,7 +101,7 @@ header: url: # Mask effect of the background image. mask: - enable: true + enable: false # Opacity of mask (value: 0 ~ 1). opacity: 0.5 diff --git a/layout/_partials/sidebar/sidebar.pug b/layout/_partials/sidebar/sidebar.pug index a304326da26ff1e9a3e59d951fa75cf817c0fc08..91eb6c4a998a31549478cf67d8f3bdbef79cdd68 100644 --- a/layout/_partials/sidebar/sidebar.pug +++ b/layout/_partials/sidebar/sidebar.pug @@ -17,7 +17,8 @@ section.sidebar-ov(class=`${isShowToc ? "hide" : ""}`) if theme.author.enable div.sidebar-ov-author if theme.author.avatar.url - img.sidebar-ov-author__img(src=theme.author.avatar.url alt="avatar") + div.sidebar-ov-author__avatar + img.sidebar-ov-author__avatar_img(src=theme.author.avatar.url alt="avatar") if theme.author.motto p.sidebar-ov-author__p= theme.author.motto diff --git a/source/css/_common/components/sidebar/index.styl b/source/css/_common/components/sidebar/index.styl index 0afea97ce026cdbca6f92e0c2ac8356b518191ab..600589c5fdcbb4ea61a185359daf45cd6d74f5e2 100644 --- a/source/css/_common/components/sidebar/index.styl +++ b/source/css/_common/components/sidebar/index.styl @@ -93,11 +93,9 @@ if (hexo-config('sidebar.enable')) { } &-ov { - & > div { + & > div + div { if (hexo-config('sidebar.horizon_line')) { - &:not(:last-child) { - border-bottom: 1px dashed $sidebar-horizon-line-color; - } + border-top: 1px dashed $sidebar-horizon-line-color; } } @@ -106,18 +104,20 @@ if (hexo-config('sidebar.enable')) { width: 100%; text-align: center; - &__img { + &__avatar { + margin: 0 auto; width: 120px; height: 120px; - opacity: hexo-config('author.avatar.opacity'); - if (hexo-config('author.avatar.rounded')) { - border-radius: 50%; - } else { - border-radius: 2px; + &_img { + opacity: hexo-config('author.avatar.opacity'); + + if (hexo-config('author.avatar.rounded')) { + border-radius: 50%; + } } - &:hover { + &:hover &_img { animation: convert('avatar-' + (hexo-config('author.avatar.animation') || 'turn')) .8s both ease-out; } }