Added support and styling for code

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2021-03-12 00:11:57 +01:00
parent 4ddf9589cb
commit 1f95796279
5 changed files with 36 additions and 3 deletions

View File

@ -2,8 +2,13 @@
/* Coded by Louis Vallat */
@font-face {
font-family: 'Rubik';
src: url("/assets/fonts/Rubik-Medium.ttf");
font-family: 'JetBrains Mono';
src: url("/assets/fonts/JetBrainsMono.ttf");
}
@font-face {
font-family: 'IBM Plex Mono';
src: url("/assets/fonts/IBMPlexMono.ttf");
}
@font-face {
@ -13,6 +18,7 @@
:root {
--bg: #2A2D34;
--light_bg: #414652;
--fg: #fefefe;
--link: #009DDC;
--link_h: #009B72;
@ -80,7 +86,7 @@ nav > a:not(#home_link) {
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Rubik', sans-serif;
font-family: 'JetBrains Mono', sans-serif;
font-weight: bold;
margin-top: 10px;
margin-bottom: 5px;
@ -126,6 +132,25 @@ footer {
font-size: 14px;
}
pre {
margin-bottom: 5px;
margin-top: 5px;
}
pre > code {
padding: 10px;
display: inline-block;
width: 100%;
}
code {
padding: 5px;
border-radius: 5px;
background-color: var(--light_bg);
font-family: 'IBM Plex Mono', monospace;
line-height: 1.2em;
}
@media screen and (max-width: 992px) {
body {
margin-right: 10vw;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,3 +2,11 @@
Démo
[index](index.html)
```py
if __name__ == "__main__":
print("Hello World!")
```
This is a `demo`.