Hugo Bilberry First commit to gitea@cowbay.org
This commit is contained in:
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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}}
|
||||
@@ -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>
|
||||
@@ -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={{ . }}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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 }}
|
||||
111
themes/bilberry-hugo-theme/layouts/partials/footer.html
Normal file
111
themes/bilberry-hugo-theme/layouts/partials/footer.html
Normal 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">
|
||||
©
|
||||
{{ 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>
|
||||
42
themes/bilberry-hugo-theme/layouts/partials/header.html
Normal file
42
themes/bilberry-hugo-theme/layouts/partials/header.html
Normal 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>
|
||||
8
themes/bilberry-hugo-theme/layouts/partials/mathjax.html
Normal file
8
themes/bilberry-hugo-theme/layouts/partials/mathjax.html
Normal 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>
|
||||
11
themes/bilberry-hugo-theme/layouts/partials/paginator.html
Normal file
11
themes/bilberry-hugo-theme/layouts/partials/paginator.html
Normal 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 }}
|
||||
26
themes/bilberry-hugo-theme/layouts/partials/topnav.html
Normal file
26
themes/bilberry-hugo-theme/layouts/partials/topnav.html
Normal 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>
|
||||
@@ -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 }}
|
||||
Reference in New Issue
Block a user