A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Local navigation

+156 -9
+4 -1
elm.json
··· 18 18 "elm/svg": "1.0.1", 19 19 "elm/time": "1.0.0", 20 20 "elm/url": "1.0.0", 21 + "elm-community/list-extra": "8.1.0", 22 + "jorgengranseth/elm-string-format": "1.0.1", 21 23 "justgage/tachyons-elm": "4.1.0" 22 24 }, 23 25 "indirect": { 26 + "elm/regex": "1.0.0", 24 27 "elm/virtual-dom": "1.0.2" 25 28 } 26 29 }, ··· 28 31 "direct": {}, 29 32 "indirect": {} 30 33 } 31 - } 34 + }
+5 -2
src/Applications/UI.elm
··· 219 219 , T.items_center 220 220 , T.justify_center 221 221 , T.min_vh_100 222 + , T.ph3 222 223 , T.relative 223 224 , T.z_1 224 225 ] ··· 247 248 ----------------------------------------- 248 249 -- Main 249 250 ----------------------------------------- 250 - , chunk 251 + , block 252 + [ style "max-width" (String.fromFloat UI.Kit.insulationWidth ++ "px") ] 251 253 [ T.bg_white 252 254 , T.br1 253 255 , T.flex_grow_1 254 - , T.pa3 256 + , T.overflow_hidden 257 + , T.w_100 255 258 ] 256 259 [ case model.page of 257 260 Page.Index ->
+116 -4
src/Applications/UI/Navigation.elm
··· 1 - module UI.Navigation exposing (global, globalItem) 1 + module UI.Navigation exposing (Action(..), Icon(..), Label(..), LabelType(..), global, local) 2 2 3 3 import Chunky exposing (..) 4 - import Color 4 + import Color exposing (Color) 5 5 import Conditional exposing (..) 6 6 import Html exposing (Html, text) 7 - import Html.Attributes exposing (href, style) 7 + import Html.Attributes exposing (href, style, title) 8 + import Html.Events exposing (onClick) 9 + import List.Extra as List 10 + import String.Format 11 + import Svg exposing (Svg) 8 12 import Tachyons.Classes as T 9 - import UI.Core exposing (Msg) 13 + import UI.Core exposing (Msg(..)) 10 14 import UI.Kit 11 15 import UI.Page as Page exposing (Page) 12 16 13 17 14 18 19 + -- 🌳 20 + 21 + 22 + type Icon msg 23 + = Icon (Color -> Int -> Svg msg) 24 + 25 + 26 + type Label 27 + = Label String LabelType 28 + 29 + 30 + type LabelType 31 + = Hidden 32 + | Shown 33 + 34 + 35 + type Action 36 + = GoToPage Page 37 + | PerformMsg Msg 38 + 39 + 40 + 15 41 -- Global 16 42 17 43 ··· 69 95 70 96 globalBorderColor = 71 97 "rgba(65, 50, 63, 0.125)" 98 + 99 + 100 + 101 + -- Local 102 + 103 + 104 + local : List ( Icon Msg, Label, Action ) -> Page -> Html Msg 105 + local items activePage = 106 + block 107 + [ style "font-size" "12.5px" ] 108 + [ T.flex ] 109 + (items 110 + |> List.reverse 111 + |> List.indexedMap localItem 112 + |> List.reverse 113 + ) 114 + 115 + 116 + localItem : Int -> ( Icon Msg, Label, Action ) -> Html Msg 117 + localItem idx ( Icon icon, Label labelText labelType, action ) = 118 + slab 119 + (case action of 120 + GoToPage _ -> 121 + Html.a 122 + 123 + PerformMsg _ -> 124 + Html.button 125 + ) 126 + [ case action of 127 + GoToPage page -> 128 + href (Page.toString page) 129 + 130 + PerformMsg msg -> 131 + onClick msg 132 + 133 + -- 134 + , case labelType of 135 + Hidden -> 136 + title labelText 137 + 138 + Shown -> 139 + title "" 140 + 141 + -- 142 + , style "border-right-color" localBorderColor 143 + , style "border-right-style" "solid" 144 + , style "border-right-width" (ifThenElse (idx == 0) "0" "1px") 145 + , style "box-shadow" ("0 -1px 0 0 {{ }} inset" |> String.Format.value localBorderColor) 146 + , style "color" localTextColor 147 + ] 148 + [ ifThenElse (labelType == Hidden) T.flex_shrink_0 T.flex_grow_1 149 + 150 + -- 151 + , T.bn 152 + , T.fw6 153 + , T.inline_flex 154 + , T.items_center 155 + , T.justify_center 156 + , T.lh_solid 157 + , T.no_underline 158 + , T.pa3 159 + ] 160 + [ icon UI.Kit.colors.text 16 161 + 162 + -- 163 + , case labelType of 164 + Hidden -> 165 + empty 166 + 167 + Shown -> 168 + slab 169 + Html.span 170 + [] 171 + [ T.dib, T.ml1 ] 172 + [ text labelText ] 173 + ] 174 + 175 + 176 + localBorderColor : String 177 + localBorderColor = 178 + Color.toCssString UI.Kit.colors.subtleBorder 179 + 180 + 181 + localTextColor : String 182 + localTextColor = 183 + Color.toCssString UI.Kit.colors.text
+31 -2
src/Applications/UI/Sources.elm
··· 2 2 3 3 import Chunky exposing (..) 4 4 import Html exposing (Html, text) 5 - import Sources 5 + import Material.Icons.Content as Icons 6 + import Material.Icons.Navigation as Icons 7 + import Material.Icons.Notification as Icons 8 + import Sources exposing (..) 6 9 import UI.Core 10 + import UI.Navigation exposing (..) 11 + import UI.Page as Page 7 12 8 13 9 14 ··· 12 17 13 18 view : UI.Core.Model -> Sources.Page -> Html UI.Core.Msg 14 19 view model page = 15 - text "Sources" 20 + case page of 21 + Index -> 22 + index model 23 + 24 + 25 + 26 + -- PAGES 27 + 28 + 29 + index : UI.Core.Model -> Html UI.Core.Msg 30 + index model = 31 + chunk 32 + [] 33 + [ UI.Navigation.local 34 + [ ( Icon Icons.add 35 + , Label "Add a new source" Shown 36 + , GoToPage (Page.Sources Sources.Index) 37 + ) 38 + , ( Icon Icons.sync 39 + , Label "Process sources" Shown 40 + , PerformMsg UI.Core.Bypass 41 + ) 42 + ] 43 + model.page 44 + ]