Skip to content

Commit 513033c

Browse files
committed
feat: [slides] Use embedded slides
1 parent 126c36d commit 513033c

File tree

2 files changed

+42
-37
lines changed

2 files changed

+42
-37
lines changed

layouts/partials/slides/scripts.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
progress: true,
88
history: true,
99
center: true,
10+
embedded: true,
11+
disableLayout: false,
1012
plugins: [RevealMarkdown, RevealHighlight],
1113
});
1214
</script>

layouts/slides/single.html

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,52 @@
11
{{- define "main" -}}
22
<!-- Hide header & footer until slides are ready -->
3-
<div style="display: none;">
3+
<div class="hide">
44
<div id="slide-header-footer">
5-
{{ if .Title }}
6-
<div class="header-left">{{- .Title -}}</div>
7-
{{ end }}
8-
{{ if $.Site.Copyright }}
9-
<div class="footer-left">{{ $.Site.Copyright | safeHTML }} {{ now.Year }}</div>
10-
{{ end }}
5+
{{- if .Title -}}
6+
<div class="header-left">{{ .Title }}</div>
7+
{{- end -}}
8+
{{- if site.Copyright -}}
9+
<div class="footer-left">{{ site.Copyright | safeHTML }} {{ now.Year }}</div>
10+
{{- end -}}
1111
</div>
1212
</div>
1313

14-
<div class="reveal">
15-
<div class="slides">
16-
<!-- Title slide -->
17-
{{ if .Title }}
18-
<section>
19-
<h1>{{- .Title -}}</h1>
20-
<p>
21-
{{ with .Date }}
22-
{{ .Format "2006-01-02" }}
23-
{{ end }}
24-
{{ with .Params.Author }}
25-
|
26-
{{ . }}
27-
{{ end }}
28-
</p>
29-
{{ if .Description }}
30-
<p style="font-style: italic;">
31-
{{ .Description | plainify }}
32-
</p>
33-
{{ end }}
34-
</section>
35-
{{ end }}
14+
<div class="highlight-wrapper">
15+
<div class="reveal">
16+
<div class="slides">
17+
<!-- Title slide -->
18+
{{- if .Title }}
19+
<section>
20+
<h1>{{ .Title }}</h1>
21+
{{- if or .Date .Params.Author }}
22+
<p>
23+
{{- with .Date -}}
24+
<span>{{ .Format "2006-01-02" }}</span>
25+
{{- end -}}
3626

27+
{{- with .Params.Author -}}
28+
<span>&nbsp;| {{ . }}</span>
29+
{{- end -}}
30+
</p>
31+
{{- end }}
3732

38-
<!-- Content slides -->
39-
<section data-markdown data-separator="^\n---\n$" data-separator-vertical="^\n--\n$">
40-
{{- .RawContent -}}
41-
</section>
33+
{{- with .Description }}
34+
<p class="post-description">{{ . }}</p>
35+
{{- end }}
36+
</section>
37+
{{- end }}
4238

43-
<!-- End slide -->
44-
<section>
45-
<h2>Thank you</h2>
46-
</section>
39+
40+
<!-- Content slides -->
41+
<section data-markdown data-separator="^\n---\n$" data-separator-vertical="^\n--\n$">
42+
{{ .RawContent }}
43+
</section>
44+
45+
<!-- End slide -->
46+
<section>
47+
<h2>Thank you</h2>
48+
</section>
49+
</div>
4750
</div>
4851
</div>
4952
{{- end -}}

0 commit comments

Comments
 (0)