Fix wrong scrolling behavior for account timeline.

This commit is contained in:
Nicolas Perriault 2017-04-28 19:33:38 +02:00
parent 3ea6aaade2
commit cfe0937a01
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A
2 changed files with 41 additions and 35 deletions

View File

@ -56,6 +56,10 @@ body {
text-decoration: none; text-decoration: none;
} }
.timeline .list-group {
margin-bottom: 0;
}
.status, .follow-profile, .current-user { .status, .follow-profile, .current-user {
min-height: 50px; min-height: 50px;
clear: both; clear: both;

View File

@ -204,10 +204,11 @@ statusView context ({ account, content, media_attachments, reblog, mentions } as
accountTimelineView : Mastodon.Model.Account -> List Mastodon.Model.Status -> String -> String -> Html Msg accountTimelineView : Mastodon.Model.Account -> List Mastodon.Model.Status -> String -> String -> Html Msg
accountTimelineView account statuses label iconName = accountTimelineView account statuses label iconName =
div [ class "col-md-3" ] div [ class "col-md-3 column" ]
[ div [ class "panel panel-default" ] [ div [ class "panel panel-default" ]
[ closeablePanelheading iconName label ClearOpenedAccount [ closeablePanelheading iconName label ClearOpenedAccount
, div [ class "account-detail", style [ ( "background-image", "url('" ++ account.header ++ "')" ) ] ] , div [ class "timeline" ]
[ div [ class "account-detail", style [ ( "background-image", "url('" ++ account.header ++ "')" ) ] ]
[ div [ class "opacity-layer" ] [ div [ class "opacity-layer" ]
[ img [ src account.avatar ] [] [ img [ src account.avatar ] []
, span [ class "account-display-name" ] [ text account.display_name ] , span [ class "account-display-name" ] [ text account.display_name ]
@ -232,7 +233,7 @@ accountTimelineView account statuses label iconName =
, text <| toString account.followers_count , text <| toString account.followers_count
] ]
] ]
, ul [ class "list-group timeline" ] <| , ul [ class "list-group" ] <|
List.map List.map
(\s -> (\s ->
li [ class "list-group-item status" ] li [ class "list-group-item status" ]
@ -241,6 +242,7 @@ accountTimelineView account statuses label iconName =
statuses statuses
] ]
] ]
]
statusActionsView : Mastodon.Model.Status -> Html Msg statusActionsView : Mastodon.Model.Status -> Html Msg
@ -320,7 +322,7 @@ statusEntryView context className status =
timelineView : String -> String -> String -> List Mastodon.Model.Status -> Html Msg timelineView : String -> String -> String -> List Mastodon.Model.Status -> Html Msg
timelineView label iconName context statuses = timelineView label iconName context statuses =
div [ class "col-md-3" ] div [ class "col-md-3 column" ]
[ div [ class "panel panel-default" ] [ div [ class "panel panel-default" ]
[ a [ a
[ href "", onClickWithPreventAndStop <| ScrollColumn context ] [ href "", onClickWithPreventAndStop <| ScrollColumn context ]
@ -396,7 +398,7 @@ notificationEntryView notification =
notificationListView : List Mastodon.Model.NotificationAggregate -> Html Msg notificationListView : List Mastodon.Model.NotificationAggregate -> Html Msg
notificationListView notifications = notificationListView notifications =
div [ class "col-md-3" ] div [ class "col-md-3 column" ]
[ div [ class "panel panel-default" ] [ div [ class "panel panel-default" ]
[ a [ a
[ href "", onClickWithPreventAndStop <| ScrollColumn "notifications" ] [ href "", onClickWithPreventAndStop <| ScrollColumn "notifications" ]
@ -578,7 +580,7 @@ threadView thread =
) )
status status
in in
div [ class "col-md-3" ] div [ class "col-md-3 column" ]
[ div [ class "panel panel-default" ] [ div [ class "panel panel-default" ]
[ closeablePanelheading "list" "Thread" CloseThread [ closeablePanelheading "list" "Thread" CloseThread
, ul [ class "list-group timeline" ] <| , ul [ class "list-group timeline" ] <|
@ -604,7 +606,7 @@ optionsView model =
sidebarView : Model -> Html Msg sidebarView : Model -> Html Msg
sidebarView model = sidebarView model =
div [ class "col-md-3" ] div [ class "col-md-3 column" ]
[ draftView model [ draftView model
, optionsView model , optionsView model
] ]