Documentation ¶
Index ¶
- Constants
- Variables
- func Decode(o io.Reader, v interface{}) error
- func Encode(o io.Writer, v interface{}) error
- func Style(s string) template.HTML
- type Author
- type Caption
- type Code
- type Doc
- type Elem
- type File
- type HTML
- type Iframe
- type Image
- type Lines
- type Link
- type List
- type Section
- type Text
- type Video
Constants ¶
const TimeFormat = "2 January 2006"
Variables ¶
var NotesEnabled = false
NotesEnabled specifies whether presenter notes should be displayed in the present user interface.
var PlayEnabled = false
PlayEnabled specifies whether runnable playground snippets should be displayed in the present user interface.
Functions ¶
Types ¶
type Author ¶
type Author struct {
Elem []Elem
}
Author represents the person who wrote and/or is presenting the document.
type Code ¶
type Code struct { Text template.HTML Play bool // runnable code Edit bool // editable code FileName string // file name Ext string // file extension Raw []byte // content of the file }
func (Code) TemplateName ¶
type Doc ¶
type Doc struct { Title string Subtitle string Time time.Time Authors []Author TitleNotes []string Sections []Section Tags []string }
Doc represents an entire document.
type Elem ¶
type Elem interface {
TemplateName() string
}
Elem defines the interface for a present element. That is, something that can provide the name of the template used to render the element.
type HTML ¶
func (HTML) TemplateName ¶
type Iframe ¶
func (Iframe) TemplateName ¶
type Image ¶
func (Image) TemplateName ¶
type Lines ¶
type Lines struct { Line int // 0 indexed, so has 1-indexed number of last line returned Text []string }
Lines is a helper for parsing line-based input.
func (*Lines) NextNonEmpty ¶
type Link ¶
func (Link) TemplateName ¶
type List ¶
type List struct {
Bullet []string
}
List represents a bulleted list.
func (List) TemplateName ¶
type Section ¶
type Section struct { Number []int Title string Elem []Elem Notes []string Classes []string Styles []string }
Section represents a section of a document (such as a presentation slide) comprising a title and a list of elements.
func (Section) FormattedNumber ¶
FormattedNumber returns a string containing the concatenation of the numbers identifying a Section.
func (Section) HTMLAttributes ¶
HTMLAttributes for the section
func (Section) Level ¶
Level returns the level of the given section. The document title is level 1, main section 2, etc.
func (*Section) Render ¶
Render renders the section to the given writer using the provided template.