style(gallery): update gallery demande UI
This commit is contained in:
parent
e5b6a28e0b
commit
c6a2cb0240
3 changed files with 37 additions and 33 deletions
Binary file not shown.
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.3 KiB |
|
@ -33,16 +33,18 @@
|
|||
color: var(--text-active-blue-france);
|
||||
border: 1px solid var(--border-active-blue-france);
|
||||
padding: 0.25rem 0.75rem;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--hover-tint);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--active-tint);
|
||||
}
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
a.gallery-link:hover .fr-btn,
|
||||
a.gallery-link:active .fr-btn {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
a.gallery-link:active .fr-btn {
|
||||
background-color: var(--hover-tint);
|
||||
}
|
||||
}
|
||||
|
||||
.gallery-pieces-jointes {
|
||||
|
@ -52,17 +54,16 @@
|
|||
.gallery-item {
|
||||
margin: 0 2rem 1.5rem 0;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.gallery-demande {
|
||||
img {
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
.gallery-items-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.gallery-item {
|
||||
margin: 0.5rem 2rem 1rem 0;
|
||||
}
|
||||
|
||||
.fr-download {
|
||||
|
@ -71,7 +72,7 @@
|
|||
|
||||
.thumbnail {
|
||||
width: fit-content;
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,21 +4,24 @@
|
|||
- champ.piece_justificative_file.attachments.each do |attachment|
|
||||
%li= render Attachment::ShowComponent.new(attachment:, new_tab: true)
|
||||
- else
|
||||
- champ.piece_justificative_file.attachments.each do |attachment|
|
||||
%ul
|
||||
%li= render Attachment::ShowComponent.new(attachment:, new_tab: true, truncate: true)
|
||||
.gallery-item
|
||||
- blob = attachment.blob
|
||||
- if blob.content_type.in?(AUTHORIZED_PDF_TYPES)
|
||||
= link_to blob.url, id: blob.id, data: { iframe: true, src: blob.url }, class: 'gallery-link', type: blob.content_type, title: "#{champ.libelle} -- #{blob.filename}" do
|
||||
.thumbnail
|
||||
= image_tag("pdf-placeholder.png")
|
||||
.fr-btn.fr-btn--tertiary.fr-btn--icon-left.fr-icon-eye{ role: :button }
|
||||
= 'Visualiser'
|
||||
.gallery-items-list
|
||||
- champ.piece_justificative_file.attachments.each do |attachment|
|
||||
.gallery-item
|
||||
- blob = attachment.blob
|
||||
- if blob.content_type.in?(AUTHORIZED_PDF_TYPES)
|
||||
= link_to blob.url, id: blob.id, data: { iframe: true, src: blob.url }, class: 'gallery-link', type: blob.content_type, title: "#{champ.libelle} -- #{blob.filename}" do
|
||||
.thumbnail
|
||||
= image_tag("pdf-placeholder.png")
|
||||
.fr-btn.fr-btn--tertiary.fr-btn--icon-left.fr-icon-eye{ role: :button }
|
||||
= 'Visualiser'
|
||||
|
||||
- elsif blob.content_type.in?(AUTHORIZED_IMAGE_TYPES)
|
||||
= link_to image_url(blob.url), title: "#{champ.libelle} -- #{blob.filename}", data: { src: blob.url }, class: 'gallery-link' do
|
||||
- elsif blob.content_type.in?(AUTHORIZED_IMAGE_TYPES)
|
||||
= link_to image_url(blob.url), title: "#{champ.libelle} -- #{blob.filename}", data: { src: blob.url }, class: 'gallery-link' do
|
||||
.thumbnail
|
||||
= image_tag(attachment.variant(:medium), loading: :lazy)
|
||||
.fr-btn.fr-btn--tertiary.fr-btn--icon-left.fr-icon-eye{ role: :button }
|
||||
= 'Visualiser'
|
||||
- else
|
||||
.thumbnail
|
||||
= image_tag(attachment.variant(:small), loading: :lazy)
|
||||
.fr-btn.fr-btn--tertiary.fr-btn--icon-left.fr-icon-eye{ role: :button }
|
||||
= 'Visualiser'
|
||||
= image_tag('apercu-indisponible.png')
|
||||
= render Attachment::ShowComponent.new(attachment:, new_tab: true, truncate: true)
|
||||
|
|
Loading…
Reference in a new issue