Renders ekkolightbox contents inside iframe so that PDF files can be displayed.
This commit is contained in:
parent
229c22e61f
commit
6c7657eeee
|
@ -356,6 +356,7 @@
|
|||
}
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
> iframe, img.attachment-large {
|
||||
display: block;
|
||||
height: auto;
|
||||
|
@ -406,6 +407,7 @@
|
|||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
line-height: 1.5rem
|
||||
}
|
||||
a,
|
||||
a:focus,
|
||||
|
@ -415,6 +417,10 @@
|
|||
cursor: pointer;
|
||||
color: black;
|
||||
}
|
||||
.attachment-without-image img {
|
||||
padding: 42px;
|
||||
background-color: #dbdbdb;
|
||||
}
|
||||
}
|
||||
.single-item-collection--attachments-prev {
|
||||
left: -50px;
|
||||
|
|
|
@ -82,9 +82,11 @@
|
|||
<div class="single-item-collection--attachments">
|
||||
<?php foreach ( $attachments as $attachment ) { ?>
|
||||
<div class="single-item-collection--attachments-file">
|
||||
<a href="<?php echo wp_get_attachment_url($attachment->ID, 'large'); ?>" data-toggle="lightbox" data-gallery="example-gallery">
|
||||
<a
|
||||
class="<?php if (!wp_get_attachment_image( $attachment->ID, 'tainacan-interface-item-attachments')) echo'attachment-without-image'; ?>"
|
||||
href="<?php echo wp_get_attachment_url($attachment->ID, 'large'); ?>" data-toggle="lightbox" data-disable-external-check="true" data-gallery="example-gallery">
|
||||
<?php
|
||||
echo wp_get_attachment_image( $attachment->ID, 'tainacan-interface-item-attachments' );
|
||||
echo wp_get_attachment_image( $attachment->ID, 'tainacan-interface-item-attachments', true );
|
||||
echo get_the_title( $attachment->ID );
|
||||
?>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue