Use generated css, common to the project

This commit is contained in:
nemunaire 2026-05-17 18:05:16 +08:00
commit af2b407c52
14 changed files with 1242 additions and 132 deletions

View file

@ -1,51 +1,39 @@
<!DOCTYPE html>
<!doctype html>
<html lang="{{ .Site.LanguageCode }}">
{{ partial "head.html" . }}
{{ partial "head.html" . }}
<body>
<div id="all">
{{ partial "nav.html" . }} {{ partial "breadcrumbs.html" . }}
<body>
<div
id="content"
class="mt-5 mb-5"
style="min-height: calc(80vh - 152px)"
>
{{ if isset .Params "id" }} {{ partial .Params.id . }} {{ else
}}
<div id="all">
<div class="container">
{{ if .Params.toc }}
<aside>
<header>
<h1>{{ .Title }}</h1>
</header>
{{ .TableOfContents }}
</aside>
{{ end }}
{{ partial "nav.html" . }}
{{ partial "breadcrumbs.html" . }}
<div id="content" class="mt-5 mb-5" style="min-height: calc(80vh - 180px)">
{{ if isset .Params "id" }}
{{ partial .Params.id . }}
{{ else }}
<div class="container">
{{ if .Params.toc }}
<aside>
<header>
<h1>{{ .Title }}</h1>
</header>
{{ .TableOfContents }}
</aside>
{{ end }}
<div>
{{ .Content }}
</div>
<div>{{ .Content }}</div>
</div>
<!-- /.container -->
{{ end }}
</div>
<!-- /#content -->
</div>
<!-- /.container -->
<!-- /#all -->
{{ end }}
</div>
<!-- /#content -->
</div>
<!-- /#all -->
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
</body>
{{ partial "footer.html" . }} {{ partial "scripts.html" . }}
</body>
</html>

View file

@ -49,15 +49,21 @@
<!-- Mastodon proof -->
<link rel="me" href="https://floss.social/@happyDomain">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/icons/font/bootstrap-icons.min.css">
<!-- Variable fonts (Hanken Grotesk, JetBrains Mono, Quicksand) — served from node_modules via Hugo mounts -->
<link rel="stylesheet" href="/fonts/hanken-grotesk/wght.css">
<link rel="stylesheet" href="/fonts/jetbrains-mono/wght.css">
<link rel="stylesheet" href="/fonts/quicksand/wght.css">
<!-- Theme stylesheet, if possible do not edit this stylesheet -->
{{ if and (isset .Site.Params "style") .Site.Params.style }}
<link href="{{ .Site.BaseURL }}css/style.{{ .Site.Params.style }}.css" rel="stylesheet" id="theme-stylesheet">
{{ else }}
<link href="{{ .Site.BaseURL }}css/style.default.css" rel="stylesheet" id="theme-stylesheet">
<!-- Bootstrap (compiled from SCSS) -->
{{ $scss := resources.Get "scss/bootstrap.scss" }}
{{ $opts := dict "transpiler" "libsass" "includePaths" (slice "node_modules") }}
{{ $css := $scss | css.Sass $opts }}
{{ if hugo.IsProduction }}
{{ $css = $css | minify | fingerprint }}
{{ end }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
<link rel="stylesheet" href="/icons/font/bootstrap-icons.min.css">
<!-- Custom stylesheet - for your changes -->
<link href="{{ .Site.BaseURL }}css/custom.css" rel="stylesheet">

View file

@ -3,7 +3,11 @@
id="mainnav"
>
<div class="container">
<a class="h1 navbar-brand mb-0" href="/{{ .Site.Language.Lang }}/">
<a
class="h1 navbar-brand d-flex align-items-top gap-2 mb-0"
href="/{{ .Site.Language.Lang }}/"
>
<img src="/img/apple-touch-icon.png" alt="" style="height: 24px" />
<svg
version="1.1"
viewBox="7 5 100 15"