more layouts work
All checks were successful
Build Hugo Site / build (push) Successful in 7s

This commit is contained in:
John 2025-03-09 15:37:10 -05:00
parent 15699af640
commit ab7e9c9ed2
4 changed files with 64 additions and 13 deletions

View File

@ -1,10 +1,48 @@
{{- define "baseof" -}}
<!DOCTYPE html>
<html>
<html lang="{{ .Site.LanguageCode | default "en-US" }}">
<head>
<meta charset="utf-8">
<title>{{ .Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ partial "favicon.html" . }}
<title>{{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
{{ partial "seo_tags.html" . }}
<!-- Load Theme Styles -->
{{ $style := print (default "original" .Site.Params.themeStyle) ".css" | resources.Get | minify }}
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
{{ if (.Page.Store.Get "hasCodeBlock") }}
{{ $syntax := resources.Get "syntax.css" | minify }}
<link href="{{ $syntax.RelPermalink }}" rel="stylesheet">
{{ end }}
{{ with .Params.style }}
{{ $extra := resources.Get . | minify }}
<link href="{{ $extra.RelPermalink }}" rel="stylesheet">
{{ end }}
</head>
<body>
{{ block "main" . }}{{ end }}
<!-- Site Container -->
<div class="container">
<!-- Site Header (Reuses Bearcub's Partial) -->
{{ partial "header.html" . }}
<!-- Main Content Block (Where Custom Pages Inject Content) -->
<main class="content">
{{ block "main" . }}{{ end }}
</main>
<!-- Footer (Reuses Bearcub's Partial) -->
{{ partial "footer.html" . }}
</div>
<!-- Load Scripts -->
{{ partial "scripts.html" . }}
</body>
</html>
{{- end -}}

View File

@ -1,4 +1,22 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
<section class="post-list">
<header>
<h1>{{ .Title }}</h1>
{{ with .Content }}
<p>{{ . }}</p>
{{ end }}
</header>
<ul class="posts">
{{ range .Pages }}
<li class="post-item">
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<p class="post-meta">{{ .Date.Format "January 2, 2006" }}</p>
{{ with .Summary }}
<p>{{ . }} <a href="{{ .RelPermalink }}">Read more...</a></p>
{{ end }}
</li>
{{ end }}
</ul>
</section>
{{ end }}

View File

@ -5,11 +5,6 @@
<a href="/blog/" class="button">Read the Blog</a>
</section>
<section class="about">
<h2>About Me</h2>
<p>A short introduction about yourself or your website.</p>
</section>
<section class="latest-posts">
<h2>Latest Blog Posts</h2>
<ul>