From 32a6ffc0c117b4ef28ea9f74517de77f8fafff1a Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 5 Nov 2021 09:02:55 +0200 Subject: Styling --- global.css | 35 +++++++++++++++++++++++++++++++++++ index.html | 14 +------------- src/Components/PostList.elm | 1 - src/Header.elm | 3 +-- src/Pages/Feed.elm | 5 ++++- 5 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 global.css diff --git a/global.css b/global.css new file mode 100644 index 0000000..10a5b1b --- /dev/null +++ b/global.css @@ -0,0 +1,35 @@ +body { + margin: 0 auto; +} + +img { + width: 100%; +} + +a { + text-decoration: none; +} + +a:visited { + color: initial; +} + +a:hover *, +a:active * { + color: orange !important; +} + +a, +h1, +h2, +h3 { + color: #454545; +} + +input { + padding: 5px; +} + +button { + cursor: pointer; +} \ No newline at end of file diff --git a/index.html b/index.html index 31f8d81..62906f3 100644 --- a/index.html +++ b/index.html @@ -6,19 +6,7 @@ - + diff --git a/src/Components/PostList.elm b/src/Components/PostList.elm index 998bdff..d417deb 100644 --- a/src/Components/PostList.elm +++ b/src/Components/PostList.elm @@ -43,7 +43,6 @@ styles = , postLikeButton = css [ marginRight (px 5) - , cursor pointer ] } diff --git a/src/Header.elm b/src/Header.elm index 36469aa..60b2309 100644 --- a/src/Header.elm +++ b/src/Header.elm @@ -21,7 +21,6 @@ styles = , logoutButton = css [ marginLeft (px 10) - , cursor pointer ] , flexPad = css [ flex (int 1) ] } @@ -33,6 +32,6 @@ headerView model = [ a [ href "/" ] [ h1 [] [ text "😎 SOMEBOOK" ] ] , div [ styles.flexPad ] [] , div [] [ "Logged in as {0}" |> templ [ model.userData.name ] |> text ] - , button [ styles.logoutButton, onClick RequestLogout ] [ text "Logout" ] + , button [ styles.logoutButton, onClick RequestLogout ] [ text "Log out" ] ] ] diff --git a/src/Pages/Feed.elm b/src/Pages/Feed.elm index 5afbbda..42e934d 100644 --- a/src/Pages/Feed.elm +++ b/src/Pages/Feed.elm @@ -16,11 +16,14 @@ styles = css [ displayFlex , flexFlow2 row wrap + , margin3 (px -5) (px -5) (px 10) ] , composeInput = css [ flex (int 1) + , margin (px 5) ] + , submitButton = css [ margin (px 5) ] } @@ -57,7 +60,7 @@ composeForm model = , value model.composeImageInputValue ] [] - , button [ type_ "submit" ] [ text "➡️" ] + , button [ styles.submitButton, type_ "submit" ] [ text "➡️" ] ] -- cgit v1.3