Permalink
Browse files

more deleting

  • Loading branch information...
1 parent 50644bd commit 4d570919bf23d5ee98eb8dd4ce4312cb6c39557d Evan Czaplicki committed Oct 2, 2012
Showing with 0 additions and 1,879 deletions.
  1. +0 −39 Website/Docs.elm
  2. +0 −29 Website/Skeleton.elm
  3. +0 −23 Website/Tiles.elm
  4. +0 −42 docs/Prelude.elm
  5. +0 −126 examples/Basic.elm
  6. +0 −17 examples/Elements/Blog.elm
  7. +0 −7 examples/Elements/Color.elm
  8. +0 −5 examples/Elements/FittedImage.elm
  9. +0 −19 examples/Elements/FlowDown1a.elm
  10. +0 −2 examples/Elements/FlowDown1b.elm
  11. +0 −7 examples/Elements/FlowDown2.elm
  12. +0 −2 examples/Elements/HelloWorld.elm
  13. +0 −2 examples/Elements/Image.elm
  14. +0 −5 examples/Elements/Layers.elm
  15. +0 −9 examples/Elements/Lines.elm
  16. +0 −18 examples/Elements/Markdown.elm
  17. +0 −4 examples/Elements/Opacity.elm
  18. +0 −30 examples/Elements/Position.elm
  19. +0 −10 examples/Elements/Shapes.elm
  20. +0 −17 examples/Elements/Size.elm
  21. +0 −4 examples/Elements/Spacer.elm
  22. +0 −4 examples/Elements/Sprite.elm
  23. +0 −14 examples/Elements/Text.elm
  24. +0 −2 examples/Elements/Texture.elm
  25. +0 −4 examples/Elements/ToForm.elm
  26. +0 −9 examples/Elements/Transforms.elm
  27. +0 −23 examples/Elements/Typeface.elm
  28. +0 −2 examples/Elements/Video.elm
  29. +0 −8 examples/Elements/Web.elm
  30. +0 −53 examples/ElmHaskell.elm
  31. +0 −77 examples/ElmJS.elm
  32. +0 −35 examples/Functional/Anonymous.elm
  33. +0 −16 examples/Functional/Application.elm
  34. +0 −38 examples/Functional/BooleanExpressions.elm
  35. +0 −23 examples/Functional/Composition.elm
  36. +0 −4 examples/Functional/Factorial.elm
  37. +0 −17 examples/Functional/Filter.elm
  38. +0 −23 examples/Functional/Infix.elm
  39. +0 −4 examples/Functional/Length.elm
  40. +0 −11 examples/Functional/Map.elm
  41. +0 −45 examples/Functional/Maybe.elm
  42. +0 −32 examples/Functional/QuickSort.elm
  43. +0 −27 examples/Functional/Sum.elm
  44. +0 −94 examples/Functional/Tree.elm
  45. +0 −22 examples/Functional/Zip.elm
  46. +0 −16 examples/Functional/ZipWith.elm
  47. +0 −34 examples/Intermediate.elm
  48. +0 −14 examples/Intermediate/Clock.elm
  49. +0 −28 examples/Intermediate/FibonacciTiles.elm
  50. +0 −68 examples/Intermediate/Form.elm
  51. +0 −44 examples/Intermediate/LightBox.elm
  52. +0 −13 examples/Intermediate/PascalsTriangle.elm
  53. +0 −58 examples/Intermediate/Plot.elm
  54. +0 −22 examples/Intermediate/SlideShow.elm
  55. +0 −14 examples/Intermediate/Stamps.elm
  56. +0 −10 examples/Intermediate/Web.elm
  57. +0 −26 examples/JavaScript/ChangeTitle.elm
  58. +0 −20 examples/JavaScript/FindWithDefault.elm
  59. +0 −23 examples/JavaScript/Insert.elm
  60. +0 −30 examples/JavaScript/Logging.elm
  61. +0 −17 examples/JavaScript/Lookup.elm
  62. +0 −31 examples/JavaScript/Modify.elm
  63. +0 −41 examples/JavaScript/People.elm
  64. +0 −22 examples/JavaScript/Person.elm
  65. +0 −26 examples/JavaScript/Redirect.elm
  66. +0 −20 examples/JavaScript/ZipCodes.elm
  67. +0 −16 examples/Reactive/Between.elm
  68. +0 −8 examples/Reactive/Centering.elm
  69. +0 −14 examples/Reactive/CharPressed.elm
  70. +0 −8 examples/Reactive/CheckBox.elm
  71. +0 −14 examples/Reactive/Clock.elm
  72. +0 −7 examples/Reactive/CountClicks.elm
  73. +0 −23 examples/Reactive/DropDown.elm
  74. +0 −14 examples/Reactive/DropRepeats.elm
  75. +0 −7 examples/Reactive/Every.elm
  76. +0 −4 examples/Reactive/IsAbove.elm
  77. +0 −11 examples/Reactive/IsDown.elm
  78. +0 −12 examples/Reactive/KeepIf.elm
  79. +0 −10 examples/Reactive/KeysDown.elm
  80. +0 −8 examples/Reactive/Password.elm
  81. +0 −6 examples/Reactive/Position.elm
  82. +0 −5 examples/Reactive/Randomize.elm
  83. +0 −14 examples/Reactive/ResizePaint.elm
  84. +0 −10 examples/Reactive/ResizeYogi.elm
  85. +0 −8 examples/Reactive/SampleOn.elm
  86. +0 −18 examples/Reactive/StringDropDown.elm
  87. +0 −15 examples/Reactive/TextField.elm
  88. +0 −16 examples/Reactive/Transforms.elm
  89. +0 −25 examples/Reactive/ZipCodes.elm
  90. +0 −25 examples/ThisWebsite.elm
View
@@ -1,39 +0,0 @@
-
-module Website.Docs (createDocs) where
-
-import Data.List (intersperse)
-
-lightGrey = rgb 245 245 245
-mediumGrey = rgb 216 221 225
-
-skeleton body outer =
- let content = body (outer - 80) in
- flow down [ spacer outer 15
- , container outer (heightOf content) midTop content
- , container outer 50 midBottom . text . Text.color mediumGrey $
- toText "© 2011-2012 Evan Czaplicki"
- ]
-
-addSpaces px = intersperse (spacer 1 px)
-
-section s = bold . Text.height s . toText
-
-entry w (name, typ, desc) =
- let tipe = if length typ > 0 then " :: " ++ typ else "" in
- flow down
- [ color mediumGrey $ spacer w 1
- , width w . color lightGrey . text . monospace $ bold (toText name) ++ toText tipe
- , spacer 1 10
- , flow right [ spacer 50 10, width (w-50) $ plainText desc ]
- , spacer 1 20
- ]
-
-group w (name, fs) =
- flow down $ text (section (5/4) name) : spacer 1 20 : map (entry w) fs
-
-createDocs name cats =
- let f w = flow down $ [ text $ Text.link "/Documentation.elm" (toText "Back")
- , width w . centeredText $ section 2 name
- , spacer 1 30
- ] ++ (addSpaces 50 $ map (group w) cats)
- in lift (skeleton f) Window.width
View
@@ -1,29 +0,0 @@
-
-module Website.Skeleton (skeleton) where
-
-button (name, href) = link href . container 100 60 middle $ plainText name
-buttons = flow right . map button $
- [ ("Home" , "/" )
- , ("Examples", "/Examples.elm" )
- , ("Docs" , "/Documentation.elm")
- , ("Download", "/Download.elm" ) ]
-
-lightGrey = rgb 245 245 245
-mediumGrey = rgb 216 221 225
-
-title w = container w 60 midLeft . text . Text.height 2 . bold $ toText "Elm"
-
-heading outer inner =
- color mediumGrey . container outer 61 midTop .
- color lightGrey . container outer 60 middle .
- container inner 60 middle $ title (inner - widthOf buttons) `beside` buttons
-
-skeleton bodyFunc outer =
- let inner = if outer < 820 then outer - 20 else 800 in
- let body = bodyFunc inner in
- flow down [ heading outer inner
- , spacer outer 10
- , container outer (heightOf body) middle body
- , container outer 50 midBottom . text . Text.color mediumGrey $
- toText "&copy; 2011-2012 Evan Czaplicki"
- ]
View
@@ -1,23 +0,0 @@
-
-module Website.Tiles (tile, toTile) where
-
-import Data.List (take,drop,intersperse)
-
-format (x,y,z) = (x, z ++ y ++ ".elm", "/screenshot/" ++ y ++ ".jpg")
-
-tileSize = 130
-
-toTile info =
- let { (name, ex, pic) = format info
- ; x = tileSize }
- in link ("/edit/examples/" ++ ex) $ flow down
- [ container x x middle $ image (x-10) (x-10) pic
- , width x . centeredText $ toText name
- ]
-
-groups n lst =
- case lst of
- { [] -> [] ; x:xs -> take n lst : groups n (drop n lst) }
-
-tile w tiles =
- flow down . intersperse (spacer 1 14) . map (flow right) $ groups (w `div` tileSize) tiles
View
@@ -1,42 +0,0 @@
-
-import Website.Docs (createDocs)
-
-
-math =
- [ ("(+),(-),(*),(^)", "Number -> Number -> Number", "Functions for basic mathematics.")
- , ("(/)", "Float -> Float -> Float", "Division.")
- , ("div", "Int -> Int -> Int", "Integer division, remainder is discarded.")
- , ("rem", "Int -> Int -> Int", "Finds the remainder after dividing one number by another. (4 `rem` 3) == 1.")
- , ("mod", "Int -> Int -> Int", "Perform modular arithmetic. (-2 `mod` 5) == 3")
- , ("sin, cos, tan, asin, acos, atan", "Number -> Number", "Basic functions of trigonometry.")
- , ("sqrt", "Number -> Number", "Take the square root of a number.")
- , ("abs", "Number -> Number", "Take the absolute value of a number.")
- , ("logBase", "Number -> Number -> Number", "Calculate the logarithm of a number with a given base: logBase 10 100 == 2.")
- , ("min, max", "Number -> Number -> Number", "Given two numbers, returns the smaller (or greater respectively).")
- , ("clamp", "Number -> Number -> Number -> Number", "Clamps a number within a given range, so (clamp 100 200 x) is 200 for x >= 200, 100 for x <= 100, and x for any 100 < x < 200 ")
- , ("pi", "Float", "An approximation of pi.")
- , ("e", "Float", "An approximation of e.")
- ]
-
-convert =
- [ ("round", "Float -> Int", "Round a number to the nearest integer.")
- , ("truncate", "Float -> Int", "Truncate a decimal number, rounding towards zero.")
- , ("floor", "Float -> Int", "Floor function, rounding down.")
- , ("ceiling", "Float -> Int", "Ceiling function, rounding up.")
- , ("toFloat", "Int -> Float", "Convert an integer into a float.")
- ]
-
-funcs =
- [ ("(.)", "(b -> c) -> (a -> b) -> (a -> c)", "Function composition: f . g == (\\x -> f (g x))")
- , ("($)", "(a -> b) -> a -> b", "Function application (f $ x == f x). This function is useful for avoiding parenthesis. Consider the following code to create a text element: (text (monospace (toText \"code\"))). This can also be written as (text . monospace $ toText \"code\").")
- , ("id", "a -> a", "Given a value, returns exactly the same value.")
- , ("flip", "(a -> b -> c) -> (b -> a -> c)", "Flips the order of the first two arguments to a function.")
- ]
-
-categories =
- [ ("Mathematics", math)
- , ("Number Conversions", convert)
- , ("Function Helpers", funcs)
- ]
-
-main = createDocs "Prelude" categories
View
@@ -1,126 +0,0 @@
-
-import Data.List (intercalate,intersperse)
-import Website.Skeleton
-import Graphics.Text as Text
-
-addFolder folder lst =
- let add (x,y) = (x, folder ++ y ++ ".elm") in
- let f (n,xs) = (n, map add xs) in
- map f lst
-
-elements = addFolder "Elements/"
- [ ("Primitives",
- [ ("Text" , "HelloWorld")
- , ("Images", "Image")
- , ("Fitted Images", "FittedImage")
- , ("Videos", "Video")
- , ("Markdown", "Markdown")
- ])
- , ("Formatting",
- [ ("Size" , "Size")
- , ("Opacity" , "Opacity")
- , ("Text" , "Text")
- , ("Typeface", "Typeface")
- ])
- , ("Layout",
- [ ("Simple Flow", "FlowDown1a")
- , ("Flow Down" , "FlowDown2")
- , ("Layers" , "Layers")
- , ("Positioning", "Position")
- , ("Spacers" , "Spacer")
- ])
- , ("Collage", [ ("Lines" , "Lines")
- , ("Shapes" , "Shapes")
- , ("Sprites" , "Sprite")
- , ("Elements" , "ToForm")
- , ("Colors" , "Color")
- , ("Textures" , "Texture")
- , ("Transforms", "Transforms")
- ])
- ]
-
-
-functional = addFolder "Functional/"
- [ ("Recursion",
- [ ("Factorial" , "Factorial")
- , ("List Length", "Length")
- , ("Zip" , "Zip")
- , ("Quick Sort" , "QuickSort")
- ])
- , ("Functions as Values",
- [ ("Anonymous Functions", "Anonymous")
- , ("Application" , "Application")
- , ("Composition" , "Composition")
- , ("Infix Operators" , "Infix")
- ])
- , ("Higher-Order Functions",
- [ ("Map" , "Map")
- , ("Fold" , "Sum")
- , ("Filter" , "Filter")
- , ("ZipWith", "ZipWith")
- ])
- , ("Abstract Data Types",
- [ ("Maybe", "Maybe")
- , ("Boolean Expressions", "BooleanExpressions")
- , ("Tree", "Tree")
- ])
- ]
-
-reactive = addFolder "Reactive/"
- [ ("Mouse", [ ("Position", "Position")
- , ("Presses" , "IsDown")
- , ("Clicks" , "CountClicks")
- , ("Position+Image", "ResizeYogi")
- , ("Position+Collage" , "Transforms")
- -- , ("Hover" , "IsAbove")
- ])
- ,("Keyboard",[ ("Keys Down" , "KeysDown")
- , ("Key Presses", "CharPressed")
- ])
- , ("Window", [ ("Size", "ResizePaint")
- , ("Centering", "Centering")
- ])
- , ("Time", [ ("Before and After", "Between")
- , ("Every" , "Every")
- , ("Clock" , "Clock")
- ])
- , ("Input", [ ("Text Fields", "TextField")
- , ("Passwords" , "Password")
- , ("Check Boxes", "CheckBox")
- , ("String Drop Down", "StringDropDown")
- , ("Drop Down", "DropDown")
- ])
- , ("Random", [ ("Randomize", "Randomize") ])
- , ("HTTP", [ ("Zip Codes (via AJAX requests)", "ZipCodes") ])
- , ("Filters",[ ("Sample", "SampleOn")
- , ("Keep If", "KeepIf")
- , ("Drop Repeats", "DropRepeats")
- ])
- ]
-
-example (name, loc) = Text.link ("/edit/examples/" ++ loc) (toText name)
-toLinks (title, links) =
- text $ toText "&nbsp;&nbsp;&nbsp;" ++ italic (toText title) ++ toText " &#8212; " ++
- intercalate (fromString ", ") (map example links)
-
-insertSpace lst = case lst of { x:xs -> x : spacer 1 5 : xs ; [] -> [] }
-
-subsection w (name,info) =
- flow down . insertSpace . map (width w) $
- (text . bold $ toText name) : map toLinks info
-
-words = [markdown|
-
-### Basic Examples
-
-Each example listed below focuses on a single function or concept.
-These examples demonstrate all of the basic building blocks of Elm.
-
-|]
-
-content w =
- words : map (subsection w) [ ("Display",elements), ("React",reactive), ("Compute",functional) ]
-
-exampleSets w = flow down . map (width w) . intersperse (plainText "&nbsp;") $ content w
-
-main = lift (skeleton exampleSets) Window.width
View
@@ -1,17 +0,0 @@
-
-links = map (text . curry link)
- [ ("/", "Home"), ("/Examples.elm", "Examples"), ("/docs/docs.elm", "Documentation") ]
-
-blog blogWidth =
- let content = flowRight
- [ width 100 $ flowDown links
- , width (blogWidth - 200) $ text "this is the actual content."
- , width 100 $ text "ads and other distracting content"
- ]
- in flowDown . map (centerX . width blogWidth) $
- [ padding 5 . centerText $ header "Example Blog"
- , padding 5 $ image "chessboard.jpg"
- , content
- ]
-
-main = lift1 blog $ lift1 (\w -> if w < 840 then w - 40 else 800) Window.width
@@ -1,7 +0,0 @@
-
-myBlue = rgb 0 85 170
-myGreen = rgba 28 267 85 (1/2)
-
-main = collage 300 300 [ filled myBlue $ ngon 4 75 (150, 150)
- , filled myGreen $ ngon 5 50 (200, 100)
- ]
@@ -1,5 +0,0 @@
-
--- fittedImage crops and resizes the image to fill the given area without
--- becoming deformed.
-
-main = fittedImage 300 300 "book.jpg"
@@ -1,19 +0,0 @@
-
-{-------------------------------------------------------------
- Elements can be combined into more complex layouts using
- the flow function:
-
- flow :: Direction -> [Element] -> Element
-
- It is easy to change the direction of flow. Just use a
- different value for the direction!
-
- down, up, left, right, inward, outward :: Direction
-
- Try switching "down" in the code below with "up".
--------------------------------------------------------------}
-
-main = flow down [ plainText "By using the \"flow\" function,"
- , plainText "we can stack elements"
- , plainText "on top of other elements."
- ]
@@ -1,2 +0,0 @@
-
-main = flow down (List.map plainText [ "line 1", "line 2", "line 3" ])
@@ -1,7 +0,0 @@
-
-content = [ plainText "Bears, Oh My!"
- , video 320 240 "/bear.ogg"
- , image 472 315 "/shells.jpg"
- ]
-
-main = flow down (map (width 150) content)
@@ -1,2 +0,0 @@
-
-main = plainText "Hello, World!"
@@ -1,2 +0,0 @@
-
-main = image 472 315 "/stack.jpg"
@@ -1,5 +0,0 @@
-
-main = layers
- [ video 320 240 "/bear.ogg"
- , width 320 . centeredText . header $ toText "Birds and Bears"
- ]
@@ -1,9 +0,0 @@
-
-outline = line [ (50,50), (150,50), (150,150), (50,150), (50,50) ]
-
-main = collage 200 530
- [ dashed blue outline
- , move 0 110 $ dotted green outline
- , move 0 220 $ solid red outline
- , move 0 330 $ customLine [8,4,2,4] black outline
- ]
@@ -1,18 +0,0 @@
-
-main = [markdown|
-
-# Markdown Support
-
-Elm has native markdown support, making it easy to create complex
-text elements. You can easily make:
-
- - Headers
- - [Links](/)
- - Images
- - **Bold**, *italic*, and `monospaced` text
- - Lists (numbered, nested, multi-paragraph bullets)
-
-It all feels quite natural to type. For more information on Markdown,
-see [this site](http://daringfireball.net/projects/markdown/).
-
-|]
@@ -1,4 +0,0 @@
-
--- opacity :: Number -> Element -> Element
-
-main = opacity 0.5 (fittedImage 300 200 "/book.jpg")
Oops, something went wrong.

0 comments on commit 4d57091

Please sign in to comment.