Skip to content

Commit 4e2e53f

Browse files
committed
#9 More beautiful styling
1 parent 0ba117b commit 4e2e53f

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

public/index.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<title>HORSES</title>
55
<meta charset="UTF-8">
66
<script type="text/javascript" src="/horses.js"></script>
7-
<link href="https://fonts.googleapis.com/css?family=Fascinate+Inline"
8-
rel="stylesheet">
7+
<link href="https://fonts.googleapis.com/css?family=Fascinate+Inline" rel="stylesheet">
98
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tachyons/4.8.1/tachyons.min.css" />
109
</head>
1110

@@ -15,4 +14,4 @@
1514
</script>
1615
</body>
1716

18-
</html>
17+
</html>

src/Views/View.elm

+11-8
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,27 @@ import List.Extra exposing (getAt)
1010
view : Model -> Html Msg
1111
view model =
1212
div [ class "mh5" ]
13-
[ h1 [ class "tc f1 orange ma5 b" ] [ text "Studio Ghibli Horseplay" ]
14-
, createFilmListSection model
13+
[ h1 [ class "tc f-headline gold pb4 bb b--gold bw3" ] [ text "Studio Ghibli Horseplay" ]
14+
, p [ class "white f2 ml4 mb1" ] [ text "Studio Ghibli films" ]
15+
, div [ class "flex" ]
16+
[ createFilmListSection model
17+
, filmDescription model
18+
]
1519
, buildGifs model.gifUrls
16-
, filmDescription model
1720
]
1821

1922

2023
createFilmListSection : Model -> Html Msg
2124
createFilmListSection model =
22-
aside []
25+
aside [ class "flex w-40" ]
2326
[ ul [] <|
2427
List.indexedMap createFilmItem model.allFilms
2528
]
2629

2730

2831
createFilmItem : Int -> FilmRecord -> Html Msg
2932
createFilmItem index filmRecord =
30-
li [ class "list white f3 ma1 helvetica", onMouseEnter (Hover index) ] [ text filmRecord.title ]
33+
li [ class "list white f3 ma1 helvetica pointer", onMouseEnter (Hover index) ] [ text filmRecord.title ]
3134

3235

3336
buttonStyle : Attribute msg
@@ -54,16 +57,16 @@ filmDescription : Model -> Html Msg
5457
filmDescription model =
5558
case model.hoveredFilm of
5659
Nothing ->
57-
h2 [] [ text "Choose a film, goddamnit" ]
60+
h2 [ class "flex white w-60 helvetica" ] [ text "Hover over a film title to see the description! Click for gifs!" ]
5861

5962
Just int ->
6063
let
6164
description =
6265
case getAt int model.allFilms of
6366
Nothing ->
64-
"you broke it"
67+
"You broke it."
6568

6669
Just film ->
6770
film.description
6871
in
69-
h2 [] [ text description ]
72+
h2 [ class "flex white w-60 helvetica" ] [ text description ]

0 commit comments

Comments
 (0)