mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-04 06:22:00 +08:00
breaking changes: 移除 html 的 font-size 改為瀏覽器默認大小
feat: 為文章單獨設置 TOC simple_style 顯示 closed #631 feat: page 頁頂部圖增加黑色遮罩 closed #671 feat: 首頁 pagination 更新 UI fix: 修復使用本地搜索時,搜索插件配置為不搜索文章內容會無法使用搜索 的 bug fix: 修復開啟 photofigcaption 後,導致inlineImg標籤外掛顯示錯亂的 bug fix: 修復 字體過大/過小而導致 部分 ui 偏移的 bug improvement: 主題 css 使用的 rem 改為 em 或 px improvement: 修改没有顶部图下,文章页的标题大小 closed #669 improvement: 代碼優化
This commit is contained in:
1 parent
484f036adb
commit
3708fdf569
42 files changed
+387
-425
No files matched your search
+1
-1
@@ -171,7 +171,7 @@ toc:
|
|||||||
post: true
|
post: true
|
||||||
page: false
|
page: false
|
||||||
number: true
|
number: true
|
||||||
style_simple: false
|
style_simple: false # for post
|
||||||
|
|
||||||
post_copyright:
|
post_copyright:
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
mixin postUI(posts)
|
mixin postUI(posts)
|
||||||
each article , index in page.posts.data
|
each article , index in page.posts.data
|
||||||
.recent-post-item
|
.recent-post-item
|
||||||
- let link = article.link || article.path
|
-
|
||||||
- let title = article.title || _p('no_title')
|
let link = article.link || article.path
|
||||||
- let leftOrRight = index%2 == 0 ? 'left_radius' : 'right_radius'
|
let title = article.title || _p('no_title')
|
||||||
- let post_cover = article.cover
|
const position = theme.cover.position
|
||||||
- let no_cover = article.cover === false || !theme.cover.index_enable ? 'no-cover' : ''
|
let leftOrRight = position === 'both'
|
||||||
|
? index%2 == 0 ? 'left' : 'right'
|
||||||
|
: position === 'left' ? 'left' : 'right'
|
||||||
|
let post_cover = article.cover
|
||||||
|
let no_cover = article.cover === false || !theme.cover.index_enable ? 'no-cover' : ''
|
||||||
|
-
|
||||||
if post_cover && theme.cover.index_enable
|
if post_cover && theme.cover.index_enable
|
||||||
.post_cover(class=leftOrRight)
|
.post_cover(class=leftOrRight)
|
||||||
a(href=url_for(link) title=title)
|
a(href=url_for(link) title=title)
|
||||||
img.post_bg(src=url_for(post_cover) onerror=`this.onerror=null;this.src='`+ url_for(theme.error_img.post_page) + `'` alt=title)
|
img.post_bg(src=url_for(post_cover) onerror=`this.onerror=null;this.src='`+ url_for(theme.error_img.post_page) + `'` alt=title)
|
||||||
.recent-post-info(class=no_cover)
|
.recent-post-info(class=no_cover)
|
||||||
a.article-title(href=url_for(link) title=title)= title
|
a.article-title(href=url_for(link) title=title)= title
|
||||||
@@ -20,7 +25,7 @@ mixin postUI(posts)
|
|||||||
span.article-meta__separator |
|
span.article-meta__separator |
|
||||||
if (theme.post_meta.page.date_type)
|
if (theme.post_meta.page.date_type)
|
||||||
span.post-meta-date
|
span.post-meta-date
|
||||||
if (theme.post_meta.page.date_type === 'both')
|
if (theme.post_meta.page.date_type === 'both')
|
||||||
i.far.fa-calendar-alt
|
i.far.fa-calendar-alt
|
||||||
span.article-meta-label=_p('post.created')
|
span.article-meta-label=_p('post.created')
|
||||||
time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))=date(article.date, config.date_format)
|
time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))=date(article.date, config.date_format)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
.item-headline
|
.item-headline
|
||||||
i.fas.fa-stream
|
i.fas.fa-stream
|
||||||
span= _p('aside.card_toc')
|
span= _p('aside.card_toc')
|
||||||
|
span.toc-percentage
|
||||||
|
|
||||||
if (page.encrypt == true)
|
if (page.encrypt == true)
|
||||||
.toc-content.toc-div-class(style="display:none")!=toc(page.origin, {list_number: tocNumber})
|
.toc-content.toc-div-class(style="display:none")!=toc(page.origin, {list_number: tocNumber})
|
||||||
|
|||||||
Loaded 3 of 42 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user