2022-09-14 05:28:31 +00:00
|
|
|
{{template "layout/base" .}}
|
|
|
|
{{define "content" }}
|
2022-09-17 07:37:23 +00:00
|
|
|
{{if .posts}}
|
2022-09-14 05:28:31 +00:00
|
|
|
<div id="primary" class="content-area">
|
|
|
|
<main id="main" class="site-main">
|
2022-09-17 01:42:23 +00:00
|
|
|
{{if .header}}
|
|
|
|
<header class="page-header">
|
2022-09-17 07:37:23 +00:00
|
|
|
<h1 class="page-title">
|
|
|
|
{{if .search}}
|
|
|
|
{{.header}}
|
|
|
|
{{else}}
|
|
|
|
{{.header |unescaped}}
|
|
|
|
{{end}}
|
|
|
|
</h1>
|
2022-09-17 01:42:23 +00:00
|
|
|
</header>
|
|
|
|
{{end}}
|
2022-09-14 05:28:31 +00:00
|
|
|
{{ range $k,$v:=.posts}}
|
|
|
|
<article id="post-{{$v.Id}}"
|
2022-09-18 14:06:27 +00:00
|
|
|
class="post-{{$v.Id}} post type-post status-publish format-standard hentry category">
|
2022-09-14 05:28:31 +00:00
|
|
|
|
|
|
|
<header class="entry-header">
|
|
|
|
<h2 class="entry-title">
|
|
|
|
<a href="/p/{{$v.Id}}" rel="bookmark">{{$v.PostTitle}}</a>
|
|
|
|
</h2>
|
|
|
|
</header><!-- .entry-header -->
|
|
|
|
|
|
|
|
<div class="entry-content">
|
2022-09-18 14:06:27 +00:00
|
|
|
{{$v.PostContent|unescaped}}
|
2022-09-14 05:28:31 +00:00
|
|
|
</div><!-- .entry-content -->
|
|
|
|
|
|
|
|
<footer class="entry-footer">
|
|
|
|
<span class="posted-on">
|
|
|
|
<span class="screen-reader-text">发布于 </span>
|
|
|
|
<a href="/p/{{$v.Id}}" rel="bookmark">
|
|
|
|
<time class="entry-date published updated" datetime="{{$v.PostDateGmt}}">{{$v.PostDate|dateCh}}
|
|
|
|
</time>
|
|
|
|
</a>
|
|
|
|
</span>
|
2022-09-16 15:39:20 +00:00
|
|
|
{{if $v.CategoriesHtml}}
|
2022-09-14 05:28:31 +00:00
|
|
|
<span class="cat-links">
|
|
|
|
<span class="screen-reader-text">分类 </span>
|
2022-09-16 09:59:17 +00:00
|
|
|
{{$v.CategoriesHtml|unescaped}}
|
|
|
|
</span>
|
2022-09-16 15:39:20 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if $v.TagsHtml}}
|
2022-09-16 09:59:17 +00:00
|
|
|
<span class="tags-links">
|
|
|
|
<span class="screen-reader-text">标签 </span>
|
|
|
|
{{$v.TagsHtml|unescaped}}
|
2022-09-14 05:28:31 +00:00
|
|
|
</span>
|
2022-09-16 15:39:20 +00:00
|
|
|
{{end}}
|
|
|
|
|
2022-09-14 05:28:31 +00:00
|
|
|
<span class="comments-link">
|
|
|
|
<a href="/p/1#comments">
|
|
|
|
<span class="screen-reader-text">{{$v.PostTitle}}</span>有1条评论
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</footer><!-- .entry-footer -->
|
|
|
|
|
|
|
|
</article><!-- #post-{{$v.Id}} -->
|
|
|
|
{{end}}
|
|
|
|
|
2022-09-15 14:35:32 +00:00
|
|
|
{{template "layout/page" .}}
|
2022-09-14 05:28:31 +00:00
|
|
|
</main><!-- .site-main -->
|
|
|
|
</div>
|
2022-09-17 07:37:23 +00:00
|
|
|
{{else }}
|
|
|
|
{{template "layout/empty" .}}
|
|
|
|
{{end}}
|
|
|
|
|
2022-09-14 05:28:31 +00:00
|
|
|
{{end}}
|