source link, with style ;)

dockercon2021
Efertone 2 years ago
parent 4371afdbcc
commit 87e6d42cf5
Signed by: efertone
GPG Key ID: 58E2D23885002DC5
  1. 17
      public/index.html
  2. 12
      src/Main.elm

@ -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;
}
</style>
<script type="text/javascript" src="application.js"></script>
</head>
@ -58,4 +73,4 @@
</body>
</html>
</html>

@ -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" ]
]
]
}

Loading…
Cancel
Save