hugo-snotra/static/css/style.css

803 lines
15 KiB
CSS
Raw Normal View History

2020-04-28 12:26:34 +02:00
/******************* Constants *******************/
:root {
--font-color: #EFEFEF;
--font-color_rgb: 239, 239, 239;
2020-04-28 12:26:34 +02:00
--font-color-em: #8C8C8C;
--background-color: #1C1C1C;
--background-color-light: #252525;
--background-color-dark: #121212;
--avatar-background: #B6B6B6;
2020-05-06 11:27:04 +02:00
--color01: #799479;
--color01_bright: #58af58;
--color02: #8f8071;
--color02_bright: #b88a5b;
2021-02-03 07:52:01 +01:00
--image-margin-side: 2.5em;
2021-02-26 16:59:11 +01:00
--content-width: 900px;
2020-04-28 12:26:34 +02:00
}
/******************* Page *******************/
* {
box-sizing: border-box;
}
html {
background-color: var(--background-color);
font-family: Lato, Helvetica, sans-serif;
font-size: medium;
color: var(--font-color);
}
@media only screen and (min-width: 768px) {
html {
font-size: large;
}
}
body {
margin: 0;
}
p, ul, ol {
2020-04-28 12:26:34 +02:00
line-height: 1.6em;
}
2021-10-26 08:48:08 +02:00
article {
position: relative;
}
2020-04-28 12:26:34 +02:00
/******************* Links *******************/
a:not(.anchor) {
2020-04-28 12:26:34 +02:00
text-decoration: none;
color: var(--font-color);
border-bottom: 1px dotted;
transition: box-shadow 0.2s ease, outline-offset 0.2s ease, transform 0.2s ease, background 0.4s ease;
}
a:not(.anchor):visited {
2020-04-28 12:26:34 +02:00
color: var(--font-color);
}
a:not(.anchor):hover {
2020-04-28 12:26:34 +02:00
outline: 1px solid;
outline-offset: .3em;
border-bottom: 1px dashed;
}
a:not(.anchor):active {
2020-04-28 12:26:34 +02:00
border-bottom: 1px solid;
}
a.not(.anchor):focus {
2020-04-28 12:26:34 +02:00
outline-offset: .3em;
outline: 1px solid;
}
/******************* Wrapper *******************/
.wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
}
/******************* Home Page *******************/
.centered {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
margin: 1em;
}
/******************* Navbar *******************/
#navigation {
height: 4em;
width: 100%;
line-height: 4em;
}
#navigation a {
padding: 1em;
padding-bottom: 0.75em; /* Pour éviter d'avoir un espace trop grand en bas*/
border: none;
border-radius: 0.5em;
}
#navigation a:hover {
background-color: var(--font-color);
text-decoration: none;
color: var(--background-color);
2020-04-28 21:59:42 +02:00
outline: none;
2020-04-28 12:26:34 +02:00
}
#navigation a:active {
color: var(--font-color);
border: none;
}
#navigation a:focus {
outline: none;
}
#navigation .navigation-container {
margin: 0 auto;
max-width: 90vw;
}
@media only screen and (max-width: 320px) {
#navigation .navigation-container {
max-width: 100vw;
}
}
@media only screen and (min-width: 1000px) {
#navigation .navigation-container {
max-width: var(--content-width);
2020-04-28 12:26:34 +02:00
}
}
#navigation-title {
letter-spacing: .1rem;
text-transform: uppercase;
font-weight: bold;
font-size: 1em;
}
/******************* Navbar Menu *******************/
#menu-toggle {
display: none;
}
#navigation .menu-button {
float: right;
position: relative;
2020-04-28 12:26:34 +02:00
display: none;
width: 4em;
height: 4em;
}
#navigation .menu-button-inner {
width: 3em;
height: 3em;
position:relative;
top: 0.5em;
left: 0.5em;
text-align:center
}
#navigation .menu-button .menu-button-image {
display: inline-block;
position: relative;
height: 1.5em;
width: 1.5em;
top: 0.75em;
2020-04-28 12:26:34 +02:00
background-image: url(../svg/bars.svg);
background-size: contain;
background-repeat: no-repeat;
2020-04-28 12:26:34 +02:00
margin: auto;
vertical-align: top;
}
#menu-toggle:checked + .menu-button .menu-button-inner {
background-color: var(--link-hover-background);
border-radius: 0.5em;
transition: background .5s, max-height .35s linear;
}
#menu-toggle:checked + .menu-button .menu-button-image {
opacity: 40%;
}
#navigation-list {
position: absolute;
top: 6rem;
right: 0;
visibility: hidden;
2024-11-30 09:21:23 +01:00
z-index: 1;
2020-04-28 12:26:34 +02:00
opacity: 0;
max-height: 0;
width: 100%;
font-size: 1.5em;
background-color: var(--background-color);
border-top: solid 2px var(--font-color);
border-bottom: solid 2px var(--font-color);
transition: opacity .5s, max-height .35s linear;
padding: 0;
}
#navigation-list .navigation-item {
float: none !important;
text-align: center;
margin: 0;
display: block;
}
#navigation-list .navigation-item,
#navigation-list .navigation-item span {
line-height: 5rem;
}
#menu-toggle:checked + label + ul {
visibility: visible;
opacity: 1;
max-height: 100rem;
}
#navigation .menu-button {
display: block;
cursor: pointer;
}
@media only screen and (min-width: 768px) {
#navigation-list {
position: relative;
float: right;
top: 0;
max-height: none;
visibility: visible;
opacity: 100;
width: auto;
border: none;
list-style: none;
font-size: 1em;
margin-top: 0;
}
#navigation-list .navigation-item {
display: inline-block;
font-weight: bold;
line-height: 4rem;
}
#navigation-list .navigation-item a,
#navigation-list .navigation-item span {
line-height: 1rem;
}
#menu-toggle:checked + label + ul {
visibility: visible;
opacity: 1;
max-height: 100rem;
}
#navigation .menu-button {
display: none;
}
}
/******************* Author Infos *******************/
#author {
text-align: center;
2021-10-24 21:10:21 +02:00
margin: 0 auto;
max-width: 90vw;
}
@media only screen and (max-width: 320px) {
#author {
max-width: 100vw;
}
}
@media only screen and (min-width: 1000px) {
#author {
max-width: var(--content-width);
}
2020-04-28 12:26:34 +02:00
}
#social {
list-style: none;
padding: 0;
}
#avatar img {
2021-03-13 13:45:04 +01:00
width: 20vw;
min-width: 120px;
max-width: 200px;
2020-04-28 12:26:34 +02:00
border-radius: 40%;
background-color: var(--avatar-background);
}
#social .social-element {
display: inline-block;
vertical-align: middle;
2022-10-03 08:32:53 +02:00
height: 3em;
2020-04-28 12:26:34 +02:00
margin-top: 1em;
}
#social .social-element a {
2022-10-03 08:32:53 +02:00
height: 75%;
2020-04-28 12:26:34 +02:00
display: inline-block;
margin-left: 1em;
margin-right: 1em;
border: none;
}
#social .social-element a:active {
outline: 2px solid;
}
#social .social-icon {
height: 100%;
}
@media only screen and (min-width: 768px) {
2022-10-03 08:32:53 +02:00
#social .social-element {
height: 2.5em;
2020-04-28 12:26:34 +02:00
}
}
/******************* Simple Page *******************/
.container {
max-width: 90vw;
margin: 0 auto;
width: 100%;
}
@media only screen and (min-width: 1000px) {
.container {
2021-02-26 16:59:11 +01:00
max-width: var(--content-width);
2020-04-28 12:26:34 +02:00
}
}
.page-icon {
width: 1em;
height: 1em;
vertical-align: middle;
}
/******************* Error Page *******************/
.error_page {
width: max-content;
}
.error_page footer {
padding-top: 1em;
border-top: 1px solid var(--font-color);
}
/******************* Error Page *******************/
#blog-list .list-title,
#site-page .site-title {
font-size: 2rem;
}
/******************* Articles List *******************/
.articles-list {
list-style: none;
padding-left: 0;
}
.articles-list li {
margin: 1em 0;
}
.articles-list .date {
display: block;
width: 15em;
text-align: left;
padding-right: 1.5em;
}
@media only screen and (min-width: 768px) {
.articles-list .date {
display: inline-block;
text-align: right;
}
2024-10-16 09:17:34 +02:00
.articles-list .title {
display: inline-block;
max-width: calc(100% - 16em);
vertical-align: top;
}
2020-04-28 12:26:34 +02:00
}
.articles-list .title {
font-weight: bold;
}
/******************* Paginator *******************/
.pagination {
padding-left: 0;
margin: auto;
text-align: center;
}
.pagination li {
display: inline-block;
}
/******************* Article *******************/
.container article {
margin: 0 1em;
}
@media only screen and (max-width: 320px) {
.container article {
margin: 0em;
}
}
2020-04-28 12:26:34 +02:00
/******************* Article Header *******************/
.container article .post-title {
margin-bottom: 0.3em;
}
.container article .post-title a:hover {
outline: none;
}
.container article .post-title a:active {
border-bottom: 1px solid;
}
.post-meta>div {
line-height: 2em;
}
.post-meta .date span {
display: inline-block;
}
.post-meta .posted-on {
margin-right: 1em;
}
.post-meta .categories, .post-meta .tags {
display: inline-block;
}
.post-meta .categories {
margin-right: 1em;
}
.post-meta .header-icon {
vertical-align: baseline;
margin-right: 0.3em;
}
.post-header {
margin-top: 3.5rem;
margin-bottom: 1.8rem;
}
@media only screen and (max-width: 320px) {
.post-header {
margin-top: 2rem;
margin-bottom: 1.6rem;
}
}
.post-title {
font-size: 3rem;
margin: 0;
}
@media only screen and (max-width: 320px) {
.post-title {
font-size: 2.4rem;
}
}
/******************* Article Body *******************/
.article-body {
margin-bottom: 2em;
}
.article-body img {
2021-02-15 13:02:37 +01:00
max-width: 100%;
2020-04-28 12:26:34 +02:00
}
.article-body h1 {
font-size: 2.55rem;
margin: 3.5rem 0 1.8rem;
}
.article-body h2 {
font-size: 2.17rem;
margin: 2.98rem 0 1.53rem;
}
.article-body h3 {
font-size: 1.84rem;
margin: 2.53rem 0 1.30rem;
}
.article-body h4 {
font-size: 1.57rem;
margin: 2.15rem 0 1.11rem;
}
.article-body h5 {
font-size: 1.33rem;
margin: 1.83rem 0 0.94rem;
}
.article-body h6 {
font-size: 1.13rem;
margin: 1.55rem 0 0.80rem;
}
@media only screen and (max-width: 320px) {
.article-body h1 {
font-size: 2.16rem;
margin: 2rem 0 1.6rem;
}
.article-body h2 {
font-size: 1.94rem;
margin: 1.80rem 0 1.44rem;
}
.article-body h3 {
font-size: 1.75rem;
margin: 1.62rem 0 1.30rem;
}
.article-body h4 {
font-size: 1.57rem;
margin: 1.46rem 0 1.17rem;
}
.article-body h5 {
font-size: 1.42rem;
margin: 1.31rem 0 1.05rem;
}
.article-body h6 {
font-size: 1.28rem;
margin: 1.18rem 0 0.94rem;
}
}
.anchor {
content: '#';
position: absolute;
opacity: 0%;
left: -1em;
width: 80%;
max-width: 600px;
border: none;
color: var(--font-color-em);
text-decoration: none;
}
@media only screen and (max-width: 500px) {
.anchor {
left: -0.8em;
}
}
.anchor:hover {
opacity: 100%;
outline: none;
border: none;
cursor: pointer;
}
@media only screen and (max-width: 320px) {
.anchor:hover {
opacity: 0%;
}
}
2020-04-28 12:26:34 +02:00
/******************* Article Footer *******************/
.article-footer {
font-style: italic;
font-size: 0.8rem;
margin: 2rem 0;
}
2020-09-22 15:02:00 +02:00
.article-footer .footer-return {
margin-bottom: 1em;
width: 100%;
text-align: right;
display: inline-block;
}
2020-04-28 12:26:34 +02:00
.article-footer .footer-link {
display: block;
}
.article-footer .footer-link .spacer {
display: none;
}
.article-footer .footer-link .label {
display: inline-block;
width: 8em;
}
@media only screen and (min-width: 768px) {
.article-footer .footer-link {
display: inline-block;
}
.article-footer .footer-link .label {
width: auto;
}
.article-footer .footer-link .spacer {
display: inline-block !important;
}
}
.footnotes {
clear: left;
}
2020-04-28 12:26:34 +02:00
/******************* Article Figure *******************/
.article-body figure {
margin: 1em 0;
max-width: 100%;
width: fit-content;
2021-02-03 07:52:01 +01:00
overflow: visible;
2020-04-28 12:26:34 +02:00
}
.article-body figure img {
vertical-align: middle;
2021-02-26 16:59:11 +01:00
min-width: calc(50% - 2 * var(--image-margin-side));
2020-04-28 12:26:34 +02:00
}
@media only screen and (min-width: 768px) {
.article-body figure {
margin: 1em 2.5em;
}
.article-body figure.logo,
.article-body figure.inline {
margin: 0;
}
2021-02-15 13:02:37 +01:00
.article-body figure.border img {
2021-02-03 07:52:01 +01:00
min-width: calc(100% - 2 * var(--image-margin-side)) !important;
}
2020-04-28 12:26:34 +02:00
}
.article-body figure.logo {
display: inline-block;
2021-02-08 21:54:24 +01:00
min-width: auto;
2020-04-28 12:26:34 +02:00
}
2021-01-31 10:04:59 +01:00
.article-body figure.wrap {
float: left;
margin: 0.7em 1em;
}
2020-04-28 12:26:34 +02:00
.article-body figure.inline {
display: inline-block;
2021-02-25 14:31:47 +01:00
min-width: auto;
margin-left: 1em;
margin-right: 1em;
2020-04-28 12:26:34 +02:00
}
2021-02-15 13:02:37 +01:00
.article-body figure.half {
width: 100%;
2021-02-27 08:49:54 +01:00
max-width: 45%;
2021-02-15 13:02:37 +01:00
}
.article-body figure.third {
width: 100%;
2021-02-27 08:49:54 +01:00
max-width: 30%;
2021-02-15 13:02:37 +01:00
}
2020-04-28 12:26:34 +02:00
.article-body figure.logo img {
2021-03-13 13:45:04 +01:00
width: 10vw;
max-width: 100px;
2021-03-13 13:45:04 +01:00
min-width: 40px;
2020-04-28 12:26:34 +02:00
vertical-align: bottom;
2021-01-31 10:04:59 +01:00
padding: 0;
2020-04-28 12:26:34 +02:00
}
.article-body figure.border img {
padding: 0.3rem;
border: 3px solid var(--background-color-light);
min-width: 100%;
}
.article-body figure.border figcaption {
background-color: var(--background-color-light);
min-width: 100%;
display: inline-block;
2020-04-28 12:26:34 +02:00
}
.article-body figure>a {
2020-04-28 12:26:34 +02:00
display: block;
width: fit-content;
2021-02-03 07:52:01 +01:00
outline: none;
2020-04-28 12:26:34 +02:00
min-height: 100%;
border: none;
margin: auto;
margin-bottom: 0.3em;
}
.article-body figure>a:hover {
border: none !important;
}
2021-02-03 07:52:01 +01:00
.article-body figure>a>img:hover {
box-shadow: 0 0 1em rgba(var(--font-color_rgb), 0.5);
2020-04-28 12:26:34 +02:00
}
.article-body figure figcaption p,
.article-body figure figcaption h4 {
font-style: italic;
font-weight: normal;
font-size: 0.9rem;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
margin-left: 1rem;
margin-right: 1rem;
}
.article-body figure figcaption .attribution {
2024-10-13 18:27:42 +02:00
display: block;
text-align: right;
}
2020-04-28 12:26:34 +02:00
@media only screen and (max-width: 320px) {
.article-body .footnotes ol {
padding-left: 2em;
}
}
.article-body .separator {
margin: 0 0.2em;
}
/******************* Article Tabular *******************/
.article-body .tabular.border table {
padding: 0.3rem;
border: 3px solid var(--background-color-light);
min-width: 100%;
}
.article-body .tabular td,
.article-body .tabular th {
2020-04-28 12:26:34 +02:00
padding: 0 0.4rem;
}
.article-body .tabular th {
border-bottom: 3px solid var(--background-color-light);
}
2020-05-04 17:26:27 +02:00
.article-body .tabular.center td {
text-align: center;
}
.article-body .tabular.right td {
text-align: right;
}
2020-04-28 12:26:34 +02:00
/******************* Article Abbreviation *******************/
abbr {
text-decoration: none;
}
abbr[title]:after {
content: " (" attr(title) ")";
}
@media only screen and (min-width: 768px) {
abbr[title] {
border-bottom: 1px dotted var(--font-color);
cursor:help;
}
abbr[title]:after {
content: none;
}
}
/******************* Article Code *******************/
pre {
2020-04-28 12:26:34 +02:00
font-size: 0.8rem;
white-space: pre-wrap;
padding: 0.3rem;
margin-top: 0.5rem;
background: repeating-linear-gradient(28deg, #1C1C1C, #1C1C1C 20px, #121212 20px, #121212 40px);
overflow: auto;
2020-04-28 12:26:34 +02:00
}
2020-05-06 11:30:31 +02:00
:not(pre)>code, :not(details)>code {
2020-04-28 12:26:34 +02:00
font-size: 1rem;
color: var(--font-color-em);
word-break: break-word;
}
.allowbreak code {
word-break: break-word;
2020-04-28 12:26:34 +02:00
}
/******************* Article Details *******************/
details{
overflow: auto;
}
2020-04-28 12:26:34 +02:00
details[open] {
outline: 1px solid white;
outline-offset: .3rem;
}
details summary {
transition: box-shadow 0.2s ease, outline-offset 0.2s ease, transform 0.2s ease;
cursor: pointer;
padding: 0.3rem;
background: repeating-linear-gradient(28deg, #1C1C1C, #1C1C1C 20px, #252525 20px, #252525 40px);
}
@media only screen and (min-width: 768px) {
details summary {
text-decoration: 1px underline dotted;
}
details summary:hover {
text-decoration: 1px underline dashed;
}
}
details summary:after {
content: "[touche pour dérouler]";
font-size: 0.7rem;
margin-left: 0.5em;
font-style: italic;
}
details[open] summary:after {
content: "[touche pour enrouler]";
}
@media only screen and (min-width: 768px) {
details summary:after {
content: none;
}
details[open] summary:after {
content: none;
}
}
details[open] summary {
background-color: var(--background-color-light);
}
details summary:hover {
outline: 1px solid !important;
outline-offset: .3rem;
}
details summary:focus {
outline: none;
}
details[open] summary:hover {
outline: 1px dotted !important;
outline-offset: .3rem;
}
2020-05-06 11:06:29 +02:00
/******************* Article Superscript *******************/
2020-04-28 12:26:34 +02:00
.article-body sup {
vertical-align: top;
position: relative;
top: -0.5rem;
2022-10-11 19:23:02 +02:00
font-size: 0.6em;
2020-04-28 12:26:34 +02:00
}
/******************* Article Blockquote *******************/
blockquote {
2020-04-28 12:26:34 +02:00
position: relative;
background-color: var(--background-color-light);
padding: 0.1rem 1rem;
margin-top: 2rem;
}
.bigquote {
2020-04-28 12:26:34 +02:00
padding: 1rem;
border-radius: 1.5rem;
}
.bigquote p:first-of-type {
margin-top: 0;
}
.bigquote footer {
text-align: right;
}
blockquote:after {
2020-04-28 12:26:34 +02:00
position: absolute;
content: "”";
color: var(--text-color);
font-size: 10rem;
line-height: 0;
top: 2rem;
right: 1rem;
font-family: Arial;
}
2020-05-06 11:27:04 +02:00
/******************* Generic colors *******************/
.color01 {
color: var(--color01);
}
.color01.bright {
color: var(--color01_bright);
}
.color02 {
color: var(--color02);
}
.color02.bright {
color: var(--color02_bright);
}