-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enable auto-formatting for template files (#133)
- Loading branch information
Showing
32 changed files
with
586 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
*.html | ||
.drone.yml | ||
search*.js | ||
_normalize.css | ||
list.json.json | ||
.lighthouseci/ | ||
themes/ | ||
static/js/ | ||
src/favicon/ | ||
/.lighthouseci/ | ||
/themes/ | ||
/static/js/ | ||
/src/favicon/ | ||
LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ .Site.Language.Lang }}" class="color-toggle-hidden"> | ||
|
||
<head> | ||
<head> | ||
{{ partial "head/meta" . }} | ||
<title>Lost? Don't worry</title> | ||
|
||
{{ partial "head/favicons" . }} | ||
{{ partial "head/others" . }} | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
{{ partial "svg-sprites" . }} | ||
|
||
|
||
<div class="wrapper"> | ||
{{ partial "site-header" . }} | ||
|
||
<main class="gblog-error flex-even"> | ||
<div class="flex align-center justify-center"> | ||
<div class="gblog-error__icon"> | ||
<svg class="icon gblog_cloud_off"><use xlink:href="#gblog_cloud_off"></use></svg> | ||
</div> | ||
<div class="gblog-error__message"> | ||
<div class="gblog-error__line gblog-error__title">Lost?</div> | ||
<div class="gblog-error__line gblog-error__code">Error 404</div> | ||
<div class="gblog-error__line gblog-error__help"> | ||
Seems like what you are looking for can't be found. Don't worry we can | ||
bring you back to the <a class="gblog-error__link" href="{{ .Site.BaseURL }}">homepage</a>. | ||
</div> | ||
</div> | ||
{{ partial "site-header" . }} | ||
|
||
|
||
<main class="gblog-error flex-even"> | ||
<div class="flex align-center justify-center"> | ||
<div class="gblog-error__icon"> | ||
<svg class="icon gblog_cloud_off"><use xlink:href="#gblog_cloud_off"></use></svg> | ||
</div> | ||
<div class="gblog-error__message"> | ||
<div class="gblog-error__line gblog-error__title">Lost?</div> | ||
<div class="gblog-error__line gblog-error__code">Error 404</div> | ||
<div class="gblog-error__line gblog-error__help"> | ||
Seems like what you are looking for can't be found. Don't worry we can bring you back | ||
to the <a class="gblog-error__link" href="{{ .Site.BaseURL }}">homepage</a>. | ||
</div> | ||
</main> | ||
</div> | ||
</div> | ||
</main> | ||
|
||
{{ partial "site-footer" . }} | ||
{{ partial "site-footer" . }} | ||
|
||
</div> | ||
</body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /> | ||
<img | ||
src="{{ .Destination | safeURL }}" | ||
alt="{{ .Text }}" | ||
{{ with .Title }}title="{{ . }}"{{ end }} | ||
/> | ||
{{- /* Drop trailing newlines */ -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}} | ||
<a class="gblog-markdown__link{{ if $raw }}--raw{{ end }}" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a> | ||
<a | ||
class="gblog-markdown__link{{ if $raw }}--raw{{ end }}" | ||
href="{{ .Destination | safeURL }}" | ||
{{ with .Title }}title="{{ . }}"{{ end }} | ||
>{{ .Text | safeHTML }}</a | ||
> | ||
{{- /* Drop trailing newlines */ -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.Language.Lang }}" class="color-toggle-hidden"> | ||
|
||
<head> | ||
<html | ||
itemscope | ||
itemtype="http://schema.org/WebPage" | ||
lang="{{ .Site.Language.Lang }}" | ||
class="color-toggle-hidden" | ||
> | ||
<head> | ||
{{ partial "head/meta" . }} | ||
<title>{{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title }}</title> | ||
<title> | ||
{{ if not (eq .Kind "home") }}{{ partial "title" . }} |{{ end }}{{ .Site.Title }} | ||
</title> | ||
|
||
{{ partial "head/favicons" . }} | ||
{{ partial "head/rel-me" . }} | ||
{{ partial "head/microformats" . }} | ||
{{ partial "head/others" . }} | ||
{{ partial "head/schema.html" . }} | ||
{{ partial "head/custom" . }} | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
{{ partial "svg-sprites" . }} | ||
|
||
<div class="wrapper {{ if default false .Site.Params.GeekblogDarkModeDim }}dark-mode-dim{{ end }}"> | ||
{{ partial "site-header" . }} | ||
|
||
<main class="gblog-page container"> | ||
{{ template "main" . }} | ||
</main> | ||
<div | ||
class="wrapper {{ if default false .Site.Params.GeekblogDarkModeDim }}dark-mode-dim{{ end }}" | ||
> | ||
{{ partial "site-header" . }} | ||
|
||
|
||
<main class="gblog-page container"> | ||
{{ template "main" . }} | ||
</main> | ||
|
||
{{ partial "site-footer" . }} | ||
{{ partial "site-footer" . }} | ||
</div> | ||
</body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
{{ define "main" }} | ||
{{ $pages := where .RegularPages "Type" "in" .Site.Params.mainSections }} | ||
{{ if (eq .Kind "home") }} | ||
{{ $pages = where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} | ||
{{ end }} | ||
{{ $pages := where .RegularPages "Type" "in" .Site.Params.mainSections }} | ||
{{ if (eq .Kind "home") }} | ||
{{ $pages = where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} | ||
{{ end }} | ||
|
||
{{ $paginator := .Paginate $pages }} | ||
{{ range $paginator.Pages }} | ||
{{ $paginator := .Paginate $pages }} | ||
{{ range $paginator.Pages }} | ||
<article class="gblog-post"> | ||
<header class="gblog-post__header"> | ||
<h1><a href="{{ .RelPermalink }}">{{ partial "title" . }}</a></h1> | ||
</header> | ||
<header class="gblog-post__header"> | ||
<h1><a href="{{ .RelPermalink }}">{{ partial "title" . }}</a></h1> | ||
</header> | ||
|
||
<section class="gblog-markdown"> | ||
{{ .Summary }} | ||
</section> | ||
<div class="gblog-post__readmore"> | ||
{{ if .Truncated }} | ||
<a class="flex-inline align-center fake-link" title="Read full post" href="{{ .RelPermalink }}">Read full post<i class="gblog-icon">gblog_arrow_right</i></a> | ||
{{ end }} | ||
</div> | ||
<section class="gblog-markdown"> | ||
{{ .Summary }} | ||
</section> | ||
<div class="gblog-post__readmore"> | ||
{{ if .Truncated }} | ||
<a | ||
class="flex-inline align-center fake-link" | ||
title="Read full post" | ||
href="{{ .RelPermalink }}" | ||
>Read full post<i class="gblog-icon">gblog_arrow_right</i></a | ||
> | ||
{{ end }} | ||
</div> | ||
|
||
<footer class="gblog-post__footer"> | ||
{{ partial "metadata.html" . }} | ||
</footer> | ||
<footer class="gblog-post__footer"> | ||
{{ partial "metadata.html" . }} | ||
</footer> | ||
</article> | ||
{{ end }} | ||
{{ partial "pagination.html" . }} | ||
{{ end }} | ||
{{ partial "pagination.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
{{ define "main" }} | ||
<article class="gblog-post"> | ||
<header class="gblog-post__header"> | ||
{{ $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }} | ||
{{ with $source }} | ||
<div class="gblog-post__feature"> | ||
<picture> | ||
{{ $featured := .Fill (printf "910x280 %s" (default "Smart" .Params.anchor)) }} | ||
<source srcset="{{ $featured.Permalink }}"> | ||
<img src="{{ $featured.Permalink }}" alt="{{ default $.Title .Params.description }}" > | ||
</picture> | ||
{{ with $source.Params.credits }} | ||
<span>Credits: {{ . | $.Page.RenderString | safeHTML }}</span> | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
<article class="gblog-post"> | ||
<header class="gblog-post__header"> | ||
{{ $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }} | ||
{{ with $source }} | ||
<div class="gblog-post__feature"> | ||
<picture> | ||
{{ $featured := .Fill (printf "910x280 %s" (default "Smart" .Params.anchor)) }} | ||
<source srcset="{{ $featured.Permalink }}" /> | ||
<img src="{{ $featured.Permalink }}" alt="{{ default $.Title .Params.description }}" /> | ||
</picture> | ||
{{ with $source.Params.credits }} | ||
<span>Credits: {{ . | $.Page.RenderString | safeHTML }}</span> | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
|
||
<h1>{{ partial "title" . }}</h1> | ||
</header> | ||
|
||
{{ if or (eq .Type (default "posts" .Site.Params.GeekblogContentSection)) (eq .Type "post") }} | ||
<div class="gblog-post__meta"> | ||
{{ partial "metadata.html" . }} | ||
</div> | ||
{{ end }} | ||
<h1>{{ partial "title" . }}</h1> | ||
</header> | ||
|
||
{{ if or (eq .Type (default "posts" .Site.Params.GeekblogContentSection)) (eq .Type "post") }} | ||
<div class="gblog-post__meta"> | ||
{{ partial "metadata.html" . }} | ||
</div> | ||
{{ end }} | ||
|
||
|
||
<section class="gblog-markdown"> | ||
{{ partial "content" . }} | ||
</section> | ||
</article> | ||
<section class="gblog-markdown"> | ||
{{ partial "content" . }} | ||
</section> | ||
</article> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!-- You can add custom elements to the page header here. --> | ||
<!-- You can add custom elements to the page header here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
<link rel="icon" type="image/svg+xml" href="{{ "favicon/favicon.svg" | relURL }}"> | ||
<link rel="icon" type="image/png" sizes="48x48" href="{{ "favicon/favicon-32x32.png" | relURL }}"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon/favicon-32x32.png" | relURL }}"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon/favicon-16x16.png" | relURL }}"> | ||
<link rel="icon" type="image/svg+xml" href="{{ "favicon/favicon.svg" | relURL }}" /> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="48x48" | ||
href="{{ "favicon/favicon-32x32.png" | relURL }}" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="32x32" | ||
href="{{ "favicon/favicon-32x32.png" | relURL }}" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="16x16" | ||
href="{{ "favicon/favicon-16x16.png" | relURL }}" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
{{ $description := default (default .Site.Title .Site.Params.description) (default .Summary .Description) }} | ||
{{ $keywords := default .Site.Params.Keywords .Keywords }} | ||
{{ $authors := default (slice .Site.Params.GeekblogAuthor) .Params.authors }} | ||
|
||
{{ with $description }} | ||
<meta name="description" content="{{ . }}"> | ||
<meta name="description" content="{{ . }}" /> | ||
{{ end }} | ||
{{ with $keywords }} | ||
<meta name="keywords" content="{{ delimit . "," }}"> | ||
<meta name="keywords" content="{{ delimit . "," }}" /> | ||
{{ end }} | ||
{{ with $authors }} | ||
{{ $list := slice }} | ||
{{ range sort . }} | ||
{{ with . }} | ||
{{ $author := index $.Site.Data.authors . }} | ||
{{ $list = $list | append $author.name }} | ||
{{ end }} | ||
{{ $list := slice }} | ||
{{ range sort . }} | ||
{{ with . }} | ||
{{ $author := index $.Site.Data.authors . }} | ||
{{ $list = $list | append $author.name }} | ||
{{ end }} | ||
{{ end }} | ||
|
||
{{ with $list }} | ||
<meta name="author" content="{{ delimit . "," }}"> | ||
{{ end }} | ||
{{ with $list }} | ||
<meta name="author" content="{{ delimit . "," }}" /> | ||
{{ end }} | ||
{{ end }} |
Oops, something went wrong.