diff options
| author | verdant <im@verdant.ee> | 2026-05-31 17:04:01 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-05-31 17:04:01 +0800 |
| commit | d072f16225729ce2f84a40083109ae173a7a13a2 (patch) | |
| tree | 1facc25aaf82fac090b1c075b2d1fdafd82f9dfc | |
| parent | 8991dab64025dccf6c7b702622c2401866ccdb96 (diff) | |
| download | blog-d072f16225729ce2f84a40083109ae173a7a13a2.tar.gz blog-d072f16225729ce2f84a40083109ae173a7a13a2.zip | |
Format CSS code
| -rw-r--r-- | layouts/_default/baseof.html | 57 |
1 files changed, 39 insertions, 18 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3516304..7736f27 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,26 +1,47 @@ <!doctype html> <html lang={{ or .Site.LanguageCode "zh-cn" }}> + <head> - <meta charset=utf-8> - <meta name=viewport content="width=device-width,initial-scale=1"> - <meta http-equiv=X-Clacks-Overhead content="GNU Terry Pratchett"> - <meta name=referrer content="no-referrer-when-downgrade"> - <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ printf "%s | %s" .Title .Site.Title }}{{ end }}</title> - <style>body{font-family: monospace;line-height: 1.7;max-width: 720px;margin: 40px auto;padding: 0 20px;color:#2b2b2a;background: #f5f2eb;}pre{border: 1px dashed #555;padding: 12px;overflow-x: auto;}img {max-width: 100%;}</style> - {{- partial "favicon.html" . -}} - {{- partial "seo_tags.html" . -}} - - <link rel=alternate type=application/rss+xml href=/atom.xml title={{ .Site.Title }}> - {{- with .OutputFormats.Get "rss" -}} - <link rel={{ .Rel }} type={{ .MediaType.Type }} href={{ .Permalink }} title={{ $.Site.Title }}> - {{- end -}} - - {{- partial "custom_head.html" . -}} + <meta charset=utf-8> + <meta name=viewport content="width=device-width,initial-scale=1"> + <meta http-equiv=X-Clacks-Overhead content="GNU Terry Pratchett"> + <meta name=referrer content="no-referrer-when-downgrade"> + <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ printf "%s | %s" .Title .Site.Title }}{{ end }}</title> + <style> + body { + font-family: monospace; + line-height: 1.7; + max-width: 760px; + margin: 40px auto; + padding: 0 20px; + } + + pre { + border: 1px dashed #555; + padding: 12px; + overflow-x: auto; + } + + img { + max-width: 100%; + } + </style> + {{- partial "favicon.html" . -}} + {{- partial "seo_tags.html" . -}} + + <link rel=alternate type=application/rss+xml href=/atom.xml title={{ .Site.Title }}> + {{- with .OutputFormats.Get "rss" -}} + <link rel={{ .Rel }} type={{ .MediaType.Type }} href={{ .Permalink }} title={{ $.Site.Title }}> + {{- end -}} + + {{- partial "custom_head.html" . -}} </head> <body> - <main>{{ block "main" . }}{{ end }}</main> - <footer>{{ partial "footer.html" . }}</footer> - {{- partial "custom_body.html" . -}} + <main>{{ block "main" . }}{{ end }} + <footer>{{ partial "footer.html" . }}</footer> + </main> + {{- partial "custom_body.html" . -}} </body> + </html> |
