Skip to content

Commit dbdb73a

Browse files
committed
Adjust reassurance modal layout for image sizing
1 parent 744af3a commit dbdb73a

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

views/css/everblock.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,34 @@
208208
border: 0;
209209
-webkit-appearance: none;
210210
}
211+
212+
#everblockModal.modal {
213+
text-align: center;
214+
}
215+
216+
#everblockModal .everblock-modal-dialog {
217+
display: inline-block;
218+
width: auto;
219+
max-width: 90vw;
220+
margin: 1.75rem auto;
221+
}
222+
223+
#everblockModal .everblock-modal-dialog .modal-content {
224+
text-align: left;
225+
}
226+
227+
#everblockModal .everblock-modal-media {
228+
display: flex;
229+
justify-content: center;
230+
}
231+
232+
#everblockModal .everblock-modal-image {
233+
display: block;
234+
width: auto;
235+
max-width: 100%;
236+
height: auto;
237+
max-height: 80vh;
238+
}
211239
.ever-model-product.card {
212240
border: 1px solid #dee2e6; /* même valeur que Bootstrap 4 */
213241
border-radius: 0.25rem;

views/templates/front/modal.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
{if isset($everblock_modal) && $everblock_modal}
2020
<div class="modal fade everblockModal" id="everblockModal" tabindex="-1" role="dialog" aria-labelledby="everblockModalLabel" aria-hidden="true">
21-
<div class="modal-dialog modal-lg" role="document">
21+
<div class="modal-dialog modal-dialog-centered everblock-modal-dialog" role="document">
2222
<div class="modal-content"
23-
{if isset($everblock_modal->background) && $everblock_modal->background}
24-
style="background-color:{$everblock_modal->background|escape:'htmlall':'UTF-8'};"
23+
{if isset($everblock_modal->background) && $everblock_modal->background}
24+
style="background-color:{$everblock_modal->background|escape:'htmlall':'UTF-8'};"
2525
{/if}>
2626
{* SEO : modal must have titles *}
2727
<p id="everblockModalLabel" class="h5 modal-title d-none">
@@ -37,7 +37,7 @@
3737
{if isset($everblock_modal->file) && $everblock_modal->file}
3838
<div class="everblock-modal-media mt-3">
3939
{if isset($everblock_modal->file_render_type) && $everblock_modal->file_render_type == 'image'}
40-
<img src="{$everblock_modal->file|escape:'htmlall':'UTF-8'}" alt="" class="img-fluid" loading="lazy" />
40+
<img src="{$everblock_modal->file|escape:'htmlall':'UTF-8'}" alt="" class="everblock-modal-image" loading="lazy" />
4141
{elseif isset($everblock_modal->file_render_type) && $everblock_modal->file_render_type == 'video'}
4242
<video controls preload="metadata" class="w-100">
4343
<source src="{$everblock_modal->file|escape:'htmlall':'UTF-8'}" type="video/{$everblock_modal->file_extension|escape:'htmlall':'UTF-8'}" />

0 commit comments

Comments
 (0)