hugo-toha/layouts/_default/single.html
2020-06-14 02:46:22 +06:00

87 lines
2.6 KiB
HTML

{{ define "header" }}
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/atom-one-dark.min.css"
/>
<link rel="stylesheet" href="/assets/css/single.css" />
{{ end }}
{{ define "navbar" }}
{{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" false) }}
{{ end }}
{{ define "content" }}
<div class="container p-0 read-area">
<!--Hero Area-->
<div class="hero-area col-sm-12" style='background-image: url({{ partial "helpers/get-hero.html" . }});'>
</div>
<!--Content Start-->
<div class="page-content">
<div class="author-profile ml-auto align-self-lg-center">
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}'/>
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
<p>{{ .Page.Date.Format "January 2, 2006" }}</p>
</div>
<div class="title">
<h1>{{ .Page.Title }}</h1>
</div>
<div class="post-content">
{{ .Page.Content }}
</div>
<!--- Improve this page button --->
<div class="btn-improve-page">
<a href="{{ .Site.Params.GitRepo }}/edit/master/content/{{ .File.Path }}">
<i class="fas fa-code-branch"></i>
Improve This Page
</a>
</div>
<!---Next and Previous Navigator -->
<hr />
<div class="row next-prev-navigator">
{{ $currentPage := . }}
{{ range .Site.RegularPages.ByDate }}
{{ if eq .RelPermalink $currentPage.RelPermalink }}
{{ if .Next }}
<div class="col-md-6 previous-article">
<a href="{{.Next.RelPermalink}}" class="btn btn-outline-info">
<span><i class="fas fa-chevron-circle-left"></i> Prev</span>
<br />
<span>{{ .Next.Title }}</span>
</a>
</div>
{{ end }}
{{ if .Prev }}
<div class="{{ if .Next }}col-md-6{{ else }}col-md-12{{ end }} next-article">
<a href="{{ .Prev.RelPermalink }}" class="btn btn-outline-info">
<span>Next <i class="fas fa-chevron-circle-right"></i></span>
<br />
<span>{{ .Prev.Title }}</span>
</a>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
<hr />
<!-- Add Disqus forum -->
{{ if .Site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ end }}
</div>
{{ end }}
{{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
{{ if .Params.math }}
{{ partial "math.html" . }}
{{ end }}
{{ end }}