Adds boxed style to filters panel

This commit is contained in:
mateuswetah 2021-01-05 00:07:06 -03:00
parent ebe5e7e2c4
commit 29c6237dc7
10 changed files with 84 additions and 45 deletions

View File

@ -20,6 +20,17 @@ $options = [
'prefix' => $prefix,
]),
'inner-options' => [
$prefix . 'filters_panel_background_style' => [
'label' => __('Panel style', 'blocksy'),
'type' => 'ct-radio',
'value' => 'boxed',
'view' => 'text',
'divider' => 'bottom',
'choices' => [
'simple' => __('Simple', 'blocksy'),
'boxed' => __('Boxed', 'blocksy'),
],
],
$prefix . 'start_with_filters_hidden' => [
'label' => __( 'Start with filters hidden', 'blocksy-tainacan' ),
'type' => 'ct-switch',

View File

@ -19,7 +19,7 @@ $options = [
],
blocksy_get_options(get_stylesheet_directory() . '/inc/options/archive-elements/search-control.php', [
'prefix' => $post_type->name . '_archive',
'prefix' => $post_type->name . '_archive'
], false),
blocksy_get_options(get_stylesheet_directory() . '/inc/options/archive-elements/filters-panel.php', [

View File

@ -16,7 +16,8 @@ $options = [
],
],
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/tainacan-single-structure.php', [
'prefix' => $post_type->name . '_single'
'prefix' => $post_type->name . '_single',
'location' => 'teste'
], false),
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/section-labels.php', [
'prefix' => $post_type->name . '_single',

View File

@ -53,12 +53,14 @@
.modal-content {
padding: 16px 10px;
@media screen and (max-width: 768px){
padding: 16px 10px 16px 12vw;
}
#filters-items-list {
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
background-color: var(--backgroundColor, #f8f9fb);
padding: 20px;
margin: -3px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
.filters-components-list {
margin-bottom: 24px;
@ -192,6 +194,16 @@
display: none;
}
}
/* Extra classes applied from customizer */
.page {
&.has-filters-panel-style-boxed #filters-modal .modal-content #filters-items-list {
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
}
}
/* Tooltips and Modals are outside of the items list div */
body:not(.tainacan-admin-page) {

View File

@ -78,12 +78,16 @@
padding: 16px 10px;
}
@media screen and (max-width: 768px) {
.theme-items-list #filters-modal .modal-content {
padding: 16px 10px 16px 12vw;
}
}
.theme-items-list #filters-modal .modal-content #filters-items-list {
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
background-color: var(--backgroundColor, #f8f9fb);
padding: 20px;
margin: -3px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
}
.theme-items-list #filters-modal .modal-content #filters-items-list .filters-components-list {
@ -229,6 +233,13 @@
display: none;
}
/* Extra classes applied from customizer */
.page.has-filters-panel-style-boxed #filters-modal .modal-content #filters-items-list {
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
}
/* Tooltips and Modals are outside of the items list div */
body:not(.tainacan-admin-page) .tooltip,
body:not(.tainacan-admin-page) .tainacan-modal-content {

File diff suppressed because one or more lines are too long

2
style.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,13 @@
<?php
$prefix = blocksy_manager()->screen->get_prefix();
$page_container_classes = 'page type-page hentry singular';
$page_container_classes = $page_container_classes . ( get_theme_mod($prefix . '_filters_panel_background_style', 'boxed') == 'boxed' ? ' has-filters-panel-style-boxed' : '' );
?>
<?php get_header(); ?>
<article class="page type-page hentry singular">
<article class="<?php echo $page_container_classes ?>">
<header class="tainacan-collection-header" style="background-image: <?php if ( get_header_image() ) { echo('linear-gradient(to bottom, rgba(255, 255, 255, 0.3), var(--backgroundColor, #f8f9fb)), url(' . get_header_image() . ')'); } else { echo ''; } ?>">
<div class="tainacan-collection-header__box">
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :

View File

@ -20,38 +20,40 @@
// Galley mode is a shortname for when documents and attachments are displayed merged in the same list
$is_gallery_mode = get_theme_mod($prefix . '_document_attachments_structure', 'gallery-type-1') == 'gallery-type-2';
function render_attachment_thumbnail_slide_item($attachment) {
if ( function_exists('tainacan_get_attachment_html_url') ) {
$href = tainacan_get_attachment_html_url($attachment->ID);
} else {
$href = wp_get_attachment_url($attachment->ID, 'full');
}
if (!wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments')) :
?>
<li class="tainacan-item-section__attachments-file swiper-slide">
<a
class="attachment-without-image"
href="<?php echo $href; ?>">
<?php
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
?>
<span class="swiper-slide-name <?php if (get_theme_mod( $prefix . '_hide_files_name', 'no') == 'yes') echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
</a>
</li>
<?php
else:
$img_scr = wp_get_attachment_image_src( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
if (!function_exists('render_attachment_thumbnail_slide_item')) {
function render_attachment_thumbnail_slide_item($attachment) {
if ( function_exists('tainacan_get_attachment_html_url') ) {
$href = tainacan_get_attachment_html_url($attachment->ID);
} else {
$href = wp_get_attachment_url($attachment->ID, 'full');
}
if (!wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments')) :
?>
<li class="tainacan-item-section__attachments-file swiper-slide">
<a
href="<?php echo $img_scr[0] ?>">
<?php
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
?>
<span class="swiper-slide-name <?php if (get_theme_mod( $prefix . '_hide_files_name', 'no') == 'yes') echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
</a>
</li>
<?php endif;
<li class="tainacan-item-section__attachments-file swiper-slide">
<a
class="attachment-without-image"
href="<?php echo $href; ?>">
<?php
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
?>
<span class="swiper-slide-name <?php if (get_theme_mod( $prefix . '_hide_files_name', 'no') == 'yes') echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
</a>
</li>
<?php
else:
$img_scr = wp_get_attachment_image_src( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
?>
<li class="tainacan-item-section__attachments-file swiper-slide">
<a
href="<?php echo $img_scr[0] ?>">
<?php
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
?>
<span class="swiper-slide-name <?php if (get_theme_mod( $prefix . '_hide_files_name', 'no') == 'yes') echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
</a>
</li>
<?php endif;
}
}
?>