guide.deuxfleurs.fr/sass/juice.scss

326 lines
4.8 KiB
SCSS
Raw Normal View History

2022-05-10 15:52:28 +00:00
@import "_ultility.scss";
@import "_text.scss";
@import "_markdown.scss";
body {
padding: 0;
margin: 0;
box-sizing: border-box;
background-color: var(--secondary-color);
display: flex;
flex-direction: column;
min-height: 100vh;
}
a {
text-decoration: none;
}
ul {
margin-top: 0.5rem;
}
ul > li {
padding: 0.3rem 0;
}
p > img {
width: 100%;
height: auto;
}
header {
background-color: var(--primary-color);
color: black;
padding: 20px 50px;
display: flex;
align-items: center;
justify-content: space-between;
}
2022-12-21 23:07:05 +00:00
header ul {
margin: 0px;
padding: 0px;
list-style: none;
}
header ul li {
display: inline;
}
2022-05-10 15:52:28 +00:00
.logo {
2022-05-11 15:53:45 +00:00
font-family: Georgia, DejaVu Serif, Norasi, serif;
2022-12-21 23:07:05 +00:00
font-size: 28px;
2022-05-10 15:52:28 +00:00
color: var(--primary-text-color);
2022-05-11 15:53:45 +00:00
font-weight: 500;
2022-05-10 15:52:28 +00:00
display: flex;
align-items: center;
margin: 0 40px;
img {
width: 60px;
margin: 0 25px;
}
}
.nav-item {
margin: 0 10px;
text-decoration: none;
font-weight: bold;
2022-05-11 15:53:45 +00:00
color: var(--primary-text-color);
2022-05-10 15:52:28 +00:00
&:hover {
2022-05-11 15:53:45 +00:00
color: #fff;
2022-05-10 15:52:28 +00:00
text-decoration: underline;
}
}
.hero {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100vh;
background-color: var(--primary-color);
overflow-x: hidden;
padding: 0 40px;
.explore-more {
position: absolute;
bottom: 20px;
cursor: pointer;
}
}
2022-12-21 23:07:05 +00:00
2022-05-10 15:52:28 +00:00
main {
display: flex;
2022-12-21 23:42:54 +00:00
padding: 50px 50px;
2022-12-21 23:49:52 +00:00
flex-grow: 1;
2022-05-10 15:52:28 +00:00
2022-12-22 10:35:44 +00:00
.toc-homepage .toc-sticky {
2022-12-21 23:35:27 +00:00
display: none;
}
2022-05-10 15:52:28 +00:00
.toc {
max-width: 260px;
min-width: 240px;
}
.toc-item {
padding: 10px 20px;
color: #424242;
}
2022-05-11 15:53:45 +00:00
.toc-section a {
font-weight: bold;
}
2022-08-26 13:08:52 +00:00
.nav-subsection {
padding-top: 10px;
}
2022-05-10 15:52:28 +00:00
.toc-item a, .toc-item-child a {
color: var(--secondary-text-color);
&:hover {
cursor: pointer;
text-decoration: underline;
}
}
.toc-item a.active, .toc-item-child a.active {
color: var(--toc-highlight-text-color);
}
.toc-item-child {
padding: 0 30px 5px;
color: #424242;
}
}
.toc-sticky {
border-radius: 3px;
border-top: 5px solid var(--primary-color);
background-color: white;
position: sticky;
position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky;
position: -o-sticky;
top: 10px;
padding: 10px 0 20px;
max-height: 100vh;
overflow: auto;
}
footer {
padding: 50px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #202020;
color: #fcfcfc;
a {
color: #fcfcfc;
text-decoration: underline;
}
}
@media screen and (min-width: 1280px) {
2022-12-21 23:42:54 +00:00
main {
padding: 50px 100px;
}
2022-12-21 23:07:05 +00:00
.logo {
font-size: 32px;
}
2022-05-10 15:52:28 +00:00
.content {
max-width: 60%;
min-width: 800px;
2022-08-26 13:08:52 +00:00
overflow: hidden;
2022-05-10 15:52:28 +00:00
}
2022-12-21 23:07:05 +00:00
.text {
font-size: 18px;
}
2022-05-10 15:52:28 +00:00
}
@media screen and (max-width: 768px) {
header {
2022-12-21 23:39:12 +00:00
padding: 10px 30px;
flex-direction: column;
align-items: center;
justify-content: center;
2022-12-21 23:07:05 +00:00
}
header nav {
display: none;
}
2022-05-10 15:52:28 +00:00
.logo {
font-size: 28px;
margin: 10px;
img {
width: 45px;
margin: 0 10px 0 0;
}
}
.nav-item {
margin: 0 5px;
2022-12-21 23:07:05 +00:00
font-size: 1em;
2022-05-10 15:52:28 +00:00
}
.hero {
padding: 40px 30px;
}
main {
2022-12-21 23:07:05 +00:00
display: block;
padding: 0px;
}
main .content {
margin: 15px;
2022-05-10 15:52:28 +00:00
}
.content {
padding: 0;
2022-12-21 23:07:05 +00:00
display: block;
2022-05-10 15:52:28 +00:00
}
2022-12-21 23:07:05 +00:00
}
2022-12-22 10:35:44 +00:00
/*
Disposition spécifique du menu pour mobile; menu déroulable pour mobile
Code inspiré de: https://alvarotrigo.com/blog/hamburger-menu-css/
*/
2022-12-21 23:07:05 +00:00
#menu-toggle {
display: none;
}
2022-12-21 23:42:54 +00:00
.menu-button-container {
2022-12-21 23:35:27 +00:00
display: none;
2022-12-21 23:07:05 +00:00
}
.menu-button::before {
content: '';
transform: translate(0, -8px);
}
.menu-button::after {
content: '';
transform: translate(0, 8px);
}
#menu-toggle:checked + .menu-button-container .menu-button::before {
margin-top: 0px;
transform: rotate(45deg);
}
#menu-toggle:checked + .menu-button-container .menu-button {
background: transparent;
}
#menu-toggle:checked + .menu-button-container .menu-button::after {
margin-top: 0px;
transform: rotate(-45deg);
}
@media (max-width: 768px) {
2022-12-21 23:49:52 +00:00
main .toc {
margin: 0px;
width: 100%;
max-width: none;
border: 0px;
}
main .toc-sticky {
border: 0px;
2022-12-22 10:35:44 +00:00
padding: 10px 0px;
2022-12-21 23:42:54 +00:00
}
2022-12-22 10:35:44 +00:00
main .toc-homepage .toc-sticky {
2022-12-21 23:07:05 +00:00
display: block;
}
2022-12-21 23:35:27 +00:00
2022-12-21 23:49:52 +00:00
.menu-button-container {
display: block;
}
2022-12-21 23:35:27 +00:00
.toc-menu-title {
font-weight: 600;
margin-left: 64px;
}
.toc-section {
margin-top: 16px;
}
.menu-button {
top: 28px;
left:24px;
}
.menu-button,
.menu-button::before,
.menu-button::after {
display: block;
background-color: #777;
position: absolute;
height: 4px;
width: 30px;
transition: transform 400ms ease;
border-radius: 2px;
}
#menu-toggle ~ .toc-item {
2022-12-21 23:07:05 +00:00
display: none;
}
2022-12-21 23:35:27 +00:00
#menu-toggle:checked ~ .toc-item {
2022-12-21 23:07:05 +00:00
display: block;
}
}