Initial commit: TechCare Hugo site

Hugo site scaffold with blog and hardware pages, layouts, styles,
fonts, and image assets.
This commit is contained in:
2026-10-05 13:34:35 +00:00
commit e14602d01d
51 changed files with 1024 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
{{- $css := resources.Get "css/style.css" -}}
{{- if hugo.IsProduction -}}
{{- $css = $css | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
{{- else -}}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{- end }}
+47
View File
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="max-image-preview:large">
<link rel="icon" href="/img/tech-care-logo.png" sizes="192x192">
<link rel="apple-touch-icon" href="/img/tech-care-logo.png">
<title>{{ if .IsHome }}{{ site.Title }} – {{ site.Params.description }}{{ else }}{{ .Title }} – {{ site.Title }}{{ end }}</title>
{{ with .Description | default site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ partial "head-css.html" . }}
</head>
<body>
<a class="skip" href="#main">Skip to content</a>
<header class="site-head">
<div class="wrap site-head__inner">
{{/* On post pages the article title is the h1; elsewhere, as on the live site,
the site title is. */}}
{{ $isPost := and .IsPage (eq .Section "posts") }}
{{ if $isPost }}<p class="site-title"><a href="/">{{ site.Title }}</a></p>{{ else }}<h1 class="site-title"><a href="/">{{ site.Title }}</a></h1>{{ end }}
<nav aria-label="Navigation">
<ul>
{{ $cur := . }}
{{ range site.Menus.main }}
<li><a href="{{ .URL }}"{{ if eq .URL $cur.RelPermalink }} aria-current="page"{{ end }}>{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
</div>
</header>
<main id="main" class="wrap">
{{ block "main" . }}{{ end }}
</main>
<footer class="site-foot">
<div class="wrap">
<ul class="social">
<li><a href="https://social.coop/@techcare"><svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"/></svg><span class="vh">Mastodon</span></a></li>
<li><a href="https://techcare.coop/feed"><svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"/></svg><span class="vh">https://techcare.coop/feed</span></a></li>
</ul>
<p class="foot-note">| <a href="/privacy-policy/">Privacy</a></p>
</div>
</footer>
</body>
</html>
+25
View File
@@ -0,0 +1,25 @@
{{ define "main" }}
{{/* the live cover photo is a 3000x1500 JPEG served by pd.w.org; serve a
resized WebP from assets instead. Position matches the live 42% 43%. */}}
{{ $hero := resources.Get "img/blog-hero.jpg" }}
{{ with $hero }}
{{ $sm := .Resize "800x q80 webp" }}
{{ $md := .Resize "1600x q80 webp" }}
<div class="hero hero--photo" style="--hero-sm:url('{{ $sm.RelPermalink }}');--hero-lg:url('{{ $md.RelPermalink }}')">
<p class="hero__title">Blog</p>
</div>
{{ end }}
<div class="posts">
{{ range where site.RegularPages "Section" "posts" }}
{{ $post := . }}
<article class="post">
<time class="post__date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 2, 2006" }}</time>
<h2 class="post__title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ with .Params.thumb }}{{ partial "image.html" (dict "path" . "max" 800 "class" "post__thumb" "alt" ($post.Params.featuredAlt | default $post.Title) "loading" "lazy") }}{{ end }}
{{ with .Params.excerpt }}<p class="post__excerpt">{{ . }}</p>{{ end }}
<a class="post__more" href="{{ .RelPermalink }}">Read more…</a>
</article>
{{ end }}
</div>
{{ end }}
+1
View File
@@ -0,0 +1 @@
{{ define "main" }}{{ .Content }}{{ end }}
+1
View File
@@ -0,0 +1 @@
{{ define "main" }}{{ .Content }}{{ end }}
+17
View File
@@ -0,0 +1,17 @@
{{- /* Resolves a front-matter "featured" path (relative to assets/) through
Hugo's image pipeline. Hugo's Resize also scales up, so only convert to
WebP and shrink when the source is wider than the given width. */ -}}
{{- $path := .path -}}
{{- $max := .max -}}
{{- $class := .class -}}
{{- $alt := .alt | default "" -}}
{{- $loading := .loading | default "eager" -}}
{{- with resources.Get $path -}}
{{- $img := . -}}
{{- if and (eq $img.ResourceType "image") (gt $img.Width $max) -}}
{{- $img = $img.Resize (printf "%dx q82 webp" $max) -}}
{{- end -}}
<img class="{{ $class }}" src="{{ $img.RelPermalink }}" alt="{{ $alt }}" width="{{ $img.Width }}" height="{{ $img.Height }}" loading="{{ $loading }}" decoding="async"{{ if eq $loading "eager" }} fetchpriority="high"{{ end }}>
{{- else -}}
{{- warnf "featured image not found in assets: %s" $path -}}
{{- end -}}
+7
View File
@@ -0,0 +1,7 @@
{{ define "main" }}
<article class="entry">
<h1 class="entry__title">{{ .Title }}</h1>
{{ with .Params.featured }}{{ partial "image.html" (dict "path" . "max" 1200 "class" ($.Params.featuredClass | default "post__figure") "alt" $.Params.featuredAlt) }}{{ end }}
{{ .Content }}
</article>
{{ end }}