调整default主题,解决问题

This commit is contained in:
2026-08-01 03:33:30 +08:00
parent 9854b4f195
commit 156b78d45e
4 changed files with 4 additions and 6 deletions
-2
View File
@@ -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
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -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))
}
// 获取页面
+3 -3
View File
@@ -16,6 +16,7 @@
{{if .IsTop}}<span class="top-badge">置顶</span>{{end}}
</h2>
<div class="post-meta">
<span><i class="layui-icon">&#xe66f;</i><a href="/?author={{.AuthorID}}">{{.Author.Username}}</a></span>
<span class="post-date">{{if .PublishedAt}}<i class="layui-icon">&#xe60e;</i>{{.PublishedAt.Format "2006-01-02"}}{{else}}未发布{{end}}</span>
<span class="post-category">
{{if .Category}}<i class="layui-icon">&#xe705;</i><a href="/?category={{.CategoryID}}">{{.Category.Name}}</a>{{else}}未分类{{end}}
@@ -27,10 +28,9 @@
{{end}}
</span>
{{end}}
<span><i class="layui-icon">&#xe66f;</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">&#xe63a;</i>{{.Views}} 阅读</span>
<span class="post-comments"><i class="layui-icon">&#xe611;</i>{{len .Comments}} 评论</span>
</div>
<p class="post-summary">{{.Summary}}</p>
<a href="/post/{{.Slug}}" class="read-more">阅读全文 →</a>