Website Summary Files Commits Branches @commit @diff @stats
path: root / website / themes / reveal-hugo / layouts / partials / layout / theme.html
blob: a4f7c86efadc67932e3fb3d008f04a1d2f93b677 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!-- Theme used for presentation -->
{{- $reveal_location := $.Param "reveal_hugo.reveal_cdn" | default "reveal-js" -}}
{{- $highlight_location := $.Param "reveal_hugo.highlight_cdn" | default "highlight-js" -}}
{{- $custom_theme := $.Param "reveal_hugo.custom_theme" -}}
<link rel="stylesheet" href="{{ printf "%s/css/reset.css" $reveal_location | relURL }}">
<link rel="stylesheet" href="{{ printf "%s/css/reveal.css" $reveal_location | relURL }}">
{{- $custom_theme := $.Param "reveal_hugo.custom_theme" -}}
{{- if $custom_theme -}}
  {{- $custom_theme_options := $.Param "reveal_hugo.custom_theme_options" | default dict -}}
  {{- if $.Param "reveal_hugo.custom_theme_compile" -}}
  {{ $asset := resources.Get $custom_theme | resources.ExecuteAsTemplate "_.scss" . | toCSS $custom_theme_options | minify | fingerprint }}
  <link rel="stylesheet" href="{{ $asset.Permalink | relURL }}" id="theme">
  {{- else -}}
  <link rel="stylesheet" href="{{ $custom_theme | relURL }}" id="theme">
  {{- end -}}
{{ else -}}
  {{- $theme := $.Param "reveal_hugo.theme" | default "black" -}}
  <link rel="stylesheet" href="{{ printf "%s/css/theme/%s.css" $reveal_location $theme | relURL }}" id="theme">
{{ end -}}
{{ if $.Param "reveal_hugo.load_default_plugins" | default true -}}
  <!-- Theme used for syntax highlighting of code -->
  {{- $highlight_theme := $.Param "reveal_hugo.highlight_theme" | default "default" -}}
  <link rel="stylesheet" href="{{ printf "%s/%s.min.css" $highlight_location $highlight_theme | relURL }}">
{{- end }}
{{- $custom_css := $.Param "reveal_hugo.custom_css" -}}
{{- if $custom_css -}}
<link rel="stylesheet" href="{{ $custom_css | relURL }}" id="custom_css">
{{- end -}}