mirror of
https://github.com/zopiya/blog.git
synced 2025-11-03 20:16:47 +08:00
Add initial theme assets, layouts, and configuration for Hugo site
This commit is contained in:
39
themes/typo/layouts/_default/baseof.html
Normal file
39
themes/typo/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
|
||||
dir="{{ or site.Language.LanguageDirection `ltr` }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
{{ $theme := "auto"}}
|
||||
|
||||
{{ with .Param "theme" }}
|
||||
{{ $theme = .}}
|
||||
{{ end }}
|
||||
|
||||
<body class="{{ $theme }}">
|
||||
|
||||
<div class="content">
|
||||
<header>
|
||||
{{ partial "header.html" . }}
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
{{ partial "footer.html" . }}
|
||||
</footer>
|
||||
|
||||
{{ if .Param "math" }}
|
||||
{{ partialCached "math.html" . }}
|
||||
{{ end }}
|
||||
|
||||
</body>
|
||||
|
||||
<script src="{{ "js/theme-switch.js" | relURL }}"></script>
|
||||
<script defer src="{{ "js/copy-code.js" | relURL }}"></script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user