Adds Gallery Above Title layout to item single page.
This commit is contained in:
parent
e35bcc0b0a
commit
9fa68ca82f
|
@ -35,8 +35,8 @@ $inner_options = [
|
||||||
'id' => 'palette-2',
|
'id' => 'palette-2',
|
||||||
|
|
||||||
'color1' => [ 'color' => 'var(--paletteColor3, #415161)' ],
|
'color1' => [ 'color' => 'var(--paletteColor3, #415161)' ],
|
||||||
'color2' => [ 'color' => 'var(--paletteColor7, #f8f9fb)' ],
|
'color2' => [ 'color' => 'var(--paletteColor4, #2c3e50)' ],
|
||||||
'color3' => [ 'color' => 'var(--paletteColor2, #33a370)' ]
|
'color3' => [ 'color' => 'var(--paletteColor6, #edeff2)' ]
|
||||||
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
|
@ -38,10 +38,10 @@ $options = [
|
||||||
'title' => __( 'Metadata to the left', 'tainacan-blocksy' )
|
'title' => __( 'Metadata to the left', 'tainacan-blocksy' )
|
||||||
],
|
],
|
||||||
|
|
||||||
// 'type-gtm' => [
|
'type-gtm' => [
|
||||||
// 'src' => tainacan_blocksy_image_picker_url( 'type-gtm.svg' ),
|
'src' => tainacan_blocksy_image_picker_url( 'type-gtm.svg' ),
|
||||||
// 'title' => __( 'Document and Attachments above Title', 'tainacan-blocksy' ),
|
'title' => __( 'Document and Attachments above Title', 'tainacan-blocksy' ),
|
||||||
// ]
|
]
|
||||||
],
|
],
|
||||||
'sync' => ''
|
'sync' => ''
|
||||||
]
|
]
|
||||||
|
|
|
@ -165,5 +165,54 @@ if ( !function_exists('tainacan_get_default_order_choices') ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters the item single content page structure to add the media gallery above the title
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function tainacan_blocksy_render_media_gallery_above_title() {
|
||||||
|
|
||||||
|
$prefix = blocksy_manager()->screen->get_prefix();
|
||||||
|
$page_structure_type = get_theme_mod( $prefix . '_page_structure_type', 'type-dam');
|
||||||
|
|
||||||
|
if ($page_structure_type === 'type-gtm') {
|
||||||
|
|
||||||
|
$content_style = get_theme_mod($prefix . '_content_style', 'wide');
|
||||||
|
$extra_classes = '';
|
||||||
|
|
||||||
|
if ( is_array($content_style) ) {
|
||||||
|
|
||||||
|
if ( isset($content_style['desktop']) )
|
||||||
|
$extra_classes .= ' has-content-style-' . $content_style['desktop'] . '--desktop';
|
||||||
|
if ( isset($content_style['tablet']) )
|
||||||
|
$extra_classes .= ' has-content-style-' . $content_style['tablet'] . '--tablet';
|
||||||
|
if ( isset($content_style['mobile']) )
|
||||||
|
$extra_classes .= ' has-content-style-' . $content_style['mobile'] . '--mobile';
|
||||||
|
|
||||||
|
} elseif ( is_string($content_style) ) {
|
||||||
|
$extra_classes = 'has-content-style-' . $content_style;
|
||||||
|
}
|
||||||
|
|
||||||
|
$media_component_style = '';
|
||||||
|
$media_component_color_palette = get_theme_mod($prefix . '_document_attachments_colors',
|
||||||
|
[
|
||||||
|
'color1' => [ 'color' => 'var(--paletteColor6, #edeff2)' ],
|
||||||
|
'color2' => [ 'color' => 'var(--paletteColor4, #2c3e50)' ],
|
||||||
|
'color3' => [ 'color' => 'var(--paletteColor1, #3eaf7c)' ]
|
||||||
|
]);
|
||||||
|
|
||||||
|
$media_component_style .= '--tainacan-media-background-color:' . $media_component_color_palette['color1']['color'] . ';';
|
||||||
|
$media_component_style .= '--tainacan-media-color:' . $media_component_color_palette['color2']['color'] . ';';
|
||||||
|
$media_component_style .= '--tainacan-media-accent-color:' . $media_component_color_palette['color3']['color'] . ';';
|
||||||
|
|
||||||
|
echo '<div class="tainacan-gallery-above-title ' . $extra_classes . '" style="' . $media_component_style . '">';
|
||||||
|
tainacan_blocksy_get_template_part( 'template-parts/tainacan-item-single-document' );
|
||||||
|
do_action( 'tainacan-blocksy-single-item-after-document' );
|
||||||
|
|
||||||
|
tainacan_blocksy_get_template_part( 'template-parts/tainacan-item-single-attachments' );
|
||||||
|
do_action( 'tainacan-blocksy-single-item-after-attachments' );
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'blocksy:hero:before', 'tainacan_blocksy_render_media_gallery_above_title');
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -320,150 +320,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tainacan Media Component (attachments gallery)
|
|
||||||
.tainacan-media-component {
|
|
||||||
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
|
||||||
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
|
||||||
--swiper-navigation-size: 2.5rem;
|
|
||||||
--tainacan-media-background: var(--background-color, #ffffff);
|
|
||||||
--tainacan-media-main-carousel-height: var(--document-height, 60vh);
|
|
||||||
--tainacan-media-main-carousel-width: var(--document-width, 100%);
|
|
||||||
--tainacan-media-thumbs-carousel-width: var(--attachments-carousel-width, 100%);
|
|
||||||
--tainacan-media-thumbs-carousel-item-size: var(--attachments-size, 140px);
|
|
||||||
|
|
||||||
.tainacan-media-component__swiper-main {
|
|
||||||
.swiper-slide-metadata__name,
|
|
||||||
.swiper-slide-metadata__caption,
|
|
||||||
.swiper-slide-metadata__description {
|
|
||||||
font-family: var(--fontFamily);
|
|
||||||
font-size: var(--fontSize);
|
|
||||||
font-weight: var(--fontWeight);
|
|
||||||
font-style: var(--fontStyle, inherit);
|
|
||||||
line-height: var(--lineHeight);
|
|
||||||
letter-spacing: var(--letterSpacing);
|
|
||||||
text-transform: var(--textTransform);
|
|
||||||
-webkit-text-decoration: var(--textDecoration);
|
|
||||||
text-decoration: var(--textDecoration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.tainacan-media-component__swiper-thumbs {
|
|
||||||
font-weight: normal;
|
|
||||||
transition: font-weight 0.3s ease;
|
|
||||||
|
|
||||||
img {
|
|
||||||
border-radius: var(--borderRadius, 3px);
|
|
||||||
border-bottom: 4px solid transparent;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
transition: border 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-slide-metadata__name {
|
|
||||||
display: block;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
font-family: var(--fontFamily);
|
|
||||||
font-size: var(--fontSize);
|
|
||||||
font-weight: var(--fontWeight);
|
|
||||||
font-style: var(--fontStyle, inherit);
|
|
||||||
line-height: var(--lineHeight);
|
|
||||||
letter-spacing: var(--letterSpacing);
|
|
||||||
text-transform: var(--textTransform);
|
|
||||||
-webkit-text-decoration: var(--textDecoration);
|
|
||||||
text-decoration: var(--textDecoration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tainacan Gallery above title
|
|
||||||
.tainacan-gallery-above-title {
|
|
||||||
background-color: var(--tainacan-media-background-color, var(--paletteColor7));
|
|
||||||
margin-top: calc(-1 * var(--content-vertical-spacing));
|
|
||||||
margin-bottom: var(--content-vertical-spacing);
|
|
||||||
margin-left: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
|
||||||
margin-right: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
|
||||||
padding-top: calc(var(--content-vertical-spacing)/2);
|
|
||||||
padding-bottom: calc(var(--content-vertical-spacing)/2);
|
|
||||||
|
|
||||||
.tainacan-media-component {
|
|
||||||
--tainacan-media-background: var(--tainacan-media-background-color, var(--paletteColor7));
|
|
||||||
--swiper-navigation-color: var(--tainacan-media-accent-color, --paletteColor1);
|
|
||||||
--swiper-theme-color: var(--tainacan-media-accent-color, --paletteColor1);
|
|
||||||
--tainacan-label-color: var(--tainacan-media-color, --tainacan-label-color);
|
|
||||||
--tainacan-info-color: var(--tainacan-media-color, --tainacan-info-color);
|
|
||||||
}
|
|
||||||
.tainacan-item-section {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Document and attachments fixed column
|
|
||||||
.tainacan-item-single--affix-column .tainacan-item-section.tainacan-item-section--gallery {
|
|
||||||
position: sticky;
|
|
||||||
top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Document Download button -------------------------------------
|
|
||||||
.tainacan-item-file-download {
|
|
||||||
position: absolute;
|
|
||||||
opacity: 0;
|
|
||||||
transform: scale(0);
|
|
||||||
border-radius: 24px;
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
bottom: 0px;
|
|
||||||
right: calc(50% - 18px);
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 0;
|
|
||||||
background-color: var(--paletteColor1, #3eaf7c);
|
|
||||||
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;
|
|
||||||
background: transparent !important;
|
|
||||||
padding: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.tainacan-item-section__document {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&>.twitter-tweet,
|
|
||||||
&>iframe.wp-embedded-content {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.tainacan-media-component__swiper-main,
|
|
||||||
.tainacan-item-section__document {
|
|
||||||
&:hover .tainacan-item-file-download {
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Metadata section layouts */
|
/* Metadata section layouts */
|
||||||
.tainacan-item-section--metadata-sections {
|
.tainacan-item-section--metadata-sections {
|
||||||
.metadata-section-layout--tabs {
|
.metadata-section-layout--tabs {
|
||||||
|
@ -575,3 +431,151 @@
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page,
|
||||||
|
.tainacan-gallery-above-title {
|
||||||
|
|
||||||
|
// Tainacan Media Component (attachments gallery)
|
||||||
|
.tainacan-media-component {
|
||||||
|
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
--swiper-navigation-size: 2.5rem;
|
||||||
|
--tainacan-media-background: var(--background-color, #ffffff);
|
||||||
|
--tainacan-media-main-carousel-height: var(--document-height, 60vh);
|
||||||
|
--tainacan-media-main-carousel-width: var(--document-width, 100%);
|
||||||
|
--tainacan-media-thumbs-carousel-width: var(--attachments-carousel-width, 100%);
|
||||||
|
--tainacan-media-thumbs-carousel-item-size: var(--attachments-size, 140px);
|
||||||
|
|
||||||
|
.tainacan-media-component__swiper-main {
|
||||||
|
.swiper-slide-metadata__name,
|
||||||
|
.swiper-slide-metadata__caption,
|
||||||
|
.swiper-slide-metadata__description {
|
||||||
|
font-family: var(--fontFamily);
|
||||||
|
font-size: var(--fontSize);
|
||||||
|
font-weight: var(--fontWeight);
|
||||||
|
font-style: var(--fontStyle, inherit);
|
||||||
|
line-height: var(--lineHeight);
|
||||||
|
letter-spacing: var(--letterSpacing);
|
||||||
|
text-transform: var(--textTransform);
|
||||||
|
-webkit-text-decoration: var(--textDecoration);
|
||||||
|
text-decoration: var(--textDecoration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tainacan-media-component__swiper-thumbs {
|
||||||
|
font-weight: normal;
|
||||||
|
transition: font-weight 0.3s ease;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: var(--borderRadius, 3px);
|
||||||
|
border-bottom: 4px solid transparent;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
transition: border 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-slide-metadata__name {
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
font-family: var(--fontFamily);
|
||||||
|
font-size: var(--fontSize);
|
||||||
|
font-weight: var(--fontWeight);
|
||||||
|
font-style: var(--fontStyle, inherit);
|
||||||
|
line-height: var(--lineHeight);
|
||||||
|
letter-spacing: var(--letterSpacing);
|
||||||
|
text-transform: var(--textTransform);
|
||||||
|
-webkit-text-decoration: var(--textDecoration);
|
||||||
|
text-decoration: var(--textDecoration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Document and attachments fixed column
|
||||||
|
.tainacan-item-single--affix-column .tainacan-item-section.tainacan-item-section--gallery {
|
||||||
|
position: sticky;
|
||||||
|
top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Document Download button -------------------------------------
|
||||||
|
.tainacan-item-file-download {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0);
|
||||||
|
border-radius: 24px;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
bottom: 0px;
|
||||||
|
right: calc(50% - 18px);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 0;
|
||||||
|
background-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
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;
|
||||||
|
background: transparent !important;
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tainacan-item-section__document {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&>.twitter-tweet,
|
||||||
|
&>iframe.wp-embedded-content {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tainacan-media-component__swiper-main,
|
||||||
|
.tainacan-item-section__document {
|
||||||
|
&:hover .tainacan-item-file-download {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tainacan Gallery above title
|
||||||
|
.tainacan-gallery-above-title {
|
||||||
|
background-color: var(--tainacan-media-background-color, var(--paletteColor7));
|
||||||
|
margin-top: calc(-1 * var(--content-vertical-spacing));
|
||||||
|
margin-bottom: var(--content-vertical-spacing);
|
||||||
|
margin-left: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
||||||
|
margin-right: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
||||||
|
padding-top: calc(var(--content-vertical-spacing)/2);
|
||||||
|
padding-bottom: calc(var(--content-vertical-spacing)/2);
|
||||||
|
|
||||||
|
.tainacan-media-component {
|
||||||
|
--tainacan-media-background: var(--tainacan-media-background-color, var(--paletteColor7));
|
||||||
|
--swiper-navigation-color: var(--tainacan-media-accent-color, --paletteColor1);
|
||||||
|
--swiper-theme-color: var(--tainacan-media-accent-color, --paletteColor1);
|
||||||
|
--tainacan-label-color: var(--tainacan-media-color, --tainacan-label-color);
|
||||||
|
--tainacan-info-color: var(--tainacan-media-color, --tainacan-info-color);
|
||||||
|
}
|
||||||
|
.tainacan-item-section {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
|
@ -717,146 +717,6 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-media-component {
|
|
||||||
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
|
||||||
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
|
||||||
--swiper-navigation-size: 2.5rem;
|
|
||||||
--tainacan-media-background: var(--background-color, #ffffff);
|
|
||||||
--tainacan-media-main-carousel-height: var(--document-height, 60vh);
|
|
||||||
--tainacan-media-main-carousel-width: var(--document-width, 100%);
|
|
||||||
--tainacan-media-thumbs-carousel-width: var(--attachments-carousel-width, 100%);
|
|
||||||
--tainacan-media-thumbs-carousel-item-size: var(--attachments-size, 140px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__name,
|
|
||||||
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__caption,
|
|
||||||
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__description {
|
|
||||||
font-family: var(--fontFamily);
|
|
||||||
font-size: var(--fontSize);
|
|
||||||
font-weight: var(--fontWeight);
|
|
||||||
font-style: var(--fontStyle, inherit);
|
|
||||||
line-height: var(--lineHeight);
|
|
||||||
letter-spacing: var(--letterSpacing);
|
|
||||||
text-transform: var(--textTransform);
|
|
||||||
-webkit-text-decoration: var(--textDecoration);
|
|
||||||
text-decoration: var(--textDecoration);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-thumbs {
|
|
||||||
font-weight: normal;
|
|
||||||
transition: font-weight 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-thumbs img {
|
|
||||||
border-radius: var(--borderRadius, 3px);
|
|
||||||
border-bottom: 4px solid transparent;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
transition: border 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-thumbs .swiper-slide-metadata__name {
|
|
||||||
display: block;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
font-family: var(--fontFamily);
|
|
||||||
font-size: var(--fontSize);
|
|
||||||
font-weight: var(--fontWeight);
|
|
||||||
font-style: var(--fontStyle, inherit);
|
|
||||||
line-height: var(--lineHeight);
|
|
||||||
letter-spacing: var(--letterSpacing);
|
|
||||||
text-transform: var(--textTransform);
|
|
||||||
-webkit-text-decoration: var(--textDecoration);
|
|
||||||
text-decoration: var(--textDecoration);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-gallery-above-title {
|
|
||||||
background-color: var(--tainacan-media-background-color, var(--paletteColor7));
|
|
||||||
margin-top: calc(-1 * var(--content-vertical-spacing));
|
|
||||||
margin-bottom: var(--content-vertical-spacing);
|
|
||||||
margin-left: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
|
||||||
margin-right: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
|
||||||
padding-top: calc(var(--content-vertical-spacing)/2);
|
|
||||||
padding-bottom: calc(var(--content-vertical-spacing)/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-gallery-above-title .tainacan-media-component {
|
|
||||||
--tainacan-media-background: var(--tainacan-media-background-color, var(--paletteColor7));
|
|
||||||
--swiper-navigation-color: var(--tainacan-media-accent-color, --paletteColor1);
|
|
||||||
--swiper-theme-color: var(--tainacan-media-accent-color, --paletteColor1);
|
|
||||||
--tainacan-label-color: var(--tainacan-media-color, --tainacan-label-color);
|
|
||||||
--tainacan-info-color: var(--tainacan-media-color, --tainacan-info-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-gallery-above-title .tainacan-item-section {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-item-single--affix-column .tainacan-item-section.tainacan-item-section--gallery {
|
|
||||||
position: sticky;
|
|
||||||
top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-item-file-download {
|
|
||||||
position: absolute;
|
|
||||||
opacity: 0;
|
|
||||||
transform: scale(0);
|
|
||||||
border-radius: 24px;
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
bottom: 0px;
|
|
||||||
right: calc(50% - 18px);
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 0;
|
|
||||||
background-color: var(--paletteColor1, #3eaf7c);
|
|
||||||
color: white;
|
|
||||||
transition: opacity 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-item-file-download a {
|
|
||||||
height: 38px;
|
|
||||||
width: 38px;
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
z-index: 99;
|
|
||||||
background: transparent !important;
|
|
||||||
padding: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-item-file-download::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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-item-section__document {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-item-section__document > .twitter-tweet,
|
|
||||||
.tainacan-item-single-page .tainacan-item-section__document > iframe.wp-embedded-content {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-media-component__swiper-main:hover .tainacan-item-file-download,
|
|
||||||
.tainacan-item-single-page .tainacan-item-section__document:hover .tainacan-item-file-download {
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single-page .tainacan-item-section--metadata-sections .metadata-section-layout--tabs {
|
.tainacan-item-single-page .tainacan-item-section--metadata-sections .metadata-section-layout--tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
@ -986,6 +846,162 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-media-component,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component {
|
||||||
|
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
--swiper-navigation-size: 2.5rem;
|
||||||
|
--tainacan-media-background: var(--background-color, #ffffff);
|
||||||
|
--tainacan-media-main-carousel-height: var(--document-height, 60vh);
|
||||||
|
--tainacan-media-main-carousel-width: var(--document-width, 100%);
|
||||||
|
--tainacan-media-thumbs-carousel-width: var(--attachments-carousel-width, 100%);
|
||||||
|
--tainacan-media-thumbs-carousel-item-size: var(--attachments-size, 140px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__name,
|
||||||
|
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__caption,
|
||||||
|
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__description,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__name,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__caption,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component .tainacan-media-component__swiper-main .swiper-slide-metadata__description {
|
||||||
|
font-family: var(--fontFamily);
|
||||||
|
font-size: var(--fontSize);
|
||||||
|
font-weight: var(--fontWeight);
|
||||||
|
font-style: var(--fontStyle, inherit);
|
||||||
|
line-height: var(--lineHeight);
|
||||||
|
letter-spacing: var(--letterSpacing);
|
||||||
|
text-transform: var(--textTransform);
|
||||||
|
-webkit-text-decoration: var(--textDecoration);
|
||||||
|
text-decoration: var(--textDecoration);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-thumbs,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component .tainacan-media-component__swiper-thumbs {
|
||||||
|
font-weight: normal;
|
||||||
|
transition: font-weight 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-thumbs img,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component .tainacan-media-component__swiper-thumbs img {
|
||||||
|
border-radius: var(--borderRadius, 3px);
|
||||||
|
border-bottom: 4px solid transparent;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
transition: border 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-media-component .tainacan-media-component__swiper-thumbs .swiper-slide-metadata__name,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component .tainacan-media-component__swiper-thumbs .swiper-slide-metadata__name {
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
font-family: var(--fontFamily);
|
||||||
|
font-size: var(--fontSize);
|
||||||
|
font-weight: var(--fontWeight);
|
||||||
|
font-style: var(--fontStyle, inherit);
|
||||||
|
line-height: var(--lineHeight);
|
||||||
|
letter-spacing: var(--letterSpacing);
|
||||||
|
text-transform: var(--textTransform);
|
||||||
|
-webkit-text-decoration: var(--textDecoration);
|
||||||
|
text-decoration: var(--textDecoration);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-item-single--affix-column .tainacan-item-section.tainacan-item-section--gallery,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-single--affix-column .tainacan-item-section.tainacan-item-section--gallery {
|
||||||
|
position: sticky;
|
||||||
|
top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-item-file-download,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-file-download {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0);
|
||||||
|
border-radius: 24px;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
bottom: 0px;
|
||||||
|
right: calc(50% - 18px);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 0;
|
||||||
|
background-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
color: white;
|
||||||
|
transition: opacity 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-item-file-download a,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-file-download a {
|
||||||
|
height: 38px;
|
||||||
|
width: 38px;
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
z-index: 99;
|
||||||
|
background: transparent !important;
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-item-file-download::after,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-file-download::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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-item-section__document,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-section__document {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-item-section__document > .twitter-tweet,
|
||||||
|
.tainacan-item-single-page .tainacan-item-section__document > iframe.wp-embedded-content,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-section__document > .twitter-tweet,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-section__document > iframe.wp-embedded-content {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single-page .tainacan-media-component__swiper-main:hover .tainacan-item-file-download,
|
||||||
|
.tainacan-item-single-page .tainacan-item-section__document:hover .tainacan-item-file-download,
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component__swiper-main:hover .tainacan-item-file-download,
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-section__document:hover .tainacan-item-file-download {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-gallery-above-title {
|
||||||
|
background-color: var(--tainacan-media-background-color, var(--paletteColor7));
|
||||||
|
margin-top: calc(-1 * var(--content-vertical-spacing));
|
||||||
|
margin-bottom: var(--content-vertical-spacing);
|
||||||
|
margin-left: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
||||||
|
margin-right: var(--has-boxed, calc(-1 * var(--boxed-content-spacing)));
|
||||||
|
padding-top: calc(var(--content-vertical-spacing)/2);
|
||||||
|
padding-bottom: calc(var(--content-vertical-spacing)/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-gallery-above-title .tainacan-media-component {
|
||||||
|
--tainacan-media-background: var(--tainacan-media-background-color, var(--paletteColor7));
|
||||||
|
--swiper-navigation-color: var(--tainacan-media-accent-color, --paletteColor1);
|
||||||
|
--swiper-theme-color: var(--tainacan-media-accent-color, --paletteColor1);
|
||||||
|
--tainacan-label-color: var(--tainacan-media-color, --tainacan-label-color);
|
||||||
|
--tainacan-info-color: var(--tainacan-media-color, --tainacan-info-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-gallery-above-title .tainacan-item-section {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
#tainacan-taxonomy-terms-list-form {
|
#tainacan-taxonomy-terms-list-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -32,50 +32,6 @@ do_action( 'tainacan-blocksy-single-item-top' );
|
||||||
|
|
||||||
do_action( 'tainacan-blocksy-single-item-after-title' );
|
do_action( 'tainacan-blocksy-single-item-after-title' );
|
||||||
|
|
||||||
add_action( 'blocksy:hero:before', function() use ( $page_structure_type, $prefix ) {
|
|
||||||
|
|
||||||
if ($page_structure_type === 'type-gtm') {
|
|
||||||
|
|
||||||
$content_style = get_theme_mod($prefix . '_content_style', 'wide');
|
|
||||||
$extra_classes = '';
|
|
||||||
|
|
||||||
if ( is_array($content_style) ) {
|
|
||||||
|
|
||||||
if ( isset($content_style['desktop']) )
|
|
||||||
$extra_classes .= ' has-content-style-' . $content_style['desktop'] . '--desktop';
|
|
||||||
if ( isset($content_style['tablet']) )
|
|
||||||
$extra_classes .= ' has-content-style-' . $content_style['tablet'] . '--tablet';
|
|
||||||
if ( isset($content_style['mobile']) )
|
|
||||||
$extra_classes .= ' has-content-style-' . $content_style['mobile'] . '--mobile';
|
|
||||||
|
|
||||||
} elseif ( is_string($content_style) ) {
|
|
||||||
$extra_classes = 'has-content-style-' . $content_style;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $column_documents_attachments_affix )
|
|
||||||
$extra_classes .= ' has-column-affix';
|
|
||||||
|
|
||||||
$media_component_style = '';
|
|
||||||
$media_component_color_palette = get_theme_mod($prefix . '_document_attachments_colors',
|
|
||||||
[
|
|
||||||
'color1' => [ 'color' => 'var(--paletteColor6, #edeff2)' ],
|
|
||||||
'color2' => [ 'color' => 'var(--paletteColor4, #2c3e50)' ],
|
|
||||||
'color3' => [ 'color' => 'var(--paletteColor1, #3eaf7c)' ]
|
|
||||||
]);
|
|
||||||
|
|
||||||
$media_component_style .= '--tainacan-media-background-color:' . $media_component_color_palette['color1']['color'] . ';';
|
|
||||||
$media_component_style .= '--tainacan-media-color:' . $media_component_color_palette['color2']['color'] . ';';
|
|
||||||
$media_component_style .= '--tainacan-media-accent-color:' . $media_component_color_palette['color3']['color'] . ';';
|
|
||||||
|
|
||||||
echo '<div class="tainacan-gallery-above-title ' . $extra_classes . '" style="' . $media_component_style . '">';
|
|
||||||
tainacan_blocksy_get_template_part( 'template-parts/tainacan-item-single-document' );
|
|
||||||
do_action( 'tainacan-blocksy-single-item-after-document' );
|
|
||||||
|
|
||||||
tainacan_blocksy_get_template_part( 'template-parts/tainacan-item-single-attachments' );
|
|
||||||
do_action( 'tainacan-blocksy-single-item-after-attachments' );
|
|
||||||
echo '</div>';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="<?php echo esc_attr('tainacan-item-single tainacan-item-single--layout-'. $page_structure_type . ($column_documents_attachments_affix ? ' tainacan-item-single--affix-column' : '')) ?>" style="<?php echo esc_attr($template_columns_style) ?>">
|
<div class="<?php echo esc_attr('tainacan-item-single tainacan-item-single--layout-'. $page_structure_type . ($column_documents_attachments_affix ? ' tainacan-item-single--affix-column' : '')) ?>" style="<?php echo esc_attr($template_columns_style) ?>">
|
||||||
|
|
Loading…
Reference in New Issue