Skip to content

Commit 50587f5

Browse files
committed
fix: [slides] Add header section to slides layout
Add header section with title, date, author and description to slides layout.
1 parent 40c7bb2 commit 50587f5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

layouts/slides/single.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,35 @@
1111
</div>
1212
</div>
1313

14+
<header class="post-header">
15+
{{- if .Title }}
16+
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
17+
{{- end }}
18+
19+
{{- if or (.Params.Date) (.Params.Author) }}
20+
<address class="post-meta">
21+
{{- with .Params.Date }}
22+
<time pubdate datetime="{{ .Format "2006-01-02 15:04:05 IST" }}">
23+
Published on
24+
{{ .Format "2006-01-02 15:04:05 IST" }}
25+
</time>
26+
{{- end }}
27+
28+
{{- with .Params.Author }}
29+
<span>by {{ . }}</span>
30+
{{- end }}
31+
32+
{{- with .Params.LastMod }}
33+
<time pubdate datetime="{{ .Format "2006-01-02 15:04:05 IST" }}"> last modified {{ .Format "2006-01-02 15:04:05 IST" }}. </time>
34+
{{- end }}
35+
</address>
36+
{{- end }}
37+
38+
{{- with .Params.Description }}
39+
<p class="post-description">{{ . }}</p>
40+
{{- end }}
41+
</header>
42+
1443
<div class="highlight-wrapper">
1544
<div class="reveal">
1645
<div class="slides">

0 commit comments

Comments
 (0)