feat: 品牌CMS配置化 + cookie_secure配置
- config.yaml 新增 server.cookie_secure 配置项
- site_settings 新增 site_name/site_tagline/contact_email 站点信息
- SiteInfo 结构体扩展,支持运行时从 DB 读取站点品牌信息
- cookie.go 使用 cfg.Server.CookieSecure 替代 Mode!=debug 判断
- SetSessionCookie/ClearSessionCookie 支持 siteSettings 运行时覆盖
- 模板替换硬编码 MetaLab → {{.SiteName}}(nav/header/footer/home/login/register/guidelines/admin,12+处)
- 管理后台站点设置页新增站点名称/标语/联系邮箱输入项
- 页脚版权年份改为动态 CurrentYear
- 注册成功消息 CMS 化(后端+前端)
This commit is contained in:
@ -7,8 +7,8 @@
|
||||
<section class="hero-banner">
|
||||
<div class="hero-bg"></div>
|
||||
<div class="hero-content">
|
||||
<h1 class="hero-title">Meta<span class="hero-accent">Lab</span></h1>
|
||||
<p class="hero-tagline">下一代开发者社区</p>
|
||||
<h1 class="hero-title">{{.SiteName}}</h1>
|
||||
<p class="hero-tagline">{{.SiteTagline}}</p>
|
||||
{{if .IsLoggedIn}}
|
||||
<p class="hero-welcome">欢迎回来,{{.Username}} 👋</p>
|
||||
{{else}}
|
||||
@ -69,7 +69,7 @@
|
||||
<div class="user-avatar-fallback"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg></div>
|
||||
{{end}}
|
||||
<h3 class="user-card-name">{{.Username}}</h3>
|
||||
<p class="user-card-desc">欢迎加入 MetaLab</p>
|
||||
<p class="user-card-desc">欢迎加入 {{.SiteName}}</p>
|
||||
<a href="/space" class="user-card-link">我的空间</a>
|
||||
{{else}}
|
||||
<div class="user-avatar-fallback guest-avatar">
|
||||
|
||||
Reference in New Issue
Block a user