Complete redesign, wow!

This commit is contained in:
Pascal Engélibert 2024-12-26 13:37:14 +01:00
commit 49049eadb3
37 changed files with 1363 additions and 485 deletions

16
sass/css/_base.scss Normal file
View file

@ -0,0 +1,16 @@
@use "_fonts";
@use "_consts" as c;
html {
background-color: #000;
background-image: url("/img/pia23121.webp");
background-repeat: repeat;
}
html, body {
font-family: "Libertinus Sans", "Linux Biolinum", "Liberation Sans", "Helvetica", "Arial";
font-size: 110%;
margin: 0;
padding: 0;
min-height: 100vh;
}

14
sass/css/_consts.scss Normal file
View file

@ -0,0 +1,14 @@
$main_color: #ff8900;
$main_color_shade: #ad5d00;
$second_color: #2b0f46;
$header_text_color: #fff;
$header_bg: $second_color;
$header_content_border: $main_color;
$page_text_color: #000;
$page_bg: #dddddd;
$footer_text_color: #fff;
$footer_bg: $second_color;
$footer_link_color: $main_color;

232
sass/css/_content.scss Normal file
View file

@ -0,0 +1,232 @@
@use "_fonts";
@use "_consts" as c;
h1 {
margin: 16px 0 0 0;
text-align: center;
//width: fit-content;
//padding: 0 1em;
//line-height: 1.6em;
/*background:
url("/img/line.png") center/8px repeat-x padding-box,
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NgYPj/HwADAgH/eL9GtQAAAABJRU5ErkJggg==") content-box;*/
/*background-repeat: repeat-x, repeat;
background-position: 50% 50%, initial;
background-size: 8px 8px, initial;
background-clip: padding-box, content-box;*/
display: grid;
grid-template-columns: 1fr max-content 1fr;
grid-template-rows: 1ch 0;
grid-gap: 20px;
align-items: center;
}
h1:before, h1:after {
content: " ";
display: block;
background-color: c.$main_color;
height: 4px;
}
h2 {
border-bottom: 2px solid c.$main_color;
}
h3 {
border-bottom: 1px solid c.$main_color;
}
h4 {
border-bottom: 1px dotted c.$main_color;
}
code, pre {
font-family: "Fira Code", monospace, monospace;
font-variant-ligatures: none;
font-size: 14px;
}
pre {
padding: 4px;
border-left: 2px solid c.$second_color;
}
blockquote {
border-left: 2px solid c.$main_color;
border-radius: 4px 0 0 4px;
margin: 16px;
padding: 0 16px;
}
main p {
line-height: 130%;
}
main a {
text-decoration-color: c.$main_color;
}
main a:hover, main a:focus, main a:visited:hover, main a:visited:focus {
color: c.$main_color;
}
.sidenav {
position: sticky;
top: 16px;
float: left;
max-width: calc(50vw - 444px);
background-color: #dddc;
padding: 16px;
}
.sidenav:hover, .sidenav:focus {
background-color: #dddd;
}
.sidenav ul {
margin: 0;
padding-left: 0;
}
.sidenav li {
list-style-type: none;
}
.sidenav li ul {
margin-left: 16px;
}
.sidenav a, .sidenav a:visited {
text-decoration: none;
color: c.$second_color;
}
.anchor, .anchor:visited {
display: inline-block;
text-align: center;
width: 24px;
margin-right: 8px;
color: c.$second_color !important;
text-decoration: none;
font-size: 2rem;
background-color: c.$main_color;
}
.anchor:hover, .anchor:visited:hover, .anchor:focus, .anchor:visited:focus {
color: #ddd !important;
background-color: c.$second_color;
}
h2 > .anchor, h3 > .anchor {
margin-left: -32px;
}
.article-list_title {
margin-bottom: 0;
border: none;
}
.article-list_title a, .article-list_title a:visited {
text-decoration: none;
color: c.$second_color;
}
article p {
margin-top: 0;
}
.service_boxes {
text-align: center;
}
.service_box {
display: inline-block;
width: 144px;
padding-top: 4px;
border: 2px solid transparent;
vertical-align: top;
}
.service_box-img {
max-width: 128px;
max-height: 128px;
}
.service_box-img_wrap {
width: 128px;
height: 128px;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
}
.service_box-link, .service_box-link:visited {
color: #000;
font-size: 120%;
text-decoration: none;
}
.service_box-title {
position: relative;
top: 14px;
display: inline-block;
padding-bottom: 14px;
}
.service_box:hover, .service_box:focus {
border-top-color: #000;
border-left-color: #000;
border-bottom-color: #f00;
border-right-color: #f00;
}
@media screen and (min-width: 1301px) {
.pagetoc {
display: none;
}
}
@media screen and (max-width: 1300px) {
.sidenav {
display: none;
}
}
@media (prefers-color-scheme: dark) {
h2 {
border-bottom: 2px solid c.$main_color_shade;
}
h3 {
border-bottom: 1px solid c.$main_color_shade;
}
h4 {
border-bottom: 1px dotted c.$main_color_shade;
}
.sidenav {
background-color: #111a;
}
.sidenav:hover, .sidenav:focus {
background-color: #111d;
}
.sidenav a, .sidenav a:visited {
color: c.$main_color;
}
.sidenav a:hover, .sidenav a:visited:hover, .sidenav a:focus, .sidenav a:visited:focus {
color: #ddd;
}
.article-list_title a, .article-list_title a:visited {
color: c.$main_color;
}
.article-list_title a:hover, .article-list_title a:visited:hover, .article-list_title a:focus, .article-list_title a:visited:focus {
color: #ddd;
}
}

25
sass/css/_fonts.scss Normal file
View file

@ -0,0 +1,25 @@
@font-face {
font-family: "Libertinus Sans";
font-weight: normal;
font-style: normal;
src: url("/fonts/LibertinusSans-Regular.otf");
}
@font-face {
font-family: "Libertinus Sans";
font-weight: bold;
font-style: normal;
src: url("/fonts/LibertinusSans-Bold.otf");
}
@font-face {
font-family: "Libertinus Sans";
font-weight: normal;
font-style: italic;
src: url("/fonts/LibertinusSans-Italic.otf");
}
@font-face {
font-family: "Fira Code";
src: url("/fonts/FiraCode-Regular.woff2");
}

42
sass/css/_footer.scss Normal file
View file

@ -0,0 +1,42 @@
@use "_fonts";
@use "_consts" as c;
footer {
background-color: c.$footer_bg;
color: c.$footer_text_color;
padding: 8px;
margin-top: 32px;
box-sizing: border-box;
// The simplest trick for sticky footer that works well!
// It also needs html,body {min-height: 100vh}
position: sticky;
top: 100vh;
}
.footer-wrapper {
display: flex;
max-width: 1100px;
padding: 16px 4px;
margin: auto;
gap: 20px;
justify-content: center;
align-items: center;
}
.footer-pane {
flex: 1;
max-width: 800px;
}
footer a, footer a:visited {
color: c.$footer_link_color;
}
@media screen and (max-width: 800px) {
.footer-wrapper {
flex-direction: column;
justify-content: center;
align-items: center;
}
}

37
sass/css/_header.scss Normal file
View file

@ -0,0 +1,37 @@
@use "_fonts";
@use "_consts" as c;
header {
background-color: c.$header_bg;
color: c.$header_text_color;
padding: 8px;
margin: 0;
box-sizing: border-box;
}
header a {
box-sizing: border-box;
display: inline-block;
padding: 4px;
color: c.$header_text_color;
text-decoration: none;
border: 1px solid transparent;
border-bottom: 1px solid c.$header_content_border;
}
header a:hover, header a:active, header a:focus {
border: 1px solid c.$header_content_border;
}
.header-site-title {
float: left;
}
.header-link {
float: left;
margin-left: 8px;
}
.langs {
float: right;
}

75
sass/css/_page.scss Normal file
View file

@ -0,0 +1,75 @@
@use "_fonts";
@use "_consts" as c;
.page:first-of-type {
margin-top: 32px;
}
.page {
box-sizing: border-box;
padding: 20px;
margin: auto;
max-width: 800px;
background-color: c.$page_bg;
color: c.$page_text_color;
border-image-source: url("/img/border.png");
border-image-outset: 0 8px;
border-image-width: 16px 16px;
border-image-slice: 4 4 4 4;
border-image-repeat:round;
image-rendering: pixelated;
}
.page.page-left {
margin-left: 32px;
}
.page.page-right {
margin-right: 32px;
}
.page.page-wide {
max-width: 100%;
margin-left: 32px;
margin-right: 32px;
}
.page img {
image-rendering: initial;
}
.page a, .page a:visited {
color: c.$page_text_color;
}
@media screen and (max-width: 864px) {
.page {
margin-left: 16px;
margin-right: 16px;
}
.page.page-left {
margin-left: 16px;
}
.page.page-right {
margin-right: 16px;
}
.page.page-wide {
margin-left: 16px;
margin-right: 16px;
}
}
@media (prefers-color-scheme: dark) {
.page {
background-color: #111;
color: #ddd;
}
.page a, .page a:visited {
color: #ddd;
}
}

View file

@ -1,235 +1,7 @@
@font-face {
font-family: Caladea;
src: url("/fonts/Caladea-Regular.ttf");
}
@font-face {
font-family: CMU-Bright;
src: url("/fonts/cmunbmr.ttf");
}
@font-face {
font-family: "Libertinus Sans";
font-weight: normal;
font-style: normal;
src: url("/fonts/LibertinusSans-Regular.otf");
}
@font-face {
font-family: "Libertinus Sans";
font-weight: bold;
font-style: normal;
src: url("/fonts/LibertinusSans-Bold.otf");
}
@font-face {
font-family: "Libertinus Sans";
font-weight: normal;
font-style: italic;
src: url("/fonts/LibertinusSans-Italic.otf");
}
@font-face {
font-family: "Fira Code";
src: url("/fonts/FiraCode-Regular.woff2");
}
html, body {
font-family: "Libertinus Sans", "Linux Biolinum", "Liberation Sans", "Helvetica", "Arial";
font-size: 110%;
}
body {
padding: 16px;
}
h1, h2, h3 {
font-family: Caladea;
font-weight: normal;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 2em;
}
h3 {
font-size: 1.5em;
}
main p, main li {
max-width: 800px;
}
.service_boxes {
text-align: center;
}
.service_box {
display: inline-block;
width: 144px;
padding-top: 4px;
border: 2px solid transparent;
vertical-align: top;
}
.service_box-img {
max-width: 128px;
max-height: 128px;
}
.service_box-img_wrap {
width: 128px;
height: 128px;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
}
.service_box-link, .service_box-link:visited {
color: #000;
font-family: CMU-Bright;
text-decoration: none;
}
.service_box-title {
position: relative;
top: 14px;
display: inline-block;
padding-bottom: 14px;
}
.service_box:hover, .service_box:focus {
border-top-color: #000;
border-left-color: #000;
border-bottom-color: #f00;
border-right-color: #f00;
}
.article-list_title {
margin-bottom: 0;
}
code, pre {
font-family: "Fira Code", monospace, monospace;
font-variant-ligatures: none;
}
code {
background-color: rgba(255, 128, 0, 0.3);
}
pre code {
background-color: initial;
}
.anchor, .anchor:visited {
margin-left: -1rem;
margin-right: 0.75rem;
color: #aaa;
text-decoration: none;
font-size: 2rem;
font-family: LinBiolinum;
}
.anchor:hover, .anchor:focus {
color: #f00;
text-decoration: none;
}
table {
border-collapse: collapse;
}
table td, table th {
border: 1px solid #888;
}
@media (prefers-color-scheme: dark) {
html {
background-color: #000;
color: #fff;
}
a {
color: #fa4;
}
a:visited {
color: #fc8;
}
.service_box:hover, .service_box:focus {
border-top-color: #fff;
border-left-color: #fff;
}
.service_box-img_wrap {
background-color: #fff;
box-shadow: 0 0 3px 5px #fff;
}
.service_box-link, .service_box-link:visited {
color: #fff;
}
.toc {
border: 1px solid #333;
}
}
.float_img {
float: right;
max-width: 100%;
margin: 4px;
}
blockquote {
border-left: 2px solid #fa4;
border-radius: 4px 0 0 4px;
margin: 16px;
padding: 0 16px;
}
footer {
margin-top: 64px;
}
footer hr {
border: 1px dashed #fa4;
}
.footer-icons img {
margin: 24px;
}
.toc {
border: 1px solid #bbb;
}
.hidden {
opacity: 0;
}
.hidden:hover, .hidden:focus {
opacity: 1;
}
h1 a, h2 a, h3 a,
#breadcrumb a, #langs a,
.article-tags a, .toc a {
text-decoration: none;
}
h1 a:hover, h2 a:hover, h3 a:hover,
#breadcrumb a:hover, #langs a:hover,
.article-tags a:hover, .toc a:hover,
h1 a:focus, h2 a:focus, h3 a:focus,
#breadcrumb a:focus, #langs a:focus,
.article-tags a:focus, .toc a:focus {
text-decoration: underline;
}
@use "_fonts";
@use "_consts" as c;
@use "_base";
@use "_header";
@use "_page";
@use "_content";
@use "_footer";