parent
							
								
									da59462af1
								
							
						
					
					
						commit
						2ea32af5fa
					
				@ -1,4 +1,8 @@ | 
				
			|||||||
mixin data_row(name, value) | 
					mixin data_row(name, value, target_href) | 
				
			||||||
  .data-row | 
					  .data-row | 
				
			||||||
    span.data-name=name | 
					    span.data-name=name | 
				
			||||||
    span.data-value=value | 
					    if target_href | 
				
			||||||
 | 
					      span.data-value | 
				
			||||||
 | 
					        a(href=target_href target='_balnk')=value | 
				
			||||||
 | 
					    else | 
				
			||||||
 | 
					      span.data-value=value | 
				
			||||||
 | 
				
			|||||||
@ -1,35 +1,38 @@ | 
				
			|||||||
include titled_card.pug | 
					include titled_card.pug | 
				
			||||||
include data_row.pug  | 
					include data_row.pug  | 
				
			||||||
 | 
					include button.pug | 
				
			||||||
 | 
					
 | 
				
			||||||
.information-card | 
					mixin information_card(...extendData) | 
				
			||||||
  +titled_card("Status") | 
					  .information-card | 
				
			||||||
    .information-content | 
					    +titled_card("Status") | 
				
			||||||
      .avatar-box  | 
					      .information-content | 
				
			||||||
        .avatar-img | 
					        .avatar-box  | 
				
			||||||
          img(src=theme.avatar) | 
					          .avatar-img | 
				
			||||||
        .personal-information | 
					            img(src=theme.avatar) | 
				
			||||||
          span.name= config.author | 
					          .personal-information | 
				
			||||||
          span.sign= config.description | 
					            span.name= config.author | 
				
			||||||
 | 
					            span.sign= config.description | 
				
			||||||
 | 
					
 | 
				
			||||||
      hr | 
					        hr | 
				
			||||||
 | 
					        +data_row("文章", site.posts.length) | 
				
			||||||
 | 
					        +data_row("页面", site.pages.length) | 
				
			||||||
 | 
					        +data_row("标签", site.tags.length) | 
				
			||||||
 | 
					        +data_row("分类", site.categories.length) | 
				
			||||||
 | 
					
 | 
				
			||||||
      +data_row("页面创建", page.date) | 
					        if theme.social | 
				
			||||||
      +data_row("页面更新", page.updated) | 
					          hr | 
				
			||||||
       | 
					          each value, name in theme.social | 
				
			||||||
      hr | 
					            - const splitValue = value.split('||') | 
				
			||||||
 | 
					            - const displayValue = splitValue[0] | 
				
			||||||
 | 
					            - const link = splitValue[1] | 
				
			||||||
 | 
					              +data_row(name, displayValue, link) | 
				
			||||||
 | 
					
 | 
				
			||||||
      +data_row("文章", site.posts.length) | 
					        hr | 
				
			||||||
      +data_row("页面", site.pages.length) | 
					        if extendData | 
				
			||||||
      +data_row("标签", site.tags.length) | 
					          each data in extendData | 
				
			||||||
      +data_row("分类", site.categories.length) | 
					            +data_row(data.name, data.value) | 
				
			||||||
 | 
					         | 
				
			||||||
 | 
					        +data_row("运行时间", "421天") | 
				
			||||||
 | 
					
 | 
				
			||||||
      hr | 
					        hr | 
				
			||||||
 | 
					        span.no-error-declaration NO ERROR | 
				
			||||||
      +data_row("文章数", 12) | 
					 | 
				
			||||||
      +data_row("总字数", "16k") | 
					 | 
				
			||||||
      +data_row("全站访问次数", "16k") | 
					 | 
				
			||||||
       | 
					 | 
				
			||||||
      hr | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      span.no-error-declaration NO ERROR | 
					 | 
				
			||||||
       | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,27 @@ | 
				
			|||||||
extends includes/layout.pug | 
					extends includes/layout.pug | 
				
			||||||
 | 
					include includes/_partials/information_card.pug | 
				
			||||||
 | 
					include includes/_partials/post_list/post_item.pug | 
				
			||||||
 | 
					
 | 
				
			||||||
block content | 
					block content | 
				
			||||||
  .index-content | 
					  .index-content | 
				
			||||||
    .left-content | 
					    .left-content | 
				
			||||||
      include ./includes/_partials/left_declaration.pug | 
					      include includes/_partials/left_declaration.pug | 
				
			||||||
      .post-list | 
					      .post-list | 
				
			||||||
 | 
					        - const posts = page.posts | 
				
			||||||
 | 
					        - posts.each(function(post) { | 
				
			||||||
 | 
					            - const date = moment(post.date).format('MM/DD/YYYY') | 
				
			||||||
 | 
					            - const time = moment(post.date).format('HH:mm:ss') | 
				
			||||||
 | 
					            - let summary = '' | 
				
			||||||
 | 
					            if post.description | 
				
			||||||
 | 
					              summary = post.description  | 
				
			||||||
 | 
					            else if post.more | 
				
			||||||
 | 
					              - const strip = strip_html(post.more).substr(0, 128) | 
				
			||||||
 | 
					              - summary = strip.length < 128 ? strip : strip + '...' | 
				
			||||||
 | 
					            else  | 
				
			||||||
 | 
					              - const strip = strip_html(post.content).substr(0, 128) | 
				
			||||||
 | 
					              - summary = strip.length < 128 ? strip : strip + '...' | 
				
			||||||
 | 
					            +post_item(post.title, post.cover, date , summary, time) | 
				
			||||||
 | 
					        - }) | 
				
			||||||
 | 
					           | 
				
			||||||
    .right-content | 
					    .right-content | 
				
			||||||
      include includes/_partials/information_card.pug | 
					      +information_card({name: '全站总字数', value: totalcount(site)}) | 
				
			||||||
@ -1,3 +1,6 @@ | 
				
			|||||||
.data-row | 
					.data-row | 
				
			||||||
  display: flex | 
					  display: flex | 
				
			||||||
  flex-direction: row | 
					  flex-direction: row | 
				
			||||||
 | 
					  .data-value a | 
				
			||||||
 | 
					    text-decoration: none | 
				
			||||||
 | 
					    color: rgb(74, 71, 62) | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue