github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/web/elm/src/Pipeline/Styles.elm (about) 1 module Pipeline.Styles exposing 2 ( cliIcon 3 , favoritedIcon 4 , groupItem 5 , groupsBar 6 , pauseToggle 7 , pipelineBackground 8 ) 9 10 import Assets 11 import Colors 12 import Concourse.Cli as Cli 13 import Html 14 import Html.Attributes exposing (style) 15 16 17 groupsBar : List (Html.Attribute msg) 18 groupsBar = 19 [ style "background-color" Colors.groupsBarBackground 20 , style "color" Colors.dashboardText 21 , style "display" "flex" 22 , style "flex-flow" "row wrap" 23 , style "padding" "5px" 24 ] 25 26 27 groupItem : { selected : Bool, hovered : Bool } -> List (Html.Attribute msg) 28 groupItem { selected, hovered } = 29 [ style "font-size" "14px" 30 , style "background" Colors.groupBackground 31 , style "margin" "5px" 32 , style "padding" "10px" 33 ] 34 ++ (if selected then 35 [ style "opacity" "1" 36 , style "border" <| "1px solid " ++ Colors.groupBorderSelected 37 ] 38 39 else if hovered then 40 [ style "opacity" "0.6" 41 , style "border" <| "1px solid " ++ Colors.groupBorderHovered 42 ] 43 44 else 45 [ style "opacity" "0.6" 46 , style "border" <| "1px solid " ++ Colors.groupBorderUnselected 47 ] 48 ) 49 50 51 favoritedIcon : List (Html.Attribute msg) 52 favoritedIcon = 53 [ style "border-left" <| 54 "1px solid " 55 ++ Colors.background 56 , style "background-color" Colors.topBarBackground 57 ] 58 59 60 pauseToggle : List (Html.Attribute msg) 61 pauseToggle = 62 [ style "border-left" <| 63 "1px solid " 64 ++ Colors.background 65 , style "background-color" Colors.topBarBackground 66 ] 67 68 69 cliIcon : Cli.Cli -> List (Html.Attribute msg) 70 cliIcon cli = 71 [ style "width" "12px" 72 , style "height" "12px" 73 , style "background-image" <| 74 Assets.backgroundImage <| 75 Just (Assets.CliIcon cli) 76 , style "background-repeat" "no-repeat" 77 , style "background-position" "50% 50%" 78 , style "background-size" "contain" 79 , style "display" "inline-block" 80 ] 81 82 83 pipelineBackground : String -> List (Html.Attribute msg) 84 pipelineBackground bg = 85 [ style "background-image" <| 86 "url(\"" 87 ++ bg 88 ++ "\")" 89 , style "background-repeat" "no-repeat" 90 , style "background-size" "cover" 91 , style "background-position" "center" 92 , style "opacity" "30%" 93 , style "filter" "grayscale(1)" 94 , style "width" "100%" 95 , style "height" "100%" 96 , style "position" "absolute" 97 ]