xiaowang/assets/css/style.scss

645 lines
14 KiB
SCSS
Raw Normal View History

2022-04-27 15:01:25 +02:00
@use 'partials/minireset';
@use 'partials/fonts';
@use 'partials/variables' as *;
@use 'partials/animations';
2022-04-08 16:37:47 +02:00
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// GENERALITIES
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// Fonts and colors
body {
font-family: var(--text-font-family);
font-size: var(--text-font-size);
line-height: var(--text-font-size);
color: var(--jet);
background-color: var(--white);
}
h1,
h2,
2022-04-26 18:04:10 +02:00
h3 {
2022-04-15 16:45:38 +02:00
color: var(--black);
2022-04-08 16:37:47 +02:00
}
h1 {
2022-04-15 16:45:38 +02:00
font-family: var(--logo-font-family);
font-size: var(--h1-font-size);
line-height: var(--h1-font-size);
2022-04-08 16:37:47 +02:00
}
h2 {
font-family: var(--text-font-family);
2022-04-15 16:45:38 +02:00
font-size: var(--h2-font-size);
line-height: var(--h2-font-size);
margin: 0 0 4rem 0;
2022-04-08 16:37:47 +02:00
}
h3 {
2022-04-15 16:45:38 +02:00
font-family: var(--text-font-family);
font-size: var(--h3-font-size);
line-height: var(--h3-font-size);
2022-04-27 15:01:25 +02:00
margin: 2rem 0 1rem 0;
2022-04-08 16:37:47 +02:00
}
p {
2022-04-15 16:45:38 +02:00
text-align: justify;
line-height: var(--text-line-height);
}
strong {
font-weight: var(--bold-font-weight);
}
em {
font-style: italic;
2022-04-08 16:37:47 +02:00
}
// Link style
a {
2022-04-15 16:45:38 +02:00
color: var(--jet);
text-decoration: underline;
-webkit-transition: color 200ms ease-in-out;
-o-transition: color 200ms ease-in-out;
transition: color 200ms ease-in-out;
&:hover,
&:focus,
&:active {
color: var(--black);
}
2022-04-08 16:37:47 +02:00
}
// General grid layout
body {
2022-04-15 16:45:38 +02:00
min-height: 100vh;
overflow-x: hidden;
display: -ms-grid;
display: grid;
grid:
2022-06-02 15:22:19 +02:00
'header' var(--header-bar-height)
2022-04-15 16:45:38 +02:00
'main' 1fr
'footer' auto
/ 1fr;
2022-04-08 16:37:47 +02:00
}
header {
2022-04-15 16:45:38 +02:00
grid-area: header;
2022-04-08 16:37:47 +02:00
}
main {
2022-04-15 16:45:38 +02:00
grid-area: main;
2022-04-08 16:37:47 +02:00
}
footer {
2022-04-15 16:45:38 +02:00
grid-area: footer;
2022-04-08 16:37:47 +02:00
}
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// HEADER
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// Header bar
.header-bar {
width: 100%;
2022-04-15 16:45:38 +02:00
max-width: var(--content-max-width);
height: var(--header-bar-height);
margin: auto;
padding: var(--header-bar-vertical-padding) var(--header-bar-horizontal-padding);
background-color: var(--transparent-white);
border-bottom: 1px solid var(--transparent-white);
2022-05-12 11:22:16 +02:00
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
z-index: 1;
2022-06-02 15:22:19 +02:00
-webkit-transition: border-bottom 400ms ease-in-out;
-o-transition: border-bottom 400ms ease-in-out;
transition: border-bottom 400ms ease-in-out;
&--fixed {
position: fixed;
top: calc(-1 * var(--header-bar-height));
border-bottom: 1px solid var(--spanish-gray);
-webkit-transition: transform 400ms ease-in-out;
-o-transition: transform 400ms ease-in-out;
transition: transform 400ms ease-in-out;
}
2022-06-02 15:22:19 +02:00
&--visible {
-webkit-transform: translateY(var(--header-bar-height));
-ms-transform: translateY(var(--header-bar-height));
transform: translateY(var(--header-bar-height));
}
2022-04-08 16:37:47 +02:00
}
.header-bar__logo {
2022-04-15 16:45:38 +02:00
width: max-content;
2022-04-08 16:37:47 +02:00
}
.header-bar__logo-link {
2022-04-15 16:45:38 +02:00
text-decoration: none;
2022-04-08 16:37:47 +02:00
}
2022-05-12 11:22:16 +02:00
.header-bar__nav {
position: relative;
z-index: 1;
}
.header-bar__nav-button {
2022-06-02 15:22:19 +02:00
width: var(--icon-size);
height: var(--icon-size);
2022-05-12 11:22:16 +02:00
border: none;
2022-06-02 15:22:19 +02:00
border-radius: 50%;
background-color: var(--jet);
2022-05-12 11:22:16 +02:00
cursor: pointer;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
2022-06-02 15:22:19 +02:00
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-transition: background-color 200ms ease-in-out;
-o-transition: background-color 200ms ease-in-out;
transition: background-color 200ms ease-in-out;
svg {
fill: var(--white);
2022-06-02 16:43:28 +02:00
width: 90%;
height: 90%;
2022-06-02 15:22:19 +02:00
-webkit-transition: fill 200ms ease-in-out;
-o-transition: fill 200ms ease-in-out;
transition: fill 200ms ease-in-out;
2022-05-12 11:22:16 +02:00
}
2022-06-02 15:22:19 +02:00
&:hover,
2022-06-02 16:43:28 +02:00
&:focus,
2022-06-02 15:22:19 +02:00
&:active {
background-color: var(--black);
}
2022-05-12 11:22:16 +02:00
}
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// MAIN
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// Home section
.home-section {
2022-04-15 16:45:38 +02:00
max-width: var(--content-max-width);
min-height: var(--home-section-min-height);
margin: auto;
padding: var(--home-section-vertical-padding) var(--home-section-horizontal-padding);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
2022-04-08 16:37:47 +02:00
}
.home__nav {
2022-04-15 16:45:38 +02:00
height: 100%;
display: -ms-grid;
display: grid;
grid:
'top-left top top-right' var(--home-nav-item-size)
'left center right' auto
'bottom-left bottom bottom-right' var(--home-nav-item-size)
/ var(--home-nav-item-size) auto var(--home-nav-item-size);
place-content: center center;
gap: var(--home-nav-gap);
line-height: 0;
2022-04-08 16:37:47 +02:00
}
.home__nav-image {
2022-04-15 16:45:38 +02:00
grid-area: center;
2022-04-08 16:37:47 +02:00
2022-04-15 16:45:38 +02:00
img {
min-width: 12rem;
max-width: Min(100%, 2500px);
min-height: 12rem;
max-height: var(--home-nav-image-max-height);
}
2022-04-08 16:37:47 +02:00
}
.home__nav--2-items {
2022-04-15 16:45:38 +02:00
.home__nav-item-1 {
grid-area: top-left;
place-self: end end;
-webkit-transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
-ms-transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
}
.home__nav-item-2 {
grid-area: top-right;
place-self: end start;
-webkit-transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
-ms-transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
}
2022-04-08 16:37:47 +02:00
}
2022-05-12 11:22:16 +02:00
.home__nav--3-items {
2022-04-08 16:37:47 +02:00
2022-04-15 16:45:38 +02:00
.home__nav-item-1 {
grid-area: top-left;
place-self: end end;
-webkit-transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
-ms-transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
}
.home__nav-item-2 {
grid-area: top-right;
place-self: end start;
-webkit-transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
-ms-transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
}
.home__nav-item-3 {
grid-area: bottom;
place-self: start center;
}
2022-04-08 16:37:47 +02:00
}
2022-05-12 11:22:16 +02:00
.home__nav--4-items {
2022-04-08 16:37:47 +02:00
2022-04-15 16:45:38 +02:00
.home__nav-item-1 {
grid-area: top-left;
place-self: end end;
-webkit-transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
-ms-transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
transform:
rotate(-45deg)
translateY(var(--home-nav-item-translation));
}
.home__nav-item-2 {
grid-area: top-right;
place-self: end start;
-webkit-transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
-ms-transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
transform:
rotate(45deg)
translateY(var(--home-nav-item-translation));
}
.home__nav-item-3 {
grid-area: bottom-left;
place-self: start end;
-webkit-transform:
rotate(45deg)
translateY(calc(var(--home-nav-item-translation) * -1));
-ms-transform:
rotate(45deg)
translateY(calc(var(--home-nav-item-translation) * -1));
transform:
rotate(45deg)
translateY(calc(var(--home-nav-item-translation) * -1));
}
.home__nav-item-4 {
grid-area: bottom-right;
place-self: start start;
-webkit-transform:
rotate(-45deg)
translateY(calc(var(--home-nav-item-translation) * -1));
-ms-transform:
rotate(-45deg)
translateY(calc(var(--home-nav-item-translation) * -1));
transform:
rotate(-45deg)
translateY(calc(var(--home-nav-item-translation) * -1));
}
2022-04-08 16:37:47 +02:00
}
.home__nav-link {
2022-04-15 16:45:38 +02:00
color: var(--black);
2022-05-12 11:22:16 +02:00
font-size: var(--h3-font-size);
2022-04-15 16:45:38 +02:00
text-decoration: none;
2022-04-11 16:23:32 +02:00
opacity: 0;
2022-04-15 16:45:38 +02:00
-webkit-transition: opacity 600ms ease-in-out;
-o-transition: opacity 600ms ease-in-out;
transition: opacity 600ms ease-in-out;
div {
opacity: 0;
-webkit-transition: opacity 600ms ease-in-out;
-o-transition: opacity 600ms ease-in-out;
transition: opacity 600ms ease-in-out;
}
2022-04-11 16:23:32 +02:00
}
.home__nav-link--visible {
opacity: 1;
2022-04-15 16:45:38 +02:00
div {
opacity: 1;
}
2022-04-08 16:37:47 +02:00
}
.home__nav-letter--wave-up {
2022-04-15 16:45:38 +02:00
-webkit-animation: wave-up 600ms ease-out;
animation: wave-up 600ms ease-in-out;
2022-04-08 16:37:47 +02:00
}
.home__nav-letter--wave-down {
2022-04-15 16:45:38 +02:00
-webkit-animation: wave-down 600ms ease-out;
animation: wave-down 600ms ease-in-out;
}
// Gallery & biography sections
2022-04-15 16:45:38 +02:00
.gallery-section,
.biography-section {
2022-04-15 16:45:38 +02:00
max-width: var(--content-max-width);
margin: auto;
padding: var(--generic-section-vertical-padding) var(--generic-section-horizontal-padding);
}
.gallery__title,
.biography__title {
2022-04-15 16:45:38 +02:00
text-align: center;
}
.gallery__introduction,
.biography__presentation {
2022-04-15 16:45:38 +02:00
max-width: var(--text-max-width);
margin: auto;
2022-04-26 18:04:10 +02:00
h3:nth-child(1) {
margin: 0 0 1rem 0;
}
2022-04-15 16:45:38 +02:00
p {
+ p,
+ ul {
margin: 1rem 0 0 0;
}
}
ul {
list-style: disc inside;
+ ul,
+ p {
margin: 1rem 0 0 0;
}
li + li {
margin: 0.5rem 0 0 0;
}
}
}
.gallery__artwork {
2022-04-15 16:45:38 +02:00
display: table;
max-width: Min(1280px, 100%);
2022-04-15 16:45:38 +02:00
margin: auto;
+ .gallery__artwork {
margin: 2rem auto 0 auto;
2022-04-15 16:45:38 +02:00
}
.gallery__image,
.gallery__video {
2022-04-15 16:45:38 +02:00
display: block;
max-height: 80vh;
}
.gallery__video {
&--full-screen {
max-height: initial;
}
2022-04-15 16:45:38 +02:00
}
figcaption {
display: table-caption;
caption-side: bottom;
margin: 1rem auto 0 auto;
font-size: var(--caption-font-size);
font-style: italic;
}
}
@media screen and (min-width: $tablet-media-query) {
.gallery__artwork {
+ .gallery__artwork {
margin: 3rem auto 0 auto;
}
}
}
2022-04-15 16:45:38 +02:00
// Error section
.error-section {
max-width: var(--content-max-width);
margin: auto;
padding: var(--generic-section-vertical-padding) var(--generic-section-horizontal-padding);
}
.error__title {
text-align: center;
}
.error__message {
max-width: var(--text-max-width);
margin: auto;
text-align: center;
}
.error__button {
margin: 1rem 0 0 0;
text-align: center;
a {
display: inline-block;
padding: 1rem;
border-radius: 10px;
color: var(--white);
background-color: var(--jet);
text-decoration: none;
font-weight: var(--semi-bold-font-weight);
-webkit-transition: background-color 200ms ease-in-out;
-o-transition: background-color 200ms ease-in-out;
transition: background-color 200ms ease-in-out;
&:hover,
&:focus,
&:active {
background-color: var(--black);
}
}
2022-04-08 16:37:47 +02:00
}
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// FOOTER
2022-04-26 18:04:10 +02:00
// ----------------------------------------------------------------------------
2022-04-08 16:37:47 +02:00
// Footer bar
.footer-bar {
2022-04-15 16:45:38 +02:00
max-width: var(--content-max-width);
height: var(--footer-bar-height);
margin: auto;
padding: var(--footer-bar-vertical-padding) var(--footer-bar-horizontal-padding);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
2022-04-08 16:37:47 +02:00
}
.footer-bar__social {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
2022-04-15 16:45:38 +02:00
a {
2022-06-02 16:43:28 +02:00
width: var(--icon-size);
height: var(--icon-size);
border-radius: 50%;
background-color: var(--jet);
2022-04-15 16:45:38 +02:00
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
2022-06-02 16:43:28 +02:00
-webkit-transition: background-color 200ms ease-in-out;
-o-transition: background-color 200ms ease-in-out;
transition: background-color 200ms ease-in-out;
2022-04-15 16:45:38 +02:00
+ a {
margin: 0 0 0 1rem;
}
svg {
2022-06-02 16:43:28 +02:00
fill: var(--white);
-webkit-transition: fill 200ms ease-in-out;
-o-transition: fill 200ms ease-in-out;
transition: fill 200ms ease-in-out;
2022-04-15 16:45:38 +02:00
}
2022-06-02 16:43:28 +02:00
&:hover,
&:focus,
&:active {
background-color: var(--black);
}
2022-04-08 16:37:47 +02:00
}
2022-06-02 16:43:28 +02:00
a.footer-bar__instagram-button {
svg {
width: 55%;
height: 55%;
}
}
a.footer-bar__email-button {
svg {
width: 70%;
height: 70%;
}
}
2022-04-08 16:37:47 +02:00
}
.footer-bar__copyright {
2022-04-15 16:45:38 +02:00
font-size: var(--footnote-font-size);
margin: 1rem 0 0 0;
2022-04-08 16:37:47 +02:00
}
@media screen and (min-width: $tablet-media-query) {
2022-04-15 16:45:38 +02:00
.footer-bar {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: end;
-ms-flex-align: end;
align-items: flex-end;
}
.footer-bar__social {
order: 2;
}
.footer-bar__copyright {
order: 1;
margin: 0;
}
2022-04-08 16:37:47 +02:00
}