Skip to content

Commit 8d9260e

Browse files
committed
feat(tui | slide): add Title prop to slides
1 parent 060dfc4 commit 8d9260e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

internal/config/style.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
)
1717

1818
type Properties struct {
19+
Title string `yaml:"title"`
1920
Style StyleConfig `yaml:"style"`
2021
Transition transitions.Transition `yaml:"transition"`
2122
}
@@ -206,6 +207,7 @@ func getLayoutPosition(p string) (lipgloss.Position, error) {
206207

207208
func (p *Properties) UnmarshalYAML(bytes []byte) error {
208209
aux := struct {
210+
Title string `yaml:"title"`
209211
Style StyleConfig `yaml:"style"`
210212
Transition string `yaml:"transition"`
211213
Preset string `yaml:"preset"`
@@ -215,6 +217,8 @@ func (p *Properties) UnmarshalYAML(bytes []byte) error {
215217
return err
216218
}
217219

220+
p.Title = aux.Title
221+
218222
if aux.Preset != "" {
219223
preset, ok := GlobalConfig.Presets[aux.Preset]
220224
if !ok {

internal/tui/slide.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type Slide struct {
1717
Style config.SlideStyle
1818
ActiveTransition transitions.Transition
1919
Properties config.Properties
20+
Title string
2021

2122
preRenderedFrame string
2223
}

0 commit comments

Comments
 (0)