more typos
This commit is contained in:
parent
02cacc9a82
commit
bd08342cc5
|
@ -1,5 +1,5 @@
|
||||||
@import url(https://fonts.bunny.net/css?family=chivo-mono:500);
|
@import url(https://fonts.bunny.net/css?family=chivo-mono:500);
|
||||||
@import url(/colours.css);
|
@import url(/css/colours.css);
|
||||||
|
|
||||||
code {
|
code {
|
||||||
background: var(--background-text);
|
background: var(--background-text);
|
||||||
|
@ -87,7 +87,7 @@ body {
|
||||||
aspect-ratio: 1/1;
|
aspect-ratio: 1/1;
|
||||||
|
|
||||||
transform-origin: top;
|
transform-origin: top;
|
||||||
transform: scale(150%) rotate(-20deg) translateY(-25%);
|
transform: scale(150%) rotate(-20deg) translate(-15%, -15%);
|
||||||
|
|
||||||
align-content: center;
|
align-content: center;
|
||||||
text-align: center;
|
text-align: center;
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="/css.css">
|
<link rel="stylesheet" href="/css/css.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="background-color: #222;">
|
<body style="background-color: #222;">
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="background"></div>
|
<div id="background"></div>
|
||||||
<script src="/main.js"></script>
|
<script src="/js/main.js"></script>
|
||||||
<script>
|
<script>
|
||||||
generate_background();
|
generate_background();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -35,6 +35,9 @@ const maps = {
|
||||||
"std::string",
|
"std::string",
|
||||||
"std::unique_ptr",
|
"std::unique_ptr",
|
||||||
"char",
|
"char",
|
||||||
|
"public",
|
||||||
|
"private",
|
||||||
|
"protected"
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -254,7 +254,7 @@ const tokens2html = (tokens) => {
|
||||||
output += "<br>"
|
output += "<br>"
|
||||||
break;
|
break;
|
||||||
case "image":
|
case "image":
|
||||||
output += `<p style="text-align:center"><img src="${token.url}" alt="${token.alt}"><br>${token.title}</p>`;
|
output += `<p style="text-align:center; font-size: 0.85em; cursor: pointer"><img src="${token.url}" alt="${token.alt}" onclick="enlarge(this, event)"><br>${token.title}</p>`;
|
||||||
break
|
break
|
||||||
case "ul":
|
case "ul":
|
||||||
console.log(token);
|
console.log(token);
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="./css.css">
|
<link rel="stylesheet" href="/css/css.css">
|
||||||
<style>
|
<style>
|
||||||
#content {
|
#content {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
|
@ -15,6 +15,29 @@
|
||||||
|
|
||||||
img {
|
img {
|
||||||
background-color: var(--background-text);
|
background-color: var(--background-text);
|
||||||
|
|
||||||
|
border-radius: var(--radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
img.enlarged {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
height: 80%;
|
||||||
|
max-width: 80%;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content>.footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Smooth scrolling IF user doesn't have a preference due to motion sensitivities */
|
||||||
|
@media screen and (prefers-reduced-motion: no-preference) {
|
||||||
|
html {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
@ -22,7 +45,9 @@
|
||||||
<body style="background-color: #222;">
|
<body style="background-color: #222;">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div class="header" style="grid-area: header; text-align: center">
|
<div class="header" style="grid-area: header; text-align: center">
|
||||||
<a href="/" style="color: inherit; text-decoration: inherit"><h1>SpoodyThe<span style="color:var(--background-text)">.</span>One</h1></a>
|
<a href="/" style="color: inherit; text-decoration: inherit">
|
||||||
|
<h1>SpoodyThe<span style="color:var(--background-text)">.</span>One</h1>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" style="grid-area: content; text-align: left">
|
<div class="content" style="grid-area: content; text-align: left">
|
||||||
<h2>Loading...</h2>
|
<h2>Loading...</h2>
|
||||||
|
@ -33,9 +58,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="background"></div>
|
<div id="background"></div>
|
||||||
<script src="/main.js"></script>
|
<script src="/js/main.js"></script>
|
||||||
<script src="/code_highlighter.js"></script>
|
<script src="/js/code_highlighter.js"></script>
|
||||||
<script src="/md2html.js"></script>
|
<script src="/js/md2html.js"></script>
|
||||||
<script>
|
<script>
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
|
@ -54,11 +79,31 @@
|
||||||
generate_background(terms.split(" "));
|
generate_background(terms.split(" "));
|
||||||
|
|
||||||
document.getElementsByClassName("content")[0].innerHTML = tokens2html(md2tokens(content));
|
document.getElementsByClassName("content")[0].innerHTML = tokens2html(md2tokens(content));
|
||||||
|
|
||||||
|
await new Promise(res => setTimeout(res, 5000));
|
||||||
|
if (document.body.scrollHeight > window.innerHeight) {
|
||||||
|
document.querySelector("#content>.footer").style.display = "initial";
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
document.getElementsByClassName("content")[0].innerText = e;
|
document.getElementsByClassName("content")[0].innerText = e;
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
|
|
||||||
|
const enlarge = (img, event) => {
|
||||||
|
let oldclick = img.onclick;
|
||||||
|
img.classList.add("enlarged")
|
||||||
|
img.onclick = null;
|
||||||
|
event.cancelBubble = true;
|
||||||
|
document.body.onclick = () => delarge(img, oldclick);
|
||||||
|
console.log(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
const delarge = (img, oldclick) => {
|
||||||
|
document.body.onclick = null;
|
||||||
|
img.onclick = oldclick;
|
||||||
|
img.classList.remove("enlarged");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,10 @@ Functions Vectors Evaluate Isolate Solve Matrix Tensor Calculus Derivation Limit
|
||||||
# Openbirch
|
# Openbirch
|
||||||
Cool fucking cas tool.
|
Cool fucking cas tool.
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
BIN
public/posts/openbirch/openbirch.png
Normal file
BIN
public/posts/openbirch/openbirch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -37,13 +37,12 @@ impl Request {
|
||||||
method: match parts.next().expect("Invalid request") {
|
method: match parts.next().expect("Invalid request") {
|
||||||
"GET" => RequestMethod::GET,
|
"GET" => RequestMethod::GET,
|
||||||
"POST" => RequestMethod::POST,
|
"POST" => RequestMethod::POST,
|
||||||
_ => panic!("Unknown method"),
|
_ => panic!("Unknown method"), // TODO: fix PUT crashing entire website
|
||||||
},
|
},
|
||||||
path: Some(
|
path: Some(
|
||||||
parts
|
parts
|
||||||
.next()
|
.next()
|
||||||
.expect("Invalid request")
|
.expect("Invalid request")
|
||||||
.to_string()
|
|
||||||
.split("?")
|
.split("?")
|
||||||
.next()
|
.next()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
Loading…
Reference in a new issue