diff options
Diffstat (limited to 'src/Views.elm')
-rw-r--r-- | src/Views.elm | 40 |
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 | |||
1 | module Views exposing (..) | 19 | module Views exposing (..) |
2 | 20 | ||
3 | import Array exposing (..) | 21 | import Array exposing (..) |
@@ -5,9 +23,9 @@ import Base exposing (..) | |||
5 | import Css exposing (..) | 23 | import Css exposing (..) |
6 | import Html | 24 | import Html |
7 | import Html.Styled exposing (..) | 25 | import Html.Styled exposing (..) |
8 | import Html.Styled.Attributes exposing (css) | 26 | import Html.Styled.Attributes exposing (css, href) |
9 | import Html.Styled.Events exposing (onClick) | 27 | import Html.Styled.Events exposing (onClick) |
10 | import Styles exposing (styledButton, styledListItem, styledUnorderedList) | 28 | import Styles exposing (..) |
11 | import Time exposing (Posix, toHour, toMinute, toSecond, utc) | 29 | import Time exposing (Posix, toHour, toMinute, toSecond, utc) |
12 | import Utils exposing (diffDuration, isNothing, wordCountWith) | 30 | import 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 | |||
145 | viewFooter : Html Msg | ||
146 | viewFooter = | ||
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 | ) | ||