blocksy-tainacan/sass/tainacan-item-single.scss

489 lines
14 KiB
SCSS
Raw Normal View History

/* Single Item Page */
.tainacan-item-single {
// Overall page layout structure -------------------
@include display-grid;
align-items: start;
grid-column-gap: 32px;
column-gap: 32px;
.tainacan-item-section {
max-width: var(--block-max-width);
align-self: flex-start;
align-self: start;
margin-bottom: 2.25rem;
}
.tainacan-item-section--document,
.tainacan-item-section--gallery { grid-area: document }
.tainacan-item-section--attachments { grid-area: attachments }
.tainacan-item-section--metadata { grid-area: metadata }
&.tainacan-item-single--layout-type-dam {
grid-template-areas:
'document'
'attachments'
'metadata';
grid-template-columns: 100%;
}
&.tainacan-item-single--layout-type-dma {
grid-template-areas:
'document'
'metadata'
'attachments';
grid-template-columns: 100%;
}
&.tainacan-item-single--layout-type-mda {
grid-template-areas:
'metadata'
'document'
'attachments';
grid-template-columns: 100%;
}
&.tainacan-item-single--layout-type-mg {
grid-template-areas:
'metadata document'
'metadata attachments'
'metadata .';
grid-template-columns: 60% 40%;
@media only screen and (max-width: 960px) {
grid-template-areas:
'metadata'
'document'
'attachments';
grid-template-columns: 100% !important;
}
}
&.tainacan-item-single--layout-type-gm {
grid-template-areas:
'document metadata'
'attachments metadata'
'. metadata';
grid-template-columns: 60% 40%;
@media only screen and (max-width: 960px) {
grid-template-areas:
'document'
'attachments'
'metadata';
grid-template-columns: 100% !important;
}
}
// Headings and spacing ----------------------------
h1 {
--fontSize: 30px;
}
h2 {
2021-01-04 21:40:54 +00:00
--fontSize: 24px;
}
h3 {
2021-01-04 21:40:54 +00:00
--fontSize: 20px;
}
h4 {
2021-01-04 21:40:54 +00:00
--fontSize: 18px;
}
h5 {
2021-01-04 21:40:54 +00:00
--fontSize: 16px;
}
h6 {
2021-01-04 21:40:54 +00:00
--fontSize: 14px;
}
.tainacan-single-item-section {
text-align: var(--section-alignment, left);
}
// Document, Attachment and Gallery sections -----------------
.tainacan-item-section__document {
display: flex;
justify-content: center;
align-items: center;
height: auto;
position: relative;
&:hover {
.tainacan-item-file-download {
opacity: 1;
transform: scale(1);
}
}
> 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;
}
}
}
.tainacan-item-section__gallery-items {
font-weight: normal;
transition: font-weight 0.3s ease;
img {
border-radius: var(--borderRadius, 3px);
border-bottom: 4px solid transparent;
margin-bottom: 4px;
transition: border 0.3s ease;
}
}
.tainacan-item-section__attachments-file {
&:hover {
.tainacan-item-file-download {
opacity: 1;
transform: scale(1);
}
}
}
.tainacan-item-section__gallery {
margin-bottom: 24px;
ul {
list-style: none;
padding: 0;
}
.tainacan-item-section__document {
margin: 0;
img {
max-height: 60vh;
width: auto;
}
video {
width: auto;
}
iframe {
min-height: 200px;
height: 60vh;
}
}
}
.tainacan-item-section__gallery-items,
.tainacan-item-section__attachments {
position: relative;
padding: 0px;
.swiper-button-disabled {
display: none;
}
.swiper-button-next,
.swiper-button-prev {
background-image: none;
top: 65px;
padding: 20px;
border-radius: 30px;
background-color: var(--background-color, #f8f9fb);
border: 1px solid var(--paletteColor1, #3eaf7c);
}
.swiper-button-prev, .swiper-container-rtl .swiper-button-next {
left: -20px;
}
.swiper-button-next, .swiper-container-rtl .swiper-button-prev {
right: -20px;
}
.swiper-slide-thumb-active {
font-weight: bold;
img {
border-bottom: 4px solid var(--paletteColor1, #3eaf7c);
}
}
ul {
list-style: none;
padding: 0;
}
.tainacan-item-section__attachments-file {
text-align: center;
vertical-align: top;
2021-02-23 02:09:46 +00:00
cursor: zoom-in;
word-break: break-all;
font-size: 0.875em;
2021-01-04 21:40:54 +00:00
max-width: calc(var(--attachments-size, 157px) + 17px);
@media only screen and (max-width: 380px) {
margin: 10px 0;
}
img {
border-radius: var(--borderRadius, 3px);
2021-01-04 21:40:54 +00:00
width: var(--attachments-size, 140px);
height: var(--attachments-size, 140px);
object-fit: cover;
transition: border-bottom 0.3s ease;
&:focus {
outline: none;
}
}
.swiper-slide-name {
display: block;
margin-top: 0.5rem;
font-family: var(--fontFamily);
font-size: var(--fontSize);
font-weight: var(--fontWeight);
font-style: var(--fontStyle, inherit);
line-height: var(--lineHeight);
letter-spacing: var(--letterSpacing);
text-transform: var(--textTransform);
-webkit-text-decoration: var(--textDecoration);
text-decoration: var(--textDecoration);
}
a {
width: 100%;
2021-01-04 21:40:54 +00:00
max-width: var(--attachments-size, 140px);
text-align: center;
word-break: break-all;
2021-02-23 02:09:46 +00:00
cursor: zoom-in;
}
a,
a:focus,
a:hover {
outline: none;
text-decoration: none;
color: black;
}
.attachment-without-image img {
box-sizing: border-box;
padding: 36px;
background-color: #dbdbdb;
object-fit: contain;
max-width: var(--attachments-size,140px);
max-height: var(--attachments-size,140px);
}
}
}
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
--swiper-navigation-size: 1.1rem;
// Photoswip zoom ---------------------------------
.pswp__zoom-wrap .attachment-without-image {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
& > iframe {
min-height: 80vh;
width: 80%;
border: none;
}
& > a,
& > p {
z-index: 99;
padding: 1rem 4.33337vw;
background: white;
border-radius: var(--borderRadius, 3px);
word-wrap: break-word;
}
& > audio,
& > video {
min-height: 54px;
padding: 12px;
}
}
.pswp__caption__center {
text-align: center;
font-size: 1rem;
}
// Metadata list -------------------------------------
.tainacan-item-section__metadata {
height: 100%;
-moz-column-width: var(--metadata-column-width, 400px);
-webkit-column-width: var(--metadata-column-width, 400px);
column-width: var(--metadata-column-width, 400px);
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-gap: 0;
-moz-column-rule: none;
-webkit-column-gap: 0;
-webkit-column-rule: none;
column-gap: 4rem;
column-rule: none;
}
@media only screen and (min-width: 1366px) {
-moz-column-gap: 7rem;
-moz-column-rule: none;
-webkit-column-gap: 7rem;
-webkit-column-rule: none;
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;
}
.tainacan-metadata-label {
text-align: var(--metadata-label-alignment, left);
}
.tainacan-metadata-value {
text-align: var(--metadata-value-alignment, left);
font-family: var(--fontFamily);
font-size: var(--fontSize);
font-weight: var(--fontWeight);
font-style: var(--fontStyle, inherit);
line-height: var(--lineHeight);
letter-spacing: var(--letterSpacing);
text-transform: var(--textTransform);
-webkit-text-decoration: var(--textDecoration);
text-decoration: var(--textDecoration);
margin-bottom: 0.75rem;
padding-bottom: 0.75rem;
2021-01-04 21:40:54 +00:00
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);
}
// 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 #e0e5eb;
}
&.metadata-type-2 {
&>div {
display: flex;
flex-wrap: nowrap;
.tainacan-metadata-label {
flex-basis: 40%;
margin-bottom: 0;
2021-01-04 21:40:54 +00:00
border-right: var(--metadata-label-border, 0px solid rgba(125, 125, 125, 0.5));
}
.tainacan-metadata-value {
flex-basis: 60%;
padding-left: 1rem;
}
@media only screen and (max-width: 767px) {
flex-wrap: wrap;
.tainacan-metadata-label {
flex-basis: 100%;
margin-bottom: 0.25rem;
}
.tainacan-metadata-value {
flex-basis: 100%;
padding-left: 0;
}
}
}
}
}
// Document Download button -------------------------------------
.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;
}
}
}