Adds download link to documents #.

This commit is contained in:
mateuswetah 2020-04-06 17:05:01 -03:00
parent 273baa1bd0
commit 6ba21d2085
3 changed files with 60 additions and 2 deletions

View File

@ -375,7 +375,14 @@
}
&.single-item-collection{
min-height: 23.5vh;
.single-item-collection--document{
position: relative;
.single-item-collection--document {
&:hover {
.tainacan-item-document-download {
opacity: 1;
transform: scale(1);
}
}
color: black;
font : {
size: 0.875rem;
@ -389,6 +396,9 @@
height: auto;
margin: 0 auto;
}
> audio {
width: 100%;
}
> iframe {
@media only screen and (min-width: 768px){
min-height: 600px;
@ -408,6 +418,49 @@
bottom: 0;
}
}
.tainacan-item-document-download {
position: absolute;
opacity: 0;
transform: scale(0);
border-radius: 24px;
width: 36px;
height: 36px;
bottom: -18px;
right: calc(50% - 18px);
cursor: pointer;
font-size: 0;
background-color: #298596;
color: white;
transition: opacity 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
a {
height: 38px;
width: 38px;
display: block;
position: relative;
z-index: 99;
}
&::after {
position: relative;
top: -38px;
display: inline-block;
font: normal normal normal 20px/1 "TainacanIcons";
font-size: 1.25rem !important;
line-height: 2.25rem;
text-rendering: auto;
vertical-align: middle;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 1.25em;
text-transform: none !important;
letter-spacing: normal !important;
content: 'download';
display: flex;
justify-content: center;
align-items: center;
}
}
}
.single-item-collection--attachments {
.single-item-collection--attachments-file {

File diff suppressed because one or more lines are too long

View File

@ -38,6 +38,11 @@
<section class="tainacan-content single-item-collection margin-two-column">
<div class="single-item-collection--document">
<?php tainacan_the_document(); ?>
<?php if(function_exists('tainacan_the_item_document_download_link')) {
echo '<span class="tainacan-item-document-download">';
tainacan_the_item_document_download_link();
echo '</span>';
} ?>
</div>
</section>
<?php endif; ?>