调整default主题,解决问题
This commit is contained in:
@@ -11,7 +11,6 @@ require (
|
||||
github.com/spf13/viper v1.21.0
|
||||
github.com/yuin/goldmark v1.8.5
|
||||
golang.org/x/crypto v0.53.0
|
||||
gorm.io/driver/sqlite v1.6.0
|
||||
gorm.io/gorm v1.31.2
|
||||
)
|
||||
|
||||
@@ -37,7 +36,6 @@ require (
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.22 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/ncruces/go-strftime v1.0.0 // indirect
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ func IndexView(c *gin.Context) {
|
||||
// 调试日志
|
||||
slog.Info("查询结果", "postCount", len(posts))
|
||||
for i, p := range posts {
|
||||
slog.Info("文章", "index", i, "id", p.ID, "title", p.Title, "status", p.Status, "publishedAt", p.PublishedAt)
|
||||
slog.Info("文章", "index", i, "id", p.ID, "title", p.Title, "status", p.Status, "publishedAt", p.PublishedAt, "views", p.Views, "commentsCount", len(p.Comments))
|
||||
}
|
||||
|
||||
// 获取页面
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
{{if .IsTop}}<span class="top-badge">置顶</span>{{end}}
|
||||
</h2>
|
||||
<div class="post-meta">
|
||||
<span><i class="layui-icon"></i><a href="/?author={{.AuthorID}}">{{.Author.Username}}</a></span>
|
||||
<span class="post-date">{{if .PublishedAt}}<i class="layui-icon"></i>{{.PublishedAt.Format "2006-01-02"}}{{else}}未发布{{end}}</span>
|
||||
<span class="post-category">
|
||||
{{if .Category}}<i class="layui-icon"></i><a href="/?category={{.CategoryID}}">{{.Category.Name}}</a>{{else}}未分类{{end}}
|
||||
@@ -27,10 +28,9 @@
|
||||
{{end}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
<span><i class="layui-icon"></i><a href="/?author={{.AuthorID}}">{{.Author.Username}}</a></span>
|
||||
<span><i class="layui-icon layui-icon-user"></i>{{.PublishedAt.Format "2006-01-02"}}</span>
|
||||
|
||||
<span class="post-views"><i class="layui-icon"></i>{{.Views}} 阅读</span>
|
||||
<span class="post-comments"><i class="layui-icon"></i>{{len .Comments}} 评论</span>
|
||||
</div>
|
||||
<p class="post-summary">{{.Summary}}</p>
|
||||
<a href="/post/{{.Slug}}" class="read-more">阅读全文 →</a>
|
||||
|
||||
Reference in New Issue
Block a user