Skip to content
This repository
Browse code

Clean up the examples page (remove the bottom section to de-clutter e…

…verything).

Reformat the Docs page, making better use of screen real-estate.
  • Loading branch information...
commit 81389deb57eae2a47e9832ea3ea7d45a6d3bf326 1 parent c3d7a8c
Evan Czaplicki authored October 10, 2012
25  public/Documentation.elm
@@ -5,31 +5,32 @@ import Data.List
5 5
 import Graphics.Text as Text
6 6
 
7 7
 standard = ("General Purpose",
8  
-  [ ("Data.Char", "docs/Data/Char.elm")
9  
-  , ("Data.Maybe", "docs/Data/Maybe.elm")
10  
-  , ("Data.List",  "docs/Data/List.elm")
  8
+  [ ("Data.List",  "docs/Data/List.elm")
11 9
   , ("Data.Map",  "docs/Data/Map.elm")
12 10
   , ("Data.Set",  "docs/Data/Set.elm")
  11
+  , ("Data.Char", "docs/Data/Char.elm")
  12
+  , ("Data.Maybe", "docs/Data/Maybe.elm")
13 13
   , ("Prelude", "docs/Prelude.elm")
14 14
   ])
15 15
 
16  
-elements = ("Graphics",
  16
+graphics = ("Graphics",
17 17
   [ ("Graphics.Element", "docs/Graphics/Element.elm")
18 18
   , ("Graphics.Color"  , "docs/Graphics/Color.elm")
19 19
   , ("Graphics.Text",  "docs/Graphics/Text.elm")
20 20
   ])
21 21
 
22  
-reaction = ("Signals",
  22
+input = ("Interaction",
23 23
   [ ("Signal" , "docs/Signal/Signal.elm")
24 24
   , ("Signal.Mouse"  , "docs/Signal/Mouse.elm")
25 25
   , ("Signal.Keyboard.Raw", "docs/Signal/KeyboardRaw.elm")
26 26
   , ("Signal.Window" , "docs/Signal/Window.elm")
  27
+  , ("Signal.Input"  , "docs/Signal/Input.elm")
27 28
   , ("Signal.Time"   , "docs/Signal/Time.elm")
28 29
   , ("Signal.HTTP"   , "docs/Signal/HTTP.elm")
29  
-  , ("Signal.Input"  , "docs/Signal/Input.elm")
30 30
   , ("Signal.Random" , "docs/Signal/Random.elm")
31 31
   ])
32 32
 
  33
+
33 34
 ffi = ("JavaScript Interface",
34 35
   [ ("Foreign.JavaScript", "docs/Foreign/JavaScript.elm") 
35 36
   , ("Foreign.JavaScript.Experimental", "docs/Foreign/JavaScript/Experimental.elm") 
@@ -54,14 +55,22 @@ My [thesis][4] gives a more formal specification of Elm.
54 55
   [3]: http://www.testblogpleaseignore.com/2012/06/29/announcing-elm-0-3-5-javascript-integration-signal-filters-and-more/ "JavaScript integration"
55 56
   [4]: http://www.testblogpleaseignore.com/wp-content/uploads/2012/04/thesis.pdf "Elm Thesis"
56 57
 
  58
+<br/>
  59
+
57 60
 |]
58 61
 
59 62
 linkify (name, src) = toText "    " ++ Text.link src (toText name)
60 63
 linkList (name, pairs) = 
61 64
   flow down . map text $ bold (toText name) : map linkify pairs
62  
-links = map linkList [ standard, elements, reaction, ffi ]
  65
+
  66
+threeCol w l m r =
  67
+  let w' = w `div` 3 in
  68
+  flow right [ width w' l, width w' m, width w' r ]
63 69
 
64 70
 categories w =
65  
-  flow down . map (width w) . intersperse (plainText "&nbsp;") $ intro : links
  71
+  flow down
  72
+  [ width w intro
  73
+  , threeCol w (linkList standard) (linkList input) (flow down [ linkList graphics, spacer 10 40, linkList ffi ])
  74
+  ]
66 75
 
67 76
 main = lift (skeleton categories) Window.width
19  public/Examples.elm
@@ -31,25 +31,8 @@ certain skills:
31 31
   [5]: /examples/ThisWebsite.elm "This Website"
32 32
   [6]: /blog/games-in-elm/part-0/Making-Pong.html "Elm for Games"
33 33
 
34  
-### Quick Overview of Elm
35  
-
36  
-If you just want a brief overview, check out the following examples:
37  
-
38 34
 |]
39 35
 
40  
-examples =
41  
-  [ ("Layout"       , "FlowDown2" , "Elements/")
42  
-  , ("Centering"    , "Centering" , "Reactive/")
43  
-  , ("Shapes"       , "Shapes"    , "Elements/")
44  
-  , ("Abstract Data Types", "Tree", "Functional/")
45  
-  , ("Analog Clock" , "Clock"     , "Intermediate/")
46  
-  , ("Light Box"    , "LightBox"  , "Intermediate/")
47  
-  , ("Graphs"       , "Plot"      , "Intermediate/")
48  
-  , ("Form Validation", "Form"      , "Intermediate/")
49  
-  , ("This Page"    , "Examples"  , "../")
50  
-  ]
51  
-
52  
-content w = let tiles = tile w $ map toTile examples in
53  
-  width w words `above` container w (heightOf tiles) middle tiles
  36
+content w = width w words
54 37
 
55 38
 main = lift (skeleton content) Window.width

0 notes on commit 81389de

Please sign in to comment.
Something went wrong with that request. Please try again.