Sets a separate scss file for single and archive templates.

This commit is contained in:
mateuswetah 2020-09-23 20:11:03 -03:00
parent 34ae1d907a
commit e9fd3e6934
9 changed files with 479 additions and 427 deletions

View File

@ -8,8 +8,9 @@ if (! isset($is_bbpress)) {
$is_bbpress = false;
}
$options =
$options = [
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/title-metadata.php', [
'prefix' => $post_type->name . '_single',
'enabled' => 'yes'
], false);
], false)
];

View File

@ -12,13 +12,13 @@ if (! isset($enabled)) {
$options = [
$prefix . 'has_title_metadata' => [
'label' => __( 'Title metadata in the metadata list.', 'blocksy-tainacan' ),
'type' => 'ct-panel',
'switch' => true,
'label' => __( 'Core title in the metadata list.', 'blocksy-tainacan' ),
'type' => 'ct-switch',
'value' => $enabled,
'setting' => [ 'transport' => 'postMessage' ],
'desc' => __( 'Toggle to hide or not the core title from the metadada list, as it already appears on the page title.', 'blocksy' ),
'sync' => blocksy_sync_single_post_container([
'prefix' => $prefix
])
],
]
];

View File

@ -17,408 +17,6 @@
--tainacan-block-gray5: var(--headingColor, rgba(44, 62, 80, 1));
}
/* Tainacan Items list customization */
.theme-items-list {
--tainacan-font-family: var(--fontFamily, inherit);
--tainacan-base-font-size: var(--fontSize, 1em);
--tainacan-secondary: var(--paletteColor1, #3eaf7c);
--tainacan-primary: var(--formBorderInitialColor, #e0e5eb);
--tainacan-background-color: var(--backgroundColor, #f8f9fb);
--tainacan-item-background-color: var(--cardBackground, white);
--tainacan-item-hover-background-color: var(--tainacan-item-background-color, white);
--tainacan-item-heading-hover-background-color: var(--tainacan-item-background-color, white);
--tainacan-input-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-input-background-color: var(--formBackgroundInitialColor, white);
--tainacan-input-border-color: var(--formBorderInitialColor, #e0e5eb);
--tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1));
--tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9));
&:not(.is-fullscreen) {
justify-content: center;
top: -42px !important;
background: transparent !important;
}
/* Tainacan items list view modes */
.tainacan-masonry-container .tainacan-masonry-item,
.tainacan-records-container .tainacan-record,
.tainacan-cards-container .tainacan-card,
.tainacan-list-container .tainacan-list {
border-radius: var(--borderRadius, 3px);
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
border: var(--border, none);
overflow: hidden;
.metadata-title p {
font-weight: 500;
}
.metadata-value,
.metadata-label {
font-size: 0.8125em !important;
}
}
.tainacan-records-container .tainacan-record,
.tainacan-list-container .tainacan-list {
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 {
.column-main-content p {
font-weight: 500;
}
td p {
font-size: 0.725em !important;
}
}
/* Search control */
.search-control {
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
padding: 20px 20px 6px 20px !important;
margin: 12px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
.search-control-item {
margin-bottom: 20px !important;
}
}
/* Filters panel */
#filters-modal {
.modal-content {
padding: 24px 18px;
#filters-items-list {
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
padding: 20px;
margin: -3px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
}
}
}
/* Items list container */
#items-list-area {
#items-list-results {
.table-container {
min-width: 100%;
padding-top: 22px;
padding-left: 24px;
padding-bottom: 24px;
padding-right: 24px;
}
.pagination-area {
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);
}
}
}
}
}
}
/* Advanced Search */
.advanced-search-criteria-title hr {
display: none;
}
}
/* Tooltips and Modals are outside of the items list div */
body:not(.tainacan-admin-page) {
.tooltip,
.tainacan-modal-content {
--tainacan-font-family: var(--fontFamily, inherit);
--tainacan-base-font-size: var(--fontSize, 1em);
--tainacan-secondary: var(--paletteColor1, #3eaf7c);
--tainacan-primary: var(--formBorderInitialColor, #e0e5eb);
--tainacan-background-color: var(--backgroundColor, #f8f9fb);
--tainacan-input-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-input-background-color: var(--formBackgroundInitialColor, white);
--tainacan-input-border-color: var(--formBorderInitialColor, #e0e5eb);
--tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1));
}
.tainacan-modal-content {
border-radius: var(--borderRadius, 6px);
.tainacan-modal-title {
hr {
display: none;
}
}
.tabs li {
margin-bottom: 0px;
}
.modal-card-body {
background-color: var(--tainacan-item-background-color, white);
}
}
}
/* Collection Items List */
.tainacan-collection-header {
display: flex;
padding: 36px 12px 28px 12px;
justify-content: center;
align-items: center;
background-color: var(--backgroundColor, #f8f9fb);
background-size: cover;
background-repeat: no-repeat;
.tainacan-collection-header__box {
width: var(--maxSiteWidth, 1290px);
border-radius: var(--borderRadius,3px);
background-color: var(--tainacan-item-background-color,#fff);
padding: 20px;
box-shadow: var(--boxShadow,0 12px 18px -6px rgba(34,56,101,.04));
h1 {
margin-bottom: 12px;
display: inline-block;
}
.collection-thumbnail {
max-width: var(--tainacan-filter-menu-width-theme, 20%);
float: left;
margin-right: 24px;
img {
border-radius: var(--borderRadius,3px);
}
}
}
}
/* 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;
}
}
}
/* Remaining imports */
@import './tainacan-item-archive.scss';
@import './tainacan-item-single.scss';

View File

@ -0,0 +1,237 @@
/* Tainacan Items list customization */
.theme-items-list {
--tainacan-font-family: var(--fontFamily, inherit);
--tainacan-base-font-size: var(--fontSize, 1em);
--tainacan-secondary: var(--paletteColor1, #3eaf7c);
--tainacan-primary: var(--formBorderInitialColor, #e0e5eb);
--tainacan-background-color: var(--backgroundColor, #f8f9fb);
--tainacan-item-background-color: var(--cardBackground, white);
--tainacan-item-hover-background-color: var(--tainacan-item-background-color, white);
--tainacan-item-heading-hover-background-color: var(--tainacan-item-background-color, white);
--tainacan-input-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-input-background-color: var(--formBackgroundInitialColor, white);
--tainacan-input-border-color: var(--formBorderInitialColor, #e0e5eb);
--tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1));
--tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9));
&:not(.is-fullscreen) {
justify-content: center;
top: -52px !important;
background: transparent !important;
padding: 6px 13px;
display: grid;
grid-template-columns: 1fr minmax(auto, 1300px) 1fr;
grid-template-rows: auto 1fr;
grid-template-areas:
". searchcontrol ."
"itemslist itemslist itemslist";
}
/* Tainacan items list view modes */
.tainacan-masonry-container .tainacan-masonry-item,
.tainacan-records-container .tainacan-record,
.tainacan-cards-container .tainacan-card,
.tainacan-list-container .tainacan-list {
border-radius: var(--borderRadius, 3px);
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
border: var(--border, none);
overflow: hidden;
.metadata-title p {
font-weight: 500;
}
.metadata-value,
.metadata-label {
font-size: 0.8125em !important;
}
}
.tainacan-records-container .tainacan-record,
.tainacan-list-container .tainacan-list {
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 {
.column-main-content p {
font-weight: 500;
}
td p {
font-size: 0.725em !important;
}
}
/* Search control */
.search-control {
grid-area: searchcontrol;
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
padding: 20px 20px 6px 20px !important;
margin: 5px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
.search-control-item {
margin-bottom: 20px !important;
}
}
/* Filters panel */
#filters-modal {
grid-area: itemslist;
justify-self: start;
align-self: normal;
.modal-content {
padding: 16px 10px;
#filters-items-list {
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
padding: 20px;
margin: -3px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
.filters-components-list {
margin-bottom: 24px;
}
}
}
}
/* Items list container */
#items-list-area {
grid-area: itemslist;
justify-self: end;
align-self: normal;
#items-list-results {
.table-container {
min-width: 100%;
padding-top: 14px;
padding-left: 10px;
padding-bottom: 14px;
padding-right: 10px;
}
.pagination-area {
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);
}
}
}
}
}
}
/* Advanced Search */
.advanced-search-criteria-title hr {
display: none;
}
}
/* Tooltips and Modals are outside of the items list div */
body:not(.tainacan-admin-page) {
.tooltip,
.tainacan-modal-content {
--tainacan-font-family: var(--fontFamily, inherit);
--tainacan-base-font-size: var(--fontSize, 1em);
--tainacan-secondary: var(--paletteColor1, #3eaf7c);
--tainacan-primary: var(--formBorderInitialColor, #e0e5eb);
--tainacan-background-color: var(--backgroundColor, #f8f9fb);
--tainacan-input-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-input-background-color: var(--formBackgroundInitialColor, white);
--tainacan-input-border-color: var(--formBorderInitialColor, #e0e5eb);
--tainacan-label-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-info-color: var(--color, rgba(44, 62, 80, 0.9));
--tainacan-heading-color: var(--headingColor, rgba(44, 62, 80, 1));
}
.tainacan-modal-content {
border-radius: var(--borderRadius, 6px);
.tainacan-modal-title {
hr {
display: none;
}
}
.tabs li {
margin-bottom: 0px;
}
.modal-card-body {
background-color: var(--tainacan-item-background-color, white);
}
}
}
/* Collection Items List */
.tainacan-collection-header {
display: flex;
padding: 36px 18px 28px 18px;
justify-content: center;
align-items: center;
background-color: var(--backgroundColor, #f8f9fb);
background-size: cover;
background-repeat: no-repeat;
.tainacan-collection-header__box {
width: var(--maxSiteWidth, 1290px);
border-radius: var(--borderRadius,3px);
background-color: var(--tainacan-item-background-color,#fff);
padding: 20px;
box-shadow: var(--boxShadow,0 12px 18px -6px rgba(34,56,101,.04));
h1 {
margin-bottom: 12px;
display: inline-block;
}
.collection-thumbnail {
max-width: var(--tainacan-filter-menu-width-theme, 20%);
float: left;
margin-right: 24px;
img {
border-radius: var(--borderRadius,3px);
}
}
}
}

View File

@ -0,0 +1,189 @@
/* 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;
}
}
}

View File

@ -16,6 +16,7 @@
--tainacan-block-gray5: var(--headingColor, rgba(44, 62, 80, 1));
}
/* Remaining imports */
/* Tainacan Items list customization */
.theme-items-list {
--tainacan-font-family: var(--fontFamily, inherit);
@ -41,8 +42,13 @@
.theme-items-list:not(.is-fullscreen) {
justify-content: center;
top: -42px !important;
top: -52px !important;
background: transparent !important;
padding: 6px 13px;
display: grid;
grid-template-columns: 1fr minmax(auto, 1300px) 1fr;
grid-template-rows: auto 1fr;
grid-template-areas: ". searchcontrol ." "itemslist itemslist itemslist";
}
.theme-items-list .tainacan-masonry-container .tainacan-masonry-item,
@ -101,10 +107,11 @@
}
.theme-items-list .search-control {
grid-area: searchcontrol;
border-radius: var(--borderRadius, 3px);
background-color: var(--tainacan-item-background-color, white);
padding: 20px 20px 6px 20px !important;
margin: 12px;
margin: 5px;
box-shadow: var(--boxShadow, 0px 12px 18px -6px rgba(34, 56, 101, 0.04));
}
@ -112,8 +119,14 @@
margin-bottom: 20px !important;
}
.theme-items-list #filters-modal {
grid-area: itemslist;
justify-self: start;
align-self: normal;
}
.theme-items-list #filters-modal .modal-content {
padding: 24px 18px;
padding: 16px 10px;
}
.theme-items-list #filters-modal .modal-content #filters-items-list {
@ -124,12 +137,22 @@
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 {
margin-bottom: 24px;
}
.theme-items-list #items-list-area {
grid-area: itemslist;
justify-self: end;
align-self: normal;
}
.theme-items-list #items-list-area #items-list-results .table-container {
min-width: 100%;
padding-top: 22px;
padding-left: 24px;
padding-bottom: 24px;
padding-right: 24px;
padding-top: 14px;
padding-left: 10px;
padding-bottom: 14px;
padding-right: 10px;
}
.theme-items-list #items-list-area #items-list-results .pagination-area {
@ -208,7 +231,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
/* Collection Items List */
.tainacan-collection-header {
display: flex;
padding: 36px 12px 28px 12px;
padding: 36px 18px 28px 18px;
justify-content: center;
align-items: center;
background-color: var(--backgroundColor, #f8f9fb);

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