Last active
January 26, 2017 19:58
-
-
Save soupi/c62b5778a6a5f2bcd32dd97b294c068a to your computer and use it in GitHub Desktop.
Try PureScript - slides edition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Prelude (($), (<>)) | |
| import Slides | |
| import Slides.Remember | |
| main = runSlidesAndRemember | |
| [ slide "Slides" $ | |
| valign | |
| [ image "https://gilmi.xyz/static/misc/ducks.gif" | |
| , title "Let's build a presentation!" | |
| , center $ | |
| text "(In " | |
| <+> link "http://purescript.org" (text "PureScript") | |
| <> text ", Using " | |
| <+> link "https://github.com/soupi/purescript-slides" (text "purescript-slides") | |
| <> text ")" | |
| , text "" | |
| , center $ | |
| text "New to PureScript? Perhaps you want to" | |
| <+> link "?backend=core" (text "try PureScript") | |
| <+> text "using the core libraries." | |
| ] | |
| , slide "Primitives" $ | |
| valign | |
| [ text "We have the following primitives:" | |
| , ulist | |
| [ code "text" <+> text "- write a block of text" | |
| , code "code" <+> text "- write a block of code" | |
| , code "link" <+> text "- turn an element into a clickable link" | |
| , code "image" <+> text "- display an image from a url" | |
| , code "title" <+> text "- a title" | |
| , code "center" <+> text "- center an element" | |
| , code "bold" <> text "/" <> code "italic" <+> text "-" | |
| <+> bold (text "bold") | |
| <+> text "and" | |
| <+> italic (text "italic") | |
| , code "withClass" <> text "/" <> code "withId" <+> text "- add a class or id to element" | |
| ] | |
| ] | |
| , slide "Combinators" $ | |
| valign | |
| [ text "To combine elements, we can use the following combinators:" | |
| , center $ ulist | |
| [ code "valign" <+> text "- vertically align elements in a list" | |
| , code "halign" <+> text "- horizontally align elements in a list" | |
| , code "group" <+> text "- group an array of elements" | |
| , code "ulist" <+> text "- create a list of bullets" | |
| ] | |
| ] | |
| , slide "Creating slides" $ | |
| ulist | |
| [ text "to create a slide, call the" <+> code "slide" <+> text "function with a title string and an element" | |
| , text "to create slides, call the" <+> code "mkSlides" <+> text "function with a list of slides" | |
| , text "to run the slides, call the" <+> code "runSlides" <+> text "function with the slides" | |
| ] | |
| ,slide "That's it!" $ | |
| valign | |
| [ text "This library is still tiny and may grow in the future :)" | |
| , center $ text "Interested? Check the source on" <+> link "https://github.com/soupi/purescript-slides" (text "Github") <> text "!" | |
| ] | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment