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> <!DOCTYPE html>
<html> <html lang="{{ .Site.LanguageCode | default "en-US" }}">
<head> <head>
<meta charset="utf-8"> <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> </head>
<body> <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> </body>
</html> </html>
{{- end -}}

View File

@ -1,4 +1,22 @@
{{ define "main" }} {{ define "main" }}
<h1>{{ .Title }}</h1> <section class="post-list">
{{ .Content }} <header>
{{ end }} <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

@ -3,7 +3,7 @@
<header class="post-header"> <header class="post-header">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
<p class="post-meta"> <p class="post-meta">
{{ .Date.Format "January 2, 2006" }} | {{ .Date.Format "January 2, 2006" }} |
{{ if .Params.author }}By {{ .Params.author }}{{ end }} {{ if .Params.author }}By {{ .Params.author }}{{ end }}
</p> </p>
</header> </header>

View File

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