simplified everything, partially half the size loaded, despite the unified css file :); added colour scheme support; added blogroll and about pages
This commit is contained in:
parent
8c242b4aa5
commit
e753ca3e90
20 changed files with 194 additions and 734 deletions
|
@ -2,13 +2,14 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ with .Title }} {{ . }} – {{ end }}{{ .Site.Title }}</title>
|
||||
{{- $style := resources.Get "/style.scss" | resources.ToCSS (dict "outputStyle" "compressed") }}
|
||||
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
{{ block "stylesheet" . }}{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "nav.html" . }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{- block "main" . }}{{ end }}
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,32 +4,12 @@
|
|||
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
||||
{{- end -}}
|
||||
|
||||
{{- define "main" }}
|
||||
{{- define "main" }}
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<section class="section posts">
|
||||
<div class="section posts inner">
|
||||
{{- range .Pages }}
|
||||
<a href="{{ .Permalink }}">
|
||||
<article>
|
||||
<h2><span>{{ .Title }}</span></h2>
|
||||
{{ with .Description }}<p class="description">{{ . }}</p>{{ end }}
|
||||
{{- if eq .Params.type "post" }}
|
||||
<p class="meta" title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}">
|
||||
<span class="date">{{ .Date.Format "2 January 2006" }}</span>
|
||||
{{- with .Params.author }}<span class="author">by {{ . }}</span>{{ end }}
|
||||
{{ end }}
|
||||
{{- if eq .Params.type "project" }}
|
||||
<p class="meta">
|
||||
{{ with .Params.activetime }}<span class="date">{{ . }}</span><br />{{ end }}
|
||||
{{ with .Params.status }}<span class="status">{{ . }}</span>{{ end }}
|
||||
{{- end }}
|
||||
</p>
|
||||
</article>
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{{- range .Pages }}
|
||||
<p> <a href="{{ .Permalink }}">{{ .Title }}</a> <span>{{ .Date.Format "2 January 2006" }}</span> </p>
|
||||
{{- end }}
|
||||
</main>
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
|
|
@ -1,69 +1,26 @@
|
|||
{{- define "stylesheet" -}}
|
||||
{{- $scss := resources.Get "/_default/single.scss" -}}
|
||||
{{- $style := $scss | resources.ToCSS -}}
|
||||
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
||||
{{- end -}}
|
||||
|
||||
{{- define "main" -}}
|
||||
{{- define "main" }}
|
||||
<main>
|
||||
<div class="container">
|
||||
<section class="section-article">
|
||||
<article>
|
||||
<p class="meta">
|
||||
{{ if eq .Params.type "post" }}<span title="{{ .Date.Format "2. January 2006, 15:04 MST" }}">{{ .Date.Format "2. January 2006" }}</span>{{ end }}
|
||||
{{- if eq .Params.type "singlepage" }}<span title="{{ .Date.Format "2. January 2006" }}">version: {{ .Date.Format "2006-01-02" }}</span>{{ end }}
|
||||
{{- with .Params.author }}<span>by {{ . }}</span>{{ end }}
|
||||
</p>
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
{{ with .Params.featured_image }}<img src="{{ . | relURL }}" loading="lazy" alt="">{{ end }}
|
||||
|
||||
{{ printf "<!-- content -->" | safeHTML }}
|
||||
{{ .Content }}
|
||||
{{- printf "<!-- content END -->" | safeHTML }}
|
||||
|
||||
<aside class="meta">
|
||||
{{- with .Params.topics }}
|
||||
<ul class="topics">
|
||||
{{- range . }}
|
||||
<li>
|
||||
<a href="{{ "topics" | relURL}}/{{ . | urlize }}">{{ . }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- with .Params.tags }}
|
||||
<h3>tags</h3>
|
||||
<ul class="tags">
|
||||
{{- range . }}
|
||||
<li>
|
||||
<a href="{{ "tags" | relURL }}/{{ . | urlize }}">{{ . }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</aside>
|
||||
</article>
|
||||
</section>
|
||||
{{- if ne .Params.type "singlepage" }}
|
||||
<section class="section-articles">
|
||||
<article class="next-article">
|
||||
{{- with .NextInSection }}
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ if eq .Params.type "project" }}← next project{{ end }}
|
||||
{{ if ne .Params.type "project" }}← next article{{ end }}
|
||||
</a>
|
||||
{{- end }}
|
||||
</article>
|
||||
<article class="previous-article">
|
||||
{{- with .PrevInSection }}<span></span>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- if eq .Params.type "project" }}previous project →{{ end -}}
|
||||
{{- if ne .Params.type "project" }}previous article →{{ end -}}
|
||||
</a>
|
||||
{{- end }}
|
||||
</article>
|
||||
</section>
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
{{- if eq .Params.type "post" }}
|
||||
<p title="{{ .Date.Format "2. January 2006, 15:04 MST" }}">{{ .Date.Format "2. January 2006" }}</p>
|
||||
{{- end }}
|
||||
{{ .Content -}}
|
||||
<aside>
|
||||
{{- with .Params.topics }}
|
||||
<ul class="topics">
|
||||
{{- range . }}
|
||||
<li>
|
||||
<a href="{{ "topics" | relURL}}/{{ . | urlize }}">{{ . }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- with .Params.tags }}
|
||||
tags
|
||||
{{- range . }}
|
||||
<a href="{{ "tags" | relURL }}/{{ . | urlize }}">{{ . }}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</aside>
|
||||
</main>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
{{ define "stylesheet" }}{{ $sass := resources.Get "/errorpages.scss" }}{{ $style := $sass | resources.ToCSS }}
|
||||
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
<div class="container">
|
||||
<section>
|
||||
<header>
|
||||
<h2>{{ .Params.heading }}</h2>
|
||||
<span class="subtitle">{{.Params.subheading}}</span>
|
||||
</header>
|
||||
{{.Content}}
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
||||
{{- define "main" }}
|
||||
<main>
|
||||
<h2>{{ .Params.heading }}</h2>
|
||||
<p>{{ .Params.subheading}}</p>
|
||||
</main>
|
||||
{{- end }}
|
||||
|
|
|
@ -1,17 +1,6 @@
|
|||
{{ define "stylesheet" }}{{ $sass := resources.Get "/errorpages.scss" }}{{ $style := $sass | resources.ToCSS }}
|
||||
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
<div class="container">
|
||||
<section>
|
||||
<header>
|
||||
<h2>{{ .Params.heading }}</h2>
|
||||
<span class="subtitle">{{.Params.subheading}}</span>
|
||||
</header>
|
||||
{{.Content}}
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
{{- define "main" }}
|
||||
<main>
|
||||
<h2>{{ .Params.heading }}</h2>
|
||||
<p>{{ .Params.subheading}}</p>
|
||||
</main>
|
||||
{{- end }}
|
||||
|
|
|
@ -1,73 +1,7 @@
|
|||
{{- define "stylesheet" -}}
|
||||
{{- $scss := resources.Get "/index.scss" -}}
|
||||
{{- $style := $scss | resources.ToCSS -}}
|
||||
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
||||
{{- end -}}
|
||||
|
||||
{{- define "main" -}}
|
||||
<section class="section header">
|
||||
<div class="container">
|
||||
<header>
|
||||
<h2>{{ .Params.heading }}</h2>
|
||||
<span class="subtitle">{{.Params.subheading}}</span>
|
||||
</header>
|
||||
<section class="section contact">
|
||||
<table class="table contact">
|
||||
{{- range sort .Params.contact "weight" "asc" }}
|
||||
<tr>
|
||||
<td>{{ .name }}</td>
|
||||
<td>
|
||||
{{- with .url }}<a href="{{ . }}">{{ end -}}
|
||||
{{ .handle }}
|
||||
{{- with .url }}</a>{{ end }} {{ with .hint }}<a href="{{ .url }}">{{ .name }}</a>{{ end -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{- define "main" }}
|
||||
<main>
|
||||
<div class="container">
|
||||
<section class="section projects">
|
||||
<span class="latest">
|
||||
latest <a href="{{ "/projects" | relURL }}">projects</a>
|
||||
</span>
|
||||
<div class="section projects inner">
|
||||
{{- range first 4 (where .Site.RegularPages "Type" "project") }}
|
||||
<a href="{{ .Permalink }}">
|
||||
<article>
|
||||
<h2>{{ .Title }}</h2>
|
||||
<p class="meta">
|
||||
{{ with .Params.activetime }}<span class="date">{{ . }}</span><br />{{ end }}
|
||||
{{ with .Params.status }}<span class="status">{{ . }}</span>{{ end }}
|
||||
</p>
|
||||
</article>
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<section class="section posts">
|
||||
<span class="latest">
|
||||
latest <a href="{{ "/blog" | relURL }}">posts</a>
|
||||
</span>
|
||||
<div class="section posts inner">
|
||||
{{- range first 4 (where .Site.RegularPages "Type" "post") }}
|
||||
<a href="{{ .Permalink }}">
|
||||
<article>
|
||||
<h2><span>{{ .Title }}</span></h2>
|
||||
{{ with .Description }}<p class="description">{{ . }}</p>{{ end }}
|
||||
<p class="meta" title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}">
|
||||
<span class="date">{{ .Date.Format "2 January 2006" }}</span>
|
||||
<span class="author">{{ with .Params.author }}by {{ end }}{{ .Params.author }}</span>
|
||||
</p>
|
||||
</article>
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
{{- range first 8 (where .Site.RegularPages "Type" "post") }}
|
||||
<p> <a href="{{ .Permalink }}">{{ .Title }}</a> <span>{{ .Date.Format "2 January 2006" }}</span> </p>
|
||||
{{- end }}
|
||||
</main>
|
||||
{{- end }}
|
||||
|
|
|
@ -1,21 +1,7 @@
|
|||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<section class="website-version">
|
||||
<span title="{{ now.Format "2. January 2006, 15:04 MST" }}">version {{ now.Format "2006-01-02" }}</span>
|
||||
</section>
|
||||
<section class="website-subnav">
|
||||
<ul>
|
||||
{{- $currentPage := . }}
|
||||
{{- range .Site.Menus.footer }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">
|
||||
{{- .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<span title="{{ now.Format "2. January 2006, 15:04 MST" }}">version {{ now.Format "2006-01-02" }}</span>
|
||||
{{- range .Site.Menus.footer }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{- end }}
|
||||
</footer>
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
{{- $currentPage := . -}}
|
||||
<header class="main">
|
||||
{{- range .Site.Menus.name }}
|
||||
<h1><a href="{{ .URL }}">{{ .Name }}</a></h1>
|
||||
{{- $currentPage := . }}
|
||||
<header>
|
||||
{{- range .Site.Menus.name }}
|
||||
{{- if $currentPage.IsMenuCurrent "name" . }}
|
||||
<h1> <a href="{{ .URL }}" class="active">{{ .Name }}</a> </h1>
|
||||
{{- else }}
|
||||
<h1> <a href="{{ .URL }}">{{ .Name }}</a> </h1>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<nav>
|
||||
{{- range .Site.Menus.main }}
|
||||
{{- if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) -}}
|
||||
<a href="{{ .URL }}" class="active">{{ .Name }}</a>
|
||||
{{- else }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
</nav>
|
||||
</header>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue