Displays attachment download link when inside documents section.
This commit is contained in:
parent
8f876a8f32
commit
3b2aa319ca
|
@ -485,54 +485,11 @@
|
||||||
clear: both;
|
clear: both;
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
&.single-item-collection{
|
&.single-item-collection {
|
||||||
min-height: 10vh;
|
min-height: 10vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.single-item-collection--document {
|
.tainacan-item-file-download {
|
||||||
&:hover {
|
|
||||||
.tainacan-item-document-download {
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
color: black;
|
|
||||||
font : {
|
|
||||||
size: 0.875rem;
|
|
||||||
weight: 400;
|
|
||||||
}
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
> iframe, img.attachment-large {
|
|
||||||
display: block;
|
|
||||||
height: auto;
|
|
||||||
margin: 0 auto;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
> audio {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
> iframe {
|
|
||||||
@media only screen and (min-width: 768px){
|
|
||||||
min-height: 600px;
|
|
||||||
}
|
|
||||||
@media only screen and (max-width: 576px){
|
|
||||||
min-height: 429px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.tainacan-embed-container{
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
iframe {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.tainacan-item-document-download {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
|
@ -575,6 +532,49 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.single-item-collection--document {
|
||||||
|
&:hover {
|
||||||
|
.tainacan-item-file-download {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
color: black;
|
||||||
|
font : {
|
||||||
|
size: 0.875rem;
|
||||||
|
weight: 400;
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
> iframe, img.attachment-large {
|
||||||
|
display: block;
|
||||||
|
height: auto;
|
||||||
|
margin: 0 auto;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
> audio {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
> iframe {
|
||||||
|
@media only screen and (min-width: 768px){
|
||||||
|
min-height: 600px;
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 576px){
|
||||||
|
min-height: 429px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tainacan-embed-container{
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.single-item-collection--gallery {
|
.single-item-collection--gallery {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
@ -612,6 +612,14 @@
|
||||||
border-bottom: 4px solid #298596;
|
border-bottom: 4px solid #298596;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.single-item-collection--attachments-file {
|
||||||
|
&:hover {
|
||||||
|
.tainacan-item-file-download {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.single-item-collection--gallery-items,
|
.single-item-collection--gallery-items,
|
||||||
.single-item-collection--attachments {
|
.single-item-collection--attachments {
|
||||||
.single-item-collection--attachments-file {
|
.single-item-collection--attachments-file {
|
||||||
|
@ -682,7 +690,8 @@
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.single-item-collection--attachments-prev, .single-item-collection--attachments-next {
|
.single-item-collection--attachments-prev,
|
||||||
|
.single-item-collection--attachments-next {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: block;
|
display: block;
|
||||||
height: 33px;
|
height: 33px;
|
||||||
|
|
|
@ -1491,7 +1491,7 @@ function tainacan_get_color_scheme_css( $colors ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Document download button */
|
/* Document download button */
|
||||||
.tainacan-single-post article .tainacan-content.single-item-collection .single-item-collection--document .tainacan-item-document-download {
|
.tainacan-single-post article .tainacan-content.single-item-collection .single-item-collection--document .tainacan-item-file-download {
|
||||||
background-color: {$colors['tainacan_link_color']} !important;
|
background-color: {$colors['tainacan_link_color']} !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -39,7 +39,7 @@
|
||||||
<?php
|
<?php
|
||||||
tainacan_the_document();
|
tainacan_the_document();
|
||||||
if ( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
if ( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
||||||
echo '<span class="tainacan-item-document-download">' . tainacan_the_item_document_download_link() . '</span>';
|
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_document_download_link() . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,6 +52,9 @@
|
||||||
if ( function_exists('tainacan_get_single_attachment_as_html') ) {
|
if ( function_exists('tainacan_get_single_attachment_as_html') ) {
|
||||||
tainacan_get_single_attachment_as_html($attachment->ID);
|
tainacan_get_single_attachment_as_html($attachment->ID);
|
||||||
}
|
}
|
||||||
|
if ( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_attachment_download_link') && tainacan_the_item_attachment_download_link($attachment->ID) != '' ) {
|
||||||
|
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_attachment_download_link($attachment->ID) . '</span>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<?php
|
<?php
|
||||||
tainacan_the_document();
|
tainacan_the_document();
|
||||||
if( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
if( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
||||||
echo '<span class="tainacan-item-document-download">' . tainacan_the_item_document_download_link() . '</span>';
|
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_document_download_link() . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue