1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-01 13:37:49 +00:00

Format JS CSS MD

This commit is contained in:
RGBCube 2024-01-09 19:48:39 +03:00
parent edd579b1b8
commit 9a8df66d89
No known key found for this signature in database
9 changed files with 85 additions and 83 deletions

View file

@ -13,7 +13,7 @@ a {
width: min-content;
padding: 0 .3em;
padding: 0 0.3em;
border-radius: 1em;
user-select: none;

View file

@ -28,7 +28,7 @@ nav {
overflow-x: auto;
background-color: white;
padding: .3em .6em;
padding: 0.3em 0.6em;
/* Rotated 180deg so it's top instead of bottom. */
border-top-left-radius: 1em;
@ -38,7 +38,7 @@ nav {
nav a {
color: black;
font-weight: bold;
margin-right: .6em;
margin-right: 0.6em;
}
a {
@ -50,7 +50,7 @@ a:hover {
}
footer {
border-top: .15em solid white;
border-top: 0.15em solid white;
display: flex;
justify-content: center;
@ -58,5 +58,5 @@ footer {
font-size: small;
margin-bottom: 1em;
padding-top: .5em;
padding-top: 0.5em;
}

View file

@ -1,3 +1,4 @@
---
title: About
---

View file

@ -1,3 +1,4 @@
---
title: Contact
---

View file

@ -26,15 +26,15 @@ pub static PAGES: LazyLock<HashMap<String, (Metadata, Markup)>> = LazyLock::new(
let content = String::from_utf8(file.content().to_vec()).unwrap();
let (metadata, content) = content.split_once("---").unwrap();
let mut parts = content.splitn(2, "---").skip(1);
let metadata: Metadata = serde_yaml::from_str(metadata).unwrap();
let metadata: Metadata = serde_yaml::from_str(parts.next().unwrap()).unwrap();
log::info!("Adding page {path}");
Some((
path.strip_suffix(".md").unwrap().to_string(),
(metadata, markdown::parse(content)),
(metadata, markdown::parse(parts.next().unwrap())),
))
}))
});