From 87e6d42cf581f23e7b0a294ed6c30f506af42915 Mon Sep 17 00:00:00 2001 From: Balazs Nadasdi Date: Mon, 22 Mar 2021 21:11:49 +0100 Subject: [PATCH] source link, with style ;) --- public/index.html | 17 ++++++++++++++++- src/Main.elm | 12 +++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index 8aea553..a2be7da 100644 --- a/public/index.html +++ b/public/index.html @@ -38,6 +38,21 @@ border: 1px solid #555; padding: 0.2em; } + + footer > a { + font-size: 0.8em; + margin-left: 1em; + padding: 0.1em 0.8em; + background-color: #60b5cc; + color: #333; + border-radius: 3px; + text-decoration: none; + } + + footer > a:hover { + background-color: #cc60b6; + color: #ccc; + } @@ -58,4 +73,4 @@ - \ No newline at end of file + diff --git a/src/Main.elm b/src/Main.elm index 657777b..5e134cb 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -39,7 +39,7 @@ type alias Model = } init : flags -> Url.Url -> Browser.Navigation.Key -> ( Model, Cmd Msg ) -init _ _ _ = ({ selected = "", videos = [{title="asd", path="kjhkj"}] }, requestVideoList) +init _ _ _ = ({ selected = "", videos = [] }, requestVideoList) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = @@ -53,11 +53,17 @@ update msg model = view : Model -> Document Msg view model = - { title = "My Title" + { title = "Minimal WebPlayer" , body = [ if List.length model.videos == 0 then Html.div [] [] else makeDropDown model.videos , if model.selected == "" then Html.div [] [] else makePlayer model.selected - , Html.footer [] [ Html.text "Handmade with love (and Vim and elm) ;)" ] + , Html.footer [] + [ Html.text "Handmade with love (and Vim and elm) ;)" + , Html.a + [ Html.Attributes.href "https://gitea.code-infection.com/efertone/minimal-webplayer" + , Html.Attributes.target "_blank" + ] [ Html.text "source" ] + ] ] }