Redesign homepage layout and update content
Align homepage content to center, adjust sidebar width and page max-width, update hero text to Chinese, and apply dark background for the site.
This commit is contained in:
@@ -28,3 +28,27 @@ kbd {
|
|||||||
.hextra-nav-container-blur {
|
.hextra-nav-container-blur {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Shift logo left to compensate for internal whitespace */
|
||||||
|
nav a:first-of-type img {
|
||||||
|
margin-left: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unified widths — all sections aligned at 76rem */
|
||||||
|
:root {
|
||||||
|
--hx-color-dark: #000;
|
||||||
|
--hextra-max-page-width: 76rem;
|
||||||
|
--hextra-max-content-width: 76rem;
|
||||||
|
--hextra-max-navbar-width: 76rem;
|
||||||
|
--hextra-max-footer-width: 76rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Narrow left sidebar to half width (128px) */
|
||||||
|
.hextra-sidebar-container {
|
||||||
|
width: 8rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark body,
|
||||||
|
body:where(.dark) {
|
||||||
|
background-color: #000;
|
||||||
|
}
|
||||||
|
|||||||
+7
-2
@@ -3,10 +3,15 @@ title: FuKun
|
|||||||
layout: hextra-home
|
layout: hextra-home
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
{{< hextra/hero-subtitle >}}
|
||||||
|
Fukun.Net
|
||||||
|
{{< /hextra/hero-subtitle >}}
|
||||||
|
|
||||||
{{< hextra/hero-headline >}}
|
{{< hextra/hero-headline >}}
|
||||||
FuKun
|
晴耕雨读 心灯不夜
|
||||||
{{< /hextra/hero-headline >}}
|
{{< /hextra/hero-headline >}}
|
||||||
|
|
||||||
{{< hextra/hero-subtitle >}}
|
{{< hextra/hero-subtitle >}}
|
||||||
FuKun.Net — Tech notes & life
|
一周更新两次,让脑袋泡泡冰浴
|
||||||
{{< /hextra/hero-subtitle >}}
|
{{< /hextra/hero-subtitle >}}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ params:
|
|||||||
navbar:
|
navbar:
|
||||||
displayTitle: false
|
displayTitle: false
|
||||||
displayLogo: true
|
displayLogo: true
|
||||||
width: wide
|
width: normal
|
||||||
logo:
|
logo:
|
||||||
path: /images/logo.svg
|
path: /images/logo.svg
|
||||||
dark: /images/logo-dark.svg
|
dark: /images/logo-dark.svg
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="hx:mx-auto hx:flex hextra-max-page-width">
|
<div class="hx:mx-auto hx:flex hextra-max-page-width">
|
||||||
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true) }}
|
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true
|
||||||
|
"displayPlaceholder" true) }}
|
||||||
<main
|
<main
|
||||||
id="content"
|
id="content"
|
||||||
class="hx:w-full hx:break-words hx:min-h-[calc(100vh-var(--navbar-height))] hx:min-w-0 hx:pb-8 hx:pt-8 hx:md:pt-12 hx:pl-[max(env(safe-area-inset-left),1.5rem)] hx:pr-[max(env(safe-area-inset-left),1.5rem)]"
|
class="hx:w-full hx:break-words hx:min-h-[calc(100vh-var(--navbar-height))] hx:min-w-0 hx:pb-8 hx:px-6 hx:pt-4 hx:md:px-12"
|
||||||
>
|
>
|
||||||
<div class="hx:flex hx:flex-col hx:items-start">{{ .Content }}</div>
|
<div class="hx:flex hx:flex-col hx:items-center hx:text-center">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
|
||||||
{{- $pages := where .Site.RegularPages "Section" "blog" }} {{- $pages =
|
{{- $pages := where .Site.RegularPages "Section" "blog" }} {{- $pages =
|
||||||
$pages.ByDate.Reverse }} {{- $recent := first 6 $pages }} {{- $readMore
|
$pages.ByDate.Reverse }} {{- $recent := first 6 $pages }} {{- $readMore
|
||||||
@@ -46,5 +49,6 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<div class="hx:max-xl:hidden hx:h-0 hx:w-64 hx:shrink-0"></div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user