Adds Tainacan View Mode options to related items carousel. Still required fixes with sync preview...

This commit is contained in:
mateuswetah 2024-05-17 17:12:58 -03:00
parent 6cd672fc3b
commit a63f7b0909
10 changed files with 441 additions and 110 deletions

View File

@ -12,23 +12,9 @@ if (! isset($enabled)) {
$order_options = tainacan_get_default_order_choices(); $order_options = tainacan_get_default_order_choices();
$options = [ $view_modes = tainacan_get_default_view_mode_choices();
$prefix . 'display_items_related_to_this' => [
'label' => __( 'Display "Items related to this"', 'tainacan-blocksy' ), $layout_choices = [
'type' => 'ct-panel',
'switch' => true,
'value' => $enabled,
'sync' => blocksy_sync_whole_page([
'prefix' => $prefix,
]),
'inner-options' => [
$prefix . 'items_related_to_this_layout' => [
'label' => false,
'type' => 'ct-image-picker',
'value' => 'carousel',
'design' => 'block',
'setting' => [ 'transport' => 'postMessage' ],
'choices' => [
'carousel' => [ 'carousel' => [
'src' => tainacan_blocksy_image_picker_url( 'items-carousel.svg' ), 'src' => tainacan_blocksy_image_picker_url( 'items-carousel.svg' ),
'title' => __( 'Carousel', 'tainacan-blocksy' ) 'title' => __( 'Carousel', 'tainacan-blocksy' )
@ -41,7 +27,23 @@ $options = [
'src' => tainacan_blocksy_image_picker_url( 'items-list.svg' ), 'src' => tainacan_blocksy_image_picker_url( 'items-list.svg' ),
'title' => __( 'List', 'tainacan-blocksy' ) 'title' => __( 'List', 'tainacan-blocksy' )
] ]
], ];
if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.3' ) > 0 ) {
$layout_choices['tainacan-view-modes'] = [
'src' => tainacan_blocksy_image_picker_url( 'items-records.svg' ),
'title' => __( 'Tainacan View Modes', 'tainacan-blocksy' )
];
}
$inner_options = [
$prefix . 'items_related_to_this_layout' => [
'label' => false,
'type' => 'ct-image-picker',
'value' => 'carousel',
'design' => 'block',
'setting' => [ 'transport' => 'postMessage' ],
'choices' => $layout_choices,
'sync' => blocksy_sync_single_post_container([ 'sync' => blocksy_sync_single_post_container([
'prefix' => $prefix 'prefix' => $prefix
]) ])
@ -100,6 +102,31 @@ $options = [
$order_options $order_options
) )
], ],
blocksy_rand_md5() => [
'type' => 'ct-condition',
'condition' => [
$prefix . 'items_related_to_this_layout' => 'tainacan-view-modes'
],
'options' => [
$prefix . 'items_related_to_this_tainacan_view_mode' => [
'label' => __('Tainacan view mode', 'tainacan-blocksy'),
'type' => 'ct-select',
'value' => $view_modes['default_view_mode'],
'view' => 'text',
'design' => 'inline',
'sync' => '',
'choices' => blocksy_ordered_keys(
$view_modes['enabled_view_modes']
)
]
],
],
blocksy_rand_md5() => [
'type' => 'ct-condition',
'condition' => [
$prefix . 'items_related_to_this_layout' => 'grid | list | carousel'
],
'options' => [
$prefix . 'items_related_to_this_image_size' => [ $prefix . 'items_related_to_this_image_size' => [
'label' => __('Image size', 'blocksy'), 'label' => __('Image size', 'blocksy'),
'type' => 'ct-select', 'type' => 'ct-select',
@ -114,3 +141,33 @@ $options = [
] ]
] ]
]; ];
if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.3' ) > 0 ) {
$inner_options[ $prefix . 'items_related_to_this_hide_collection_heading' ] = [
'label' => __( 'Hide collection heading', 'tainacan-blocksy' ),
'type' => 'ct-switch',
'value' => 'no',
'desc' => __( 'Toggle to hide the relationship collection heading.', 'tainacan-blocksy' ),
'sync' => ''
];
$inner_options[ $prefix . 'items_related_to_this_hide_metadata_label' ] = [
'label' => __( 'Hide related metadata label', 'tainacan-blocksy' ),
'type' => 'ct-switch',
'value' => 'no',
'desc' => __( 'Toggle to hide the relationship metadata label.', 'tainacan-blocksy' ),
'sync' => ''
];
}
$options = [
$prefix . 'display_items_related_to_this' => [
'label' => __( 'Display "Items related to this"', 'tainacan-blocksy' ),
'type' => 'ct-panel',
'switch' => true,
'value' => $enabled,
'sync' => blocksy_sync_whole_page([
'prefix' => $prefix,
]),
'inner-options' => $inner_options
]
];

View File

@ -7,7 +7,7 @@
*/ */
/* Tainacan Gutenberg Blocks colors */ /* Tainacan Gutenberg Blocks colors */
:root { :root {
--tainacan-block-primary: var(--theme-palette-color-1 var(--paletteColor1, #3eaf7c)); --tainacan-block-primary: var(--theme-palette-color-1 var(--paletteColor1, #3eaf7c));
--tainacan-block-gray0: var(--backgroundColor, #f8f9fb); --tainacan-block-gray0: var(--backgroundColor, #f8f9fb);
--tainacan-block-gray1: var(--backgroundColor, #f8f9fb); --tainacan-block-gray1: var(--backgroundColor, #f8f9fb);
@ -19,8 +19,25 @@
// Previous Blocksy variables // Previous Blocksy variables
--maxSiteWidth: var(--theme-normal-container-max-width, var(--normal-container-max-width)); --maxSiteWidth: var(--theme-normal-container-max-width, var(--normal-container-max-width));
} }
/** Dynamic items list block has styling for tainacan item view modes */
.items-list.items-layout-tainacan-view-modes {
--tainacan-font-family: var(--theme-font-family, var(--fontFamily, inherit));
--tainacan-base-font-size: var(--theme-font-size, var(--fontSize, 1em));
--tainacan-secondary: var(--theme-palette-color-1, var(--paletteColor1, #3eaf7c));
--tainacan-primary: var(--theme-form-field-border-initial-color, var(--form-field-border-initial-color, #e0e5eb));
--tainacan-background-color: var(--background-color, var(--backgroundColor, #f8f9fb));
--tainacan-input-color: var(--theme-text-color, var(--color, rgba(44, 62, 80, 0.9)));
--tainacan-input-background-color: var(--theme-form-field-background-initial-color, var(--form-field-background-initial, white));
--tainacan-input-border-color: var(--theme-form-field-border-initial-color, #e0e5eb);
--tainacan-label-color: var(--theme-text-color, var(--color, rgba(44, 62, 80, 0.9)));
--tainacan-info-color: var(--theme-text-color, var(--color, rgba(44, 62, 80, 0.9)));
--tainacan-heading-color: var(--theme-heading-color, var(--theme-heading-color, rgba(44, 62, 80, 1)));
--tainacan-input-border-radius: var(--theme-form-field-border-radius, var(--form-field-border-radius, 3px));
--tainacan-button-border-radius: var(--theme-button-border-radius, var(--button-border-radius, 5px));
}
// Grid mixin for display: grid compatibility // Grid mixin for display: grid compatibility
@mixin display-grid { @mixin display-grid {
flex-wrap: wrap; flex-wrap: wrap;

View File

@ -58,11 +58,11 @@
@media screen and (max-width: 768px){ @media screen and (max-width: 768px){
padding: 16px 16px 16px 6vw !important; padding: 16px 16px 16px 6vw !important;
background-color: var(--background-color, var(--backgroundColor, #f8f9fb)); background-color: var(--tainacan-background-color, var(--backgroundColor, #f8f9fb));
} }
#filters-items-list { #filters-items-list {
background-color: var(--background-color, var(--backgroundColor, #f8f9fb)); background-color: var(--tainacan-background-color, var(--backgroundColor, #f8f9fb));
padding: 3px; padding: 3px;
margin: -3px; margin: -3px;

View File

@ -52,7 +52,6 @@
&.tainacan-item-single--layout-type-mg { &.tainacan-item-single--layout-type-mg {
grid-template-areas: grid-template-areas:
'metadata document' 'metadata document'
'metadata attachments'
'metadata related' 'metadata related'
'metadata .'; 'metadata .';
grid-template-columns: 60% 40%; grid-template-columns: 60% 40%;
@ -61,7 +60,6 @@
grid-template-areas: grid-template-areas:
'metadata' 'metadata'
'document' 'document'
'attachments'
'related'; 'related';
grid-template-columns: 100% !important; grid-template-columns: 100% !important;
} }
@ -69,7 +67,6 @@
&.tainacan-item-single--layout-type-gm { &.tainacan-item-single--layout-type-gm {
grid-template-areas: grid-template-areas:
'document metadata' 'document metadata'
'attachments metadata'
'related metadata' 'related metadata'
'. metadata'; '. metadata';
grid-template-columns: 60% 40%; grid-template-columns: 60% 40%;
@ -77,7 +74,6 @@
@media only screen and (max-width: 960px) { @media only screen and (max-width: 960px) {
grid-template-areas: grid-template-areas:
'document' 'document'
'attachments'
'metadata' 'metadata'
'related'; 'related';
grid-template-columns: 100% !important; grid-template-columns: 100% !important;

View File

@ -0,0 +1,238 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
viewBox="0 0 100 70"
id="Layer_1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata15">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs13" />
<style
id="style2">.st2{fill:#e6e7e8}</style>
<path
id="path4"
fill="#fff"
d="M13 73.5c-1.4 0-2.5-1.1-2.5-2.5V13c0-1.4 1.1-2.5 2.5-2.5h74c1.4 0 2.5 1.1 2.5 2.5v58c0 1.4-1.1 2.5-2.5 2.5H13z" />
<path
id="path6"
fill="#565d66"
d="M87 11c1.1 0 2 .9 2 2v58c0 1.1-.9 2-2 2H13c-1.1 0-2-.9-2-2V13c0-1.1.9-2 2-2h74m0-1H13c-1.7 0-3 1.3-3 3v58c0 1.7 1.3 3 3 3h74c1.6 0 3-1.3 3-3V13c0-1.7-1.4-3-3-3z" />
<path
style="fill:#ececec;fill-opacity:1;stroke-width:0.383166"
id="path891"
d="M 37.837022,47.619451 H 21.000266 c -0.247582,0 -0.412636,-0.264509 -0.412636,-0.661322 V 31.086237 c 0,-0.396819 0.165054,-0.661328 0.412636,-0.661328 h 16.836756 c 0.247582,0 0.412693,0.264509 0.412693,0.661328 v 15.871892 c 0,0.396819 -0.165054,0.661322 -0.412693,0.661322 z" />
<path
style="fill:#e6e7e8;fill-opacity:1;stroke-width:1.44235"
id="path935"
d="M 38.592289,24.417141 H 20.617397 c -0.17797,0 -0.296616,-0.314782 -0.296616,-0.786955 0,-0.472173 0.118645,-0.786955 0.296616,-0.786955 H 38.59229 c 0.177969,0 0.296616,0.314782 0.296616,0.786955 0,0.472173 -0.118647,0.786955 -0.296617,0.786955 z" />
<path
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.824948"
id="path937"
d="m 42.327382,27.646857 h -21.64935 c -0.214351,0 -0.357251,-0.209981 -0.357251,-0.524952 0,-0.314971 0.1429,-0.524952 0.357251,-0.524952 h 21.64935 c 0.21435,0 0.35725,0.209981 0.35725,0.524952 0,0.314971 -0.142901,0.524952 -0.35725,0.524952 z" />
<path
id="rect6857"
style="fill:#e6e7e8;stroke-width:0.377953;stroke-linecap:round;stroke-linejoin:round"
d="m 20.896171,49.19261 h 8.841097 c 0.318766,0 0.575389,0.256623 0.575389,0.575389 v 1.347191 c 0,0.318765 -0.256623,0.575389 -0.575389,0.575389 h -8.841097 c -0.318766,0 -0.575389,-0.256624 -0.575389,-0.575389 v -1.347191 c 0,-0.318766 0.256623,-0.575389 0.575389,-0.575389 z" />
<path
style="fill:#e6e7e8;fill-opacity:1;stroke-width:1.44235"
id="path7131"
d="M 38.592289,60.418457 H 20.617397 c -0.17797,0 -0.296616,-0.314782 -0.296616,-0.786955 0,-0.472173 0.118645,-0.786955 0.296616,-0.786955 H 38.59229 c 0.177969,0 0.296616,0.314782 0.296616,0.786955 0,0.472173 -0.118647,0.786955 -0.296617,0.786955 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path867"
d="M 30.852935,33.222674 H 22.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path870"
d="m 36.693167,36.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path872"
d="M 32.779752,39.35364 H 22.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path1380"
d="M 34.799841,42.279736 H 22.600874 c -0.120783,0 -0.201304,-0.154416 -0.201304,-0.386041 0,-0.231624 0.08052,-0.386041 0.201304,-0.386041 h 12.198967 c 0.120782,0 0.201304,0.154417 0.201304,0.386041 0,0.231625 -0.08053,0.386041 -0.201304,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path1"
d="M 32.779752,45.205833 H 22.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path2"
d="m 29.859259,36.427543 h -7.338591 c -0.07266,0 -0.121098,-0.154416 -0.121098,-0.386041 0,-0.231624 0.04844,-0.386041 0.121098,-0.386041 h 7.338591 c 0.07266,0 0.121099,0.154417 0.121099,0.386041 0,0.231625 -0.04844,0.386041 -0.121099,0.386041 z" />
<path
style="fill:#ececec;fill-opacity:1;stroke-width:0.383166"
id="path3"
d="M 59.837022,47.619451 H 43.000266 c -0.247582,0 -0.412636,-0.264509 -0.412636,-0.661322 V 31.086237 c 0,-0.396819 0.165054,-0.661328 0.412636,-0.661328 h 16.836756 c 0.247582,0 0.412693,0.264509 0.412693,0.661328 v 15.871892 c 0,0.396819 -0.165054,0.661322 -0.412693,0.661322 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path5"
d="M 52.852935,33.222674 H 44.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path7"
d="m 58.693167,36.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path8"
d="M 54.779752,39.35364 H 44.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path9"
d="M 56.799841,42.279736 H 44.600874 c -0.120783,0 -0.201304,-0.154416 -0.201304,-0.386041 0,-0.231624 0.08052,-0.386041 0.201304,-0.386041 h 12.198967 c 0.120782,0 0.201304,0.154417 0.201304,0.386041 0,0.231625 -0.08053,0.386041 -0.201304,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path10"
d="M 54.779752,45.205833 H 44.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path11"
d="m 51.859259,36.427543 h -7.338591 c -0.07266,0 -0.121098,-0.154416 -0.121098,-0.386041 0,-0.231624 0.04844,-0.386041 0.121098,-0.386041 h 7.338591 c 0.07266,0 0.121099,0.154417 0.121099,0.386041 0,0.231625 -0.04844,0.386041 -0.121099,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path13"
d="M 52.852935,33.222674 H 44.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path14"
d="m 58.693167,36.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path15"
d="M 54.779752,39.35364 H 44.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path16"
d="M 56.799841,42.279736 H 44.600874 c -0.120783,0 -0.201304,-0.154416 -0.201304,-0.386041 0,-0.231624 0.08052,-0.386041 0.201304,-0.386041 h 12.198967 c 0.120782,0 0.201304,0.154417 0.201304,0.386041 0,0.231625 -0.08053,0.386041 -0.201304,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path17"
d="M 54.779752,45.205833 H 44.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path18"
d="m 51.859259,36.427543 h -7.338591 c -0.07266,0 -0.121098,-0.154416 -0.121098,-0.386041 0,-0.231624 0.04844,-0.386041 0.121098,-0.386041 h 7.338591 c 0.07266,0 0.121099,0.154417 0.121099,0.386041 0,0.231625 -0.04844,0.386041 -0.121099,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path19"
d="M 74.852935,33.222674 H 66.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path20"
d="m 80.693167,36.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path21"
d="M 76.779752,39.35364 H 66.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path22"
d="M 78.799841,42.279736 H 66.600874 c -0.120783,0 -0.201304,-0.154416 -0.201304,-0.386041 0,-0.231624 0.08052,-0.386041 0.201304,-0.386041 h 12.198967 c 0.120782,0 0.201304,0.154417 0.201304,0.386041 0,0.231625 -0.08053,0.386041 -0.201304,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path23"
d="M 76.779752,45.205833 H 66.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path24"
d="m 73.859259,36.427543 h -7.338591 c -0.07266,0 -0.121098,-0.154416 -0.121098,-0.386041 0,-0.231624 0.04844,-0.386041 0.121098,-0.386041 h 7.338591 c 0.07266,0 0.121099,0.154417 0.121099,0.386041 0,0.231625 -0.04844,0.386041 -0.121099,0.386041 z" />
<path
style="fill:#ececec;fill-opacity:1;stroke-width:0.383166"
id="path25"
d="M 81.837022,47.619451 H 65.000266 c -0.247582,0 -0.412636,-0.264509 -0.412636,-0.661322 V 31.086237 c 0,-0.396819 0.165054,-0.661328 0.412636,-0.661328 h 16.836756 c 0.247582,0 0.412693,0.264509 0.412693,0.661328 v 15.871892 c 0,0.396819 -0.165054,0.661322 -0.412693,0.661322 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path26"
d="M 74.852935,33.222674 H 66.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path27"
d="m 80.693167,36.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path28"
d="M 76.779752,39.35364 H 66.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path29"
d="M 78.799841,42.279736 H 66.600874 c -0.120783,0 -0.201304,-0.154416 -0.201304,-0.386041 0,-0.231624 0.08052,-0.386041 0.201304,-0.386041 h 12.198967 c 0.120782,0 0.201304,0.154417 0.201304,0.386041 0,0.231625 -0.08053,0.386041 -0.201304,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path30"
d="M 76.779752,45.205833 H 66.568079 c -0.101106,0 -0.168509,-0.154416 -0.168509,-0.386041 0,-0.231624 0.0674,-0.386041 0.168509,-0.386041 h 10.211673 c 0.101106,0 0.16851,0.154417 0.16851,0.386041 0,0.231625 -0.0674,0.386041 -0.16851,0.386041 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path31"
d="m 73.859259,36.427543 h -7.338591 c -0.07266,0 -0.121098,-0.154416 -0.121098,-0.386041 0,-0.231624 0.04844,-0.386041 0.121098,-0.386041 h 7.338591 c 0.07266,0 0.121099,0.154417 0.121099,0.386041 0,0.231625 -0.04844,0.386041 -0.121099,0.386041 z" />
<path
style="fill:#ececec;fill-opacity:1;stroke-width:0.383166"
id="path32"
d="M 37.837022,74.257524 H 21.000266 c -0.247582,0 -0.412636,-0.120492 -0.412636,-0.301251 v -7.230109 c 0,-0.180763 0.165054,-0.301255 0.412636,-0.301255 h 16.836756 c 0.247582,0 0.412693,0.120492 0.412693,0.301255 v 7.230109 c 0,0.180762 -0.165054,0.301251 -0.412693,0.301251 z" />
<path
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.824948"
id="path34"
d="m 42.327382,63.646857 h -21.64935 c -0.214351,0 -0.357251,-0.209981 -0.357251,-0.524952 0,-0.314971 0.1429,-0.524952 0.357251,-0.524952 h 21.64935 c 0.21435,0 0.35725,0.209981 0.35725,0.524952 0,0.314971 -0.142901,0.524952 -0.35725,0.524952 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path36"
d="M 30.852935,69.222674 H 22.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path37"
d="m 36.693167,72.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path43"
d="M 52.852935,69.222674 H 44.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path44"
d="m 58.693167,72.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#ececec;fill-opacity:1;stroke-width:0.383166"
id="path49"
d="M 59.837022,74.257524 H 43.000266 c -0.247582,0 -0.412636,-0.120492 -0.412636,-0.301251 v -7.230109 c 0,-0.180763 0.165054,-0.301255 0.412636,-0.301255 h 16.836756 c 0.247582,0 0.412693,0.120492 0.412693,0.301255 v 7.230109 c 0,0.180762 -0.165054,0.301251 -0.412693,0.301251 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path50"
d="M 52.852935,69.222674 H 44.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path51"
d="m 58.693167,72.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path56"
d="M 74.852935,69.222674 H 66.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path57"
d="m 80.693167,72.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
<path
style="fill:#ececec;fill-opacity:1;stroke-width:0.383166"
id="path62"
d="M 81.837022,74.257524 H 65.000266 c -0.247582,0 -0.412636,-0.120492 -0.412636,-0.301251 v -7.230109 c 0,-0.180763 0.165054,-0.301255 0.412636,-0.301255 h 16.836756 c 0.247582,0 0.412693,0.120492 0.412693,0.301255 v 7.230109 c 0,0.180762 -0.165054,0.301251 -0.412693,0.301251 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.824946"
id="path63"
d="M 74.852935,69.222674 H 66.5368 c -0.08234,0 -0.13723,-0.255492 -0.13723,-0.638733 0,-0.38324 0.05489,-0.638734 0.13723,-0.638734 h 8.316135 c 0.08234,0 0.13723,0.255494 0.13723,0.638734 0,0.383241 -0.0549,0.638733 -0.13723,0.638733 z" />
<path
style="fill:#cccccc;fill-opacity:1;stroke-width:0.383167"
id="path64"
d="m 80.693167,72.741225 h -3.543775 c -0.05211,0 -0.08685,-0.07684 -0.08685,-0.192119 v -4.610918 c 0,-0.115279 0.03474,-0.192121 0.08685,-0.192121 h 3.543775 c 0.05211,0 0.08686,0.07684 0.08686,0.192121 v 4.610918 c 0,0.115279 -0.03474,0.192119 -0.08686,0.192119 z" />
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -18,6 +18,23 @@
--maxSiteWidth: var(--theme-normal-container-max-width, var(--normal-container-max-width)); --maxSiteWidth: var(--theme-normal-container-max-width, var(--normal-container-max-width));
} }
/** Dynamic items list block has styling for tainacan item view modes */
.items-list.items-layout-tainacan-view-modes {
--tainacan-font-family: var(--theme-font-family, var(--fontFamily, inherit));
--tainacan-base-font-size: var(--theme-font-size, var(--fontSize, 1em));
--tainacan-secondary: var(--theme-palette-color-1, var(--paletteColor1, #3eaf7c));
--tainacan-primary: var(--theme-form-field-border-initial-color, var(--form-field-border-initial-color, #e0e5eb));
--tainacan-background-color: var(--background-color, var(--backgroundColor, #f8f9fb));
--tainacan-input-color: var(--theme-text-color, var(--color, rgba(44, 62, 80, 0.9)));
--tainacan-input-background-color: var(--theme-form-field-background-initial-color, var(--form-field-background-initial, white));
--tainacan-input-border-color: var(--theme-form-field-border-initial-color, #e0e5eb);
--tainacan-label-color: var(--theme-text-color, var(--color, rgba(44, 62, 80, 0.9)));
--tainacan-info-color: var(--theme-text-color, var(--color, rgba(44, 62, 80, 0.9)));
--tainacan-heading-color: var(--theme-heading-color, var(--theme-heading-color, rgba(44, 62, 80, 1)));
--tainacan-input-border-radius: var(--theme-form-field-border-radius, var(--form-field-border-radius, 3px));
--tainacan-button-border-radius: var(--theme-button-border-radius, var(--button-border-radius, 5px));
}
/* Remaining imports */ /* Remaining imports */
/* Tainacan Items list customization */ /* Tainacan Items list customization */
.theme-items-list { .theme-items-list {
@ -87,12 +104,12 @@
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.theme-items-list #filters-modal .modal-content { .theme-items-list #filters-modal .modal-content {
padding: 16px 16px 16px 6vw !important; padding: 16px 16px 16px 6vw !important;
background-color: var(--background-color, var(--backgroundColor, #f8f9fb)); background-color: var(--tainacan-background-color, var(--backgroundColor, #f8f9fb));
} }
} }
.theme-items-list #filters-modal .modal-content #filters-items-list { .theme-items-list #filters-modal .modal-content #filters-items-list {
background-color: var(--background-color, var(--backgroundColor, #f8f9fb)); background-color: var(--tainacan-background-color, var(--backgroundColor, #f8f9fb));
padding: 3px; padding: 3px;
margin: -3px; margin: -3px;
} }
@ -508,25 +525,25 @@ body[data-prefix="tainacan-terms-items_archive"] .collection-thumbnail img {
} }
.tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-mg { .tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-mg {
grid-template-areas: 'metadata document' 'metadata attachments' 'metadata related' 'metadata .'; grid-template-areas: 'metadata document' 'metadata related' 'metadata .';
grid-template-columns: 60% 40%; grid-template-columns: 60% 40%;
} }
@media only screen and (max-width: 960px) { @media only screen and (max-width: 960px) {
.tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-mg { .tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-mg {
grid-template-areas: 'metadata' 'document' 'attachments' 'related'; grid-template-areas: 'metadata' 'document' 'related';
grid-template-columns: 100% !important; grid-template-columns: 100% !important;
} }
} }
.tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-gm { .tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-gm {
grid-template-areas: 'document metadata' 'attachments metadata' 'related metadata' '. metadata'; grid-template-areas: 'document metadata' 'related metadata' '. metadata';
grid-template-columns: 60% 40%; grid-template-columns: 60% 40%;
} }
@media only screen and (max-width: 960px) { @media only screen and (max-width: 960px) {
.tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-gm { .tainacan-item-single-page .tainacan-item-single.tainacan-item-single--layout-type-gm {
grid-template-areas: 'document' 'attachments' 'metadata' 'related'; grid-template-areas: 'document' 'metadata' 'related';
grid-template-columns: 100% !important; grid-template-columns: 100% !important;
} }
} }

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

View File

@ -7,6 +7,9 @@
$max_items_per_screen = get_theme_mod( $prefix . '_items_related_to_this_max_items_per_screen', 6 ); $max_items_per_screen = get_theme_mod( $prefix . '_items_related_to_this_max_items_per_screen', 6 );
$max_items_number = get_theme_mod( $prefix . '_items_related_to_this_max_items_number', 12 ); $max_items_number = get_theme_mod( $prefix . '_items_related_to_this_max_items_number', 12 );
$order_option = get_theme_mod( $prefix . '_items_related_to_this_order', 'title_asc' ); $order_option = get_theme_mod( $prefix . '_items_related_to_this_order', 'title_asc' );
$hide_collection_heading = get_theme_mod( $prefix . '_items_related_to_this_hide_collection_heading', 'no' ) === 'yes';
$hide_metadata_label = get_theme_mod( $prefix . '_items_related_to_this_hide_metadata_label', 'no' ) === 'yes';
$tainacan_view_mode = get_theme_mod( $prefix . '_items_related_to_this_tainacan_view_mode', 'records' );
$image_size = get_theme_mod($prefix . '_items_related_to_this_image_size', 'tainacan-medium'); $image_size = get_theme_mod($prefix . '_items_related_to_this_image_size', 'tainacan-medium');
@ -37,9 +40,12 @@
'order' => $order, 'order' => $order,
'orderby' => $order_by, 'orderby' => $order_by,
'max_items_number' => $max_items_number, 'max_items_number' => $max_items_number,
'hide_collection_heading' => $hide_collection_heading,
'hide_metadata_label' => $hide_metadata_label,
'dynamic_items_args' => [ 'dynamic_items_args' => [
'max_columns_count' => $max_columns_count, 'max_columns_count' => $max_columns_count,
'image_size' => $image_size 'image_size' => $image_size,
'tainacan_view_mode' => $tainacan_view_mode,
], ],
'carousel_args' => [ 'carousel_args' => [
'max_items_per_screen' => $max_items_per_screen, 'max_items_per_screen' => $max_items_per_screen,