yeamer-0.1.0.5: Yesod-based server for interactive presentation slides

Copyright(c) Justus Sagemüller 2017
LicenseGPL v3
Maintainer(@) jsagemue $ uni-koeln.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Presentation.Yeamer

Contents

Description

 

Synopsis

Documentation

type Presentation = IPresentation IO () Source #

Running a presentation

yeamer :: Presentation -> IO () Source #

Run a Yesod/Warp web server that will allow the presentation to be viewed in a web browser, on port 14910. This is a shorthand for yeamer' def.

Primitives

staticContent :: Monoid r => Html -> IPresentation m r Source #

tweakContent :: Sessionable r => (Html -> Html) -> IPresentation m r -> IPresentation m r Source #

serverSide :: Sessionable a => m a -> IPresentation m a Source #

Maths

($<>) :: (r ~ (), SymbolClass σ, SCConstraint σ LaTeX) => CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX) -> IPresentation m r -> IPresentation m r infixr 6 Source #

maths :: (r ~ (), SymbolClass σ, SCConstraint σ LaTeX) => [[CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)]] -> String -> IPresentation m r Source #

Media content

imageFromFile :: FilePath -> IPresentation IO () Source #

Display an image that lies on the server as any ordinary static file. This is a special case of useFile, wrapping the file in an img tag.

mediaFromFile :: FilePath -> IPresentation IO () Source #

More general form of imageFromFile. Takes a guess based on the file extension, as to whether the media is a standing image or a video. In the latter case, simple HTML5 controls are added.

imageFromFileSupplier Source #

Arguments

:: String

File extension

-> (FilePath -> IO ())

File-writer function

-> IPresentation IO () 

Display an image generated on-the-fly in the server. The image will be stored temporarily, in a content-indexed fashion.

Arbitrary file serving

useFile Source #

Arguments

:: FilePath

File that should be served to the client

-> (Url -> Html)

How it should be used in the presentation

-> IPresentation IO () 

useFileSupplier Source #

Arguments

:: String

File extension

-> (FilePath -> IO ())

Server-side file-providing action

-> (Url -> Html)

How to use the file client-side

-> IPresentation IO () 

Code / plaintext

verbatim Source #

Arguments

:: QuasiQuoter

String -> IPresentation m ()

Include a piece of plaintext, preserving all formatting. To be used in an oxford bracket.

In practice, you probably want to use this for monospace plaintext, which should appear in a pre or textarea tag. Use the specialised quoters for that.

plaintext Source #

Arguments

:: QuasiQuoter

String -> IPresentation m ()

A simple version of verbatim that gives the HTML wrapped in pre tags, so it will (by default) appear in a monospace font.

verbatimWithin Source #

Arguments

:: Name

A function Html -> Html that should be used for presenting the (pre-escaped) plaintext.

-> QuasiQuoter

A specialised version of verbatim that will always use the wrapper.

Convenience wrapper to generate quasi-quoters that will wrap code in any suitable HTML environment.

Structure / composition

addHeading :: Sessionable r => Html -> IPresentation m r -> IPresentation m r Source #

(======) :: Sessionable r => Html -> IPresentation m r -> IPresentation m r infixr 6 Source #

Infix synonym of addHeading. Intended to be used in do blocks, for headings of presentation slides.

discardResult :: IPresentation m r -> IPresentation m () Source #

CSS

divClass :: Sessionable r => Text -> IPresentation m r -> IPresentation m r Source #

divClasses :: Sessionable r => [(Text, IPresentation m r)] -> IPresentation m r Source #

spanClass :: Sessionable r => Text -> IPresentation m r -> IPresentation m r Source #

(#%) :: Sessionable r => Text -> IPresentation m r -> IPresentation m r infix 8 Source #

Assign this content a CSS class attribute. If the content is inline, this will be a span, else a div.

styling :: Css -> IPresentation m r -> IPresentation m r Source #

data Css :: * #

Instances

ToTypedContent Css 
HasContentType Css 

Methods

getContentType :: Monad m => m Css -> ContentType #

ToContent Css 

Methods

toContent :: Css -> Content #

ToWidgetHead site Css 

Methods

toWidgetHead :: (MonadWidget m, (* ~ HandlerSite m) site) => Css -> m () #

ToWidgetMedia site Css 

Methods

toWidgetMedia :: (MonadWidget m, (* ~ HandlerSite m) site) => Text -> Css -> m () #

ToWidget site Css 

Methods

toWidget :: (MonadWidget m, (* ~ HandlerSite m) site) => Css -> m () #

(~) * render (RY site) => ToWidgetHead site (render -> Css) 

Methods

toWidgetHead :: (MonadWidget m, (* ~ HandlerSite m) site) => (render -> Css) -> m () #

(~) * render (RY site) => ToWidgetMedia site (render -> Css) 

Methods

toWidgetMedia :: (MonadWidget m, (* ~ HandlerSite m) site) => Text -> (render -> Css) -> m () #

(~) * render (RY site) => ToWidget site (render -> Css) 

Methods

toWidget :: (MonadWidget m, (* ~ HandlerSite m) site) => (render -> Css) -> m () #

Server configuration

Default port is 14910

Orphan instances