mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-25 16:45:05 +00:00
Move card size definition in css and fix height bug
For very tall images (sometimes shopping receipts), the height must be restricted, too.
This commit is contained in:
parent
10305bc82d
commit
976aa75710
@ -179,7 +179,7 @@ view cfg settings model item =
|
||||
pageCountLabel =
|
||||
div
|
||||
[ classList
|
||||
[ ( "card-attachment-nav", True )
|
||||
[ ( "card-attachment-nav top", True )
|
||||
, ( "invisible", pageCount == 0 || (item.fileCount == 1 && pageCount == 1) )
|
||||
]
|
||||
]
|
||||
@ -227,7 +227,10 @@ view cfg settings model item =
|
||||
span [ class "invisible" ] []
|
||||
|
||||
else
|
||||
div [ class "image" ]
|
||||
div
|
||||
[ class "image ds-card-image"
|
||||
, Data.UiSettings.cardPreviewSize settings
|
||||
]
|
||||
[ img
|
||||
[ class "preview-image"
|
||||
, src previewUrl
|
||||
|
@ -226,15 +226,8 @@ fieldHidden settings field =
|
||||
|
||||
cardPreviewSize : UiSettings -> Attribute msg
|
||||
cardPreviewSize settings =
|
||||
case settings.cardPreviewSize of
|
||||
Data.BasicSize.Small ->
|
||||
HA.style "max-width" "80px"
|
||||
|
||||
Data.BasicSize.Medium ->
|
||||
HA.style "max-width" "160px"
|
||||
|
||||
Data.BasicSize.Large ->
|
||||
HA.style "max-width" "none"
|
||||
Data.BasicSize.asString settings.cardPreviewSize
|
||||
|> HA.class
|
||||
|
||||
|
||||
|
||||
|
@ -92,19 +92,46 @@
|
||||
background: floralwhite;
|
||||
padding: 0.8em;
|
||||
}
|
||||
|
||||
.default-layout .ui.card .link.content:hover {
|
||||
box-shadow: 0 0 0 1px #d4d4d5,0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);
|
||||
}
|
||||
.default-layout .image .card-attachment-nav {
|
||||
position: absolute;
|
||||
bottom: 2px;
|
||||
right: 2px;
|
||||
z-index: 10;
|
||||
}
|
||||
.default-layout .image .card-attachment-nav.bottom {
|
||||
bottom: 2px;
|
||||
}
|
||||
.default-layout .image .card-attachment-nav.top {
|
||||
top: 2px;
|
||||
}
|
||||
.default-layout .image.ds-card-image {
|
||||
overflow: auto;
|
||||
}
|
||||
.default-layout .image.ds-card-image.small {
|
||||
max-height: 120px;
|
||||
}
|
||||
.default-layout .image.ds-card-image.medium {
|
||||
max-height: 240px;
|
||||
}
|
||||
.default-layout .image.ds-card-image.large {
|
||||
max-height: 600px;
|
||||
}
|
||||
.default-layout img.preview-image {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.default-layout img.preview-image.small {
|
||||
max-width: 80px;
|
||||
}
|
||||
.default-layout img.preview-image.medium {
|
||||
max-width: 160px;
|
||||
}
|
||||
.default-layout img.preview-image.large {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.default-layout .menu .item.active a.right-tab-icon-link {
|
||||
position: relative;
|
||||
|
Loading…
x
Reference in New Issue
Block a user