More adjustments to single items page.

This commit is contained in:
mateuswetah 2020-09-13 20:38:20 -03:00
parent b04fccd91b
commit 3b8116a87d
12 changed files with 906 additions and 134 deletions

View File

@ -116,8 +116,8 @@ function blocksy_tainacan_get_adjacent_item_links() {
$next = $next_link_url === false ? '' : ( $next = $next_link_url === false ? '' : (
'<a href="' . $next_link_url .'" rel="prev" class="nav-item-next"> ' . '<a href="' . $next_link_url .'" rel="prev" class="nav-item-next"> ' .
'<div class="item-content">' . '<div class="item-content">' .
(!empty( $next_title ) ? ('<span class="item-title">' . $next_title . '</span>') : '') .
'<span class="item-label">' . __( 'Next item', 'blocksy-tainacan') . '</span>' . '<span class="item-label">' . __( 'Next item', 'blocksy-tainacan') . '</span>' .
(!empty( $next_title ) ? ('<span class="item-title">' . $next_title . '</span>') : '') .
'</div>' . '</div>' .
($has_thumb ? $next_post_image_output : '') . ($has_thumb ? $next_post_image_output : '') .
'</a>'); '</a>');

View File

@ -22,11 +22,12 @@
--tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1)); --tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1));
--tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9)); --tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9)); --tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9));
display: grid !important;
grid-template-columns: var(--tainacan-filter-menu-width-theme, 20%) auto; &:not(.is-fullscreen) {
grid-template-rows: auto auto; justify-content: center;
margin-top: -42px !important; top: -42px !important;
background: transparent; background: transparent !important;
}
/* Tainacan items list view modes */ /* Tainacan items list view modes */
.tainacan-masonry-container .tainacan-masonry-item, .tainacan-masonry-container .tainacan-masonry-item,
@ -50,6 +51,19 @@
.tainacan-list-container .tainacan-list { .tainacan-list-container .tainacan-list {
background-color: var(--tainacan-item-background-color, white) !important; background-color: var(--tainacan-item-background-color, white) !important;
} }
.tainacan-cards-container .tainacan-card {
min-height: 215px;
max-height: 215px;
.media .list-metadata {
padding: 0.125em 1.375em !important;
p.metadata-description {
max-height: 12.75em !important;
line-height: 1.25em;
}
}
}
.tainacan-table { .tainacan-table {
.column-main-content p { .column-main-content p {
font-weight: 500; font-weight: 500;
@ -61,32 +75,19 @@
/* Search control */ /* Search control */
.search-control { .search-control {
grid-row-start: 1;
grid-row-end: 1;
justify-self: stretch;
align-self: start;
border-radius: var(--borderRadius, 3px); border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white); background-color: var(--tainacan-item-background-color, white);
padding: 20px 20px 6px 20px !important; padding: 20px 20px 6px 20px !important;
margin: 12px 10px; margin: 12px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04)); box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
.search-control-item { .search-control-item {
margin-bottom: 20px; margin-bottom: 20px !important;
&:first-of-type {
width: 100%;
}
} }
} }
/* Filters panel */ /* Filters panel */
#filters-modal { #filters-modal {
grid-column-start: 1;
grid-row-start: 2;
justify-self: stretch;
align-self: start;
max-width: 100%;
.modal-content { .modal-content {
padding: 24px 18px; padding: 24px 18px;
@ -103,26 +104,49 @@
/* Items list container */ /* Items list container */
#items-list-area { #items-list-area {
max-width: 100% !important;
grid-row-start: 1;
grid-column-start: 2;
grid-row-end: 3;
justify-self: stretch;
align-self: stretch;
#items-list-results { #items-list-results {
display: flex;
flex-wrap: wrap;
.table-container { .table-container {
min-width: 100%; min-width: 100%;
padding-top: 12px; padding-top: 22px;
padding-left: 24px; padding-left: 24px;
padding-bottom: 24px; padding-bottom: 24px;
padding-right: 24px; padding-right: 24px;
} }
.pagination-area { .pagination-area {
width: 100%; border-top: none;
margin-left: 12px;
margin-right: 12px;
.pagination {
font-weight: bold;
--colorActive: #ffffff;
.pagination-link {
display: inline-flex;
align-items: center;
justify-content: center;
height: 40px;
width: 42px;
border-radius: 4px;
border: 2px solid transparent;
font-size: 14px;
font-weight: 600;
color: var(--color);
--linkInitialColor: var(--color);
transition: color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955), background 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),border-color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955);
&:hover {
text-decoration: none;
border-color: var(--linkHoverColor);
color: var(--linkHoverColor);
}
&.is-current {
color: var(--colorActive) !important;
background: var(--linkHoverColor);
}
}
}
} }
} }
} }
@ -173,9 +197,12 @@ body:not(.tainacan-admin-page) {
padding: 36px 12px 28px 12px; padding: 36px 12px 28px 12px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: var(--backgroundColor, #f8f9fb);
background-size: cover;
background-repeat: no-repeat;
.tainacan-collection-header__box { .tainacan-collection-header__box {
width: var(--maxSiteWidth); width: var(--maxSiteWidth, 1290px);
border-radius: var(--borderRadius,3px); border-radius: var(--borderRadius,3px);
background-color: var(--tainacan-item-background-color,#fff); background-color: var(--tainacan-item-background-color,#fff);
padding: 20px; padding: 20px;
@ -196,3 +223,191 @@ body:not(.tainacan-admin-page) {
} }
} }
} }
/* Single Item Page */
.single-item-data-section {
h1 {
--fontSize: 30px;
}
h2 {
--fontSize: 26px;
}
h3 {
--fontSize: 22px;
}
h4 {
--fontSize: 20px;
}
h5 {
--fontSize: 18px;
}
h6 {
--fontSize: 16px;
}
.tainacan-item-file-download {
position: absolute;
opacity: 0;
transform: scale(0);
border-radius: 24px;
width: 36px;
height: 36px;
bottom: -18px;
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;
}
&::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;
}
}
.single-item-collection--document {
&:hover {
.tainacan-item-file-download {
opacity: 1;
transform: scale(1);
}
}
display: flex;
justify-content: center;
> iframe, img.attachment-large {
display: block;
height: auto;
margin: 0 auto;
border: none;
}
> audio {
width: 100%;
}
> iframe {
@media only screen and (min-width: 768px){
min-height: 600px;
}
@media only screen and (max-width: 576px){
min-height: 429px;
}
}
.tainacan-embed-container{
width: 100%;
iframe {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}
}
.s-item-collection--metadata {
height: 100%;
div {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
display: inline-block;
width: 100%;
&:last-child {
-webkit-column-break-inside: auto;
page-break-inside: auto;
break-inside: auto;
display: inline-block;
width: 100%;
}
}
@media only screen and (min-width: 768px) {
-moz-column-count: 2;
-moz-column-gap: 0;
-moz-column-rule: none;
-webkit-column-count: 2;
-webkit-column-gap: 0;
-webkit-column-rule: none;
column-count: 2;
column-gap: 4rem;;
column-rule: none;
}
@media only screen and (min-width: 1366px) {
-moz-column-count: 3;
-moz-column-gap: 7rem;
-moz-column-rule: none;
-webkit-column-count: 3;
-webkit-column-gap: 7rem;
-webkit-column-rule: none;
column-count: 3;
column-gap: 7rem;
column-rule: none;
}
h3 {
padding-right: 1rem;
margin-bottom: 0.25rem;
width: 100%;
&:first-of-type:last-of-type {
display: inline-block;
}
}
h4,
label {
padding-right: 0.875rem;
width: 100%;
&:first-of-type:last-of-type {
display: inline-block;
}
}
p {
word-wrap: break-word;
}
// Metadata type textarea has different separator
.multivalue-separator {
color: #cbcbcb;
margin: 0 8px;
}
.hierarchy-separator {
color: #cbcbcb;
}
.metadata-type-compound,
.metadata-type-textarea {
.multivalue-separator {
display: block;
max-height: 1px;
width: 35px;
background: #cbcbcb;
content: none;
color: transparent;
margin: 0.875rem auto;
}
}
.tainacan-compound-group {
padding-left: 1.5rem;
border-left: 1px solid #f2f2f2;
}
}
}

313
style.css
View File

@ -21,11 +21,6 @@
--tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1)); --tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1));
--tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9)); --tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9)); --tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9));
display: grid !important;
grid-template-columns: var(--tainacan-filter-menu-width-theme, 20%) auto;
grid-template-rows: auto auto;
margin-top: -42px !important;
background: transparent;
/* Tainacan items list view modes */ /* Tainacan items list view modes */
/* Search control */ /* Search control */
/* Filters panel */ /* Filters panel */
@ -33,6 +28,12 @@
/* Advanced Search */ /* Advanced Search */
} }
.theme-items-list:not(.is-fullscreen) {
justify-content: center;
top: -42px !important;
background: transparent !important;
}
.theme-items-list .tainacan-masonry-container .tainacan-masonry-item, .theme-items-list .tainacan-masonry-container .tainacan-masonry-item,
.theme-items-list .tainacan-records-container .tainacan-record, .theme-items-list .tainacan-records-container .tainacan-record,
.theme-items-list .tainacan-cards-container .tainacan-card, .theme-items-list .tainacan-cards-container .tainacan-card,
@ -66,6 +67,20 @@
background-color: var(--tainacan-item-background-color, white) !important; background-color: var(--tainacan-item-background-color, white) !important;
} }
.theme-items-list .tainacan-cards-container .tainacan-card {
min-height: 215px;
max-height: 215px;
}
.theme-items-list .tainacan-cards-container .tainacan-card .media .list-metadata {
padding: 0.125em 1.375em !important;
}
.theme-items-list .tainacan-cards-container .tainacan-card .media .list-metadata p.metadata-description {
max-height: 12.75em !important;
line-height: 1.25em;
}
.theme-items-list .tainacan-table .column-main-content p { .theme-items-list .tainacan-table .column-main-content p {
font-weight: 500; font-weight: 500;
} }
@ -75,31 +90,15 @@
} }
.theme-items-list .search-control { .theme-items-list .search-control {
grid-row-start: 1;
grid-row-end: 1;
justify-self: stretch;
align-self: start;
border-radius: var(--borderRadius, 3px); border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white); background-color: var(--tainacan-item-background-color, white);
padding: 20px 20px 6px 20px !important; padding: 20px 20px 6px 20px !important;
margin: 12px 10px; margin: 12px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04)); box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
} }
.theme-items-list .search-control .search-control-item { .theme-items-list .search-control .search-control-item {
margin-bottom: 20px; margin-bottom: 20px !important;
}
.theme-items-list .search-control .search-control-item:first-of-type {
width: 100%;
}
.theme-items-list #filters-modal {
grid-column-start: 1;
grid-row-start: 2;
justify-self: stretch;
align-self: start;
max-width: 100%;
} }
.theme-items-list #filters-modal .modal-content { .theme-items-list #filters-modal .modal-content {
@ -114,30 +113,49 @@
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04)); box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
} }
.theme-items-list #items-list-area {
max-width: 100% !important;
grid-row-start: 1;
grid-column-start: 2;
grid-row-end: 3;
justify-self: stretch;
align-self: stretch;
}
.theme-items-list #items-list-area #items-list-results {
display: flex;
flex-wrap: wrap;
}
.theme-items-list #items-list-area #items-list-results .table-container { .theme-items-list #items-list-area #items-list-results .table-container {
min-width: 100%; min-width: 100%;
padding-top: 12px; padding-top: 22px;
padding-left: 24px; padding-left: 24px;
padding-bottom: 24px; padding-bottom: 24px;
padding-right: 24px; padding-right: 24px;
} }
.theme-items-list #items-list-area #items-list-results .pagination-area { .theme-items-list #items-list-area #items-list-results .pagination-area {
width: 100%; border-top: none;
margin-left: 12px;
margin-right: 12px;
}
.theme-items-list #items-list-area #items-list-results .pagination-area .pagination {
font-weight: bold;
--colorActive: #ffffff;
}
.theme-items-list #items-list-area #items-list-results .pagination-area .pagination .pagination-link {
display: inline-flex;
align-items: center;
justify-content: center;
height: 40px;
width: 42px;
border-radius: 4px;
border: 2px solid transparent;
font-size: 14px;
font-weight: 600;
color: var(--color);
--linkInitialColor: var(--color);
transition: color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955), background 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955), border-color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.theme-items-list #items-list-area #items-list-results .pagination-area .pagination .pagination-link:hover {
text-decoration: none;
border-color: var(--linkHoverColor);
color: var(--linkHoverColor);
}
.theme-items-list #items-list-area #items-list-results .pagination-area .pagination .pagination-link.is-current {
color: var(--colorActive) !important;
background: var(--linkHoverColor);
} }
.theme-items-list .advanced-search-criteria-title hr { .theme-items-list .advanced-search-criteria-title hr {
@ -182,10 +200,13 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
padding: 36px 12px 28px 12px; padding: 36px 12px 28px 12px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: var(--backgroundColor, #f8f9fb);
background-size: cover;
background-repeat: no-repeat;
} }
.tainacan-collection-header .tainacan-collection-header__box { .tainacan-collection-header .tainacan-collection-header__box {
width: var(--maxSiteWidth); width: var(--maxSiteWidth, 1290px);
border-radius: var(--borderRadius, 3px); border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, #fff); background-color: var(--tainacan-item-background-color, #fff);
padding: 20px; padding: 20px;
@ -207,4 +228,216 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
border-radius: var(--borderRadius, 3px); border-radius: var(--borderRadius, 3px);
} }
/* Single Item Page */
.single-item-data-section h1 {
--fontSize: 30px;
}
.single-item-data-section h2 {
--fontSize: 26px;
}
.single-item-data-section h3 {
--fontSize: 22px;
}
.single-item-data-section h4 {
--fontSize: 20px;
}
.single-item-data-section h5 {
--fontSize: 18px;
}
.single-item-data-section h6 {
--fontSize: 16px;
}
.single-item-data-section .tainacan-item-file-download {
position: absolute;
opacity: 0;
transform: scale(0);
border-radius: 24px;
width: 36px;
height: 36px;
bottom: -18px;
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;
}
.single-item-data-section .tainacan-item-file-download a {
height: 38px;
width: 38px;
display: block;
position: relative;
z-index: 99;
}
.single-item-data-section .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;
}
.single-item-data-section .single-item-collection--document {
display: flex;
justify-content: center;
}
.single-item-data-section .single-item-collection--document:hover .tainacan-item-file-download {
opacity: 1;
transform: scale(1);
}
.single-item-data-section .single-item-collection--document > iframe, .single-item-data-section .single-item-collection--document img.attachment-large {
display: block;
height: auto;
margin: 0 auto;
border: none;
}
.single-item-data-section .single-item-collection--document > audio {
width: 100%;
}
@media only screen and (min-width: 768px) {
.single-item-data-section .single-item-collection--document > iframe {
min-height: 600px;
}
}
@media only screen and (max-width: 576px) {
.single-item-data-section .single-item-collection--document > iframe {
min-height: 429px;
}
}
.single-item-data-section .single-item-collection--document .tainacan-embed-container {
width: 100%;
}
.single-item-data-section .single-item-collection--document .tainacan-embed-container iframe {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.single-item-data-section .s-item-collection--metadata {
height: 100%;
}
.single-item-data-section .s-item-collection--metadata div {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
display: inline-block;
width: 100%;
}
.single-item-data-section .s-item-collection--metadata div:last-child {
-webkit-column-break-inside: auto;
page-break-inside: auto;
break-inside: auto;
display: inline-block;
width: 100%;
}
@media only screen and (min-width: 768px) {
.single-item-data-section .s-item-collection--metadata {
-moz-column-count: 2;
-moz-column-gap: 0;
-moz-column-rule: none;
-webkit-column-count: 2;
-webkit-column-gap: 0;
-webkit-column-rule: none;
column-count: 2;
column-gap: 4rem;
column-rule: none;
}
}
@media only screen and (min-width: 1366px) {
.single-item-data-section .s-item-collection--metadata {
-moz-column-count: 3;
-moz-column-gap: 7rem;
-moz-column-rule: none;
-webkit-column-count: 3;
-webkit-column-gap: 7rem;
-webkit-column-rule: none;
column-count: 3;
column-gap: 7rem;
column-rule: none;
}
}
.single-item-data-section .s-item-collection--metadata h3 {
padding-right: 1rem;
margin-bottom: 0.25rem;
width: 100%;
}
.single-item-data-section .s-item-collection--metadata h3:first-of-type:last-of-type {
display: inline-block;
}
.single-item-data-section .s-item-collection--metadata h4,
.single-item-data-section .s-item-collection--metadata label {
padding-right: 0.875rem;
width: 100%;
}
.single-item-data-section .s-item-collection--metadata h4:first-of-type:last-of-type,
.single-item-data-section .s-item-collection--metadata label:first-of-type:last-of-type {
display: inline-block;
}
.single-item-data-section .s-item-collection--metadata p {
word-wrap: break-word;
}
.single-item-data-section .s-item-collection--metadata .multivalue-separator {
color: #cbcbcb;
margin: 0 8px;
}
.single-item-data-section .s-item-collection--metadata .hierarchy-separator {
color: #cbcbcb;
}
.single-item-data-section .s-item-collection--metadata .metadata-type-compound .multivalue-separator,
.single-item-data-section .s-item-collection--metadata .metadata-type-textarea .multivalue-separator {
display: block;
max-height: 1px;
width: 35px;
background: #cbcbcb;
content: none;
color: transparent;
margin: 0.875rem auto;
}
.single-item-data-section .s-item-collection--metadata .tainacan-compound-group {
padding-left: 1.5rem;
border-left: 1px solid #f2f2f2;
}
/*# sourceMappingURL=style.css.map */ /*# sourceMappingURL=style.css.map */

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,7 +1,7 @@
<?php get_header(); ?> <?php get_header(); ?>
<article class="page type-page hentry singular"> <article class="page type-page hentry singular">
<header class="tainacan-collection-header" style="background: <?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 'var(--backgroundColor, #f8f9fb)'; } ?>"> <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"> <div class="tainacan-collection-header__box">
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) : <?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :
$thumbnail_id = get_post_thumbnail_id( $post->ID ); $thumbnail_id = get_post_thumbnail_id( $post->ID );
@ -29,7 +29,8 @@
<div class="entry-content"> <div class="entry-content">
<?php <?php
tainacan_the_faceted_search([ tainacan_the_faceted_search([
'hide-hide-filters-button' => true 'show-filters-button-inside-search-control' => true,
'filters-as-modal' => false
]); ]);
?> ?>
</div> </div>

View File

@ -1 +1,378 @@
<?php get_template_part('single'); ?> <?php
/**
* The template for displaying all single items
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package BlocksyTainacan
*/
get_header();
if (
! function_exists('elementor_theme_do_location')
||
! elementor_theme_do_location('single')
) {
if (
blocksy_default_akg(
'page_structure_type',
blocksy_get_post_options(),
'default'
) !== 'default'
&&
is_customize_preview()
) {
blocksy_add_customizer_preview_cache(
function () {
return blocksy_html_tag(
'div',
[
'data-structure-custom' => blocksy_default_akg(
'page_structure_type',
blocksy_get_post_options(),
'default'
)
],
''
);
}
);
}
if (have_posts()) {
the_post();
}
/**
* Note to code reviewers: This line doesn't need to be escaped.
* Function blocksy_output_hero_section() used here escapes the value properly.
*/
echo blocksy_output_hero_section('type-2');
$container_class = 'ct-container';
if (blocksy_get_page_structure() === 'narrow') {
$container_class = 'ct-container-narrow';
}
?>
<div id="primary" class="content-area" <?php echo blocksy_get_v_spacing() ?>>
<div class="<?php echo $container_class ?>" <?php echo wp_kses_post(blocksy_sidebar_position_attr()); ?>>
<section>
<?php
$post_options = blocksy_get_post_options();
$prefix = blocksy_manager()->screen->get_prefix();
$has_share_box = get_theme_mod(
$prefix . '_has_share_box',
$prefix === 'single_blog_post' ? 'yes' : 'no'
) === 'yes';
if (blocksy_is_page()) {
$has_share_box = false;
}
$has_author_box = get_theme_mod(
$prefix . '_has_author_box',
'no'
) === 'yes';
$has_post_tags = get_theme_mod('has_post_tags', 'yes') === 'yes';
$has_post_nav = get_theme_mod(
$prefix . '_has_post_nav',
$prefix === 'single_blog_post' ? 'yes' : 'no'
) === 'yes';
if (blocksy_is_page()) {
$has_author_box = false;
$has_post_nav = false;
}
if (
blocksy_default_akg(
'disable_posts_navigation', $post_options, 'no'
) === 'yes'
) {
$has_post_nav = false;
}
if (
blocksy_default_akg(
'disable_author_box', $post_options, 'no'
) === 'yes'
) {
$has_author_box = false;
}
if (
blocksy_default_akg(
'disable_post_tags', $post_options, 'no'
) === 'yes'
) {
$has_post_tags = false;
}
if (
blocksy_default_akg(
'disable_share_box', $post_options, 'no'
) === 'yes'
) {
$has_share_box = false;
}
$featured_image_location = 'none';
$page_title_source = blocksy_get_page_title_source();
$featured_image_source = blocksy_get_featured_image_source();
if ($page_title_source) {
$actual_type = blocksy_akg_or_customizer(
'hero_section',
blocksy_get_page_title_source(),
'type-1'
);
if ($actual_type !== 'type-2') {
$featured_image_location = get_theme_mod(
$prefix . '_featured_image_location',
'above'
);
} else {
$featured_image_location = 'below';
}
} else {
$featured_image_location = 'above';
}
$share_box_type = get_theme_mod($prefix . '_share_box_type', 'type-1');
$share_box1_location = get_theme_mod($prefix . '_share_box1_location', [
'top' => false,
'bottom' => true,
]);
$share_box2_location = get_theme_mod($prefix . '_share_box2_location', 'right');
$content_class = 'entry-content';
$content_editor = blocksy_get_entry_content_editor();
if (
strpos($content_editor, 'classic') === false
&&
strpos($content_editor, 'default') === false
) {
$content_class = 'ct-builder-content';
}
ob_start();
?>
<article
id="post-<?php the_ID(); ?>"
<?php post_class(); ?>
<?php echo blocksy_get_entry_content_editor() ?>>
<?php
if ($featured_image_location === 'above') {
echo blocksy_get_featured_image_output();
}
if (! is_singular([ 'product' ])) {
/**
* Note to code reviewers: This line doesn't need to be escaped.
* Function blocksy_output_hero_section() used here escapes the value properly.
*/
echo blocksy_output_hero_section( 'type-1' );
}
if ($featured_image_location === 'below') {
echo blocksy_get_featured_image_output();
}
?>
<?php if (
(
(
$share_box_type === 'type-1'
&&
$share_box1_location['top']
) || $share_box_type === 'type-2'
)
&&
$has_share_box
) { ?>
<?php
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
/**
* Note to code reviewers: This line doesn't need to be escaped.
* Function blocksy_get_social_share_box() used here escapes the value properly.
*/
echo blocksy_get_social_share_box([
'html_atts' => $share_box_type === 'type-1' ? [
'data-location' => 'top'
] : [
'data-location' => $share_box2_location,
],
'type' => $share_box_type
]);
?>
<?php } ?>
<div class="<?php echo $content_class ?>">
<?php
do_action( 'blocksy-tainacan-single-item-top' );
do_action( 'blocksy-tainacan-single-item-after-title' );
echo '<div class="single-item-data-section">';
switch (get_theme_mod( 'tainacan_single_item_layout_sections_order', 'document-attachments-metadata')) {
case 'document-attachments-metadata':
get_template_part( 'template-parts/single-items-document' );
do_action( 'blocksy-tainacan-single-item-after-document' );
get_template_part( 'template-parts/single-items-attachments' );
do_action( 'blocksy-tainacan-single-item-after-attachments' );
get_template_part( 'template-parts/single-items-metadata' );
do_action( 'blocksy-tainacan-single-item-after-metadata' );
break;
case 'metadata-document-attachments':
get_template_part( 'template-parts/single-items-metadata' );
do_action( 'blocksy-tainacan-single-item-after-metadata' );
get_template_part( 'template-parts/single-items-document' );
do_action( 'blocksy-tainacan-single-item-after-document' );
get_template_part( 'template-parts/single-items-attachments' );
do_action( 'blocksy-tainacan-single-item-after-attachments' );
break;
case 'document-metadata-attachments':
get_template_part( 'template-parts/single-items-document' );
do_action( 'blocksy-tainacan-single-item-after-document' );
get_template_part( 'template-parts/single-items-metadata' );
do_action( 'blocksy-tainacan-single-item-after-metadata' );
get_template_part( 'template-parts/single-items-attachments' );
do_action( 'blocksy-tainacan-single-item-after-attachments' );
break;
}
echo '</div>';
?>
<?php do_action( 'blocksy-tainacan-single-item-bottom' ); ?>
</div>
<?php
if (get_post_type() === 'post') {
edit_post_link(
sprintf(
/* translators: %s: Post title. */
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'blocksy' ),
get_the_title()
)
);
}
wp_link_pages(
[
'before' => '<div class="page-links"><span class="post-pages-label">' . esc_html__( 'Pages', 'blocksy' ) . '</span>',
'after' => '</div>',
]
);
?>
<?php if (
$has_post_tags
||
blocksy_is_page()
) { ?>
<?php
/**
* Note to code reviewers: This line doesn't need to be escaped.
* Function blocksy_post_meta() used here escapes the value properly.
*/
if (blocksy_get_categories_list('', false)) {
echo blocksy_html_tag(
'div',
['class' => 'entry-tags'],
blocksy_get_categories_list('', false)
);
}
?>
<?php } ?>
<?php if (
$share_box_type === 'type-1'
&&
$share_box1_location['bottom']
&&
$has_share_box
) { ?>
<?php
/**
* Note to code reviewers: This line doesn't need to be escaped.
* Function blocksy_get_social_share_box() used here escapes the value properly.
*/
echo blocksy_get_social_share_box([
'html_atts' => ['data-location' => 'bottom'],
'type' => 'type-1'
]);
?>
<?php } ?>
<?php
if ($has_author_box) {
blocksy_author_box();
}
if ($has_post_nav) {
get_template_part( 'template-parts/single-items-navigation' );
}
if (function_exists('blc_ext_mailchimp_subscribe_form')) {
if (get_post_type() === 'post') {
/**
* Note to code reviewers: This line doesn't need to be escaped.
* Function blc_ext_mailchimp_subscribe_form() used here escapes the value properly.
*/
echo blc_ext_mailchimp_subscribe_form();
}
}
blocksy_display_page_elements('contained');
?>
</article>
</section>
<?php get_sidebar(); ?>
</div>
</div>
<?php
blocksy_display_page_elements('separated');
have_posts();
wp_reset_query();
}
get_footer();

View File

@ -129,6 +129,4 @@
</section> </section>
</div> </div>
<div class="my-5 border-bottom border-silver"></div>
<?php endif; ?> <?php endif; ?>

View File

@ -17,6 +17,4 @@
</section> </section>
</div> </div>
<div class="my-5 border-bottom border-silver"></div>
<?php endif; ?> <?php endif; ?>

View File

@ -35,5 +35,3 @@
</div> </div>
</section> </section>
</div> </div>
<div class="my-5 border-bottom border-silver"></div>

View File

@ -1,48 +0,0 @@
<?php do_action( 'blocksy-tainacan-single-item-top' ); ?>
<?php
do_action( 'blocksy-tainacan-single-item-after-title' );
echo '<div class="single-item-data-section">';
switch (get_theme_mod( 'tainacan_single_item_layout_sections_order', 'document-attachments-metadata')) {
case 'document-attachments-metadata':
get_template_part( 'template-parts/single-items-document' );
do_action( 'blocksy-tainacan-single-item-after-document' );
get_template_part( 'template-parts/single-items-attachments' );
do_action( 'blocksy-tainacan-single-item-after-attachments' );
get_template_part( 'template-parts/single-items-metadata' );
do_action( 'blocksy-tainacan-single-item-after-metadata' );
break;
case 'metadata-document-attachments':
get_template_part( 'template-parts/single-items-metadata' );
do_action( 'blocksy-tainacan-single-item-after-metadata' );
get_template_part( 'template-parts/single-items-document' );
do_action( 'blocksy-tainacan-single-item-after-document' );
get_template_part( 'template-parts/single-items-attachments' );
do_action( 'blocksy-tainacan-single-item-after-attachments' );
break;
case 'document-metadata-attachments':
get_template_part( 'template-parts/single-items-document' );
do_action( 'blocksy-tainacan-single-item-after-document' );
get_template_part( 'template-parts/single-items-metadata' );
do_action( 'blocksy-tainacan-single-item-after-metadata' );
get_template_part( 'template-parts/single-items-attachments' );
do_action( 'blocksy-tainacan-single-item-after-attachments' );
break;
}
echo '</div>';
?>
<?php get_template_part( 'template-parts/single-items-navigation' ); ?>
<?php do_action( 'blocksy-tainacan-single-item-bottom' ); ?>