Website Summary Files Commits Branches @commit @diff @stats
path: root / layouts / partials / layout / theme.html
diff options
context:
space:
mode:
1 files changed, 28 insertions, 0 deletions
-rw-r--r--layouts/partials/layout/theme.html28
diff --git a/layouts/partials/layout/theme.html b/layouts/partials/layout/theme.html
new file mode 100644
index 0000000..a4f7c86
--- /dev/null
+++ b/layouts/partials/layout/theme.html
@@ -0,0 +1,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 -}}