working site with external nginx

This commit is contained in:
2020-01-18 13:40:05 -06:00
parent 9449858d2f
commit 9f57bd71c6
62 changed files with 5267 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
{{ partial "head.html" . }}
<body>
<div class="container paper">
{{ partial "nav.html" . }}
<main>
{{ block "main" . }}{{ end }}
</main>
{{ partial "google-analytics-async.html" . }}
</div>
</body>
</html>

View File

@@ -0,0 +1,16 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ $pages := .Pages }}
{{ range $pages.ByPublishDate.Reverse }}
<h2 class="post-list {{ if ne .Params.show_summary false }}summary{{ end }}">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h2>
{{ if ne .Params.show_summary false }}
{{ .Summary }}
{{ end }}
{{ end }}
{{ end }}

View File

@@ -0,0 +1,6 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}

View File

@@ -0,0 +1,11 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ range .Data.Terms.Alphabetical }}
<h2 class="post-list">
<span class="badge">{{ .Count }}</span>
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a>
</h2>
{{ end }}
{{ end }}

View File

@@ -0,0 +1,16 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ range $pages.ByPublishDate.Reverse }}
<h2 class="post-list {{ if ne .Params.show_summary false }}summary{{ end }}">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h2>
{{ if ne .Params.show_summary false }}
{{ .Summary }}
{{ end }}
{{ end }}
{{ end }}

View File

@@ -0,0 +1,10 @@
{{ if not .Site.IsServer }}
{{ with .Site.GoogleAnalytics }}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
{{ end }}
{{ end }}

View File

@@ -0,0 +1,34 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{ hugo.Generator }}
<link rel="canonical" href="{{ .Permalink }}">
{{ if .IsHome }}
{{ with .Site.Params.homeMetaContent }}
<meta name="description" content="{{ . | plainify }}">
{{ end }}
{{ end }}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" type="text/css" href="{{ "css/paper.css" | absURL }}">
{{ $customCssPath := "css/custom.css" }}
{{ $customCss:= resources.Get $customCssPath | resources.ExecuteAsTemplate $customCssPath . }}
<link rel="stylesheet" type="text/css" href="{{ $customCss.Permalink }}">
{{ $title := print .Title " | " .Site.Title }}
{{ if .IsHome }}
{{ $title = .Site.Title }}
{{ end }}
<title>{{ $title }}</title>
</head>

View File

@@ -0,0 +1,22 @@
<nav class="border split-nav">
<div class="nav-brand">
<h3><a href="/">{{ .Site.Title }}</a></h3>
</div>
<div class="collapsible">
<input id="collapsible1" type="checkbox" name="collapsible1">
<button>
<label for="collapsible1">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</label>
</button>
<div class="collapsible-body">
<ul class="inline">
{{ range .Site.Menus.nav }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
</div>
</nav>

View File

@@ -0,0 +1,12 @@
<h1>{{ .Title }}</h1>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ range $pages.ByPublishDate.Reverse }}
<h2 class="post-list {{ if ne .Params.show_summary false }}summary{{ end }}">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h2>
{{ if ne .Params.show_summary false }}
{{ .Summary }}
{{ end }}
{{ end }}

View File

@@ -0,0 +1,21 @@
{{ $headings := findRE "<h2.*?>(.|\n])+?</h2>" .Content }}
{{ if ge (len $headings) 2 }}
<div class="child-borders">
<div class="toc border" aria-labelledby="toc-heading">
<h2 id="toc-heading">Table of contents</h2>
<ol>
{{ range $headings }}
<li>
{{ $id := findRE "id=\".*\"" . }}
{{ $id = index $id 0 }}
{{ $id = strings.TrimPrefix "id=\"" $id }}
{{ $id = strings.TrimSuffix "\"" $id }}
<a href="#{{ $id }}">
{{ . | htmlUnescape | plainify }}
</a>
</li>
{{ end }}
</ol>
</div>
</div>
{{ end }}

View File

@@ -0,0 +1,21 @@
{{ define "main" }}
<h1 class="post-title">{{ .Title }}</h1>
{{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
<strong>Publish date: </strong>{{ .PublishDate.Format $dateFormat }}
<br>
{{ with .Params.tags }}
<strong>Tags: </strong>
{{ range . }}
<a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
{{ if ne .Params.toc false }}
{{ partial "toc.html" . }}
{{ end }}
{{ .Content }}
{{ end }}

View File

@@ -0,0 +1,3 @@
<p class="alert alert-{{ .Get 0 }}">
{{ .Inner }}
</p>

View File

@@ -0,0 +1,3 @@
<p class="sm col background-{{ .Get 0 }}">
{{ .Inner }}
</p>

View File

@@ -0,0 +1,3 @@
<span class="badge {{ .Get 0 }}">
{{ .Inner }}
</span>

View File

@@ -0,0 +1,17 @@
{{ $arg := .Get 0 }}
{{ $class := "" }}
{{ if eq $arg "dashed" }}
{{ $class = "border-dashed" }}
{{ else if eq $arg "dotted" }}
{{ $class = "border-dotted" }}
{{ else if eq $arg "dashed thick" }}
{{ $class = "border-dashed border-thick" }}
{{ else if eq $arg "dotted thick" }}
{{ $class = "border-dotted border-thick" }}
{{ end }}
<div class="child-borders">
<p class="sm col {{ $class }}">
{{ .Inner }}
</p>
</div>

View File

@@ -0,0 +1,35 @@
{{ $img := .Get "img" }}
{{ $command := .Get "command" }}
{{ $options := .Get "options" }}
{{ $original := .Page.Resources.GetMatch (printf "*%s*" $img) }}
{{ $new := "" }}
{{ if eq $command "Fit" }}
{{ $new = $original.Fit $options }}
{{ else if eq $command "Fill" }}
{{ $new = $original.Fill $options }}
{{ else if eq $command "Resize" }}
{{ $new = $original.Resize $options }}
{{ else if eq $command "Original" }}
{{ $new = $original }}
{{ else }}
{{ errorf "Invalid image processing command: Must be one of Fit, Fill, Resize, Original." }}
{{ end }}
<div class="card row flex-center" style="">
<a href="{{ $original.Permalink }}" class="img-link">
<img src="{{ $new.Permalink }}">
</a>
<div class="card-body">
{{ with (.Get "title" )}}
<h4 class="card-title">{{ . | markdownify }}</h4>
{{ end }}
{{ with (.Get "subtitle" )}}
<h5 class="card-subtitle">{{ . | markdownify }}</h5>
{{ end }}
{{ with (.Get "text") }}
<p class="card-text">{{ . | markdownify }}</p>
{{ end }}
</div>
</div>

View File

@@ -0,0 +1,3 @@
<p class="text-{{ .Get 0 }}">
{{ .Inner }}
</p>