Change the card link to only use the main content

The card is no longer a link itself. The main target is moved to be
the content (the area containing the title and tags). This is in
preparation of upcoming changes: if the whole card is a link, it
cannot contain other links, due to a restriction by html. Later a card
may have more links to provide.
This commit is contained in:
Eike Kettner 2020-11-09 14:36:58 +01:00
parent 67e8994aec
commit 848c245db6

View File

@ -219,15 +219,13 @@ viewItem cfg settings item =
Data.ItemSelection.Active ids ->
onClick (ToggleSelectItem ids item.id)
in
a
div
([ classList
[ ( "ui fluid card", True )
, ( cardColor, True )
, ( "current", cfg.current == Just item.id )
]
, id item.id
, href "#"
, cardAction
]
++ DD.draggable ItemDDMsg item.id
)
@ -243,7 +241,11 @@ viewItem cfg settings item =
]
[]
]
, div [ class "content" ]
, a
[ class "content"
, href "#"
, cardAction
]
[ case cfg.selection of
Data.ItemSelection.Active ids ->
div [ class "header" ]