diff options
| author | Reorx <novoreorx@gmail.com> | 2022-04-09 23:31:15 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-04-09 23:31:15 +0800 |
| commit | 8c5d10925e591c909e98c9a413e10b2e47c15b6d (patch) | |
| tree | 1c4a410235affc8c89923fcfd121d121465b883c | |
| parent | c5d31c778b572c3952c35e918765901cb223c045 (diff) | |
allow customize post page width
| -rw-r--r-- | assets/css/common/main.css | 5 | ||||
| -rw-r--r-- | assets/css/core/theme-vars.css | 3 | ||||
| -rw-r--r-- | layouts/_default/baseof.html | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/assets/css/common/main.css b/assets/css/common/main.css index 50022ac..22dc39c 100644 --- a/assets/css/common/main.css +++ b/assets/css/common/main.css @@ -1,3 +1,4 @@ +/* for home and other pages */ .main { position: relative; min-height: calc(100vh - var(--header-height) - var(--footer-height)); @@ -5,6 +6,10 @@ margin: auto; padding: var(--gap); } +/* for post page */ +.main.post { + max-width: calc(var(--post-width) + var(--gap) * 2); +} .page-header h1 { font-size: 40px; diff --git a/assets/css/core/theme-vars.css b/assets/css/core/theme-vars.css index fd0c5ee..955b7e4 100644 --- a/assets/css/core/theme-vars.css +++ b/assets/css/core/theme-vars.css @@ -1,8 +1,9 @@ :root { --gap: 24px; --content-gap: 20px; - --nav-width: 1024px; + --nav-width: 960px; --main-width: 720px; + --post-width: 800px; --header-height: 60px; --footer-height: 60px; --radius: 8px; diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3d13f07..edd7809 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -14,7 +14,7 @@ {{- end -}} " id="top"> {{- partialCached "header.html" . .Page -}} - <main class="main"> + <main class="main {{- if (eq .Kind `page`) -}}{{- print " post" -}}{{- end -}}"> {{- block "main" . }}{{ end }} </main> {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} |
