log101-dot-dev/layouts/posts/single.html

45 lines
1.2 KiB
HTML
Raw Normal View History

2023-12-04 03:43:34 +00:00
{{ define "head" }}
{{ if .Params.featuredImg -}}
<style>.bg-img {background-image: url('{{.Params.featuredImg}}');}</style>
{{- else if .Params.images -}}
{{- range first 1 .Params.images -}}
<style>.bg-img {background-image: url('{{. | absURL}}');}</style>
{{- end -}}
{{- end -}}
{{ end }}
{{ define "header" }}
{{ partial "post/header.html" . }}
2023-12-04 03:43:34 +00:00
{{ end }}
{{ define "main" }}
{{- if (or .Params.images .Params.featuredImg) }}
<div class="bg-img"></div>
{{- end }}
<main class="site-main section-inner animated fadeIn faster">
<article class="thin">
<header class="post-header">
2023-12-07 17:35:44 +00:00
{{- with .Params.tags }}
<div class="post-tags">
2023-12-07 17:35:44 +00:00
{{- range . -}}
<span class="tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">#{{.}}</a></span>
2023-12-07 17:35:44 +00:00
{{- end }}
</div>
2023-12-07 17:35:44 +00:00
{{- end }}
2023-12-04 03:43:34 +00:00
</header>
<div class="post-content">
{{ .Content | safeHTML }}
2023-12-04 03:43:34 +00:00
</div>
{{- if .Site.Params.relatedPosts }}
{{- partial "related-posts.html" . -}}
{{- end }}
<hr class="post-end">
<a class="post-to-top-link" href="#">⮝ Başa dön</a>
2023-12-04 03:43:34 +00:00
</article>
</main>
{{ end }}
{{ define "footer" }}
{{ partialCached "footer.html" . }}
{{ end }}