fix theme...
This commit is contained in:
3
themes/anzhiyu/layout/includes/widget/card_ad.pug
Normal file
3
themes/anzhiyu/layout/includes/widget/card_ad.pug
Normal file
@@ -0,0 +1,3 @@
|
||||
if theme.ad && theme.ad.aside
|
||||
.card-widget.ads-wrap
|
||||
!= theme.ad.aside
|
||||
@@ -0,0 +1,6 @@
|
||||
if theme.aside.card_announcement.enable
|
||||
.card-widget.card-announcement
|
||||
.item-headline
|
||||
i.anzhiyufont.anzhiyu-icon-bullhorn.anzhiyu-shake
|
||||
span= _p('aside.card_announcement')
|
||||
.announcement_content!= theme.aside.card_announcement.content
|
||||
8
themes/anzhiyu/layout/includes/widget/card_archives.pug
Normal file
8
themes/anzhiyu/layout/includes/widget/card_archives.pug
Normal file
@@ -0,0 +1,8 @@
|
||||
if theme.aside.card_archives.enable
|
||||
.card-archives
|
||||
- let type = theme.aside.card_archives.type || 'monthly'
|
||||
- let format = theme.aside.card_archives.format || 'MMMM YYYY'
|
||||
- let order = theme.aside.card_archives.order || -1
|
||||
- let limit = theme.aside.card_archives.limit === 0 ? 0 : theme.aside.card_archives.limit || 8
|
||||
!= aside_archives({ type:type, format: format, order: order, limit: limit })
|
||||
hr
|
||||
20
themes/anzhiyu/layout/includes/widget/card_author.pug
Normal file
20
themes/anzhiyu/layout/includes/widget/card_author.pug
Normal file
@@ -0,0 +1,20 @@
|
||||
if theme.aside.card_author.enable
|
||||
.card-widget.card-info
|
||||
.card-content
|
||||
if theme.author_status.enable
|
||||
.author-info__sayhi#author-info__sayhi(onclick="anzhiyu.changeSayHelloText()")
|
||||
.author-info-avatar
|
||||
img.avatar-img(src=url_for(theme.avatar.img) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt="avatar")
|
||||
if theme.author_status.enable && theme.author_status.statusImg
|
||||
.author-status
|
||||
img(src=url_for(theme.author_status.statusImg) class='g-status' alt="status")
|
||||
|
||||
.author-info__description!= theme.aside.card_author.description || config.description
|
||||
|
||||
if(theme.social)
|
||||
.author-info__bottom-group
|
||||
a.author-info__bottom-group-left(href=url_for(theme.aside.card_author.name_link))
|
||||
h1.author-info__name=config.author
|
||||
.author-info__desc=config.subtitle
|
||||
.card-info-social-icons.is-center
|
||||
!=fragment_cache('social', function(){return partial('includes/header/social')})
|
||||
@@ -0,0 +1,9 @@
|
||||
if site.data.widget && site.data.widget.bottom
|
||||
each item in site.data.widget.bottom
|
||||
.card-widget(class=item.class_name id=item.id_name style=item.order ? `order: ${item.order}` : '')
|
||||
.item-headline
|
||||
i(class=item.icon)
|
||||
span=item.name
|
||||
.item-content
|
||||
!=item.html
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
if theme.aside.card_categories.enable
|
||||
if site.categories.length
|
||||
.card-widget.card-categories
|
||||
!=aside_categories({ limit: theme.aside.card_categories.limit === 0 ? 0 : theme.aside.card_categories.limit || 8 , expand: theme.aside.card_categories.expand })
|
||||
@@ -0,0 +1,8 @@
|
||||
if theme.centerConsole.card_archives.enable
|
||||
.card-archives
|
||||
- let type = theme.centerConsole.card_archives.type || 'monthly'
|
||||
- let format = theme.centerConsole.card_archives.format || 'MMMM YYYY'
|
||||
- let order = theme.centerConsole.card_archives.order || -1
|
||||
- let limit = theme.centerConsole.card_archives.limit === 0 ? 0 : theme.centerConsole.card_archives.limit || 8
|
||||
!= aside_archives({ type:type, format: format, order: order, limit: limit })
|
||||
hr
|
||||
10
themes/anzhiyu/layout/includes/widget/card_console_tags.pug
Normal file
10
themes/anzhiyu/layout/includes/widget/card_console_tags.pug
Normal file
@@ -0,0 +1,10 @@
|
||||
if theme.centerConsole.card_tags.enable
|
||||
if site.tags.length
|
||||
.card-tags
|
||||
.item-headline
|
||||
- let tagLimit = theme.centerConsole.card_tags.limit === 0 ? 0 : theme.centerConsole.card_tags.limit || 40
|
||||
if theme.centerConsole.card_tags.color
|
||||
.card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 1.05, maxfontsize: 1.05, limit: tagLimit, unit: 'rem', color: true, highlightTags: theme.centerConsole.card_tags.highlightTags})
|
||||
else
|
||||
.card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 1.05, maxfontsize: 1.05, limit: tagLimit, unit: 'rem', color: false, highlightTags: theme.centerConsole.card_tags.highlightTags})
|
||||
hr
|
||||
@@ -0,0 +1,8 @@
|
||||
if theme.newest_comments.enable
|
||||
.console-card#card-newest-comments
|
||||
.card-content
|
||||
.author-content-item-tips 互动
|
||||
span.author-content-item-title
|
||||
!= _p('aside.card_newest_comments.headline')
|
||||
.aside-list
|
||||
span= _p('aside.card_newest_comments.loading_text')
|
||||
15
themes/anzhiyu/layout/includes/widget/card_post_toc.pug
Normal file
15
themes/anzhiyu/layout/includes/widget/card_post_toc.pug
Normal file
@@ -0,0 +1,15 @@
|
||||
- let tocNumber = page.toc_number !== undefined ? page.toc_number : theme.toc.number
|
||||
- let tocExpand = page.toc_expand !== undefined ? page.toc_expand : theme.toc.expand
|
||||
- let tocExpandClass = tocExpand ? 'is-expand' : ''
|
||||
|
||||
#card-toc.card-widget
|
||||
.item-headline
|
||||
i.anzhiyufont.anzhiyu-icon-bars
|
||||
span= _p('aside.card_toc')
|
||||
span.toc-percentage
|
||||
|
||||
if (page.encrypt == true)
|
||||
.toc-content.toc-div-class(class=tocExpandClass style="display:none")!=toc(page.origin, {list_number: tocNumber})
|
||||
else
|
||||
.toc-content(class=tocExpandClass)!=toc(page.content, {list_number: tocNumber})
|
||||
|
||||
24
themes/anzhiyu/layout/includes/widget/card_recent_post.pug
Normal file
24
themes/anzhiyu/layout/includes/widget/card_recent_post.pug
Normal file
@@ -0,0 +1,24 @@
|
||||
if theme.aside.card_recent_post.enable
|
||||
.card-widget.card-recent-post
|
||||
.item-headline
|
||||
i.anzhiyufont.anzhiyu-icon-history
|
||||
span= _p('aside.card_recent_post')
|
||||
.aside-list
|
||||
- let postLimit = theme.aside.card_recent_post.limit === 0 ? site.posts.length : theme.aside.card_recent_post.limit || 5
|
||||
- let sort = theme.aside.card_recent_post.sort === 'updated' ? 'updated' : 'date'
|
||||
- site.posts.sort(sort, -1).limit(postLimit).each(function(article){
|
||||
- let link = article.link || article.path
|
||||
- let title = article.title || _p('no_title')
|
||||
- let no_cover = article.cover === false || !theme.cover.aside_enable ? 'no-cover' : ''
|
||||
- let post_cover = article.cover
|
||||
.aside-list-item(class=no_cover)
|
||||
if post_cover && theme.cover.aside_enable
|
||||
a.thumbnail(href=url_for(link) title=title)
|
||||
img(src=url_for(post_cover) onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'` alt=title)
|
||||
.content
|
||||
a.title(href=url_for(link) title=title)= title
|
||||
if theme.aside.card_recent_post.sort === 'updated'
|
||||
time(datetime=date_xml(article.updated) title=_p('post.updated') + ' ' + full_date(article.updated)) #[=date(article.updated, config.date_format)]
|
||||
else
|
||||
time(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date)) #[=date(article.date, config.date_format)]
|
||||
- })
|
||||
10
themes/anzhiyu/layout/includes/widget/card_tags.pug
Normal file
10
themes/anzhiyu/layout/includes/widget/card_tags.pug
Normal file
@@ -0,0 +1,10 @@
|
||||
if theme.aside.card_tags.enable
|
||||
if site.tags.length
|
||||
.card-tags
|
||||
.item-headline
|
||||
- let tagLimit = theme.aside.card_tags.limit === 0 ? 0 : theme.aside.card_tags.limit || 40
|
||||
if theme.aside.card_tags.color
|
||||
.card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 1.05, maxfontsize: 1.05, limit: tagLimit, unit: 'rem', color: true, highlightTags: theme.aside.card_tags.highlightTags})
|
||||
else
|
||||
.card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 1.05, maxfontsize: 1.05, limit: tagLimit, unit: 'rem', color: false, highlightTags: theme.aside.card_tags.highlightTags})
|
||||
hr
|
||||
8
themes/anzhiyu/layout/includes/widget/card_top_self.pug
Normal file
8
themes/anzhiyu/layout/includes/widget/card_top_self.pug
Normal file
@@ -0,0 +1,8 @@
|
||||
if site.data.widget && site.data.widget.top
|
||||
each item in site.data.widget.top
|
||||
.card-widget(class=item.class_name id=item.id_name)
|
||||
.item-headline
|
||||
i(class=item.icon)
|
||||
span=item.name
|
||||
.item-content
|
||||
!=item.html
|
||||
47
themes/anzhiyu/layout/includes/widget/card_webinfo.pug
Normal file
47
themes/anzhiyu/layout/includes/widget/card_webinfo.pug
Normal file
@@ -0,0 +1,47 @@
|
||||
if theme.aside.card_webinfo.enable
|
||||
.card-webinfo
|
||||
.item-headline
|
||||
i.anzhiyufont.anzhiyu-icon-chart-line
|
||||
span= _p('aside.card_webinfo.headline')
|
||||
.webinfo
|
||||
if theme.aside.card_webinfo.post_count
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.anzhiyufont.anzhiyu-icon-file-lines
|
||||
.item-name= _p('aside.card_webinfo.article_name') + " :"
|
||||
.item-count= site.posts.length
|
||||
if theme.runtimeshow.enable
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.anzhiyufont.anzhiyu-icon-stopwatch
|
||||
.item-name= _p('aside.card_webinfo.runtime.name') + " :"
|
||||
.item-count#runtimeshow(data-publishDate=date_xml(theme.runtimeshow.publish_date))
|
||||
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
|
||||
if theme.wordcount.enable && theme.wordcount.total_wordcount
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.anzhiyufont.anzhiyu-icon-font
|
||||
.item-name=_p('aside.card_webinfo.site_wordcount') + " :"
|
||||
.item-count=totalcount(site)
|
||||
if theme.busuanzi.site_uv
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.anzhiyufont.anzhiyu-icon-universal-access
|
||||
.item-name= _p('aside.card_webinfo.site_uv_name') + " :"
|
||||
.item-count#busuanzi_value_site_uv
|
||||
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
|
||||
if theme.busuanzi.site_pv
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.anzhiyufont.anzhiyu-icon-square-poll-vertical
|
||||
.item-name= _p('aside.card_webinfo.site_pv_name') + " :"
|
||||
.item-count#busuanzi_value_site_pv
|
||||
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
|
||||
if theme.aside.card_webinfo.last_push_date
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.anzhiyufont.anzhiyu-icon-hourglass-start
|
||||
.item-name= _p('aside.card_webinfo.last_push_date.name') + " :"
|
||||
.item-count#last-push-date(data-lastPushDate=date_xml(Date.now()))
|
||||
i.anzhiyufont.anzhiyu-icon-spinner.anzhiyu-spin
|
||||
|
||||
8
themes/anzhiyu/layout/includes/widget/card_weixin.pug
Normal file
8
themes/anzhiyu/layout/includes/widget/card_weixin.pug
Normal file
@@ -0,0 +1,8 @@
|
||||
- let faceImg = theme.aside.card_weixin.face
|
||||
- let backFaceImg = theme.aside.card_weixin.backFace
|
||||
if theme.aside.card_weixin.enable
|
||||
.card-widget.anzhiyu-right-widget#card-wechat(onclick="window.open("/")")
|
||||
#flip-wrapper
|
||||
#flip-content
|
||||
.face(style=`background: url(${faceImg}) center center / 100% no-repeat`)
|
||||
.back.face(style=`background: url(${backFaceImg}) center center / 100% no-repeat`)
|
||||
35
themes/anzhiyu/layout/includes/widget/index.pug
Normal file
35
themes/anzhiyu/layout/includes/widget/index.pug
Normal file
@@ -0,0 +1,35 @@
|
||||
#aside-content.aside-content
|
||||
//- post
|
||||
if is_post()
|
||||
- const tocStyle = page.toc_style_simple
|
||||
- const tocStyleVal = tocStyle === true || tocStyle === false ? tocStyle : theme.toc.style_simple
|
||||
if showToc && tocStyleVal
|
||||
.sticky_layout
|
||||
include ./card_post_toc.pug
|
||||
else
|
||||
!=partial('includes/widget/card_author', {}, {cache: true})
|
||||
!=partial('includes/widget/card_announcement', {}, {cache: true})
|
||||
!=partial('includes/widget/card_weixin', {}, {cache: true})
|
||||
!=partial('includes/widget/card_top_self', {}, {cache: true})
|
||||
.sticky_layout
|
||||
if showToc
|
||||
include ./card_post_toc.pug
|
||||
!=partial('includes/widget/card_recent_post', {}, {cache: true})
|
||||
!=partial('includes/widget/card_ad', {}, {cache: true})
|
||||
else
|
||||
//- page
|
||||
!=partial('includes/widget/card_author', {}, {cache: true})
|
||||
!=partial('includes/widget/card_announcement', {}, {cache: true})
|
||||
!=partial('includes/widget/card_weixin', {}, {cache: true})
|
||||
!=partial('includes/widget/card_top_self', {}, {cache: true})
|
||||
!=partial('includes/widget/card_categories', {}, {cache: true})
|
||||
|
||||
.sticky_layout
|
||||
if showToc
|
||||
include ./card_post_toc.pug
|
||||
.card-widget
|
||||
!=partial('includes/widget/card_ad', {}, {cache: true})
|
||||
!=partial('includes/widget/card_tags', {}, {cache: true})
|
||||
!=partial('includes/widget/card_archives', {}, {cache: true})
|
||||
!=partial('includes/widget/card_webinfo', {}, {cache: true})
|
||||
!=partial('includes/widget/card_bottom_self', {}, {cache: true})
|
||||
Reference in New Issue
Block a user