init - lots of changes from lugo
This commit is contained in:
@@ -1,36 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language }}">
|
||||
<head>
|
||||
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
|
||||
<link rel="canonical" href="{{ .Site.BaseURL }}">
|
||||
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
|
||||
<link rel='stylesheet' type='text/css' href='/style.css'>
|
||||
{{ with .Site.Params.favicon }}<link rel="icon" href="{{ . }}">
|
||||
{{ end -}}
|
||||
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
|
||||
{{ if isset .Params "tags" }}<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">
|
||||
{{ end -}}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body>
|
||||
{{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end -}}
|
||||
<main>
|
||||
<header><h1 id="tag_{{ .Title }}">{{ block "title" . }}{{ end }}</h1></header>
|
||||
<article>
|
||||
{{ block "main" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ if .Param "nextprev" }}{{ partial "nextprev.html" . -}}{{ end -}}
|
||||
{{ if .Param "taglist" }}{{ partial "taglist.html" . }}{{ end -}}
|
||||
</article>
|
||||
</main>
|
||||
{{ block "footer" . }}
|
||||
<footer>
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a>
|
||||
{{- if .Param "showrss" }}<br><br><a href="/index.xml"><img src="/rss.svg" style="max-height:1.5em" alt="RSS Feed" title="Subscribe via RSS for updates."></a>{{ end }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
{{ block "header" . }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
<main>
|
||||
<div class="article-header">
|
||||
<h3 class="spaced">
|
||||
{{ .Page.Title }}
|
||||
</h3>
|
||||
</div>
|
||||
<article>
|
||||
{{ block "main" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ block "footer" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
8
layouts/partials/footer.html
Normal file
8
layouts/partials/footer.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<hr>
|
||||
<footer>
|
||||
<p>
|
||||
Poem + Hugo = Pogo
|
||||
<br><br>
|
||||
© Pogo 2024
|
||||
</p>
|
||||
</footer>
|
19
layouts/partials/head.html
Normal file
19
layouts/partials/head.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<head>
|
||||
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
|
||||
<link rel="canonical" href="{{ .Site.BaseURL }}">
|
||||
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='/style.css'>
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="icon" href="{{ . }}">
|
||||
{{ end -}}
|
||||
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
|
||||
{{ if isset .Params "tags" }}
|
||||
<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . " , " }}{{ end }}">
|
||||
{{ end -}}
|
||||
{{ if isset .Params "redirect" }}
|
||||
<meta http-equiv="refresh" content="2; URL={{ with .Params.redirect }}{{ . }}{{ end }}">
|
||||
{{ end -}}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
5
layouts/partials/header.html
Normal file
5
layouts/partials/header.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<header>
|
||||
<h3>
|
||||
<a href="/">{{ .Site.Title }}</a>
|
||||
</h3>
|
||||
</header>
|
@@ -1,8 +0,0 @@
|
||||
<nav>
|
||||
<ul>
|
||||
{{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}}
|
||||
{{ range.Site.Menus.main.ByWeight }}{{ $base := path.Base .URL }}
|
||||
<li><a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
@@ -1,13 +0,0 @@
|
||||
{{- if isset .Params "tags" -}}
|
||||
{{- $tagsLen := len .Params.tags -}}
|
||||
{{- if gt $tagsLen 0 -}}
|
||||
<div style="clear:both" class=taglist>
|
||||
{{- with .Site.Params.relatedtext }}{{ . }}<br>{{ end -}}
|
||||
{{- range $k, $v := .Params.tags -}}
|
||||
{{- $url := printf "tags/%s" (. | urlize | lower) -}}
|
||||
<a id="tag_{{ . | lower }}" href="{{ $url | absURL }}">{{ . | title }}</a>
|
||||
{{- if lt $k (sub $tagsLen 1) }} · {{ end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end }}
|
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<figure {{ with .Get "class" }}class="{{.}}"{{ end -}}>
|
||||
{{- with .Get "link"}}<a href="{{.}}">{{ end -}}
|
||||
<img src="{{ .Get "src" }}"
|
||||
<img src='{{ .Get "src" }}'
|
||||
{{- with .Get "mouse" }} title="{{.}}"{{ end -}}
|
||||
{{- with .Get "alt" }} alt="{{.}}"{{ end -}}
|
||||
>
|
||||
|
14
layouts/shortcodes/login.html
Normal file
14
layouts/shortcodes/login.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div>
|
||||
{% if user %}
|
||||
Welcome {{/* user */}}!
|
||||
{% else %}
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='/form.css'>
|
||||
<form class="spaced" method="post" action="login" enctype="application/x-www-form-urlencoded">
|
||||
<label>Login</label>
|
||||
<br>
|
||||
<input type="text" id="username" name="username" aria-autocomplete="both" placeholder="Username" autofocus autocomplete="username" required><br>
|
||||
<input type="password" id="password" name="password" placeholder="Password" autocomplete="new-password" required><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
14
layouts/shortcodes/post.html
Normal file
14
layouts/shortcodes/post.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='/form.css'>
|
||||
<form method="post" action="post-article" enctype="application/x-www-form-urlencoded">
|
||||
<label style="display: none">Create new post:</label>
|
||||
<p>Markdown is supported!</p>
|
||||
<textarea
|
||||
accesskey="/"
|
||||
id="article"
|
||||
name="article"
|
||||
required
|
||||
maxlength="1000"
|
||||
rows="11"
|
||||
placeholder="Your super sick idea..."></textarea>
|
||||
<input type="submit" value="Post">
|
||||
</form>
|
@@ -1,3 +0,0 @@
|
||||
{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }} <ul id="tagcloud">
|
||||
{{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}<li><a href="{{ $url | absURL }}" id="tag_{{ $name }}">{{ $name | title }}</a></li>
|
||||
{{ end }}</ul>{{ end }}{{ end }}
|
Reference in New Issue
Block a user