Skip to content

Commit

Permalink
Fixednav spacing, tweaked event video link display, and removed the b…
Browse files Browse the repository at this point in the history
…ack to list view link.
  • Loading branch information
rapind committed Sep 1, 2024
1 parent f49c6d2 commit e2c5c99
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion prod.min.js

Large diffs are not rendered by default.

47 changes: 21 additions & 26 deletions src/Results.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1954,8 +1954,8 @@ view model =
)
)
, El.centerX
, El.scrollbarX
, El.clipY
, El.scrollbarX
, El.inFront
(row [ El.alignRight, El.spacing 10, El.paddingXY 0 10 ]
[ el [ El.alignTop ] (viewReloadButton theme model)
Expand Down Expand Up @@ -2117,7 +2117,7 @@ viewFetchError { flags, fullScreen, hash } message =


viewItems : Theme -> List Translation -> Model -> ItemsResult -> Element Msg
viewItems theme translations { flags, fullScreen, itemFilter } items =
viewItems theme translations { flags, fullScreen, itemFilter, device } items =
let
viewPaging =
let
Expand Down Expand Up @@ -2194,7 +2194,7 @@ viewItems theme translations { flags, fullScreen, itemFilter } items =
|> Maybe.withDefault "-"
in
row
[ El.width (El.px 184)
[ El.width (El.px 150)
, El.padding 10
, Border.width 1
, Border.color theme.grey
Expand Down Expand Up @@ -2243,7 +2243,16 @@ viewItems theme translations { flags, fullScreen, itemFilter } items =
column [ El.spacing 10, El.width El.fill, El.height (El.fill |> El.minimum 250) ]
[ row [ El.spacing 20 ]
[ Input.text
[ El.width (El.px 200)
[ El.width
(El.px
(case device.class of
El.Phone ->
180

_ ->
250
)
)
, Border.width 1
, Border.color theme.grey
, El.padding 10
Expand Down Expand Up @@ -2518,39 +2527,25 @@ viewEvent theme translations { flags, device, scoringHilight, fullScreen } neste
, El.htmlAttribute (class "cio__event")
]
[ el [ Font.size 28, El.width El.fill, Font.medium, El.htmlAttribute (class "cio__event_name") ] (text event.name)
, El.wrappedRow [ El.width El.fill, El.htmlAttribute (class "cio__event_nav") ]
, El.wrappedRow [ El.width El.fill, El.spacingXY 0 8, El.htmlAttribute (class "cio__event_nav") ]
(List.map viewNavItem (eventSections flags.excludeEventSections event)
++ (case event.videoUrl of
Just videoUrl ->
[ button
[ El.padding 16
, Font.color theme.primary
[ el [ El.padding 8 ] (text "")
, button
[ El.padding 8
, Border.rounded 4
, Font.color theme.white
, Background.color theme.secondary
]
{ onPress = Just (NavigateOut videoUrl)
, label = text (translate translations "video" ++ " »")
, label = text (translate translations "video")
}
]

Nothing ->
[]
)
++ (if flags.eventId == Nothing then
[ el [ El.alignRight ]
(button
[ El.padding 16
, Font.color theme.primary
, Border.rounded 4
, El.focused [ Background.color theme.white ]
]
{ onPress = Just (NavigateTo "/events")
, label = text (translate translations (itemsSectionName flags.section) ++ " »")
}
)
]

else
[]
)
)
, case nestedRoute of
DetailsRoute ->
Expand Down

0 comments on commit e2c5c99

Please sign in to comment.