refacto: reorganize scss for modularity

This commit is contained in:
Alexis Fourmaux 2025-05-14 23:33:30 +02:00
parent 1d939fb107
commit 17dd9dba48
10 changed files with 301 additions and 303 deletions

23
sass/parts/_anchor.scss Normal file
View file

@ -0,0 +1,23 @@
a.zola-anchor {
margin-left: .5rem;
}
h1,
h2,
h3,
h4,
h5,
h6 {
&>a {
visibility: hidden;
opacity: 0;
transition: visibility 0s, opacity 0.5s linear;
}
&:hover {
&>a {
visibility: visible;
opacity: 1;
}
}
}

25
sass/parts/_code.scss Normal file
View file

@ -0,0 +1,25 @@
pre {
font-family: var(--mono-font);
padding: 1.25rem;
border-radius: var(--standard-border-radius);
border-style: solid;
border-color: var(--overlay0);
border-width: 0.15rem;
line-height: initial;
overflow-x: scroll;
&>code {
background-color: initial;
border: initial;
}
}
code {
font-family: var(--mono-font);
background-color: var(--mantle);
padding: .2rem;
border-radius: .3rem;
border-style: dashed;
border-width: .1rem;
border-color: var(--surface0);
}

17
sass/parts/_footnote.scss Normal file
View file

@ -0,0 +1,17 @@
footer.footnotes {
font-size: .8rem;
color: var(--subtext1);
margin-top: 3rem;
border-top: 1px solid var(--overlay0);
&>ol.footnotes-list>li {
margin-top: 1rem;
&>p {
margin: {
top: .4rem;
bottom: .4rem;
}
}
}
}

20
sass/parts/_misc.scss Normal file
View file

@ -0,0 +1,20 @@
hr {
color: var(--overlay0);
margin-top: 3rem;
margin-bottom: 3rem;
width: 50%;
margin-left: auto;
margin-right: auto;
border-style: solid;
border-radius: 1rem;
border-width: 1px;
}
cite {
&::before {
content: "~ "
}
font-style: italic;
color: var(--subtext0);
}

View file

@ -0,0 +1,32 @@
section {
&.title {
margin-bottom: 2.5rem;
&>h1.title {
font-size: 3rem;
font-weight: 900;
margin-bottom: 0;
margin-top: 0;
}
&>p {
&.subtitle {
color: var(--subtext1);
font-size: 1.5rem;
margin-top: 0;
margin-bottom: 2.5rem;
}
&.metadata {
color: var(--subtext1);
font-size: .8rem;
font-weight: 100;
text-align: center;
margin: 0;
border-bottom-width: 1px;
border-bottom-color: var(--overlay0);
border-bottom-style: solid;
}
}
}
}

63
sass/parts/_table.scss Normal file
View file

@ -0,0 +1,63 @@
table {
border-collapse: separate;
border-spacing: 0;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
margin-left: auto;
margin-right: auto;
overflow-x: scroll;
}
td,
th {
padding: 0.5rem;
padding: 1rem 1.5rem;
border-style: solid;
border-width: .1rem;
border-color: var(--overlay0);
text-align: start;
}
th {
background-color: var(--base);
text-transform: uppercase;
font-weight: medium;
font-size: small;
border: none
}
tr:first-child>td:first-child {
border-top-left-radius: var(--standard-border-radius);
}
tr:first-child>td:last-child {
border-top-right-radius: var(--standard-border-radius);
}
tr:last-child>td:first-child {
border-bottom-left-radius: var(--standard-border-radius);
}
tr:last-child>td:last-child {
border-bottom-right-radius: var(--standard-border-radius);
}
tr>td:last-child {
border-right-width: .15rem;
}
tr:first-child>td {
border-top-width: .15rem;
}
tr>td:first-child {
border-left-width: .15rem;
}
tr:last-child>td {
border-bottom-width: .15rem;
}
tr:nth-child(even) td {
background-color: var(--surface0);
}