Commits: 8

Change Highlight from None in Code block day 4.

correct a typo.

index 9d4ca1c..3a09790 100644
--- a/content/day-4.txt
+++ b/content/day-4.txt
@@ -189,15 +189,35 @@ So now each segment has two sub segments: red and blue. The red one is rotate 15
=
=| Editor
=    | Annotations
-        | None
+        | Highlight
+            top = 25
+            left = 14
+            width = 44
+            height = 1
=
=        | Fold
=            start = 1
=            length = 7
=
=        | Fold
-            start = 21
-            length = 12
+            start = 27
+            length = 7
+
+        | Fold
+            start = 50
+            length = 38
+
+        | Highlight
+            top = 35
+            left = 1
+            width = 31
+            height = 1
+
+        | Highlight
+            top = 46
+            left = 13
+            width = 8
+            height = 1
=
=    | Code
=        module Main exposing (main)
@@ -877,7 +897,7 @@ It's a lot to absorb, so take your time to think about it.
=
=Our tree is very cool but rather simple. Wouldn't it be nice if it could grow bigger and bigger? What if we could say that a brown segment produces two green (left and right) and a brown (straight)? Then the brown child would have two green and a brown too. But brown gives more brown /ad infinitum/ (pardon my latin).
=
-You can try that, but don't expect to see anything interesting in the browser. Your computer will trying very hard to draw a tree for you, but after going through hundreds of thousands of segments' generations it will give up, perhaps saying "too much recursion". According to the rules you gave there is no stopping to this tree.
+You can try that, but don't expect to see anything interesting in the browser. Your computer is trying very hard to draw a tree for you, but after going through hundreds of thousands of segments' generations it will give up, perhaps saying "too much recursion". According to the rules you gave there is no stopping to this tree.
=
=| Note
=    A funny fact about computers is that they generally can't tell if the task you give them can be finished or not. It's called {Link|the halting problem|url=https://en.wikipedia.org/wiki/Halting_problem}. Best they can do is give up after certain time. That's what happens here.

Merge branch 'content' into editor-block

Merge branch 'content' into 'master'

Content

See merge request software-garden/software-garden.gitlab.io!8

Merge branch 'master' into shapes-example

Merge branch 'shapes-example' into 'master'

Shapes example

See merge request software-garden/software-garden.gitlab.io!11

Change the list on home page into block links

index 84b1c24..732e725 100644
--- a/content/index.txt
+++ b/content/index.txt
@@ -15,13 +15,30 @@ Hello! We are running a workshop that will give you a glimpse into the way softw
=
=Below is material through which we will be going during the workshop. Only the first section is a required read before you come, but feel free to read more to get more prepared.
=
-| List
-    # {Link|Before the course begins|url=/preparation.html}
-    # {Link|Day 1 - Let's Make a Dot|url=/day-1.html}
-    # {Link|Day 2 - Let's Place the Dots in a Circle|url=/day-2.html}
-    # {Link|Day 3 - Connecting the Dots|url=/day-3.html}
-    # {Link|Day 4 - Let's Make a Tree|url=/day-4.html}
-    # {Link|Day 5 - Let's Make the Tree Grow|url=/day-5.html}
+| Link
+    url = /preparation.html
+    label = Before the course begins
+
+| Link
+    url = /day-1.html
+    label = Day 1 - Let's Make a Dot
+
+
+| Link
+    url = /day-2.html
+    label = Day 2 - Let's Place the Dots in a Circle
+
+| Link
+    url = /day-3.html
+    label = Day 3 - Connecting the Dots
+
+| Link
+    url = /day-4.html
+    label = Day 4 - Let's Make a Tree
+
+| Link
+    url = /day-5.html
+    label = Day 5 - Let's Make the Tree Grow
=
=
=| Header
index af1a472..f778ba6 100644
--- a/src/Main.elm
+++ b/src/Main.elm
@@ -720,6 +720,7 @@ document =
=        typography =
=            [ Mark.Custom.header
=            , Mark.Custom.paragraph
+            , Mark.Custom.link
=            , Mark.Custom.monospace
=            , Mark.Custom.emphasize
=            , Mark.Custom.list
index 9fe4d6d..ae6f285 100644
--- a/src/Mark/Custom.elm
+++ b/src/Mark/Custom.elm
@@ -5,6 +5,7 @@ module Mark.Custom exposing
=    , header
=    , icon
=    , image
+    , link
=    , list
=    , monospace
=    , note
@@ -67,6 +68,41 @@ paragraph =
=        text
=
=
+link =
+    let
+        render :
+            String
+            -> (model -> Element msg)
+            -> model
+            -> Element msg
+        render url label model =
+            Element.link
+                [ Element.paddingXY 20 0
+                , Font.size 24
+
+                -- , Font.bold
+                -- , Background.color colors.charcoal
+                , Font.color colors.blue
+                , Border.rounded 2
+                , Element.mouseDown
+                    [ Border.shadow
+                        { offset = ( 0, 1 )
+                        , size = 0
+                        , blur = 3
+                        , color = colors.gray
+                        }
+                    ]
+                ]
+                { url = url
+                , label = label model
+                }
+    in
+    Mark.record2 "Link"
+        render
+        (Mark.field "url" Mark.string)
+        (Mark.field "label" paragraph)
+
+
=monospace : Mark.Block (model -> Element msg)
=monospace =
=    Mark.Default.monospace
@@ -520,4 +556,5 @@ colors =
=    , white = Element.rgb 1 1 1
=    , black = Element.rgb 0 0 0
=    , badass = Element.rgb255 0xBA 0xDA 0x55
+    , blue = Element.rgb 0.07 0.52 0.81
=    }

Restyle navigation bar

Make it visually less significant and make current item stand out more.

index f778ba6..e75ff71 100644
--- a/src/Main.elm
+++ b/src/Main.elm
@@ -543,14 +543,24 @@ contentNavigationBar { location, scroll, viewport } =
=            -> Element Msg
=        linkElement link =
=            Element.link
-                [ Element.width Element.fill
-                , Element.paddingEach
-                    { top = 40
+                ([ Element.width Element.fill
+                 , Font.size 14
+                 , Font.light
+                 , Element.paddingEach
+                    { top = 20
=                    , right = 5
-                    , bottom = 20
+                    , bottom = 10
=                    , left = 5
=                    }
-                ]
+                 , Font.color Mark.Custom.colors.gray
+                 ]
+                    ++ (if location.path == link.url then
+                            currentAttributes
+
+                        else
+                            []
+                       )
+                )
=                { url = link.url
=                , label =
=                    if viewport.width < 600 then
@@ -569,6 +579,12 @@ contentNavigationBar { location, scroll, viewport } =
=                    , Font.bold
=                    ]
=
+        currentAttributes =
+            [ Font.medium
+            , Font.color Mark.Custom.colors.blue
+            , Font.size 18
+            ]
+
=        progressBar : Int -> Int -> Float -> Element Msg
=        progressBar total done progress =
=            Element.row [ Element.width Element.fill ]

Merge branch 'home-page-links' into 'master'

Home page links and restyled navigation bar

See merge request software-garden/software-garden.gitlab.io!12