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(/colours.css);
|
||||
@import url(/css/colours.css);
|
||||
|
||||
code {
|
||||
background: var(--background-text);
|
||||
|
@ -87,7 +87,7 @@ body {
|
|||
aspect-ratio: 1/1;
|
||||
|
||||
transform-origin: top;
|
||||
transform: scale(150%) rotate(-20deg) translateY(-25%);
|
||||
transform: scale(150%) rotate(-20deg) translate(-15%, -15%);
|
||||
|
||||
align-content: center;
|
||||
text-align: center;
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="/css.css">
|
||||
<link rel="stylesheet" href="/css/css.css">
|
||||
</head>
|
||||
|
||||
<body style="background-color: #222;">
|
||||
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="background"></div>
|
||||
<script src="/main.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
<script>
|
||||
generate_background();
|
||||
</script>
|
||||
|
|
|
@ -35,6 +35,9 @@ const maps = {
|
|||
"std::string",
|
||||
"std::unique_ptr",
|
||||
"char",
|
||||
"public",
|
||||
"private",
|
||||
"protected"
|
||||
],
|
||||
}
|
||||
};
|
|
@ -254,7 +254,7 @@ const tokens2html = (tokens) => {
|
|||
output += "<br>"
|
||||
break;
|
||||
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
|
||||
case "ul":
|
||||
console.log(token);
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="./css.css">
|
||||
<link rel="stylesheet" href="/css/css.css">
|
||||
<style>
|
||||
#content {
|
||||
grid-template-areas:
|
||||
|
@ -15,6 +15,29 @@
|
|||
|
||||
img {
|
||||
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>
|
||||
</head>
|
||||
|
@ -22,7 +45,9 @@
|
|||
<body style="background-color: #222;">
|
||||
<div id="content">
|
||||
<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 class="content" style="grid-area: content; text-align: left">
|
||||
<h2>Loading...</h2>
|
||||
|
@ -33,9 +58,9 @@
|
|||
</div>
|
||||
|
||||
<div id="background"></div>
|
||||
<script src="/main.js"></script>
|
||||
<script src="/code_highlighter.js"></script>
|
||||
<script src="/md2html.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/code_highlighter.js"></script>
|
||||
<script src="/js/md2html.js"></script>
|
||||
<script>
|
||||
(async () => {
|
||||
try {
|
||||
|
@ -54,11 +79,31 @@
|
|||
generate_background(terms.split(" "));
|
||||
|
||||
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) {
|
||||
document.getElementsByClassName("content")[0].innerText = 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>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -2,4 +2,10 @@ Functions Vectors Evaluate Isolate Solve Matrix Tensor Calculus Derivation Limit
|
|||
# Openbirch
|
||||
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") {
|
||||
"GET" => RequestMethod::GET,
|
||||
"POST" => RequestMethod::POST,
|
||||
_ => panic!("Unknown method"),
|
||||
_ => panic!("Unknown method"), // TODO: fix PUT crashing entire website
|
||||
},
|
||||
path: Some(
|
||||
parts
|
||||
.next()
|
||||
.expect("Invalid request")
|
||||
.to_string()
|
||||
.split("?")
|
||||
.next()
|
||||
.unwrap()
|
||||
|
|
Loading…
Reference in a new issue