aboutsummaryrefslogtreecommitdiff
path: root/src/Views.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Views.elm')
-rw-r--r--src/Views.elm40
1 files changed, 38 insertions, 2 deletions
diff --git a/src/Views.elm b/src/Views.elm
index b54fc93..3a8afed 100644
--- a/src/Views.elm
+++ b/src/Views.elm
@@ -1,3 +1,21 @@
1{-
2 - This file is part of `typers`.
3 -
4 - `typers` is free software: you can redistribute it and/or modify
5 - it under the terms of the GNU Affero Public License as published by
6 - the Free Software Foundation, either version 3 of the License, or
7 - (at your option) any later version.
8 -
9 - `typers` is distributed in the hope that it will be useful,
10 - but WITHOUT ANY WARRANTY; without even the implied warranty of
11 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 - GNU Affero Public License for more details.
13 -
14 - You should have received a copy of the GNU Affero Public License
15 - along with `typers`. If not, see <https://www.gnu.org/licenses/>.
16-}
17
18
1module Views exposing (..) 19module Views exposing (..)
2 20
3import Array exposing (..) 21import Array exposing (..)
@@ -5,9 +23,9 @@ import Base exposing (..)
5import Css exposing (..) 23import Css exposing (..)
6import Html 24import Html
7import Html.Styled exposing (..) 25import Html.Styled exposing (..)
8import Html.Styled.Attributes exposing (css) 26import Html.Styled.Attributes exposing (css, href)
9import Html.Styled.Events exposing (onClick) 27import Html.Styled.Events exposing (onClick)
10import Styles exposing (styledButton, styledListItem, styledUnorderedList) 28import Styles exposing (..)
11import Time exposing (Posix, toHour, toMinute, toSecond, utc) 29import Time exposing (Posix, toHour, toMinute, toSecond, utc)
12import Utils exposing (diffDuration, isNothing, wordCountWith) 30import Utils exposing (diffDuration, isNothing, wordCountWith)
13 31
@@ -122,3 +140,21 @@ viewStats model =
122 in 140 in
123 p [] 141 p []
124 [ text (Maybe.withDefault "" stats) ] 142 [ text (Maybe.withDefault "" stats) ]
143
144
145viewFooter : Html Msg
146viewFooter =
147 let
148 footerItems =
149 [ ( "src", "https://git.peppe.rs/web/typers/about" )
150 , ( "license", "https://git.peppe.rs/web/typers/tree/COPYING" )
151 ]
152 in
153 styledUnorderedList []
154 (List.map
155 (\( inner, hr ) ->
156 styledListItem []
157 [ styledExternalLink [ href hr ] [ text inner ] ]
158 )
159 footerItems
160 )