Hugo Bilberry First commit to gitea@cowbay.org

This commit is contained in:
2018-11-09 16:23:58 +08:00
commit 16f4228909
1090 changed files with 399555 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
{{ define "main" }}
<div class="content">
<div class="article-wrapper u-cf single">
<a class="bubble" href="{{ "/" | relLangURL}}">
<i class="fa fa-fw fa-exclamation-triangle"></i>
</a>
<article class="error404 article">
<div class="content">
<h3>WOAH BUDDY!</h3>
<p></p>
<p>This is definitly not the page you're looking for...</p>
<p><strong>An Error 404 occured.</strong> That means the page is not available. </p>
<p>Please select a category at the bottom or change over to the <a href="{{ "/" | relLangURL}}"> HOMEPAGE</a>.</p>
</div>
</article>
</div>
</div>
{{ end }}

View File

@@ -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 }}

View 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>

View File

@@ -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 }}

View 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 }}

View 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 }}

View 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 }}

View File

@@ -0,0 +1,20 @@
{{ define "main" }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "ne" "page" | intersect (where .Site.RegularPages "Params.excludefromindex" "==" nil)) (index .Site.Params "paginate" | default 7) }}
{{ if .Site.Params.pinnedPost }}
{{ if (and .Site.Params.pinOnlyToFirstPage (ne $paginator.PageNumber 1)) }}
{{/* Do nothing if the pinOnlyToFirstPage flag is set and we're not on page 1. */}}
{{else}}
{{ range first 1 (where .Data.Pages "URL" .Site.Params.pinnedPost) }}
{{ partial "article-wrapper" . }}
{{end}}
{{end}}
{{end}}
{{ range $paginator.Pages }}
{{ partial "article-wrapper" . }}
{{ end }}
{{ partial "paginator" . }}
{{ end }}

View File

@@ -0,0 +1,36 @@
{{- $.Scratch.Add "index" slice -}}
{{- range $name, $taxonomy := .Site.Taxonomies.categories -}}
{{- $.Scratch.Add "index" (dict "url" (print "/categories/" $name | absURL) "title" ($name | humanize) "iconClass" "fa-folder" "type" "category" "objectID" (print "/categories/" $name | absURL) ) -}}
{{- end -}}
{{- range $name, $taxonomy := .Site.Taxonomies.author -}}
{{- $.Scratch.Add "index" (dict "url" (print "/author/" $name | absURL) "title" ($name | humanize) "iconClass" "fa-user" "type" "author" "objectID" (print "/author/" $name | absURL) ) -}}
{{- end -}}
{{- range $name, $taxonomy := .Site.Taxonomies.tags -}}
{{- $.Scratch.Add "index" (dict "url" (print "/tags/" $name | absURL) "title" ($name | humanize) "iconClass" "fa-tag" "type" "tag" "objectID" (print "/tags/" $name | absURL) ) -}}
{{- end -}}
{{- range where .Pages "Type" "not in" (slice "page" "json") -}}
{{- range .Translations -}}
{{- .Scratch.Set "iconClass" "fa-pencil" -}}
{{- if eq .Type "quote" -}}
{{- .Scratch.Set "iconClass" "fa-quote-right" -}}
{{- else if eq .Type "link" -}}
{{- .Scratch.Set "iconClass" "fa-link" -}}
{{- else if eq .Type "video" -}}
{{- .Scratch.Set "iconClass" "fa-video-camera" -}}
{{- else if or (eq .Type "gallery") (eq .Type "picture") -}}
{{- .Scratch.Set "iconClass" "fa-camera" -}}
{{- else if eq .Type "audio" -}}
{{- .Scratch.Set "iconClass" "fa-music" -}}
{{- end -}}
{{- $.Scratch.Add "index" (dict "url" .Permalink "title" .Title "tags" .Params.tags "categories" .Params.categories "author" .Params.author "type" .Type "language" .Lang "iconClass" (.Scratch.Get "iconClass") "objectID" (.Permalink | md5) ) -}}
{{- end -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}

View File

@@ -0,0 +1,12 @@
<html>
<head>
<meta http-equiv="refresh" content="0; url={{ .Params.link }}" />
<title>Redirecting...</title>
</head>
<body>
<p><a href="{{ .Params.link }}">Click here if you're not redirected.</a></p>
<script>
window.location = {{ .Params.link }}
</script>
</body>
</html>

View File

@@ -0,0 +1,42 @@
<script>
var client = algoliasearch({{ .Site.Params.algolia_appId }}, {{ .Site.Params.algolia_apiKey}});
var index = client.initIndex({{ .Site.Params.algolia_indexName }});
$('#search').autocomplete({ hint: false, autoselect: true, debug: false },
[
{
{{ if .Site.Params.algolia_currentLanguageOnly }}
source: $.fn.autocomplete.sources.hits(index, { hitsPerPage: 5, filters: 'language: {{ .Lang }}' }),
{{ else }}
source: $.fn.autocomplete.sources.hits(index, { hitsPerPage: 10 }),
{{ end }}
displayKey: function(suggestion) {
return suggestion.title || suggestion.author
},
templates: {
suggestion: function(suggestion) {
return "<span class='entry " + suggestion.type + "'>"
+ "<span class='title'>" + suggestion.title + "</span>"
+ "<span class='fa fa-fw " + suggestion.iconClass + "'></span>"
+ "</span>"
;
},
empty: function() {
return "<span class='empty'>{{ i18n "noSearchResults" }}</span>"
},
footer: function() {
return '<div class="branding">Powered by <img src="{{ "dist/algolia-logo-light.svg" | absURL }}" /></div>'
}
},
}
])
.on('autocomplete:selected', function(event, suggestion, dataset) {
window.location = (suggestion.url);
})
.keypress(function (event, suggestion) {
if (event.which == 13) {
window.location = (suggestion.url);
}
});
</script>

View File

@@ -0,0 +1,28 @@
{{ with .Params.tags }}
<div class="footer">
{{ else }}
<div class="footer no-tags">
{{ end }}
{{ with .Params.tags }}
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
{{ range . }}
<a href="{{ (print "/tags/" (. | urlize)) | relLangURL }}">{{ . }}</a>
{{ end }}
</div>
</div>
{{ end }}
{{ if .IsTranslated }}
<div class="languages">
<i class="fa fa-language"></i>
<div class="links">
{{ range .Translations }}
<a href="{{ .Permalink }}">{{ .Lang }}</a>
{{ end }}
</div>
</div>
{{ end }}
</div>

View File

@@ -0,0 +1,9 @@
{{ with . }}
<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}}

View File

@@ -0,0 +1,9 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-pencil" }}"></i>
</a>
<article class="default article">
{{ partial "featured-image" . }}
{{ partial "default-content" . }}
{{ partial "article-footer" . }}
</article>

View File

@@ -0,0 +1,31 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-music" }}"></i>
</a>
<article class="audio">
{{ partial "featured-image" . }}
{{ with .Params.spotify }}
<div class="responsive-audio spotify">
<iframe src="https://open.spotify.com/embed?uri={{ . }}" width="300" height="80" frameborder="0" allowtransparency="true"></iframe>
</div>
{{ end }}
{{ with .Params.soundcloud }}
<div class="responsive-audio soundcloud">
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url={{ . }}&amp;color=%23ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true"></iframe>
</div>
{{ end }}
{{ with .Params.tunein }}
<div class="responsive-audio tunein">
<iframe src="https://tunein.com/embed/player/{{ . }}/" style="width:100%; height:100px;" scrolling="no" frameborder="no"></iframe>
</div>
{{ end }}
{{ with .Params.mixcloud }}
<div class="responsive-audio mixcloud">
<iframe width="100%" height="120" src="https://www.mixcloud.com/widget/iframe/?hide_cover=1&feed=/{{ . }}/" frameborder="0" ></iframe>
</div>
{{ end }}
{{ partial "default-content" . }}
{{ partial "article-footer" . }}
</article>

View File

@@ -0,0 +1,9 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-code" }}"></i>
</a>
<article class="default article">
{{ partial "featured-image" . }}
{{ partial "default-content" . }}
{{ partial "article-footer" . }}
</article>

View File

@@ -0,0 +1,34 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-camera" }}"></i>
</a>
<article class="gallery">
{{ if and (isset .Params "gallery") (ne .Params.gallery "") }}
<div class="flexslider">
<ul class="slides">
{{ range .Params.gallery }}
<li><img src="{{ . | relURL }}" /></li>
{{ end }}
</ul>
</div>
{{ else if ne .Params.imageSlider false }}
<div class="flexslider">
<ul class="slides">
{{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }}
{{ range .Resources.ByType "image" }}
<li><img src="{{ (.Fill "700x350 q95").RelPermalink }}" /></li>
{{ end }}
{{ else }}
{{ range .Resources.ByType "image" }}
<li><img src="{{ .RelPermalink }}" /></li>
{{ end }}
{{ end }}
</ul>
</div>
{{ else}}
{{ partial "featured-image" . }}
{{ end }}
{{ partial "default-content" . }}
{{ partial "article-footer" . }}
</article>

View File

@@ -0,0 +1,13 @@
<a class="bubble" href="{{ .Params.link }}" target="_blank">
<i class="fa fa-fw {{or .Params.icon "fa-link" }}"></i>
</a>
<article class="link">
{{ with .Params.featuredImage }}
<img src="{{ . }}" class="featured-image" alt="">
{{ end }}
<a href="{{ .Params.link }}" target="_blank">
<h4>{{ .Title }}</h4>
{{ .Content }}
</a>
</article>

View File

@@ -0,0 +1,14 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-file" }}"></i>
</a>
<article class="default article">
{{ partial "featured-image" . }}
{{ partial "default-content" . }}
{{ with .Params.link }}
<script>window.location = {{ . | relURL }}</script>
{{ end }}
{{ partial "article-footer" . }}
</article>

View File

@@ -0,0 +1,9 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-camera" }}"></i>
</a>
<article class="picture">
{{ partial "featured-image" . }}
{{ partial "default-content" . }}
{{ partial "article-footer" . }}
</article>

View File

@@ -0,0 +1,13 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-quote-right" }}"></i>
</a>
<article class="quote">
{{ with .Params.featuredImage }}
<img src="{{ . }}" class="featured-image" alt="">
{{ end }}
<blockquote>
{{ .Content }}
<cite><a href="{{ (print "/author/" .Params.author | urlize) | relLangURL }}">{{ .Params.author }}</a></cite>
</blockquote>
</article>

View File

@@ -0,0 +1,22 @@
<a class="bubble" href="{{ .URL }}">
<i class="fa fa-fw {{or .Params.icon "fa-video-camera" }}"></i>
</a>
<article class="video">
{{ partial "featured-image" . }}
{{ with .Params.youtube }}
<div class="responsive-video youtube">
<iframe src="https://www.youtube-nocookie.com/embed/{{ . }}?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
{{ end }}
{{ with .Params.vimeo }}
<div class="responsive-video vimeo">
<iframe src="https://player.vimeo.com/video/{{ . }}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
{{ end }}
{{ partial "default-content.html" . }}
{{ partial "article-footer" . }}
</article>

View File

@@ -0,0 +1,38 @@
<div class="content">
<h3><a href="{{ .URL }}">{{ .Title }}</a></h3>
<div class="meta">
{{ if ( .Params.showDate | default true ) }}
{{ if (.Site.Params.enableMomentJs | default true ) }}
<span class="date moment">{{ .PublishDate.Format "2006-01-02" }}</span>
{{ else }}
<span class="date">{{ .PublishDate.Format (.Site.Params.DateFormat | default "2006-01-02") }}</span>
{{ end }}
{{ end }}
{{ if (.Site.Params.showReadingTime | default false ) }}
<span class="readingTime">{{ i18n "readingTime" .ReadingTime }}</span>
{{ end }}
{{ with .Params.categories }}
<span class="categories">
{{ range . }}
<a href="{{ (print "/categories/" ( . | urlize)) | relLangURL }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
{{ with .Params.author }}
<span class="author"><a href="{{ (print "/author/" (. | urlize)) | relLangURL }}">{{ . }}</a></span>
{{ end }}
</div>
{{ if or (.Scratch.Get "singlePage") (.Params.noSummary) }}
{{ .Content }}
{{ else }}
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .URL }}" class="more">{{ i18n "continueReading" }}</a>
{{ end }}
{{ end }}
</div>

View File

@@ -0,0 +1,17 @@
{{ if .Resources.GetMatch "featuredImage.*" }}
<div class="featured-image">
<a href="{{ .URL }}">
{{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }}
<img src="{{ ((.Resources.GetMatch "featuredImage.*").Fill "700x350 q95").RelPermalink }}" alt="">
{{ else }}
<img src="{{ (.Resources.GetMatch "featuredImage.*").RelPermalink }}" alt="">
{{ end }}
</a>
</div>
{{ else if and (isset .Params "featuredimage") (ne .Params.featuredImage "") }}
<div class="featured-image">
<a href="{{ .URL }}">
<img src="{{ .Params.featuredImage | relURL }}" alt="">
</a>
</div>
{{ end }}

View File

@@ -0,0 +1,111 @@
{{ if .Site.Params.showFooter | default true }}
<footer>
<div class="container">
{{ if gt (.Site.Params.amountLatestPostsInFooter | default 7) 0 }}
<div class="recent-posts">
<strong>{{ i18n "latestPosts" }}</strong>
<ul>
{{ range where (where (first (.Site.Params.amountLatestPostsInFooter | default 7) .Site.Pages.ByPublishDate.Reverse) ".Kind" "page") ".Type" "ne" "page" }}
<li>
<a href="{{ .URL }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ if and .Site.Taxonomies.categories (gt ( .Site.Params.amountCategoriesInFooter | default 7 ) 0 ) }}
<div class="categories">
<a href="{{ "/categories/" | relLangURL }}"><strong>{{ i18n "categories" }}</strong></a>
<ul>
{{ range $order, $taxonomy := (first ( .Site.Params.amountCategoriesInFooter | default 7 ) .Site.Taxonomies.categories.ByCount) }}
<li>
<a href="{{ (print "/categories/" ($taxonomy.Name | urlize)) | relLangURL }}">{{ $taxonomy.Name | humanize }} ({{ $taxonomy.Count }})</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
<div class="right">
{{ if .Site.Params.showSocialMedia | default true }}
<div class="external-profiles">
<strong>{{ i18n "socialMedia" }}</strong>
{{ with .Site.Params.facebook }}
<a href="{{ . }}" target="_blank"><i class="fa fa-facebook-adblock-proof"></i></a>
{{ end }}
{{ with .Site.Params.twitter }}
<a href="{{ . }}" target="_blank"><i class="fa fa-twitter-adblock-proof"></i></a>
{{ end }}
{{ with .Site.Params.googleplus }}
<a href="{{ . }}" target="_blank"><i class="fa fa-google-plus-official-adblock-proof"></i></a>
{{ end }}
{{ with .Site.Params.xing }}
<a href="{{ . }}" target="_blank"><i class="fa fa-xing"></i></a>
{{ end }}
{{ with .Site.Params.pinterest }}
<a href="{{ . }}" target="_blank"><i class="fa fa-pinterest"></i></a>
{{ end }}
{{ with .Site.Params.instagram }}
<a href="{{ . }}" target="_blank"><i class="fa fa-instagram"></i></a>
{{ end }}
{{ with .Site.Params.tumblr }}
<a href="{{ . }}" target="_blank"><i class="fa fa-tumblr"></i></a>
{{ end }}
{{ with .Site.Params.youtube }}
<a href="{{ . }}" target="_blank"><i class="fa fa-youtube-adblock-proof"></i></a>
{{ end }}
{{ with .Site.Params.vimeo }}
<a href="{{ . }}" target="_blank"><i class="fa fa-vimeo"></i></a>
{{ end }}
{{ with .Site.Params.github }}
<a href="{{ . }}" target="_blank"><i class="fa fa-github"></i></a>
{{ end }}
{{ with .Site.Params.linkedin }}
<a href="{{ . }}" target="_blank"><i class="fa fa-linkedin"></i></a>
{{ end }}
</div>
{{ end }}
{{ if and (.Site.Params.showFooterLanguageChooser | default true) (gt .Site.Languages 1) }}
{{- $.Scratch.Set "language" .Language -}}
<div class="languages">
<strong>{{ i18n "otherLanguages" }}</strong>
{{ range .Site.Languages }}
{{ if eq ($.Scratch.Get "language") . }}
<a href="{{ . | relURL }}" class="active">{{ . }}</a>
{{ else }}
<a href="{{ . | relURL }}">{{ . }}</a>
{{ end }}
{{ end }}
</div>
{{ end }}
</div>
</div>
</footer>
{{ end }}
<div class="credits">
<div class="container">
<div class="copyright">
<a href="{{ .Site.Params.copyrightUrl | default "https://github.com/Lednerb" }}" target="_blank">
&copy;
{{ if .Site.Params.copyrightUseCurrentYear }}
{{ now.Year }}
{{ else }}
{{ .Site.Params.copyrightYearOverride | default 2018 }}
{{ end }}
{{ .Site.Params.copyrightBy | default "by Lednerb" }}
</a>
{{ with .OutputFormats.Get "rss" -}}
-
<a href="{{ .Permalink }}">{{ .Name }}</a>
{{- end }}
</div>
<div class="author">
<a href="{{ .Site.Params.creditsUrl | default "https://github.com/Lednerb/bilberry-hugo-theme" }}" target="_blank">{{ .Site.Params.creditsText | default "Bilberry Hugo Theme" }}</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
<header>
<div class="container">
<div class="logo">
<a href="{{ .Site.BaseURL | relLangURL }}" class="logo">
{{ if and (isset .Site.Params "customimage") (ne .Site.Params.customImage "") }}
<img src="{{ .Site.Params.customImage | relURL }}" alt="">
{{ else }}
<img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatarEMail }}?d=mm&size=200" alt="">
{{ end }}
<span class="overlay"><i class="fa {{ .Site.Params.overlayIcon | default "fa-home" }}"></i></span>
</a>
</div>
<div class="titles">
<h3 class="title"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title | default "My cool new blog" }}</a></h3>
{{ with .Site.Params.Subtitle }}
<span class="subtitle">{{ . }}</span>
{{ end }}
</div>
{{ if and (gt .Site.Languages 1) (.Site.Params.showHeaderLanguageChooser | default true) }}
{{- $.Scratch.Set "language" .Language -}}
<div class="languages">
{{ range .Site.Languages }}
{{ if eq ($.Scratch.Get "language") . }}
<a href="{{ . | relURL }}" class="active">{{ . }}</a>
{{ else }}
<a href="{{ . | relURL }}">{{ . }}</a>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ if .Site.Params.permanentTopNav }}
<div class="toggler permanentTopNav">
{{ else }}
<div class="toggler">
{{ end }}
<i class="fa fa-bars" aria-hidden="true"></i>
</div>
</div>
</header>

View File

@@ -0,0 +1,8 @@
<!-- Include MathJax library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>

View File

@@ -0,0 +1,11 @@
{{ if ne .Paginator.TotalPages 0 }}
<div class="paginator">
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}" class="older"><i class="fa fa-angle-double-left"></i> {{ i18n "olderPosts" }}</a>
{{ end }}
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}" class="newer">{{ i18n "newerPosts" }} <i class="fa fa-angle-double-right"></i></a>
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,26 @@
{{ if eq .Site.Params.permanentTopNav true}}
<nav class="permanentTopNav">
{{ else }}
<nav>
{{ end }}
<div class="container">
<ul class="topnav">
{{ range where (where .Site.Pages.ByWeight ".Type" "page") ".IsPage" true }}
{{ if .Params.excludeFromTopNav }}
{{/* Do nothing */}}
{{ else if and (isset .Params "link") (ne .Params.link "") }}
<li><a href="{{ .Params.link | relURL }}" target="{{ .Params.target }}">{{ .Title }}</a></li>
{{ else }}
<li><a href="{{ .URL }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
{{ if and (isset .Site.Params "algolia_search") (eq .Site.Params.algolia_search true) }}
<div id="search-box" class="search">
<i class="fa fa-search"></i>
<input id="search" type="text" placeholder="{{ i18n "search" }}">
</div>
{{ end }}
</div>
</nav>

View File

@@ -0,0 +1,31 @@
{{ with .Params.twitter }}
<meta name="twitter:card" content="{{- .card -}}">
<meta name="twitter:site" content="{{- .site -}}">
{{ if ne .card "app" -}}
<meta name="twitter:title" content="{{- .title -}}">
<meta name="twitter:image" content="{{- .image -}}">
{{ with .image_alt -}}<meta name="twitter:image:alt" content="{{- . -}}">{{- end }}
{{- end }}
{{ with .creator -}}<meta name="twitter:creator" content="{{- . -}}">{{- end }}
{{- if eq .card "app" }}
{{ with .app_country }}<meta name="twitter:app:country" content="{{- . -}}">{{ end }}
{{ with .app_name_iphone }}<meta name="twitter:app:name:iphone" content="{{- . -}}">{{ end }}
{{ with .app_id_iphone }}<meta name="twitter:app:id:iphone" content="{{- . -}}">{{ end }}
{{ with .app_url_iphone }}<meta name="twitter:app:url:iphone" content="{{- . -}}">{{ end }}
{{ with .app_name_ipad }}<meta name="twitter:app:name:ipad" content="{{- . -}}">{{ end }}
{{ with .app_id_ipad }}<meta name="twitter:app:id:ipad" content="{{- . -}}">{{ end }}
{{ with .app_url_ipad }}<meta name="twitter:app:url:ipad" content="{{- . -}}">{{ end }}
{{ with .app_name_googleplay }}<meta name="twitter:app:name:googleplay" content="{{- . -}}">{{ end }}
{{ with .app_id_googleplay }}<meta name="twitter:app:id:googleplay" content="{{- . -}}">{{ end }}
{{ with .app_url_googleplay }}<meta name="twitter:app:url:googleplay" content="{{- . -}}">{{ end }}
{{- end }}
{{- if eq .card "player" }}
{{ with .player }}<meta name="twitter:player" content="{{- . -}}">{{ end }}
{{ with .player_width }}<meta name="twitter:player:width" content="{{- . -}}">{{ end }}
{{ with .player_height }}<meta name="twitter:player:height" content="{{- . -}}">{{ end }}
{{ with .player_stream }}<meta name="twitter:player:stream" content="{{- . -}}">{{ end }}
{{ with .player_stream_content_type }}<meta name="twitter:player:stream:content_type" content="{{- . -}}">{{ end }}
{{- end }}
{{ end }}