mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 08:35:31 -04:00
re-organize templates (use baseof.html)
This commit is contained in:
46
layouts/_default/baseof.html
Normal file
46
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!doctype html>
|
||||
{{"<!--\n ,,, ,,,\n ;\" ^; ;\" \",\n ; s$$$$$s ;\n , ss$$$$$$$ss ,\"\n ;$$$$$$$$$$$$$$$$\n $$$$$$$$$$$$$$$$$$ Hello, human. :)\n $$$$$\"\"\"$$$\"\"\"$$$$$$\n $$$$$ p\"$$$\"q $$$$$ https://jarv.is/humans.txt\n $$$$ .$$$$$. $$$$\n $$$$$$$$$$$$$$$$$\n \"$$$$\"*\"$$$$\"\n \"$$.$$\"\n-->" | safeHTML}}
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ hugo.Generator }}
|
||||
<title>{{ .Title }}{{ if not .IsHome }} – {{ .Site.Title }}{{ else }} 👨‍💻{{ end }}</title>
|
||||
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
<meta name="author" content="{{ .Site.Author.name }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ partial "open-graph" . }}
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}">
|
||||
<meta name="theme-color" content="#0e6dc2">
|
||||
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS (dict "targetPath" "style.css") }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | absURL }}" color="#009cdf">
|
||||
<link rel="icon" href="{{ "favicon-192.png" | absURL }}" sizes="192x192">
|
||||
<link rel="icon" href="{{ "favicon-48.png" | absURL }}" sizes="48x48">
|
||||
<link rel="icon" href="{{ "favicon-32.png" | absURL }}" sizes="32x32">
|
||||
<link rel="icon" href="{{ "favicon-16.png" | absURL }}" sizes="16x16">
|
||||
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}" sizes="16x16 32x32 48x48">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "index.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
|
||||
<link rel="author" href="{{ "humans.txt" | absURL }}">
|
||||
{{ if and (eq .Type "notes") (eq .Kind "page") }}
|
||||
{{ with .OutputFormats.Get "amp" }}
|
||||
<link rel="amphtml" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
{{ partial "schema-person" . }}
|
||||
{{ partial "schema-article" . }}
|
||||
{{ else }}
|
||||
{{ partial "schema-person" . }}
|
||||
{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
{{ block "header" . }}{{ partial "header" . }}{{ end }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ block "footer" . }}{{ partial "footer" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{{"<!--" | safeHTML}} {{ hugo.Environment }} {{"-->" | safeHTML}}
|
||||
{{"<!--" | safeHTML}} {{ hugo.Version }} {{"-->" | safeHTML}}
|
@@ -1,4 +1,4 @@
|
||||
{{ partial "header.html" . }}
|
||||
{{ define "main" }}
|
||||
<main id="list">
|
||||
{{- range (where .Site.RegularPages "Type" "notes").GroupByDate "2006" }}
|
||||
<section class="year">
|
||||
@@ -14,4 +14,4 @@
|
||||
</section>
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
|
@@ -180,6 +180,7 @@
|
||||
by <a class="author" href="{{ .Site.BaseURL }}" rel="me author">{{ .Site.Author.name }}</a>
|
||||
on <a class="date" href="{{ (.OutputFormats.Get "html").Permalink }}">{{ .Date.Format "January 2, 2006" }}</a>
|
||||
</p>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
{{ partial "header.html" . }}
|
||||
{{ define "main" }}
|
||||
<main id="single">
|
||||
<article>
|
||||
<div id="info">
|
||||
<div id="meta">
|
||||
<h1><a href="{{ .Permalink }}" class="no-underline">{{ .Title }}</a></h1>
|
||||
<div id="meta">
|
||||
<div id="byline">
|
||||
by <a class="no-underline" href="{{ .Site.BaseURL }}" rel="me author">{{ .Site.Author.name }}</a>
|
||||
· <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">{{ .Date.Format "January 2, 2006" }}</a>
|
||||
· <a class="no-underline" href="{{ .Site.Params.gitRepo }}/blob/master/content/{{ .File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener">Improve Post</a>
|
||||
<div id="tags">
|
||||
<ul id="tags">
|
||||
{{- range .Params.tags }}
|
||||
<span class="tag">{{ . }}</span>
|
||||
<li>{{ . }}</li>
|
||||
{{- end }}
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
@@ -19,4 +19,4 @@
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
|
@@ -1,19 +1,17 @@
|
||||
{{ partial "header.html" . }}
|
||||
{{ define "main" }}
|
||||
<main id="video">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<video poster="{{ with .Resources.GetMatch "images/*.png" }}{{ .Permalink }}{{ end }}" controls crossorigin playsinline preload="none">
|
||||
<!-- Video files -->
|
||||
{{ with .Resources.GetMatch "*.webm" }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
|
||||
{{ with .Resources.GetMatch "*.mp4" }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
|
||||
{{ with .Resources.GetMatch "*.ogg" }}<source src="{{ .Permalink }}" type="video/ogg">{{ end }}
|
||||
|
||||
<!-- Caption files -->
|
||||
{{ with .Resources.GetMatch "*.en.vtt" }}<track src="{{ .Permalink }}" kind="captions" label="English" srclang="en" default>{{ end }}
|
||||
|
||||
<!-- Fallback for browsers that don't support the <video> element -->
|
||||
Your browser doesn't support HTML5 video. {{ with .Resources.GetMatch "*.mp4" }}<a href="{{ .Permalink }}">Click here to view the raw .mp4 video.</a>{{ end }}
|
||||
<p>Your browser doesn't support HTML5 video. {{ with .Resources.GetMatch "*.mp4" }}<a href="{{ .Permalink }}">Click here to view the raw .mp4 video.</a>{{ end }}</p>
|
||||
</video>
|
||||
|
||||
{{ .Content }}
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user