[opt] indent

This commit is contained in:
xaoxuu 2024-02-07 17:39:21 +08:00
parent c058219302
commit 7d08530af8
6 changed files with 14 additions and 6 deletions

View File

@ -18,7 +18,7 @@ function layoutNodeTitle(ctx, content) {
var el = '' var el = ''
el += '<div class="header">' el += '<div class="header">'
if (content && content.length > 0) { if (content && content.length > 0) {
el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('') el += content
} }
el += '</div>' el += '</div>'
return el return el

View File

@ -20,9 +20,12 @@
overflow: hidden overflow: hidden
.l_body[text-indent] .md-text.content .l_body[text-indent] .md-text.content
>p //
p:not([class])
text-indent: 'calc(%s * 2)' % var(--fsp) text-indent: 'calc(%s * 2)' % var(--fsp)
text-align: justify text-align: justify
a
text-indent: 0
ol,ul ol,ul
margin-left: 0.5em margin-left: 0.5em
h1,h2,h3,h4,h5,h6 h1,h2,h3,h4,h5,h6
@ -31,6 +34,11 @@
display: none display: none
h2 h2
margin: 2em 0 1.5em margin: 2em 0 1.5em
//
blockquote, .poetry, .okr, .timeline, li
p:not([class])
text-indent: 0
text-align: convert(hexo-config('style.text-align'))
.md-text .md-text
ul:not(:last-child), ul:not(:last-child),

View File

@ -59,7 +59,7 @@ const FCircle = {
cell += '<img src="' + (item.avatar || cfg.avatar) + '" onerror="javascript:this.src=\'' + cfg.avatar + '\';">'; cell += '<img src="' + (item.avatar || cfg.avatar) + '" onerror="javascript:this.src=\'' + cfg.avatar + '\';">';
cell += '<span>' + item.author + '</span>'; cell += '<span>' + item.author + '</span>';
cell += '</div>'; cell += '</div>';
cell += '<p>' + item.created + '</p>'; cell += '<span>' + item.created + '</span>';
cell += '</div>'; cell += '</div>';
cell += '<a class="body" href="' + item.link + '" target="_blank" rel="external nofollow noopener noreferrer">'; cell += '<a class="body" href="' + item.link + '" target="_blank" rel="external nofollow noopener noreferrer">';
cell += item.title; cell += item.title;

View File

@ -77,7 +77,7 @@ const MemosJS = {
cell += '<span>' + item.creatorName + '</span>'; cell += '<span>' + item.creatorName + '</span>';
cell += '</div>'; cell += '</div>';
} }
cell += '<p>' + date.toLocaleString() + '</p>'; cell += '<span>' + date.toLocaleString() + '</span>';
cell += '</div>'; cell += '</div>';
cell += '<div class="body">'; cell += '<div class="body">';
cell += marked.parse(item.content || ''); cell += marked.parse(item.content || '');

View File

@ -84,7 +84,7 @@ const StellarTimeline = {
cell += '</a>'; cell += '</a>';
} }
let date = new Date(item.created_at); let date = new Date(item.created_at);
cell += '<p>' + date.toLocaleString() + '</p>'; cell += '<span>' + date.toLocaleString() + '</span>';
cell += '</div>'; cell += '</div>';
cell += '<div class="body">'; cell += '<div class="body">';
if (!hide.includes('title')) { if (!hide.includes('title')) {

View File

@ -59,7 +59,7 @@ const weibojs = {
cell += '<img src="' + (data.user.avatar_hd || cfg.avatar) + '" onerror="javascript:this.src=\'' + cfg.avatar + '\';">'; cell += '<img src="' + (data.user.avatar_hd || cfg.avatar) + '" onerror="javascript:this.src=\'' + cfg.avatar + '\';">';
cell += '<span>' + data.user.nick_name + '</span>'; cell += '<span>' + data.user.nick_name + '</span>';
cell += '</div>'; cell += '</div>';
cell += '<p>' + item.created_at + '</p>'; cell += '<span>' + item.created_at + '</span>';
cell += '</div>'; cell += '</div>';
cell += '<div class="body">'; cell += '<div class="body">';
cell += '<a class="body" href="' + item.url + '" target="_blank" rel="external nofollow noopener noreferrer">'; cell += '<a class="body" href="' + item.url + '" target="_blank" rel="external nofollow noopener noreferrer">';