Bootstrap \o/
This commit is contained in:
commit
f5391008e6
78 changed files with 5134 additions and 0 deletions
7
themes/beautifulhugo/layouts/partials/disqus.html
Normal file
7
themes/beautifulhugo/layouts/partials/disqus.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
|
||||
{{ if .Site.DisqusShortname }}
|
||||
<div class="comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
82
themes/beautifulhugo/layouts/partials/footer.html
Normal file
82
themes/beautifulhugo/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,82 @@
|
|||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<ul class="list-inline text-center footer-links">
|
||||
{{ range .Site.Data.beautifulhugo.social.social_icons }}
|
||||
{{- if isset $.Site.Author .id }}
|
||||
<li>
|
||||
<a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa {{ .icon }} fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.rss }}
|
||||
<li>
|
||||
<a href="{{ "index.xml" | absLangURL }}" title="RSS">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-rss fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<p class="credits copyright text-muted">
|
||||
{{ if .Site.Author.name }}
|
||||
{{ if .Site.Author.website }}
|
||||
<a href="{{ .Site.Author.website }}">{{ .Site.Author.name }}</a>
|
||||
{{ else }}
|
||||
{{ .Site.Author.name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
•
|
||||
{{ .Site.LastChange.Format "2006" }}
|
||||
|
||||
{{ if .Site.Title }}
|
||||
•
|
||||
<a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
<!-- Please don't remove this, keep my open source work credited :) -->
|
||||
<p class="credits theme-by text-muted">
|
||||
{{ i18n "poweredBy" . | safeHTML }}
|
||||
{{ with .Site.Params.commit }} • [<a href="{{.}}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js" integrity="sha384-/y1Nn9+QQAipbNQWU65krzJralCnuOasHncUFXGkdwntGeSvQicrYkiUBwsgUqc1" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/contrib/auto-render.min.js" integrity="sha384-dq1/gEHSxPZQ7DdrM82ID4YVol9BYyU7GbWlIwnwyPzotpoc57wDw/guX8EaYGPx" crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<script src="{{ "js/main.js" | absURL }}"></script>
|
||||
<script src="{{ "js/highlight.min.js" | absURL }}"></script>
|
||||
<script> hljs.initHighlightingOnLoad(); </script>
|
||||
<script> renderMathInElement(document.body); </script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" integrity="sha256-UplRCs9v4KXVJvVY+p+RSo5Q4ilAUXh7kpjyIP5odyc=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" integrity="sha256-PWHOlUzc96pMc8ThwRIXPn8yH4NOLu42RQ0b9SpnpFk=" crossorigin="anonymous"></script>
|
||||
<script src="{{ "js/load-photoswipe.js" | absURL }}"></script>
|
||||
<!-- Google Custom Search Engine -->
|
||||
{{ if .Site.Params.gcse }}
|
||||
<script>
|
||||
(function() {
|
||||
var cx = '{{ .Site.Params.gcse }}';
|
||||
var gcse = document.createElement('script');
|
||||
gcse.type = 'text/javascript';
|
||||
gcse.async = true;
|
||||
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(gcse, s);
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{- partial "footer_custom.html" . }}
|
4
themes/beautifulhugo/layouts/partials/footer_custom.html
Normal file
4
themes/beautifulhugo/layouts/partials/footer_custom.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </body>, put it in /layouts/footer_custom.html
|
||||
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/footer_custom.html doesn't exist.
|
||||
-->
|
52
themes/beautifulhugo/layouts/partials/head.html
Normal file
52
themes/beautifulhugo/layouts/partials/head.html
Normal file
|
@ -0,0 +1,52 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<!-- Site Title, Description, Author, and Favicon -->
|
||||
{{- with .Title | default .Site.Title }}
|
||||
<title>{{ . }}</title>
|
||||
<meta property="og:title" content="{{ . }}" />
|
||||
<meta name="twitter:title" content="{{ . | truncate 70 }}" />
|
||||
{{- end }}
|
||||
{{- with .Description | default .Params.subtitle | default .Summary }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
<meta property="og:description" content="{{ . }}">
|
||||
<meta name="twitter:description" content="{{ . | truncate 200 }}">
|
||||
{{- end }}
|
||||
<meta name="author" content="{{ .Site.Author.name }}"/>
|
||||
{{- with .Site.Params.favicon }}
|
||||
<link href='{{ . | absURL }}' rel='icon' type='image/x-icon'/>
|
||||
{{- end -}}
|
||||
<!-- Social Media Tags -->
|
||||
{{- with .Params.share_img | default .Params.image | default .Site.Params.logo }}
|
||||
<meta property="og:image" content="{{ . | absURL }}" />
|
||||
<meta name="twitter:image" content="{{ . | absURL }}" />
|
||||
{{- end }}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{{- with .Site.Author.twitter }}
|
||||
<meta name="twitter:site" content="@{{ . }}" />
|
||||
<meta name="twitter:creator" content="@{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with .Site.Params.fb_app_id }}
|
||||
<meta property="fb:app_id" content="{{ . }}" />
|
||||
{{- end }}
|
||||
<meta property="og:url" content="{{ .URL | absLangURL }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
<!-- Hugo Version number -->
|
||||
{{ .Hugo.Generator -}}
|
||||
<!-- Links and stylesheets -->
|
||||
<link rel="canonical" href="{{ .URL | absLangURL }}" />
|
||||
<link rel="alternate" href="{{ "index.xml" | absLangURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css" integrity="sha384-wITovz90syo1dJWVh32uuETPVEtGigN07tkttEqPv+uR2SE/mbQcG7ATL28aI9H0" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
|
||||
<link rel="stylesheet" href="{{ "css/pygment_highlights.css" | absURL }}" />
|
||||
<link rel="stylesheet" href="{{ "css/highlight.min.css" | absURL }}" />
|
||||
{{- partial "head_custom.html" . }}
|
||||
{{- partial "load-photoswipe-theme.html" . }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
</head>
|
4
themes/beautifulhugo/layouts/partials/head_custom.html
Normal file
4
themes/beautifulhugo/layouts/partials/head_custom.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </head>, put it in /layouts/head_custom.html
|
||||
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/head_custom.html doesn't exist.
|
||||
-->
|
70
themes/beautifulhugo/layouts/partials/header.html
Normal file
70
themes/beautifulhugo/layouts/partials/header.html
Normal file
|
@ -0,0 +1,70 @@
|
|||
{{ if .IsHome }}
|
||||
{{ $.Scratch.Set "title" .Site.Title }}
|
||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "title" .Title }}
|
||||
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||
{{ end }}
|
||||
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||
|
||||
{{ if or $bigimg ($.Scratch.Get "title") }}
|
||||
{{ if $bigimg }}
|
||||
<div id="header-big-imgs" data-num-img={{len $bigimg}} {{range $i, $img := $bigimg}}data-img-src-{{add $i 1}}="{{$img.src | absURL }}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div>
|
||||
{{ end }}
|
||||
|
||||
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
||||
{{ if $bigimg }}
|
||||
<div class="intro-header big-img">
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<hr class="small">
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="img-desc" style="display: inline;"></span>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="intro-header no-img">
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<hr class="small">
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ else }}
|
||||
<div class="intro-header"></div>
|
||||
{{ end }}
|
|
@ -0,0 +1,59 @@
|
|||
<!--
|
||||
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
|
||||
-->
|
||||
|
||||
<!-- Photoswipe css/js libraries -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.css" integrity="sha256-sCl5PUOGMLfFYctzDW3MtRib0ctyUvI9Qsmq2wXOeBY=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/default-skin/default-skin.min.css" integrity="sha256-BFeI1V+Vh1Rk37wswuOYn5lsTcaU96hGaI7OUVCLjPc=" crossorigin="anonymous" />
|
||||
<!-- these files are loaded in the theme footer
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" integrity="sha256-UplRCs9v4KXVJvVY+p+RSo5Q4ilAUXh7kpjyIP5odyc=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" integrity="sha256-PWHOlUzc96pMc8ThwRIXPn8yH4NOLu42RQ0b9SpnpFk=" crossorigin="anonymous"></script>
|
||||
-->
|
||||
|
||||
<!-- Root element of PhotoSwipe. Must have class pswp. -->
|
||||
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<!-- Background of PhotoSwipe.
|
||||
It's a separate element, as animating opacity is faster than rgba(). -->
|
||||
<div class="pswp__bg"></div>
|
||||
<!-- Slides wrapper with overflow:hidden. -->
|
||||
<div class="pswp__scroll-wrap">
|
||||
<!-- Container that holds slides.
|
||||
PhotoSwipe keeps only 3 of them in DOM to save memory.
|
||||
Don't modify these 3 pswp__item elements, data is added later on. -->
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
<div class="pswp__top-bar">
|
||||
<!-- Controls are self-explanatory. Order can be changed. -->
|
||||
<div class="pswp__counter"></div>
|
||||
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
|
||||
<button class="pswp__button pswp__button--share" title="Share"></button>
|
||||
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
|
||||
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
|
||||
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
|
||||
<!-- element will get class pswp__preloader--active when preloader is running -->
|
||||
<div class="pswp__preloader">
|
||||
<div class="pswp__preloader__icn">
|
||||
<div class="pswp__preloader__cut">
|
||||
<div class="pswp__preloader__donut"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
|
||||
</button>
|
||||
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
|
||||
</button>
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
96
themes/beautifulhugo/layouts/partials/nav.html
Normal file
96
themes/beautifulhugo/layouts/partials/nav.html
Normal file
|
@ -0,0 +1,96 @@
|
|||
<nav class="navbar navbar-default navbar-fixed-top navbar-custom">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">
|
||||
<span class="sr-only">{{ i18n "toggleNavigation" }}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="main-navbar">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ range .Site.Menus.main.ByWeight }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="navlinks-container">
|
||||
<a class="navlinks-parent" href="javascript:void(0)">{{ .Name }}</a>
|
||||
<div class="navlinks-children">
|
||||
{{ range .Children }}
|
||||
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a title="{{ .Name }}" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
{{ if ge (len .Site.Languages) 3 }}
|
||||
<li class="navlinks-container">
|
||||
<a class="navlinks-parent" href="javascript:void(0)">{{ i18n "languageSwitcherLabel" }}</a>
|
||||
<div class="navlinks-children">
|
||||
{{ range .Site.Languages }}
|
||||
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
{{ range .Site.Languages }}
|
||||
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Site.Params "gcse" }}
|
||||
<li>
|
||||
<a href="#modalSearch" data-toggle="modal" data-target="#modalSearch" style="outline: none;">
|
||||
<span class="hidden-sm hidden-md hidden-lg">{{ i18n "gcseLabelShort" }}</span> <span id="searchGlyph" class="glyphicon glyphicon-search"></span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="avatar-container">
|
||||
<div class="avatar-img-border">
|
||||
{{ if isset .Site.Params "logo" }}
|
||||
<a title="{{ .Site.Title }}" href="{{ "" | absLangURL }}">
|
||||
<img class="avatar-img" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}" />
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Search Modal -->
|
||||
{{ if isset .Site.Params "gcse" }}
|
||||
<div id="modalSearch" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">{{ i18n "gcseLabelLong" . }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<gcse:search></gcse:search>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ i18n "gcseClose" }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
11
themes/beautifulhugo/layouts/partials/post_meta.html
Normal file
11
themes/beautifulhugo/layouts/partials/post_meta.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<span class="post-meta">
|
||||
{{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
|
||||
{{ if .IsTranslated -}}
|
||||
{{- $sortedTranslations := sort .Translations "Site.Language.Weight" -}}
|
||||
{{- $links := apply $sortedTranslations "partial" "translation_link.html" "." -}}
|
||||
{{- $cleanLinks := apply $links "chomp" "." -}}
|
||||
{{- $linksOutput := delimit $cleanLinks (i18n "translationsSeparator") -}}
|
||||
• {{ i18n "translationsLabel" }}{{ $linksOutput }}
|
||||
{{- end }}
|
||||
</span>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<a href="{{ .Permalink }}" lang="{{ .Lang }}">{{ default .Lang .Site.Language.LanguageName }}</a>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue