New home page!
This commit is contained in:
parent
d281f22242
commit
83f9550849
7 changed files with 174 additions and 126 deletions
|
@ -2,28 +2,34 @@
|
|||
<html lang="{{ site.LanguageCode }}">
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body class="not-ready" data-menu="{{ isset site.Menus `main` }}">
|
||||
{{ partial "header.html" . }}
|
||||
<main class="main">
|
||||
<body>
|
||||
{{ block "body" . }}
|
||||
{{ block "header" . }}{{ end }}
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ block "footer" . }}{{ end }}
|
||||
{{ end }}
|
||||
</body>
|
||||
|
||||
{{ if and .IsPage (.Page.Scratch.Get "includes_railroad_diagram") }}
|
||||
<script defer type="module" src="{{ `scripts/railroad.js` | absURL }}"></script>
|
||||
<script defer type="module" src="{{ `scripts/railroad-utils.js` | absURL }}"></script>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Museo_Slab";
|
||||
src: url("{{ `/fonts/Museo_Slab_500.woff2` | absURL }}") format("woff2"),
|
||||
url("{{ `/fonts/Museo_Slab_500.woff` | absURL }}") format("woff");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
{{ block "styles" . }}{{ end }}
|
||||
{{ if not hugo.IsProduction }}
|
||||
<link rel="stylesheet" as="style" href="/styles/development.css">
|
||||
{{ end }}
|
||||
{{ range .Resources.Match "*.css" }}
|
||||
<link rel="stylesheet" as="style" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
{{ if and .IsPage (.Page.Scratch.Get "includes_p5_sketch") }}
|
||||
<script defer src="{{ `scripts/p5-1.4.1.min.js` | absURL }}"></script>
|
||||
<script defer src="{{ `scripts/sketch-utils.js` | absURL }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ range $script := .Resources.Match "*.js" }}
|
||||
{{ $isModule := default true $script.Params.is_module }}
|
||||
<script defer {{ if $isModule }}type="module"{{ end }} src="{{ $script.Permalink | relURL }}"></script>
|
||||
{{ end }}
|
||||
{{ block "scripts" . }}{{ end }}
|
||||
|
||||
<script>
|
||||
const bodyClasses = document.body.classList;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{ if .Title }}
|
||||
<h1 class="main-title">{{ .Title }}</h1>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ with site.Menus.main }}
|
||||
{{ $url := $.RelPermalink }}
|
||||
<nav>
|
||||
{{ range . }}
|
||||
<li><a class="{{ if eq .URL $url }}active{{ end }}" href="{{ .URL }}"><span>{{ .Name }}</span></a></li>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
<section id="homepage-content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue