mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-17 11:52:27 +08:00
fix: archive page style
This commit is contained in:
3
pkg/cache/cache.go
vendored
3
pkg/cache/cache.go
vendored
@@ -541,7 +541,7 @@ func (c *Cache) regeneratePages() {
|
|||||||
for i, article := range archive.Articles {
|
for i, article := range archive.Articles {
|
||||||
createdAt := article.CreatedAt.In(tools.TimeLocation)
|
createdAt := article.CreatedAt.In(tools.TimeLocation)
|
||||||
if i == 0 && gt12Month {
|
if i == 0 && gt12Month {
|
||||||
str := fmt.Sprintf("* *[%s](/post/%s.html) <span class=\"date\">(%s)</span>\n",
|
str := fmt.Sprintf("* *[%s](/post/%s.html) <span class=\"date\">(%s)</span>*\n",
|
||||||
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
|
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
|
||||||
buf.WriteString(str)
|
buf.WriteString(str)
|
||||||
} else {
|
} else {
|
||||||
@@ -549,7 +549,6 @@ func (c *Cache) regeneratePages() {
|
|||||||
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
|
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
|
||||||
buf.WriteString(str)
|
buf.WriteString(str)
|
||||||
}
|
}
|
||||||
buf.WriteByte('\n')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.PageArchives = string(render.RenderPage(buf.Bytes()))
|
c.PageArchives = string(render.RenderPage(buf.Bytes()))
|
||||||
|
|||||||
Reference in New Issue
Block a user