Slides-0.1.0.6: Generate slides from Haskell code

Safe HaskellNone
LanguageHaskell2010

Slides.Common

Synopsis

Documentation

data Eagerness Source

Describes the behavior of the presentation element.

Constructors

Delay

The element won't be displayed until there's an explicit signal from the user (pressing the arrow key, etc.)

Immediate

The element will be displayed as soon as it's encountered.

data Presentation Source

The outermost type. Holds slides and styling.

Constructors

Presentation 

Fields

slides :: [Slide]
 
style :: Style
 
baseHead :: String

A plain string that will be put into the <head> before everything else.

newtype Slide Source

The outermost type of a single slide. Holds content nodes.

Constructors

Slide 

Fields

nodes :: [ContentNode]
 

data ContentNode Source

The main type in the presentaion. Describes all the possible kinds of content.

Constructors

Header Int String

Generates a <hN> tag where the N is the first argument.

List [ContentNode]

Generates an unordered list that's immediately displayed.

Text String

A plain text node.

Break

Generates a <br /> tag. A new line.

RawSVG Int Int String

Generates an SVG tag with the specified width and height and string contents.

Diagram Int (Diagram SVG)

Generates an SVG tag from a given height and a Diagram

UnfoldList Eagerness [ContentNode]

Generates a list of elements where each element is delayed. The Eagerness parameter determines whether the list will immediately display the first element.

Sequence Eagerness [ContentNode]

Generates elements in sequence with the next one REPLACING the previous one. The Eagerness parameter determines whether the first element in sequence will be immediately displayed.

ConcatList [ContentNode]

Generates a list of elements. The elements themselves are not wrapped in anything, unlike in a normal list where they're wrapped in <li> tags, just concatinated together.

UnfoldConcatList Eagerness [ContentNode]

The same as ConcatList with the display behavior of UnfoldList

data Style Source

Rudimentary support for styling

Constructors

Style 

Fields

selectors :: [(Selector, ElementStyle)]

Pairs of selectors that determine what kind of elements to apply the style to and the | styles themselves.

baseCss :: String
 

data Selector Source

Describes which elements to apply the style to.

Constructors

HeaderSelector Int 
UniversalSelector

Applies to everything.

TextSelector 
SlideSelector 

emptyPresentation :: Presentation Source

An empty presentation set to the default style with UTF8 encoding.

emptyStyle :: Style Source

The default style.

emptyElementStyle :: ElementStyle Source

Completely empty element style.