Skip to content

Commit

Permalink
修改标题展示
Browse files Browse the repository at this point in the history
  • Loading branch information
movsb committed Jan 16, 2025
1 parent 80bbf62 commit 1f07999
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,13 @@ func newService(ctx context.Context, cancel context.CancelFunc, cfg *config.Conf
go s.monitorDomain(s.notifier)
}

s.exportVars()

return s
}

func (s *Service) exportVars() {}

// 从 Context 中取出用户并且必须为 Admin/System,否则 panic。
func (s *Service) MustBeAdmin(ctx context.Context) *auth.AuthContext {
return MustBeAdmin(ctx)
Expand Down
1 change: 0 additions & 1 deletion service/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ func (s *Service) getPostTagsCached(ctx context.Context, id int64) ([]string, er
}

func (s *Service) deletePostContentCacheFor(id int64) {
log.Println(`即将删除文章缓存:`, id)
s.postCaches.Delete(id, func(second _PostContentCacheKey) {
s.postContentCaches.Delete(second)
log.Println(`删除文章缓存:`, second)
Expand Down
19 changes: 14 additions & 5 deletions theme/blog/styles/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,20 @@ blockquote {
}

.entry {
h2::before { content: "## ";}
h3::before { content: "### ";}
h4::before { content: "#### ";}
h5::before { content: "##### ";}
h6::before { content: "###### ";}
h2::after{ content: " 2️⃣";}
h3::after{ content: " 3️⃣";}
h4::after{ content: " 4️⃣";}
h5::after{ content: " 5️⃣";}
h6::after{ content: " 6️⃣";}
h2,h3,h4,h5,h6 {
&::after {
transition: opacity .2s linear;
opacity: 0;
}
&:hover::after {
opacity: 1;
}
}
}

.content-wrap {
Expand Down

0 comments on commit 1f07999

Please sign in to comment.