planblog/layouts/_default/single.html
2015-07-18 00:20:39 +09:00

75 lines
2.6 KiB
HTML

{{ partial "header.html" . }}
{{ $baseurl := .Site.BaseURL }}
<article>
<header>
<h1 class="text-primary">{{ .Title }}</h1>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ .Date.Format "Jan 2, 2006" }}
</time>
</div>
<div class="pull-right">
{{ range .Params.tags }}
<span class="post-tag small"><a href="{{ $baseurl }}/tags/{{ . | urlize }}">#{{ . }}</a></span>
{{ end }}
</div>
</div>
</header>
<section>
{{ .Content }}
</section>
<footer>
<section class="author-info row">
<div class="author-avatar col-md-2">
{{ with .Site.Params.avatar }}
<img alt="Author Avatar" src="{{ . }}" />
{{ end }}
</div>
<div class="author-meta col-md-6">
{{ with .Site.Params.author }}
<h1 class="author-name text-primary">{{ . }}</h1>
{{ end }}
{{ with .Site.Params.bio }}
<div class="author-bio">{{ . }}</div>
{{ end }}
</div>
{{ with .Site.Params.contact }}
<div class="author-contact col-md-4">
<a href="{{ . }}">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
&nbsp;Contact me
</a>
</div>
{{ end }}
</section>
<ul class="pager">
{{ if .Next }}
<li class="previous"><a href="{{ .Next.Permalink }}"><span aria-hidden="true">&larr;</span> Older</a></li>
{{ else }}
<li class="previous disabled"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
{{ end }}
{{ if .Prev }}
<li class="next"><a href="{{ .Prev.Permalink }}">Newer <span aria-hidden="true">&rarr;</span></a></li>
{{ else }}
<li class="next disabled"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
{{ end }}
</ul>
{{ with .Site.Params.disqus }}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ . }}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{{ end }}
</footer>
</article>
{{ partial "footer.html" . }}