Skip to content

Commit

Permalink
Added a back button back into the event screen, but as the first item…
Browse files Browse the repository at this point in the history
… in the event nav.
  • Loading branch information
rapind committed Sep 1, 2024
1 parent 304be69 commit 54e53a4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
2 changes: 1 addition & 1 deletion prod.min.js

Large diffs are not rendered by default.

47 changes: 31 additions & 16 deletions src/Results.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2541,23 +2541,38 @@ viewEvent theme translations { flags, device, scoringHilight, fullScreen } neste
]
(text event.name)
, El.row [ El.width El.fill, El.htmlAttribute (class "cio__event_nav") ]
(List.map viewNavItem (eventSections flags.excludeEventSections event)
++ (case event.videoUrl of
Just videoUrl ->
[ el [ El.padding 8 ] (text "")
, El.newTabLink
[ El.padding 8
, Border.rounded 4
, Font.color theme.white
, Background.color theme.secondary
]
{ url = videoUrl
, label = text (translate translations "video")
}
]
((if flags.eventId == Nothing then
button
[ Font.color theme.primary
, Font.size 22
, El.padding 8
, El.focused [ Background.color theme.transparent ]
]
{ onPress = Just (NavigateTo "/events")
, label = text "«"
}

Nothing ->
[]
else
El.none
)
:: (List.map viewNavItem (eventSections flags.excludeEventSections event)
++ (case event.videoUrl of
Just videoUrl ->
[ el [ El.padding 8 ] (text "")
, El.newTabLink
[ El.padding 8
, Border.rounded 4
, Font.color theme.white
, Background.color theme.secondary
]
{ url = videoUrl
, label = text (translate translations "video")
}
]

Nothing ->
[]
)
)
)
, case nestedRoute of
Expand Down

0 comments on commit 54e53a4

Please sign in to comment.