ateliers55/user/themes/ateliers-55/sass/styles.scss

449 lines
11 KiB
SCSS

@font-face {
font-family: "Jost";
src: url("../fonts/jost-400-book-webfont.woff") format("woff"),
url("../fonts/jost-400-book-webfont.woff2") format("woff2");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Jost";
src: url("../fonts/jost-300-lightitalic-webfont.woff") format("woff"),
url("../fonts/jost-300-lightitalic-webfont.woff2") format("woff2");
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: "Jost";
src: url("../fonts/jost-500-medium-webfont.woff") format("woff"),
url("../fonts/jost-500-medium-webfont.woff2") format("woff2");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "Jost";
src: url("../fonts/jost-500-mediumitalic-webfont.woff") format("woff"),
url("../fonts/jost-500-mediumitalic-webfont.woff2") format("woff2");
font-weight: 500;
font-style: italic;
}
@font-face {
font-family: "Jost";
src: url("../fonts/jost-700-bold-webfont.woff") format("woff"),
url("../fonts/jost-700-bold-webfont.woff2") format("woff2");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "Jost";
src: url("../fonts/jost-700-bolditalic-webfont.woff") format("woff"),
url("../fonts/jost-700-bolditalic-webfont.woff2") format("woff2");
font-weight: bold;
font-style: italic;
}
$mainColor: #000;
$lightColor: #444;
$accentColor: #0066ff;
$bgColor: #fff;
* {
font-family: "Jost", sans-serif;
a, a:hover, a:active, a:focus, a:visited {
color: $accentColor;
}
ul {
list-style: none;
}
}
body {
overflow-x: hidden;
}
header {
display: flex;
width: 100vw;
max-height: 10vh;
justify-content: space-between;
align-items: center;
border-bottom: solid 1px $lightColor;
#logo {
width: 7.5vh;
height: 7.5vh;
padding: 1vh;
img {
width: 100%;
transform: scale(1.2) translateY(0.8rem);
}
}
#main-title {
align-self: flex-end;
h1 {
font-size: 1.3rem;
font-weight: normal;
color: $mainColor;
text-transform: uppercase;
}
}
#hamburger {
padding: 1.5rem 1rem;
width: 7.5vh;
height: 7.5vh;
border-left: solid 1px $lightColor;
display: flex;
flex-direction: column;
justify-content: space-between;
cursor: pointer;
outline: unset;
div {
outline: unset;
border-bottom: solid 1px $mainColor;
width: 100%;
background-color: $mainColor;
opacity: 1;
transition: opacity 0.2s ease-out, transform 0.4s ease-out;
transform: none;
}
}
#hamburger.open {
div:first-of-type {
transform: translate(0rem, calc(7.5vh / 2 - 1.5rem)) rotate(-45deg);
}
div:nth-of-type(2) {
opacity: 0;
}
div:last-of-type {
transform: translate(0rem, calc((7.5vh / 2 - 1.5rem) * -1)) rotate(45deg);
}
}
}
nav {
background-color: $accentColor;
max-height: 0vh;
height: auto;
transition: max-height 0.8s ease-out;
ul {
padding: 1rem 0 1rem 7.5vh;
margin: 0;
li {
a, a:hover, a:active, a:focus, a:visited {
padding-left: 0;
transition: padding-left 0.3s ease-out;
color: $bgColor;
font-weight: bold;
font-size: 1.2rem;
}
}
li a:hover {
padding-left: 1rem;
}
}
}
nav.open {
max-height: 20vh;
}
#about {
color: $accentColor;
line-height: 1.4;
border-bottom: solid 1px $mainColor;
padding: 1rem 1.2rem 1rem 1.2rem;
font-weight: 500;
display: grid;
grid-template-columns: 1fr;
grid-template-rows: repeat(3, auto);
justify-items: center;
#about-hidden {
overflow: hidden;
height: auto;
max-height: 0vh;
transition: max-height 1s ease-out;
font-weight: normal;
}
#about-hidden.open {
max-height: 50vh;
}
#about-arrow {
width: 7.5vh;
height: 3.75vh;
display: flex;
justify-content: space-around;
margin-top: 1rem;
transform: rotate(0deg) scale(0.5);
transition: transform 0.5s ease-out;
cursor: pointer;
outline: unset;
div {
outline: unset;
width: 50%;
border-bottom: solid 1px $mainColor;
}
div:first-of-type {
transform: translateX(50%) translateY(-1rem) rotate(45deg);
}
div:last-of-type {
transform: translateX(-50%) translateY(-1rem) rotate(-45deg);
}
}
#about-arrow.open {
transform: rotate(180deg) scale(0.5);
}
}
main {
display: grid;
padding: 1.2rem;
.article-card {
cursor: pointer;
width: 100%;
margin: 2rem 0;
.img-cover {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
max-height: 40vh;
position: relative;
.eye {
position: absolute;
opacity: 0;
background-color: rgba(255, 255, 255, 0.5);
transition: opacity 0.3s ease-out;
z-index: 1;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
.eye-picto {
width: 35%;
height: 100%;
-webkit-mask: url(../images/eye.svg) no-repeat center;
mask: url(../images/eye.svg) no-repeat center;
mask-size: 100%;
-webkit-mask-size: 100%;
background-color: $accentColor;
}
}
> img {
z-index: 0;
width: 100%;
transform: scale(1);
transition: transform 0.3s ease-out;
}
}
.date {
margin-top: 0.8rem;
font-weight: 500;
color: $accentColor;
}
h3 {
font-weight: normal;
font-size: 1rem;
margin: 0;
}
}
.article-card:hover {
.img-cover {
.eye {
opacity: 1;
}
> img {
transform: scale(1.1);
}
}
}
}
article {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
background-color: rgba(255, 255, 255, 0.5);
z-index: 3;
display: flex;
align-items: center;
justify-content: center;
#article-wrapper {
border: solid 1px $mainColor;
width: 95vw;
max-height: 90vh;
overflow-y: auto;
background-color: $bgColor;
padding-bottom: 1.5rem;
.article-header {
position: relative;
width: 100%;
height: 3rem;
margin-top: 2rem;
display: flex;
align-items: center;
margin-bottom: 1rem;
.article-siblings {
width: 100%;
padding: 0 7vw;
display: flex;
justify-content: space-between;
a {
color: $mainColor;
display: flex;
align-items: center;
i {
font-size: 0.5rem;
padding: 0.3rem;
}
}
}
.close-article {
z-index: 11;
display: block;
padding-top: 0.75rem;
width: 1.5rem;
height: 1.5rem;
position: absolute;
right: 0.5rem;
top: -1.5rem;
cursor: pointer;
div {
width: 100%;
border-bottom: solid 1px $mainColor;
}
div:first-of-type {
transform: rotate(45deg);
}
div:last-of-type {
transform: rotate(-45deg);
}
}
}
.swiper {
overflow: hidden;
opacity: 0;
transition: opacity 0.3s ease-out;
.swiper-wrapper {
.swiper-slide {
display: flex;
justify-content: center;
padding: 0 7vw;
display: flex;
height: auto;
max-height: 40vh;
align-items: center;
img {
box-sizing: content-box;
width: 100%;
}
video {
box-sizing: content-box;
width: 100%;
}
}
}
.swiper-button-prev, .swiper-button-next {
color: $mainColor;
transform: scale(0.5);
}
.swiper-button-prev {
left: 0;
}
.swiper-button-next {
right: 0;
}
}
}
.article-date {
padding: 0 7vw;
font-weight: 500;
color: $accentColor;
margin: 0;
margin-top: 1rem;
}
.article-titre {
padding: 0 7vw;
font-weight: bold;
margin: 0;
}
.article-content {
padding: 0 7vw
}
}
@media screen and (min-width: 960px) {
header {
#logo {
width: 15vw;
img {
padding-left: 40%;
padding-right: 10%;
}
}
#main-title {
width: 100%;
h1 {
font-size: 2rem;
padding-left: 2.5vw;
margin-bottom: 0.5rem;
}
}
}
nav {
ul {
padding: 1rem 0 1rem 15vw;
}
}
#about {
grid-template-columns: repeat(2, auto);
grid-template-rows: repeat(2, auto);
padding: 1rem 0 1rem 15vw;
cursor: pointer;
#about-summary {
padding-right: calc(15vw - 7.5vh);
}
#about-hidden {
grid-row: 2;
grid-column: 1;
padding-right: calc(15vw - 7.5vh);
}
#about-arrow {
grid-row: 1 / 3;
grid-column: 2;
align-self: center;
}
#about-hidden.open {
max-height: 20vh;
}
}
main {
grid-template-columns: repeat(3, 1fr);
column-gap: 2rem;
.article-card {
.img-cover {
max-height: 20vh;
}
}
}
article {
#article-wrapper {
width: 60vw;
.swiper-button-prev {
left: 1rem !important;
}
.swiper-button-next {
right: 1rem !important;
}
}
}
}
@media screen and (min-width: 1280px) {
main {
margin: 2rem 15vw;
padding: 0;
}
}