goveal/config/components.go

68 lines
2.1 KiB
Go
Raw Normal View History

package config
2021-12-22 19:27:43 +00:00
var defaults = map[string]interface{}{
"mermaid.theme": "forest",
"theme": "beige",
"codeTheme": "monokai",
"transition": TransitionNone,
"controlsLayout": ControlsLayoutEdges,
"controls": true,
"progress": true,
"history": true,
"center": true,
"slideNumber": true,
"menu.numbers": true,
"menu.useTextContentForMissingTitles": true,
}
const (
TransitionNone Transition = "none"
TransitionFade Transition = "fade"
TransitionSlide Transition = "slide"
TransitionConvex Transition = "convex"
TransitionConcave Transition = "concave"
TransitionZoom Transition = "zoom"
2021-12-22 19:19:05 +00:00
ControlsLayoutBottomRight ControlsLayout = "bottom-right"
ControlsLayoutEdges ControlsLayout = "edges"
)
type (
2021-12-22 19:19:05 +00:00
Transition string
ControlsLayout string
Mermaid struct {
Theme string `json:"theme"`
}
Rendering struct {
VerticalSeparator string
HorizontalSeparator string
Stylesheets []string
}
Reveal struct {
2021-12-22 19:19:05 +00:00
Theme string `json:"theme"`
CodeTheme string `json:"codeTheme"`
Transition Transition `json:"transition"`
Controls bool `json:"controls"`
ControlsLayout ControlsLayout `json:"controlsLayout"`
Progress bool `json:"progress"`
History bool `json:"history"`
Center bool `json:"center"`
SlideNumber bool `json:"slideNumber"`
Menu struct {
Numbers bool `json:"numbers"`
UseTextContentForMissingTitles bool `json:"useTextContentForMissingTitles"`
Transitions bool
} `json:"menu"`
}
Components struct {
ConfigFileInUse string `mapstructure:"-"`
Reveal Reveal `mapstructure:",squash"`
Rendering Rendering `mapstructure:",squash"`
Mermaid Mermaid
}
)
func (t Transition) String() string {
2021-12-22 19:27:43 +00:00
return string(t)
}