mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-14 00:16:31 +00:00
slides: enable author to choose a code highlighting style for each deck
Enables author to choose a light or dark code highlighting style in slides and match the highlighting style with the deck theme color. Close #1050
This commit is contained in:
1 parent
182f010c03
commit
f147c6a7fa
4 files changed
+45
-18
No files matched your search
@@ -1,15 +0,0 @@
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
|
||||
[slides]
|
||||
# Choose a theme from https://github.com/hakimel/reveal.js#theming
|
||||
theme = "black"
|
||||
+++
|
||||
|
||||
# Title
|
||||
|
||||
Author Name
|
||||
|
||||
---
|
||||
|
||||
## Slide 2
|
||||
@@ -0,0 +1,29 @@
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
date = {{ .Date }}
|
||||
|
||||
# Add a summary (optional).
|
||||
summary = ""
|
||||
|
||||
# Authors, tags, and categories
|
||||
# Use a comma separated list, e.g. `["Bob Smith", "David Jones"]`.
|
||||
authors = []
|
||||
tags = []
|
||||
categories = []
|
||||
|
||||
[slides]
|
||||
# Choose a theme from https://github.com/hakimel/reveal.js#theming
|
||||
theme = "black"
|
||||
|
||||
# Choose a code highlighting style (if highlighting enabled in `params.toml`)
|
||||
# Light style: github. Dark style: dracula (default).
|
||||
highlight_style = "dracula"
|
||||
+++
|
||||
|
||||
# Title
|
||||
|
||||
Author Name
|
||||
|
||||
---
|
||||
|
||||
## Slide 2
|
||||
@@ -1,9 +1,21 @@
|
||||
+++
|
||||
title = "Slides"
|
||||
date = 2019-02-05T00:00:00Z
|
||||
summary = "An introduction to using Academic's Slides feature."
|
||||
|
||||
# Authors, tags, and categories
|
||||
# Use a comma separated list, e.g. `["Bob Smith", "David Jones"]`.
|
||||
authors = []
|
||||
tags = []
|
||||
categories = []
|
||||
|
||||
[slides]
|
||||
# Choose a theme from https://github.com/hakimel/reveal.js#theming
|
||||
theme = "black"
|
||||
# Choose a theme from https://github.com/hakimel/reveal.js#theming
|
||||
theme = "black"
|
||||
|
||||
# Choose a code highlighting style (if highlighting enabled in `params.toml`)
|
||||
# Light style: github. Dark style: dracula (default).
|
||||
# highlight_style = "dracula" # Uncomment this line to set a style.
|
||||
+++
|
||||
|
||||
# Welcome to Slides
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
{{- $theme := $.Param "slides.theme" | default "black" -}}
|
||||
<link rel="stylesheet" href="{{ $cdn_url_reveal }}/css/theme/{{ $theme }}.min.css">
|
||||
|
||||
{{ printf "<link rel=\"stylesheet\" href=\"%s\" crossorigin=\"anonymous\">" (printf $css.highlight.url $css.highlight.version "dracula") | safeHTML }}
|
||||
{{- $highlight_style := $.Param "slides.highlight_style" | default "dracula" -}}
|
||||
{{ printf "<link rel=\"stylesheet\" href=\"%s\" crossorigin=\"anonymous\">" (printf $css.highlight.url $css.highlight.version $highlight_style) | safeHTML }}
|
||||
|
||||
{{ $css := resources.Get "css/reveal.css" }}
|
||||
{{ $css_custom := resources.Get "css/reveal_custom.css" }}
|
||||
|
||||
Reference in new issue
Block a user