Skip to content

Commit

Permalink
feat!: use "template" footer in built-in themes (#358)
Browse files Browse the repository at this point in the history
This makes the footer in built in themes be a template with
`{current_slide} / {total_slides}` in the right. The progress bar was
"cool" but it's not very professional so I don't think it should be the
default.

Relates to #339 #357
  • Loading branch information
mfontanini authored Aug 21, 2024
2 parents 778f03e + 32d5046 commit d21adcd
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 33 deletions.
7 changes: 1 addition & 6 deletions src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,7 @@ pub(crate) enum FooterStyle {

impl Default for FooterStyle {
fn default() -> Self {
Self::Template {
left: Some("{current_slide} / {total_slides}".to_string()),
center: None,
right: None,
colors: Colors::default(),
}
Self::Template { left: None, center: None, right: None, colors: Colors::default() }
}
}

Expand Down
6 changes: 3 additions & 3 deletions themes/catppuccin-frappe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ intro_slide:
colors:
foreground: "b5bfe2"
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -108,9 +109,8 @@ typst:
background: "414559"

footer:
style: progress_bar
colors:
background: "8caaee"
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/catppuccin-latte.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ intro_slide:
colors:
foreground: "5c5f77"
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -108,9 +109,8 @@ typst:
background: "ccd0da"

footer:
style: progress_bar
colors:
background: "1e66f5"
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/catppuccin-macchiato.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ intro_slide:
colors:
foreground: "b8c0e0"
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -108,9 +109,8 @@ typst:
background: "363a4f"

footer:
style: progress_bar
colors:
background: "8aadf4"
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/catppuccin-mocha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ intro_slide:
colors:
foreground: "bac2de"
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -108,9 +109,8 @@ typst:
background: "313244"

footer:
style: progress_bar
colors:
foreground: "89b4fa"
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/dark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ intro_slide:
colors:
foreground: "b6eada"
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -109,9 +110,8 @@ typst:
background: "292e42"

footer:
style: progress_bar
colors:
foreground: "7aa2f7"
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ intro_slide:
colors:
foreground: "4a4e69"
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -109,9 +110,8 @@ typst:
background: "e9ecef"

footer:
style: progress_bar
colors:
foreground: "7aa2f7"
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/terminal-dark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ intro_slide:
colors:
foreground: white
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -107,9 +108,8 @@ typst:
background: "292e42"

footer:
style: progress_bar
colors:
foreground: blue
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/terminal-light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ intro_slide:
colors:
foreground: black
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -107,9 +108,8 @@ typst:
background: "e9ecef"

footer:
style: progress_bar
colors:
foreground: dark_blue
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down
6 changes: 3 additions & 3 deletions themes/tokyonight-storm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ intro_slide:
colors:
foreground: "9ece6a"
positioning: page_bottom
footer: false

headings:
h1:
Expand Down Expand Up @@ -109,9 +110,8 @@ typst:
background: "545c7e"

footer:
style: progress_bar
colors:
foreground: "7aa2f7"
style: template
right: "{current_slide} / {total_slides}"

modals:
selection_colors:
Expand Down

0 comments on commit d21adcd

Please sign in to comment.