Adds option to change attachment size.
This commit is contained in:
parent
540d24cca3
commit
cda0a7fdf6
42
global.php
42
global.php
|
@ -31,17 +31,49 @@ blc_call_fnc(['fnc' => 'blocksy_output_font_css'], [
|
|||
]);
|
||||
|
||||
|
||||
blc_call_fnc(['fnc' => 'blocksy_output_responsive'], [
|
||||
'css' => $css,
|
||||
'tablet_css' => $tablet_css,
|
||||
'mobile_css' => $mobile_css,
|
||||
'selector' => blocksy_prefix_selector('.tainacan-item-section__attachments-file', $prefix),
|
||||
'variableName' => 'attachments-size',
|
||||
'value' => get_theme_mod( $prefix . '_attachments_size', [
|
||||
'mobile' => '120px',
|
||||
'tablet' => '300px',
|
||||
'desktop' => '140px',
|
||||
]),
|
||||
'unit' => ''
|
||||
]);
|
||||
|
||||
|
||||
blc_call_fnc(['fnc' => 'blocksy_output_border'], [
|
||||
'css' => $css,
|
||||
'tablet_css' => $tablet_css,
|
||||
'mobile_css' => $mobile_css,
|
||||
'selector' => blocksy_prefix_selector('.tainacan-item-section__metadata', $prefix),
|
||||
'variableName' => 'metadata-border',
|
||||
'value' => get_theme_mod( $prefix . '_metadata_border', [
|
||||
'width' => 1,
|
||||
'variableName' => 'metadata-label-border',
|
||||
'value' => get_theme_mod( $prefix . '_metadata_label_border', [
|
||||
'width' => 0,
|
||||
'style' => 'solid',
|
||||
'color' => [
|
||||
'color' => '#e0e5eb',
|
||||
'color' => 'rgba(125, 125, 125, 0.5)',
|
||||
],
|
||||
]),
|
||||
'responsive' => true
|
||||
]);
|
||||
|
||||
|
||||
blc_call_fnc(['fnc' => 'blocksy_output_border'], [
|
||||
'css' => $css,
|
||||
'tablet_css' => $tablet_css,
|
||||
'mobile_css' => $mobile_css,
|
||||
'selector' => blocksy_prefix_selector('.tainacan-item-section__metadata', $prefix),
|
||||
'variableName' => 'metadata-value-border',
|
||||
'value' => get_theme_mod( $prefix . '_metadata_value_border', [
|
||||
'width' => 0,
|
||||
'style' => 'solid',
|
||||
'color' => [
|
||||
'color' => 'rgba(125, 125, 125, 0.5)',
|
||||
],
|
||||
]),
|
||||
'responsive' => true
|
||||
|
@ -55,7 +87,7 @@ blc_call_fnc(['fnc' => 'blocksy_output_font_css'], [
|
|||
'selector' => blocksy_prefix_selector('.tainacan-metadata-label', $prefix),
|
||||
'font_value' => get_theme_mod($prefix . '_tainacan_metadata_label_font',
|
||||
blocksy_typography_default_values([
|
||||
'size' => '22px',
|
||||
'size' => '20px',
|
||||
'variation' => 'n6',
|
||||
'line-height' => '1.2'
|
||||
])
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
if (! isset($prefix)) {
|
||||
$prefix = '';
|
||||
}
|
||||
|
||||
$options = [
|
||||
$prefix . 'attachments_size' => [
|
||||
'label' => __( 'Attachments size on carousel', 'blocksy-tainacan' ),
|
||||
'type' => 'ct-slider',
|
||||
'value' => [
|
||||
'mobile' => '120px',
|
||||
'tablet' => '130px',
|
||||
'desktop' => '140px',
|
||||
],
|
||||
'units' => blocksy_units_config([
|
||||
[
|
||||
'unit' => 'px',
|
||||
'min' => 80,
|
||||
'max' => 200,
|
||||
]
|
||||
]),
|
||||
'responsive' => true,
|
||||
'divider' => 'bottom',
|
||||
'sync' => blocksy_sync_single_post_container([
|
||||
'prefix' => $prefix
|
||||
])
|
||||
],
|
||||
];
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
if (! isset($prefix)) {
|
||||
$prefix = '';
|
||||
}
|
||||
if (! isset($enabled)) {
|
||||
$enabled = 'no';
|
||||
}
|
||||
|
||||
$options = [
|
||||
$prefix . 'document_attachments_structure' => [
|
||||
'label' => false,
|
||||
'type' => 'ct-image-picker',
|
||||
'value' => 'gallery-type-1',
|
||||
'design' => 'block',
|
||||
'setting' => [ 'transport' => 'postMessage' ],
|
||||
'choices' => [
|
||||
'gallery-type-1' => [
|
||||
'src' => blocksy_tainacan_image_picker_url( 'gallery-type-1.svg' ),
|
||||
'title' => __( 'Document and Attachments separate', 'blocksy-tainacan' ),
|
||||
],
|
||||
'gallery-type-2' => [
|
||||
'src' => blocksy_tainacan_image_picker_url( 'gallery-type-2.svg' ),
|
||||
'title' => __( 'Document and Attachments merged', 'blocksy-tainacan' ),
|
||||
],
|
||||
],
|
||||
'sync' => blocksy_sync_single_post_container([
|
||||
'prefix' => $prefix
|
||||
]),
|
||||
'divider' => 'bottom',
|
||||
],
|
||||
];
|
|
@ -8,27 +8,44 @@ if (! isset($prefix)) {
|
|||
|
||||
$options = [
|
||||
$prefix . 'document-attachments' => [
|
||||
'label' => __( 'Document & Attachments', 'blocksy-tainacan' ),
|
||||
'label' => __( 'Document and attachments', 'blocksy-tainacan' ),
|
||||
'type' => 'ct-panel',
|
||||
'sync' => blocksy_sync_whole_page([
|
||||
'prefix' => $prefix,
|
||||
]),
|
||||
'inner-options' => [
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/gallery-mode.php', [
|
||||
'prefix' => $prefix,
|
||||
'enabled' => 'no'
|
||||
], false),
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-download-button.php', [
|
||||
'prefix' => $prefix,
|
||||
'enabled' => 'no'
|
||||
], false),
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-files-name.php', [
|
||||
'prefix' => $prefix,
|
||||
'enabled' => 'no'
|
||||
], false),
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/document-attachments-columns.php', [
|
||||
'prefix' => $prefix
|
||||
], false)
|
||||
|
||||
blocksy_rand_md5() => [
|
||||
'title' => __( 'General', 'blocksy' ),
|
||||
'type' => 'tab',
|
||||
'options' => [
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/document-attachments-structure.php', [
|
||||
'prefix' => $prefix,
|
||||
'enabled' => 'no'
|
||||
], false),
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/document-attachments-columns.php', [
|
||||
'prefix' => $prefix
|
||||
], false),
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-download-button.php', [
|
||||
'prefix' => $prefix,
|
||||
'enabled' => 'no'
|
||||
], false),
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-files-name.php', [
|
||||
'prefix' => $prefix,
|
||||
'enabled' => 'no'
|
||||
], false)
|
||||
]
|
||||
],
|
||||
|
||||
blocksy_rand_md5() => [
|
||||
'title' => __( 'Design', 'blocksy' ),
|
||||
'type' => 'tab',
|
||||
'options' => [
|
||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/attachments-size.php', [
|
||||
'prefix' => $prefix
|
||||
], false)
|
||||
],
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
if (! isset($prefix)) {
|
||||
$prefix = '';
|
||||
}
|
||||
if (! isset($enabled)) {
|
||||
$enabled = 'no';
|
||||
}
|
||||
|
||||
$options = [
|
||||
$prefix . 'gallery_mode' => [
|
||||
'label' => __( 'Gallery Mode', 'blocksy-tainacan' ),
|
||||
'type' => 'ct-switch',
|
||||
'value' => $enabled,
|
||||
'setting' => [ 'transport' => 'postMessage' ],
|
||||
'desc' => __( 'Merges Document and Attachments section in a single carousel.', 'blocksy-tainacan' ),
|
||||
'sync' => blocksy_sync_single_post_container([
|
||||
'prefix' => $prefix,
|
||||
]),
|
||||
]
|
||||
];
|
|
@ -5,17 +5,34 @@ if (! isset($prefix)) {
|
|||
}
|
||||
|
||||
$options = [
|
||||
$prefix . 'metadata_border' => [
|
||||
'label' => __( 'Border', 'blocksy' ),
|
||||
$prefix . 'metadata_label_border' => [
|
||||
'label' => __( 'Metadata label border', 'blocksy' ),
|
||||
'type' => 'ct-border',
|
||||
'design' => 'block',
|
||||
'responsive' => true,
|
||||
'setting' => [ 'transport' => 'postMessage' ],
|
||||
'value' => [
|
||||
'width' => 1,
|
||||
'width' => 0,
|
||||
'style' => 'solid',
|
||||
'color' => [
|
||||
'color' => '#e0e5eb',
|
||||
'color' => 'rgba(125, 125, 125, 0.5)',
|
||||
],
|
||||
],
|
||||
'sync' => blocksy_sync_single_post_container([
|
||||
'prefix' => $prefix
|
||||
])
|
||||
],
|
||||
$prefix . 'metadata_value_border' => [
|
||||
'label' => __( 'Metadata value border', 'blocksy' ),
|
||||
'type' => 'ct-border',
|
||||
'design' => 'block',
|
||||
'responsive' => true,
|
||||
'setting' => [ 'transport' => 'postMessage' ],
|
||||
'value' => [
|
||||
'width' => 0,
|
||||
'style' => 'solid',
|
||||
'color' => [
|
||||
'color' => 'rgba(125, 125, 125, 0.5)',
|
||||
],
|
||||
],
|
||||
'sync' => blocksy_sync_single_post_container([
|
||||
|
|
|
@ -8,7 +8,7 @@ if (! isset($prefix)) {
|
|||
|
||||
$options = [
|
||||
$prefix . 'metadata-list' => [
|
||||
'label' => __( 'Metadata list', 'blocksy-tainacan' ),
|
||||
'label' => __( 'Item metadata list', 'blocksy-tainacan' ),
|
||||
'type' => 'ct-panel',
|
||||
'sync' => blocksy_sync_whole_page([
|
||||
'prefix' => $prefix,
|
||||
|
|
|
@ -12,7 +12,7 @@ $options = [
|
|||
'type' => 'ct-typography',
|
||||
'label' => __( 'Metadata label', 'blocksy-tainacan' ),
|
||||
'value' => blocksy_typography_default_values([
|
||||
'size' => '22px',
|
||||
'size' => '20px',
|
||||
'variation' => 'n6',
|
||||
'line-height' => '1.2'
|
||||
]),
|
||||
|
|
|
@ -36,7 +36,7 @@ $options = [
|
|||
blocksy_rand_md5() => [
|
||||
'type' => 'ct-condition',
|
||||
'condition' => [
|
||||
$prefix . 'gallery_mode' => 'no'
|
||||
$prefix . 'document_attachments_structure' => 'gallery-type-1'
|
||||
],
|
||||
'options' => [
|
||||
$prefix . 'section_document_label' => [
|
||||
|
@ -64,12 +64,12 @@ $options = [
|
|||
blocksy_rand_md5() => [
|
||||
'type' => 'ct-condition',
|
||||
'condition' => [
|
||||
$prefix . 'gallery_mode' => 'yes'
|
||||
$prefix . 'document_attachments_structure' => 'gallery-type-1'
|
||||
],
|
||||
'options' => [
|
||||
$prefix . 'section_documents_label' => [
|
||||
'label' => __( 'Label for the "Documents" section', 'blocksy-tainacan' ),
|
||||
'desc' => __( 'Leave it blank for not displaying any label. This section is displayed only in Gallery mode.', 'blocksy-tainacan' ),
|
||||
'desc' => __( 'Leave it blank for not displaying any label. This section is displayed only if Documents and Attachments are displayed merged.', 'blocksy-tainacan' ),
|
||||
'type' => 'text',
|
||||
'design' => 'block',
|
||||
'value' => __( 'Documents', 'blocksy-tainacan' ),
|
||||
|
|
|
@ -76,20 +76,20 @@
|
|||
--fontSize: 30px;
|
||||
}
|
||||
h2 {
|
||||
--fontSize: 26px;
|
||||
--fontSize: 24px;
|
||||
}
|
||||
h3 {
|
||||
--fontSize: 22px;
|
||||
}
|
||||
h4 {
|
||||
--fontSize: 20px;
|
||||
}
|
||||
h5 {
|
||||
h4 {
|
||||
--fontSize: 18px;
|
||||
}
|
||||
h6 {
|
||||
h5 {
|
||||
--fontSize: 16px;
|
||||
}
|
||||
h6 {
|
||||
--fontSize: 14px;
|
||||
}
|
||||
|
||||
|
||||
// Document, Attachment and Gallery sections -----------------
|
||||
|
@ -215,7 +215,7 @@
|
|||
cursor: pointer;
|
||||
word-break: break-all;
|
||||
font-size: 0.875em;
|
||||
max-width: 157px;
|
||||
max-width: calc(var(--attachments-size, 157px) + 17px);
|
||||
|
||||
@media only screen and (max-width: 380px) {
|
||||
margin: 10px 0;
|
||||
|
@ -223,8 +223,8 @@
|
|||
|
||||
img {
|
||||
border-radius: var(--borderRadius, 3px);
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
width: var(--attachments-size, 140px);
|
||||
height: var(--attachments-size, 140px);
|
||||
object-fit: cover;
|
||||
transition: border-bottom 0.3s ease;
|
||||
&:focus {
|
||||
|
@ -233,7 +233,7 @@
|
|||
}
|
||||
a {
|
||||
width: 100%;
|
||||
max-width: 140px;
|
||||
max-width: var(--attachments-size, 140px);
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
|
@ -356,7 +356,7 @@
|
|||
text-decoration: var(--textDecoration);
|
||||
margin-bottom: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
border-bottom: var(--metadata-border, 1px solid #e0e5eb);
|
||||
border-bottom: var(--metadata-value-border, 0px solid rgba(125, 125, 125, 0.5));
|
||||
}
|
||||
.tainacan-item-section__metadata-thumbnail img {
|
||||
border-radius: var(--borderRadius, 3px);
|
||||
|
@ -395,7 +395,7 @@
|
|||
.tainacan-metadata-label {
|
||||
flex-basis: 40%;
|
||||
margin-bottom: 0;
|
||||
border-right: var(--metadata-border, 1px solid #e0e5eb);
|
||||
border-right: var(--metadata-label-border, 0px solid rgba(125, 125, 125, 0.5));
|
||||
}
|
||||
.tainacan-metadata-value {
|
||||
flex-basis: 60%;
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="Layer_1"
|
||||
viewBox="0 0 100 70"
|
||||
version="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" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs13" />
|
||||
<style
|
||||
id="style2">.st2{fill:#e6e7e8}</style>
|
||||
<path
|
||||
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"
|
||||
fill="#fff"
|
||||
id="path4" />
|
||||
<path
|
||||
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"
|
||||
fill="#565d66"
|
||||
id="path6" />
|
||||
<path
|
||||
d="m 70.908945,50.239483 h -41.81789 c -0.228098,0 -0.380164,-0.270221 -0.380164,-0.675554 V 21.190587 c 0,-0.405334 0.152066,-0.675555 0.380164,-0.675555 h 41.81789 c 0.228098,0 0.380164,0.270221 0.380164,0.675555 v 28.373342 c 0,0.405333 -0.152066,0.675554 -0.380164,0.675554 z"
|
||||
id="path875"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:1.0135504" />
|
||||
<path
|
||||
d="m 66.075197,67.101704 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z"
|
||||
id="path869"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367" />
|
||||
<path
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367"
|
||||
id="path883"
|
||||
d="m 77.796701,67.101704 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z" />
|
||||
<path
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367"
|
||||
id="path885"
|
||||
d="m 54.353693,67.101704 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z" />
|
||||
<path
|
||||
d="m 42.632188,67.101704 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z"
|
||||
id="path887"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367" />
|
||||
<path
|
||||
d="m 30.910683,67.101704 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z"
|
||||
id="path891"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367" />
|
||||
<path
|
||||
d="m 43.373558,56 h -20.62031 c -0.204162,0 -0.34027,-0.2 -0.34027,-0.5 0,-0.3 0.136108,-0.5 0.34027,-0.5 h 20.62031 c 0.204162,0 0.34027,0.2 0.34027,0.5 0,0.3 -0.136108,0.5 -0.34027,0.5 z"
|
||||
id="path965"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.82494754" />
|
||||
<path
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.82494754"
|
||||
id="path830"
|
||||
d="m 43.373558,18 h -20.62031 c -0.204162,0 -0.34027,-0.2 -0.34027,-0.5 0,-0.3 0.136108,-0.5 0.34027,-0.5 h 20.62031 c 0.204162,0 0.34027,0.2 0.34027,0.5 0,0.3 -0.136108,0.5 -0.34027,0.5 z" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.8 KiB |
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
viewBox="0 0 100 70"
|
||||
id="Layer_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" />
|
||||
<dc:title></dc:title>
|
||||
</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:#e6e7e8;fill-opacity:1;stroke-width:1.0135504"
|
||||
id="path875"
|
||||
d="m 70.908945,50.239483 h -41.81789 c -0.228098,0 -0.380164,-0.270221 -0.380164,-0.675554 V 21.190587 c 0,-0.405334 0.152066,-0.675555 0.380164,-0.675555 h 41.81789 c 0.228098,0 0.380164,0.270221 0.380164,0.675555 v 28.373342 c 0,0.405333 -0.152066,0.675554 -0.380164,0.675554 z" />
|
||||
<path
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367"
|
||||
id="path869"
|
||||
d="m 66.075197,61.791053 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z" />
|
||||
<path
|
||||
d="m 77.796701,61.791053 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z"
|
||||
id="path883"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367" />
|
||||
<path
|
||||
d="m 54.353693,61.791053 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z"
|
||||
id="path885"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367" />
|
||||
<path
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.17965661"
|
||||
id="path887"
|
||||
d="m 42.632188,61.791053 h -8.29441 c -0.121977,0 -0.203295,-0.01588 -0.203295,-0.03969 v -0.952604 c 0,-0.02381 0.08132,-0.03969 0.203295,-0.03969 h 8.29441 c 0.121977,0 0.203295,0.01588 0.203295,0.03969 v 0.952604 c 0,0.02381 -0.08132,0.03969 -0.203295,0.03969 z" />
|
||||
<path
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.52166367"
|
||||
id="path891"
|
||||
d="m 30.910683,61.791053 h -8.29441 c -0.121977,0 -0.203295,-0.133861 -0.203295,-0.334654 v -8.031692 c 0,-0.200793 0.08132,-0.334654 0.203295,-0.334654 h 8.29441 c 0.121977,0 0.203295,0.133861 0.203295,0.334654 v 8.031692 c 0,0.200793 -0.08132,0.334654 -0.203295,0.334654 z" />
|
||||
<path
|
||||
d="m 43.373558,18 h -20.62031 c -0.204162,0 -0.34027,-0.2 -0.34027,-0.5 0,-0.3 0.136108,-0.5 0.34027,-0.5 h 20.62031 c 0.204162,0 0.34027,0.2 0.34027,0.5 0,0.3 -0.136108,0.5 -0.34027,0.5 z"
|
||||
id="path830"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.82494754" />
|
||||
<path
|
||||
d="m 42.632188,60.326186 h -8.29441 c -0.121977,0 -0.203295,-0.111325 -0.203295,-0.278313 v -6.679507 c 0,-0.166988 0.08132,-0.278313 0.203295,-0.278313 h 8.29441 c 0.121977,0 0.203295,0.111325 0.203295,0.278313 v 6.679507 c 0,0.166988 -0.08132,0.278313 -0.203295,0.278313 z"
|
||||
id="path823"
|
||||
style="fill:#e6e7e8;fill-opacity:1;stroke-width:0.47572857" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.9 KiB |
26
style.css
26
style.css
|
@ -386,25 +386,25 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
|||
}
|
||||
|
||||
.tainacan-item-single h2 {
|
||||
--fontSize: 26px;
|
||||
--fontSize: 24px;
|
||||
}
|
||||
|
||||
.tainacan-item-single h3 {
|
||||
--fontSize: 22px;
|
||||
}
|
||||
|
||||
.tainacan-item-single h4 {
|
||||
--fontSize: 20px;
|
||||
}
|
||||
|
||||
.tainacan-item-single h5 {
|
||||
.tainacan-item-single h4 {
|
||||
--fontSize: 18px;
|
||||
}
|
||||
|
||||
.tainacan-item-single h6 {
|
||||
.tainacan-item-single h5 {
|
||||
--fontSize: 16px;
|
||||
}
|
||||
|
||||
.tainacan-item-single h6 {
|
||||
--fontSize: 14px;
|
||||
}
|
||||
|
||||
.tainacan-item-single .tainacan-item-section__document {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -554,7 +554,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
|||
cursor: pointer;
|
||||
word-break: break-all;
|
||||
font-size: 0.875em;
|
||||
max-width: 157px;
|
||||
max-width: calc(var(--attachments-size, 157px) + 17px);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 380px) {
|
||||
|
@ -567,8 +567,8 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
|||
.tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file img,
|
||||
.tainacan-item-single .tainacan-item-section__attachments .tainacan-item-section__attachments-file img {
|
||||
border-radius: var(--borderRadius, 3px);
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
width: var(--attachments-size, 140px);
|
||||
height: var(--attachments-size, 140px);
|
||||
object-fit: cover;
|
||||
transition: border-bottom 0.3s ease;
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
|||
.tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file a,
|
||||
.tainacan-item-single .tainacan-item-section__attachments .tainacan-item-section__attachments-file a {
|
||||
width: 100%;
|
||||
max-width: 140px;
|
||||
max-width: var(--attachments-size, 140px);
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
|
@ -718,7 +718,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
|||
text-decoration: var(--textDecoration);
|
||||
margin-bottom: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
border-bottom: var(--metadata-border, 1px solid #e0e5eb);
|
||||
border-bottom: var(--metadata-value-border, 0px solid rgba(125, 125, 125, 0.5));
|
||||
}
|
||||
|
||||
.tainacan-item-single .tainacan-item-section__metadata .tainacan-item-section__metadata-thumbnail img {
|
||||
|
@ -758,7 +758,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
|||
.tainacan-item-single .tainacan-item-section__metadata.metadata-type-2 > div .tainacan-metadata-label {
|
||||
flex-basis: 40%;
|
||||
margin-bottom: 0;
|
||||
border-right: var(--metadata-border, 1px solid #e0e5eb);
|
||||
border-right: var(--metadata-label-border, 0px solid rgba(125, 125, 125, 0.5));
|
||||
}
|
||||
|
||||
.tainacan-item-single .tainacan-item-section__metadata.metadata-type-2 > div .tainacan-metadata-value {
|
||||
|
|
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
|
@ -17,6 +17,9 @@
|
|||
}
|
||||
$prefix = blocksy_manager()->screen->get_prefix();
|
||||
|
||||
// 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);
|
||||
|
@ -54,21 +57,21 @@
|
|||
}
|
||||
?>
|
||||
|
||||
<?php if ( !empty( $attachments ) || ( get_theme_mod($prefix . '_gallery_mode', 'no') == 'yes' && tainacan_has_document() ) ) : ?>
|
||||
<?php if ( !empty( $attachments ) || ( $is_gallery_mode && tainacan_has_document() ) ) : ?>
|
||||
|
||||
<section class="tainacan-item-section tainacan-item-section--<?php echo ((get_theme_mod($prefix . '_gallery_mode', 'no') == 'no' ? 'attachments' : 'gallery')) ?>">
|
||||
<?php if ( (get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes') && (get_theme_mod($prefix . '_gallery_mode', 'no') == 'no') && get_theme_mod($prefix . '_section_attachments_label', __( 'Attachments', 'blocksy-tainacan' )) != '' ) : ?>
|
||||
<section class="tainacan-item-section tainacan-item-section--<?php echo ((!$is_gallery_mode ? 'attachments' : 'gallery')) ?>">
|
||||
<?php if ( (get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes') && (!$is_gallery_mode) && get_theme_mod($prefix . '_section_attachments_label', __( 'Attachments', 'blocksy-tainacan' )) != '' ) : ?>
|
||||
<h2 class="tainacan-single-item-section" id="tainacan-item-attachments-label">
|
||||
<?php echo esc_html( get_theme_mod($prefix . '_section_attachments_label', __( 'Attachments', 'blocksy-tainacan' ) ) ); ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
<?php if ( (get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes') && (get_theme_mod($prefix . '_gallery_mode', 'no') == 'yes') && get_theme_mod($prefix . '_section_documents_label', __( 'Documents', 'blocksy-tainacan' )) != '') : ?>
|
||||
<?php if ( (get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes') && ($is_gallery_mode) && get_theme_mod($prefix . '_section_documents_label', __( 'Documents', 'blocksy-tainacan' )) != '') : ?>
|
||||
<h2 class="tainacan-single-item-section" id="tainacan-item-documents-label">
|
||||
<?php echo esc_html( get_theme_mod($prefix . '_section_documents_label', __( 'Documents', 'blocksy-tainacan' )) ); ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( get_theme_mod($prefix . '_gallery_mode', 'no') == 'yes' ): ?>
|
||||
<?php if ( $is_gallery_mode ): ?>
|
||||
<div class="tainacan-item-section__gallery">
|
||||
<div class="swiper-container-main swiper-container">
|
||||
<ul class="swiper-wrapper">
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
$prefix = blocksy_manager()->screen->get_prefix();
|
||||
|
||||
// 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';
|
||||
|
||||
?>
|
||||
<?php if ( tainacan_has_document() && get_theme_mod($prefix . '_gallery_mode', 'no') != 'yes') : ?>
|
||||
<?php if ( tainacan_has_document() && !$is_gallery_mode ) : ?>
|
||||
<section class="tainacan-item-section tainacan-item-section--document">
|
||||
<?php if ( get_theme_mod($prefix . '_display_section_labels', 'yes') == 'yes' && get_theme_mod($prefix . '_section_document_label', __( 'Document', 'blocksy-tainacan' )) != '' ) : ?>
|
||||
<h2 class="tainacan-single-item-section" id="tainacan-item-document-label">
|
||||
|
|
Loading…
Reference in New Issue