Hugo Bilberry First commit to gitea@cowbay.org
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="content">
|
||||
<div class="article-wrapper u-cf single">
|
||||
<a class="bubble" href="{{ "/author/" | relLangURL}}">
|
||||
<i class="fa fa-fw fa-users"></i>
|
||||
</a>
|
||||
|
||||
<article class="article">
|
||||
<div class="content">
|
||||
<h3>{{ i18n "authors" }}</h3>
|
||||
<hr>
|
||||
<ul id="all-categories">
|
||||
{{ range $name, $taxonomy := .Site.Taxonomies.author }}
|
||||
<li><a href="{{ "/author/" | relLangURL }}{{ $name | urlize }}">{{ $name | humanize }} ({{ $taxonomy.Count }})</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
119
themes/bilberry-hugo-theme/layouts/_default/baseof.html
Normal file
119
themes/bilberry-hugo-theme/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,119 @@
|
||||
{{- if not .Params.gallery -}}
|
||||
{{- if not .Params.featuredImage -}}
|
||||
{{ .Scratch.Set "image" (printf "https://www.gravatar.com/avatar/%s?size=200" (md5 .Site.Params.gravatarEMail)) }}
|
||||
{{- else -}}
|
||||
{{ .Scratch.Set "image" (.Params.featuredImage) }}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ .Scratch.Set "image" (index (.Params.gallery) 0 | relURL | absURL) }}
|
||||
{{- end -}}
|
||||
{{- if ne .Description "" -}}
|
||||
{{ .Scratch.Set "description" (.Description) }}
|
||||
{{- else -}}
|
||||
{{- if eq .Title .Site.Title -}}
|
||||
{{ .Scratch.Set "description" (.Site.Params.description) }}
|
||||
{{- else -}}
|
||||
{{ .Scratch.Set "description" (printf "%s - %s" (.Title) (.Site.Params.description)) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if eq .Site.Title .Title -}}
|
||||
{{ .Scratch.Set "title" (.Site.Params.subtitle) }}
|
||||
{{- else -}}
|
||||
{{ .Scratch.Set "title" (.Title) }}
|
||||
{{- end -}}
|
||||
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="{{ .Site.Language.Lang }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="author" content="{{ .Site.Params.author }}">
|
||||
<meta name="description" content="{{ .Site.Params.description }}">
|
||||
<meta name="keywords" content="{{ .Site.Params.keywords }}">
|
||||
{{ .Hugo.Generator }}
|
||||
<title>{{ block "title" . }} {{ .Scratch.Get "title" }} | {{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="description" content="{{ .Scratch.Get "description" }}">
|
||||
<meta itemprop="name" content="{{ .Scratch.Get "title" }}">
|
||||
<meta itemprop="description" content="{{ .Scratch.Get "description" }}">
|
||||
<meta property="og:title" content="{{ .Scratch.Get "title" }}">
|
||||
<meta property="og:description" content="{{ .Scratch.Get "description" }}">
|
||||
<meta property="og:image" content="{{ .Scratch.Get "image" }}">
|
||||
<meta property="og:url" content="{{ .URL | absURL }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
{{- if .IsPage }}
|
||||
<meta property="og:type" content="article">
|
||||
{{- else -}}
|
||||
<meta property="og:type" content="website">
|
||||
{{- end }}
|
||||
<link rel="icon" type="image/png" href="{{ "favicon-32x32.png" | absURL }}" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{{ "favicon-16x16.png" | absURL }}" sizes="16x16">
|
||||
|
||||
{{ if .RSSLink }}
|
||||
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ $variables := resources.Get "sass/_variables.scss" }}
|
||||
{{ $theme := resources.Get "sass/theme.scss" }}
|
||||
{{ $combined := slice $variables $theme | resources.Concat "sass/combined.scss" | resources.ExecuteAsTemplate "sass/combined.scss" . }}
|
||||
{{ $style := $combined | toCSS | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
|
||||
{{ partial "twitter-card" . }}
|
||||
|
||||
{{ if isset .Site.Params "css_modules" }}
|
||||
{{ range .Site.Params.css_modules }}
|
||||
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</head>
|
||||
<body class="bilberry-hugo-theme">
|
||||
{{ partial "topnav" . }}
|
||||
|
||||
{{ partial "header" . }}
|
||||
|
||||
<div class="main container">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "footer" . }}
|
||||
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
|
||||
{{ if and (isset .Site.Params "enable_mathjax") (eq .Site.Params.enable_mathjax true) }}
|
||||
{{ partial "mathjax" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ $js := resources.Get "js/externalDependencies.js" }}
|
||||
{{ $secureJS := $js | resources.Fingerprint "md5" }}
|
||||
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
||||
|
||||
{{ $jsTemplate := resources.Get "js/theme.js" }}
|
||||
{{ $secureJS := $jsTemplate | resources.ExecuteAsTemplate "js/theme.js" . | fingerprint "md5" }}
|
||||
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
||||
|
||||
<script>
|
||||
$(".moment").each(function() {
|
||||
$(this).text(
|
||||
moment( $(this).text() )
|
||||
.locale( {{ .Site.Language.Lang }} )
|
||||
.format('LL')
|
||||
);
|
||||
});
|
||||
|
||||
$(".footnote-return sup").html({{ i18n "footnoteReturnText" }});
|
||||
</script>
|
||||
|
||||
{{ if isset .Site.Params "js_modules" }}
|
||||
{{ range .Site.Params.js_modules }}
|
||||
<script src="{{ . | absURL }}" type="application/javascript"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (isset .Site.Params "algolia_search") (eq .Site.Params.algolia_search true) }}
|
||||
{{ partial "algolia-search" . }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="content">
|
||||
<div class="article-wrapper u-cf single">
|
||||
<a class="bubble" href="{{ "/categories/" | relLangURL}}">
|
||||
<i class="fa fa-fw fa-list"></i>
|
||||
</a>
|
||||
|
||||
<article class="article">
|
||||
<div class="content">
|
||||
<h3>{{ i18n "categories" }}</h3>
|
||||
<hr>
|
||||
<ul id="all-categories">
|
||||
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
|
||||
<li><a href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}">{{ $name | humanize }} ({{ $taxonomy.Count }})</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
14
themes/bilberry-hugo-theme/layouts/_default/list.html
Normal file
14
themes/bilberry-hugo-theme/layouts/_default/list.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ define "main" }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "ne" "page") (index .Site.Params "paginate" | default 7) }}
|
||||
{{ range where .Paginator.Pages "Type" "ne" "page" }}
|
||||
<div class="article-wrapper u-cf">
|
||||
{{ if or (fileExists (print "layouts/partials/content-type/" .Type ".html") ) (fileExists (print "themes/bilberry-hugo-theme/layouts/partials/content-type/" .Type ".html")) }}
|
||||
{{ partial (print "content-type/" .Type) . }}
|
||||
{{ else }}
|
||||
{{ partial "content-type/article" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "paginator" . }}
|
||||
{{ end }}
|
||||
16
themes/bilberry-hugo-theme/layouts/_default/single.html
Normal file
16
themes/bilberry-hugo-theme/layouts/_default/single.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "singlePage" true }} <!-- SET singlePage variable -->
|
||||
<div class="article-wrapper u-cf single">
|
||||
{{ if or (fileExists (print "layouts/partials/content-type/" .Type ".html") ) (fileExists (print "themes/bilberry-hugo-theme/layouts/partials/content-type/" .Type ".html")) }}
|
||||
{{ partial (print "content-type/" .Type) . }}
|
||||
{{ else }}
|
||||
{{ partial "content-type/article" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if ( .Params.showComments | default true ) }}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Scratch.Set "singlePage" false }} <!-- RESET singlePage variable -->
|
||||
{{ end }}
|
||||
22
themes/bilberry-hugo-theme/layouts/_default/tag.terms.html
Normal file
22
themes/bilberry-hugo-theme/layouts/_default/tag.terms.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="content">
|
||||
<div class="article-wrapper u-cf single">
|
||||
<a class="bubble" href="{{ "/tags/" | relLangURL}}">
|
||||
<i class="fa fa-fw fa-tag"></i>
|
||||
</a>
|
||||
|
||||
<article class="article">
|
||||
<div class="content">
|
||||
<h3>{{ i18n "tags" }}</h3>
|
||||
<hr>
|
||||
<ul id="all-categories">
|
||||
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
|
||||
<li><a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}">{{ $name | humanize }} ({{ $taxonomy.Count }})</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user