Adding ICS button. Make sidebar not sticky.

This commit is contained in:
Vidir Valberg Gudmundsson 2017-08-16 19:58:04 +02:00
parent 25eb491f24
commit 8055071b8b
2 changed files with 30 additions and 8 deletions

View file

@ -14,8 +14,8 @@ import Regex
-- External modules -- External modules
import Html exposing (Html, text, div, ul, li, span, i, h4, small) import Html exposing (Html, text, div, ul, li, span, i, h4, small, a)
import Html.Attributes exposing (class, classList, style) import Html.Attributes exposing (class, classList, style, href)
import Html.Events exposing (onClick) import Html.Events exposing (onClick)
import Date.Extra exposing (Interval(..), equalBy) import Date.Extra exposing (Interval(..), equalBy)
@ -60,9 +60,7 @@ filterSidebar model =
[ classList [ classList
[ ( "col-sm-3", True ) [ ( "col-sm-3", True )
, ( "col-sm-push-9", True ) , ( "col-sm-push-9", True )
, ( "schedule-sidebar", True )
, ( "schedule-filter", True ) , ( "schedule-filter", True )
, ( "sticky", True )
] ]
] ]
[ h4 [] [ text "Filter" ] [ h4 [] [ text "Filter" ]
@ -86,9 +84,37 @@ filterSidebar model =
model.eventInstances model.eventInstances
.videoState .videoState
] ]
, icsButton model
] ]
icsButton : Model -> Html Msg
icsButton model =
let
filterString =
case filterToString model.filter of
"" ->
""
filter ->
"?" ++ filter
icsURL =
model.flags.ics_button_href ++ filterString
in
a
[ classList
[ ( "btn", True )
, ( "btn-default", True )
]
, href <| icsURL
]
[ i [ classList [ ( "fa", True ), ( "fa-calendar", True ) ] ]
[]
, text " ICS file with these filters"
]
videoRecordingFilters : List FilterType videoRecordingFilters : List FilterType
videoRecordingFilters = videoRecordingFilters =
[ VideoFilter "Will not be recorded" "not-to-be-recorded" [ VideoFilter "Will not be recorded" "not-to-be-recorded"

View file

@ -233,10 +233,6 @@ footer {
} }
} }
.schedule-sidebar {
top: 120px;
}
.sticky { .sticky {
position: sticky; position: sticky;
background-color: #fff; background-color: #fff;