hugo-toha/layouts/_default/single.html
Md. Emruz Hossain e2d376215a
Make home page sections dynamic and configurable (#14)
* Make home page sections dynamic and configurable

* Fix navbar issue when no section is configured + fix next-prev navigator

* Update exampleSite

* Fix next-prev navigator

* Make navbar brand URL context aware
2020-06-30 01:54:28 +06:00

66 lines
1.9 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 "navBrandURL" "/posts") }}
{{ 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" id="post-content">
{{ .Page.Content }}
</div>
<!--- Improve this page button --->
{{ if .Site.Params.GitRepo }}
<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>
{{ end }}
<!---Next and Previous Navigator -->
<hr />
{{ partial "next-prev-navigator.html" . }}
<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 src="/assets/js/single.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
{{ if .Params.math }}
{{ partial "math.html" . }}
{{ end }}
{{ end }}