This commit is contained in:
xaoxuu 2022-10-12 20:09:40 +08:00
parent 12c380c4df
commit aecd6e9a4f
6 changed files with 23 additions and 25 deletions

View File

@ -10,7 +10,7 @@
'use strict'; 'use strict';
hexo.extend.tag.register('about', function(args, content) { hexo.extend.tag.register('about', function(args, content) {
args = hexo.args.map(args, ['avatar', 'height']); args = hexo.args.map(args, ['avatar', 'height', 'border']);
var rows = hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n'); var rows = hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n');
var el = ''; var el = '';
// wrapper // wrapper
@ -24,20 +24,15 @@ hexo.extend.tag.register('about', function(args, content) {
if (avatar_url) { if (avatar_url) {
el += '<div class="avatar">' el += '<div class="avatar">'
el += '<img src="' + avatar_url + '"'; el += '<img src="' + avatar_url + '"';
if (args.height && args.height.length > 0) { if (args.border && args.border.length > 0) {
el += ' height="' + args.height + '"/>'; el += ' style="border-radius:' + args.border + '"';
} else {
el += '/>';
} }
if (args.height && args.height.length > 0) {
el += ' height="' + args.height + '"';
}
el += '/>';
el += '</div>'; el += '</div>';
} }
// title
if (rows.length > 0) {
// el += '<div class="title">';
el += rows.shift();
// el += '</div>';
}
el += '</div>'; el += '</div>';
// content // content

View File

@ -76,6 +76,13 @@ $border-image = 6px
@media screen and (min-width: $device-4k) @media screen and (min-width: $device-4k)
--width-main: 860px --width-main: 860px
--gap-l: 64px --gap-l: 64px
// iPad
@media screen and (max-width: $device-tablet)
--width-left: 220px
// iPad
@media screen and (max-width: $device-mobile-max)
--width-left: 256px
// shadow // shadow

View File

@ -19,11 +19,6 @@
max-width: var(--width-main) max-width: var(--width-main)
// iPad
@media screen and (max-width: $device-tablet)
:root
--width-left: 220px
// //
@media screen and (max-width: $device-mobile-max) @media screen and (max-width: $device-mobile-max)
.mobile-only .mobile-only

View File

@ -1,11 +1,12 @@
.tag-plugin.about .tag-plugin.about
background: var(--block) background: var(--block)
border-radius: $border-card border-radius: $border-card
padding: 3rem 2rem 2rem padding: 2rem
.about-header .about-header
display flex display flex
justify-content: space-between justify-content: center
flex-wrap: wrap flex-wrap: wrap
margin: 1rem 0 2rem
img img
object-fit: contain object-fit: contain
>img >img
@ -30,7 +31,6 @@
nav.cap nav.cap
margin-top: 1rem margin-top: 1rem
background: var(--card) background: var(--card)
border: 1px solid var(--block-border)
a a
color: $color-link color: $color-link
&:hover &:hover
@ -43,7 +43,8 @@
@media screen and (max-width: $device-mobile) @media screen and (max-width: $device-mobile)
.tag-plugin.about .tag-plugin.about
padding: 2rem 1rem 1rem padding: 1rem
.about-header .about-header
margin: 2rem 0
p p
width 100% width 100%

View File

@ -17,10 +17,7 @@
margin-top: 2rem margin-top: 2rem
.stellar-friends-api .stellar-friends-api
display: block display: block
.loading-wrap
min-height: 50px
margin: 2rem 0
text-align: center
.users-wrap .user-card .users-wrap .user-card
flex-shrink: 1 flex-shrink: 1

View File

@ -1,3 +1,6 @@
.md .tag-plugin.folding .body:has(.timeline)
background: var(--site-bg)
.md .tag-plugin.timeline .md .tag-plugin.timeline
position: relative position: relative
margin-top: 0 margin-top: 0