feat: initial style
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="dark" lang="{{ site.Language.Locale | default `en` }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }} | {{ site.Title }}{{ end }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
|
||||
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet">
|
||||
<script>
|
||||
tailwind.config = {
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
surface: "#161413",
|
||||
"surface-dim": "#161413",
|
||||
"surface-bright": "#3d3937",
|
||||
"surface-container-lowest": "#0c0b0a",
|
||||
"surface-container-low": "#1d1a19",
|
||||
"surface-container": "#211e1d",
|
||||
"surface-container-high": "#2c2826",
|
||||
"surface-container-highest": "#373130",
|
||||
"on-surface": "#eae4e2",
|
||||
"on-surface-variant": "#d2c7c5",
|
||||
primary: "#d18c81",
|
||||
"on-primary": "#3e1c15",
|
||||
"primary-container": "#5b2c23",
|
||||
"on-primary-container": "#ffdacf",
|
||||
secondary: "#e2b8b1",
|
||||
"on-secondary": "#412b26",
|
||||
"secondary-container": "#5a413b",
|
||||
"on-secondary-container": "#ffdacf",
|
||||
tertiary: "#c9c3a3",
|
||||
"on-tertiary": "#312e18",
|
||||
"tertiary-container": "#48442c",
|
||||
"on-tertiary-container": "#e6dfbc",
|
||||
error: "#ffb4ab",
|
||||
"on-error": "#690005",
|
||||
"error-container": "#93000a",
|
||||
"on-error-container": "#ffdad6",
|
||||
background: "#161413",
|
||||
"on-background": "#eae4e2",
|
||||
outline: "#968d8a",
|
||||
"outline-variant": "#4d4644",
|
||||
"inverse-surface": "#eae4e2",
|
||||
"inverse-on-surface": "#322f2e",
|
||||
"inverse-primary": "#97483c"
|
||||
},
|
||||
borderRadius: {
|
||||
DEFAULT: "0.25rem",
|
||||
lg: "0.5rem",
|
||||
xl: "0.75rem",
|
||||
full: "9999px"
|
||||
},
|
||||
spacing: {
|
||||
"container-max": "1120px",
|
||||
"stack-lg": "32px",
|
||||
"margin-mobile": "16px",
|
||||
gutter: "24px",
|
||||
"stack-sm": "4px",
|
||||
"stack-md": "12px",
|
||||
base: "8px"
|
||||
},
|
||||
fontFamily: {
|
||||
"body-md": ["JetBrains Mono", "monospace"],
|
||||
"body-lg": ["JetBrains Mono", "monospace"],
|
||||
"display-lg": ["Cormorant Garamond", "serif"],
|
||||
"headline-md": ["Cormorant Garamond", "serif"],
|
||||
"label-sm": ["JetBrains Mono", "monospace"],
|
||||
"display-lg-mobile": ["Cormorant Garamond", "serif"]
|
||||
},
|
||||
fontSize: {
|
||||
"body-md": ["14px", { lineHeight: "24px", fontWeight: "400" }],
|
||||
"body-lg": ["16px", { lineHeight: "28px", fontWeight: "400" }],
|
||||
"display-lg": ["42px", { lineHeight: "1.2", fontWeight: "400" }],
|
||||
"headline-md": ["24px", { lineHeight: "32px", fontWeight: "400" }],
|
||||
"label-sm": ["12px", { lineHeight: "16px", fontWeight: "400" }],
|
||||
"display-lg-mobile": ["32px", { lineHeight: "40px", fontWeight: "400" }]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.material-symbols-outlined {
|
||||
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
||||
}
|
||||
|
||||
.tree-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tree-item::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -12px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
background-color: rgba(234, 228, 226, 0.1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-surface text-on-surface font-body-md min-h-screen flex antialiased">
|
||||
<div class="flex w-full max-w-7xl mx-auto px-8 py-16 gap-16">
|
||||
{{ partial "sidebar.html" . }}
|
||||
<main class="flex-1 max-w-3xl pt-2">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
{{ define "main" }}
|
||||
<div class="prose prose-invert max-w-none text-body-md text-on-surface/90 space-y-6">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<div class="mt-12">
|
||||
<a class="inline-flex items-center text-on-surface-variant hover:text-primary transition-colors font-body-md italic mb-4" href="{{ `/docs/` | relLangURL }}">
|
||||
Read the guide <span class="material-symbols-outlined ml-1 text-[18px]">arrow_forward</span>
|
||||
</a>
|
||||
<hr class="border-on-surface/10">
|
||||
</div>
|
||||
<div class="mt-auto pt-32 pb-8 font-display-lg italic text-on-surface-variant text-lg">
|
||||
{{ site.Params.homeFooter }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{ define "main" }}
|
||||
<div class="prose prose-invert max-w-none text-body-md text-on-surface/90 space-y-6">
|
||||
<p>{{ .Title }}</p>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<div class="mt-12">
|
||||
<a class="inline-flex items-center text-on-surface-variant hover:text-primary transition-colors font-body-md italic mb-4" href="{{ `/` | relLangURL }}">
|
||||
Home <span class="material-symbols-outlined ml-1 text-[18px]">arrow_back</span>
|
||||
</a>
|
||||
<hr class="border-on-surface/10">
|
||||
</div>
|
||||
<div class="mt-8 divide-y divide-on-surface/10">
|
||||
{{ range .Pages.ByWeight }}
|
||||
<article class="py-5">
|
||||
<p class="mb-3"><a class="hover:text-primary transition-colors" href="{{ .RelPermalink }}">{{ .Title }}</a></p>
|
||||
{{ with .Params.summary }}
|
||||
<p class="text-on-surface/90">{{ . }}</p>
|
||||
{{ else }}
|
||||
{{ with .Summary }}<p class="text-on-surface/90">{{ . | plainify }}</p>{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="mt-auto pt-32 pb-8 font-display-lg italic text-on-surface-variant text-lg">
|
||||
{{ site.Params.homeFooter }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<div class="prose prose-invert max-w-none text-body-md text-on-surface/90 space-y-6">
|
||||
<p>{{ .Title }}</p>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<div class="mt-12">
|
||||
<a class="inline-flex items-center text-on-surface-variant hover:text-primary transition-colors font-body-md italic mb-4" href="{{ printf "/%s/" .Section | relLangURL }}">
|
||||
{{ .Section }} <span class="material-symbols-outlined ml-1 text-[18px]">arrow_back</span>
|
||||
</a>
|
||||
<hr class="border-on-surface/10">
|
||||
</div>
|
||||
<div class="mt-auto pt-32 pb-8 font-display-lg italic text-on-surface-variant text-lg">
|
||||
{{ site.Params.homeFooter }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- range .ByWeight -}}
|
||||
<div class="flex flex-col">
|
||||
<a class="flex items-center {{ if .HasChildren }}text-on-surface{{ else }}text-on-surface-variant{{ end }} hover:text-primary transition-colors py-1 text-left w-full group" href="{{ .URL }}">
|
||||
<span class="material-symbols-outlined text-[16px] mr-1 text-on-surface-variant group-hover:text-primary">{{ if .HasChildren }}expand_more{{ else }}chevron_right{{ end }}</span>
|
||||
{{ .Name }}
|
||||
</a>
|
||||
{{- with .Children -}}
|
||||
<div class="ml-6 flex flex-col gap-1 text-on-surface-variant text-label-sm tree-item mt-1 mb-2">
|
||||
{{- range .ByWeight -}}
|
||||
{{- if .HasChildren -}}
|
||||
<div class="flex flex-col">
|
||||
<a class="flex items-center hover:text-on-surface transition-colors py-0.5" href="{{ .URL }}">
|
||||
<span class="material-symbols-outlined text-[14px] mr-1 text-on-surface-variant">expand_more</span>
|
||||
{{ .Name }}
|
||||
</a>
|
||||
<div class="ml-5 flex flex-col gap-1 text-on-surface-variant text-label-sm tree-item mt-1 italic">
|
||||
{{ range .Children.ByWeight }}
|
||||
<a class="hover:text-on-surface transition-colors py-0.5" href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- else -}}
|
||||
<a class="hover:text-on-surface transition-colors py-0.5 italic" href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,24 @@
|
||||
<aside class="w-72 flex-shrink-0 flex flex-col gap-12 border-r border-on-surface/10 pr-8">
|
||||
<header>
|
||||
<a class="font-display-lg text-display-lg text-on-surface" href="{{ `/` | relLangURL }}">{{ site.Title }}</a>
|
||||
</header>
|
||||
|
||||
<div class="relative">
|
||||
<span class="material-symbols-outlined absolute left-2 top-1.5 text-on-surface-variant text-[18px]">search</span>
|
||||
<input class="w-full bg-transparent text-on-surface border border-outline/30 rounded py-1.5 pl-8 pr-3 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-colors placeholder-on-surface-variant/50 text-label-sm" placeholder="Search" type="text" aria-label="Search">
|
||||
</div>
|
||||
|
||||
<nav class="flex flex-col gap-1 text-sm" aria-label="Primary">
|
||||
{{ with site.Menus.main }}
|
||||
{{ partial "menu-tree.html" . }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
||||
{{ with site.Params.sidebarFooter }}
|
||||
<div class="mt-auto pt-8 font-display-lg italic text-on-surface-variant text-lg">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* ponytail: search stays visual-only until a real index is worth the runtime and markup */}}
|
||||
</aside>
|
||||
Reference in New Issue
Block a user