styles

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package styles implements the theming logic for slides

Index

Constants

This section is empty.

Variables

View Source
var (
	// Author is the style for the author text in the bottom-left corner of the
	// presentation.
	Author = lipgloss.NewStyle().Foreground(salmon).Align(lipgloss.Left).MarginLeft(2)
	// Date is the style for the date text in the bottom-left corner of the
	// presentation.
	Date = lipgloss.NewStyle().Faint(true).Align(lipgloss.Left).Margin(0, 1)
	// Page is the style for the pagination progress information text in the
	// bottom-right corner of the presentation.
	Page = lipgloss.NewStyle().Foreground(salmon).Align(lipgloss.Right).MarginRight(3)
	// Slide is the style for the slide.
	Slide = lipgloss.NewStyle().Padding(1)
	// Status is the style for the status bar at the bottom of the
	// presentation.
	Status = lipgloss.NewStyle().Padding(1)
	// Search is the style for the search input at the bottom-left corner of
	// the screen when searching is active.
	Search = lipgloss.NewStyle().Faint(true).Align(lipgloss.Left).MarginLeft(2)
)
View Source
var (
	// DefaultTheme is the default theme for the presentation.
	//go:embed theme.json
	DefaultTheme []byte
)

Functions

func JoinHorizontal

func JoinHorizontal(left, right string, width int) string

JoinHorizontal joins two strings horizontally and fills the space in-between.

func JoinVertical

func JoinVertical(top, bottom string, height int) string

JoinVertical joins two strings vertically and fills the space in-between.

func SelectTheme added in v0.2.0

func SelectTheme(theme string) glamour.TermRendererOption

SelectTheme picks a glamour style config based on the theme provided in the markdown header

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL