Skip to content

Commit

Permalink
fix: [slides] Add header section to slides layout
Browse files Browse the repository at this point in the history
Add header section with title, date, author and description to slides
layout.
  • Loading branch information
manid2 committed Dec 23, 2023
1 parent 40c7bb2 commit 50587f5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions layouts/slides/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@
</div>
</div>

<header class="post-header">
{{- if .Title }}
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
{{- end }}

{{- if or (.Params.Date) (.Params.Author) }}
<address class="post-meta">
{{- with .Params.Date }}
<time pubdate datetime="{{ .Format "2006-01-02 15:04:05 IST" }}">
Published on
{{ .Format "2006-01-02 15:04:05 IST" }}
</time>
{{- end }}

{{- with .Params.Author }}
<span>by {{ . }}</span>
{{- end }}

{{- with .Params.LastMod }}
<time pubdate datetime="{{ .Format "2006-01-02 15:04:05 IST" }}"> last modified {{ .Format "2006-01-02 15:04:05 IST" }}. </time>
{{- end }}
</address>
{{- end }}

{{- with .Params.Description }}
<p class="post-description">{{ . }}</p>
{{- end }}
</header>

<div class="highlight-wrapper">
<div class="reveal">
<div class="slides">
Expand Down

0 comments on commit 50587f5

Please sign in to comment.