refactor: move tenant templates to internal/tenant
- Move internal/build/ to internal/tenant/ - Rename assets for clarity - Add tenant-blog.js for shared blog functionality - Update style.css with improved code block styling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
bef5dd4437
commit
6e2959f619
11 changed files with 153 additions and 358 deletions
63
internal/tenant/templates/base.html
Normal file
63
internal/tenant/templates/base.html
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{.Title}}</title>
|
||||
<meta name="description" content="{{.Description}}">
|
||||
<link rel="canonical" href="{{.CanonicalURL}}">
|
||||
|
||||
{{if .NoIndex}}<meta name="robots" content="noindex">{{end}}
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title" content="{{.Title}}">
|
||||
<meta property="og:description" content="{{.Description}}">
|
||||
<meta property="og:type" content="{{.OGType}}">
|
||||
<meta property="og:url" content="{{.CanonicalURL}}">
|
||||
{{if .OGImage}}<meta property="og:image" content="{{.OGImage}}">{{end}}
|
||||
<meta property="og:site_name" content="{{.SiteName}}">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{.Title}}">
|
||||
<meta name="twitter:description" content="{{.Description}}">
|
||||
{{if .OGImage}}<meta name="twitter:image" content="{{.OGImage}}">{{end}}
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
{{if .FontURL}}<link rel="stylesheet" href="{{.FontURL}}">{{end}}
|
||||
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
|
||||
{{if .StructuredData}}
|
||||
<script type="application/ld+json">{{.StructuredData}}</script>
|
||||
{{end}}
|
||||
</head>
|
||||
<body>
|
||||
<div id="page" class="layout-{{with index .Settings "layout"}}{{.}}{{else}}default{{end}} compactness-{{with index .Settings "compactness"}}{{.}}{{else}}cozy{{end}}">
|
||||
<style>
|
||||
:root {
|
||||
--accent: {{with index .Settings "accent_color"}}{{.}}{{else}}#2563eb{{end}};
|
||||
--font-body: {{or .FontFamily "system-ui, -apple-system, sans-serif"}};
|
||||
}
|
||||
{{.CodeThemeCSS}}
|
||||
</style>
|
||||
<header class="site-header">
|
||||
<a href="/" class="site-name">{{.SiteName}}</a>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{{template "content" .}}
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<span>© {{.Year}} {{.SiteName}}</span>
|
||||
{{if .ShowBadge}}<a href="https://writekit.dev" class="powered-by" target="_blank" rel="noopener">Powered by WriteKit</a>{{end}}
|
||||
</footer>
|
||||
|
||||
<script src="/static/js/tenant-blog.js"></script>
|
||||
{{block "scripts" .}}{{end}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue