Put parser in fieldset
This commit is contained in:
parent
9cab2942bf
commit
86705df03d
@ -9,8 +9,8 @@ module Main exposing
|
|||||||
|
|
||||||
import Browser
|
import Browser
|
||||||
import Data exposing (Url, hostname, toUrl)
|
import Data exposing (Url, hostname, toUrl)
|
||||||
import Html exposing (Html, div, input)
|
import Html exposing (Html, fieldset, input, label)
|
||||||
import Html.Attributes exposing (placeholder, readonly, style, value)
|
import Html.Attributes exposing (for, id, placeholder, readonly, style, value)
|
||||||
import Html.Events exposing (onInput)
|
import Html.Events exposing (onInput)
|
||||||
import Parse exposing (parseUrl)
|
import Parse exposing (parseUrl)
|
||||||
|
|
||||||
@ -46,22 +46,19 @@ displayMUrl mUrl =
|
|||||||
|> Maybe.withDefault (hostname ++ "<service>/<user>/<repo>/<gitref>/<file>")
|
|> Maybe.withDefault (hostname ++ "<service>/<user>/<repo>/<gitref>/<file>")
|
||||||
|
|
||||||
|
|
||||||
myStyle : List (Html.Attribute msg)
|
myStyle : List (Html.Attribute msg) -> List (Html.Attribute msg)
|
||||||
myStyle =
|
myStyle =
|
||||||
[ style "width" "100%" ]
|
List.append [ style "width" "100%" ]
|
||||||
|
|
||||||
|
|
||||||
myStyle2 : List (Html.Attribute msg) -> List (Html.Attribute msg)
|
|
||||||
myStyle2 =
|
|
||||||
List.append myStyle
|
|
||||||
|
|
||||||
|
|
||||||
view : Model -> Html Msg
|
view : Model -> Html Msg
|
||||||
view state =
|
view state =
|
||||||
div myStyle
|
fieldset []
|
||||||
[ input (myStyle2 [ placeholder "GitHub/GitLab/Bitbucket URL", value state.url, onInput UrlChange ])
|
[ label [ for "url" ] []
|
||||||
|
, input (myStyle [ id "url", placeholder "GitHub/GitLab/Bitbucket URL", value state.url, onInput UrlChange ])
|
||||||
[]
|
[]
|
||||||
, input (myStyle2 [ readonly True, value (displayMUrl state.parsed) ]) []
|
, label [ for "output" ] []
|
||||||
|
, input (myStyle [ id "output", readonly True, value (displayMUrl state.parsed) ]) []
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user