-
Notifications
You must be signed in to change notification settings - Fork 1
/
ElmLogo.elm
53 lines (46 loc) · 1.17 KB
/
ElmLogo.elm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module ElmLogo exposing (..)
import Pieces exposing (..)
import Svg exposing (Svg, svg)
import Svg.Attributes exposing (viewBox)
colors =
{ gray = "#5a6378"
, green = "#83c833"
, orange = "#efa500"
, blue = "#5fb4ca"
}
main : Svg msg
main =
let
big1 =
triangle 2
|> rotate (45 + 180)
big2 =
triangle 2
|> rotate -45
par =
parallelogram
|> rotate -45
|> snap 1 (to big1 3)
in
svg [ viewBox "-3 -3 10 10" ]
[ big1
|> draw colors.gray
, big2
|> draw colors.blue
, triangle 1
|> rotate (45 + 90)
|> draw colors.orange
, par
|> draw colors.green
, triangle (sqrt 2)
|> rotate -90
|> snap 3 (to par 4)
|> draw colors.blue
, square
|> rotate 45
|> draw colors.green
, triangle 1
|> rotate 45
|> snap 3 (to big2 2)
|> draw colors.orange
]