added stuff

This commit is contained in:
Charlie Root 2024-04-09 23:11:33 +02:00
commit 9d0ebdfbd0
907 changed files with 70990 additions and 0 deletions

127
nyx/docs/templates/html/page.html vendored Normal file
View file

@ -0,0 +1,127 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="generator" content="pandoc" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=yes"
/>
$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$ $if(date-meta)$
<meta name="dcterms.date" content="$date-meta$" />
$endif$ $if(keywords)$
<meta
name="keywords"
content="$for(keywords)$$keywords$$sep$, $endfor$"
/>
$endif$ $if(description-meta)$
<meta name="description" content="$description-meta$" />
$endif$
<title>$title$</title>
<style>
$styles.html()$
</style>
$for(css)$
<link rel="stylesheet" href="$css$" />
$endfor$
<!-- Begin Google Fonts import -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Roboto+Slab:wght@100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<!-- End Google Fonts import -->
<!-- Begin Lineicons import -->
<!--
<link
rel="stylesheet"
href="https://cdn.lineicons.com/4.0/lineicons.css"
/>
<!-- End Lineicons import-->
<link rel="stylesheet" href="/style.css" />
</head>
<body>
<header>
<nav class="primary-buttons">
<ul>
<li><a class="nav-button" href="/">Index</a></li>
</ul>
</nav>
<nav class="secondary-buttons">
<ul>
<li>
<div class="dropdown">
<button class="nav-button">Posts</button>
<div
class="dropdown-content"
id="dropdown-content"
></div>
</div>
<a class="nav-button" href="/pages/about.html">
About
</a>
<a class="nav-button" href="/pages/privacy.html">
Privacy
</a>
</li>
</ul>
</nav>
</header>
<main>
$if(toc)$
<nav id="$idprefix$TOC" role="doc-toc">
$if(toc-title)$
<h2 id="$idprefix$toc-title">$toc-title$</h2>
$endif$ $table-of-contents$
</nav>
$endif$ $body$ $for(include-after)$ $include-after$ $endfor$
</main>
<footer>
<div class="footer-divider"></div>
<p>&copy; 2024 NotAShelf</p>
<div class="footer-icons">
<a href="https://twitter.com/notashelf">
<i class="lni lni-twitter-original" title="Twitter"></i>
</a>
<a href="https://github.com/notashelf">
<i class="lni lni-github-original" title="GitHub"></i>
</a>
<a href="/feed.json">
<i class="lni lni-rss-feed" title="RSS Feed"></i>
</a>
</div>
</footer>
<script>
// Dropdown post listing
function fetchPosts() {
fetch("/posts/posts.json")
.then((response) => response.json())
.then((data) => {
const dropdownContent =
document.getElementById("dropdown-content");
data.posts.forEach((post) => {
const postLink = document.createElement("a");
postLink.textContent = post.title;
// we could use posts.url here, instead of posts.path
// but it messes with local serving, which prefers `/`
// to the actual URL, as it would point to the live site
// by path
postLink.href = post.path;
dropdownContent.appendChild(postLink);
});
})
.catch((error) =>
console.error("Error fetching posts:", error),
);
}
document.addEventListener("DOMContentLoaded", () => {
fetchPosts();
});
</script>
</body>
</html>

212
nyx/docs/templates/pandoc/custom.theme vendored Normal file
View file

@ -0,0 +1,212 @@
{
"text-color": "#C3CBE9",
"background-color": null,
"line-number-color": null,
"line-number-background-color": null,
"text-styles": {
"Alert": {
"text-color": "#ffcfaf",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Annotation": {
"text-color": "#7f9f7f",
"background-color": null,
"bold": true,
"italic": false,
"underline": false
},
"Attribute": {
"text-color": null,
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"BaseN": {
"text-color": "#dca3a3",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"BuiltIn": {
"text-color": null,
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Char": {
"text-color": "#dca3a3",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Comment": {
"text-color": "#7f9f7f",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"CommentVar": {
"text-color": "#7f9f7f",
"background-color": null,
"bold": true,
"italic": false,
"underline": false
},
"Constant": {
"text-color": "#dca3a3",
"background-color": null,
"bold": true,
"italic": false,
"underline": false
},
"ControlFlow": {
"text-color": "#f0dfaf",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"DataType": {
"text-color": "#dfdfbf",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"DecVal": {
"text-color": "#dcdccc",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Documentation": {
"text-color": "#7f9f7f",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Error": {
"text-color": "#c3bf9f",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Extension": {
"text-color": null,
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Float": {
"text-color": "#c0bed1",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Function": {
"text-color": "#efef8f",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Import": {
"text-color": null,
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Information": {
"text-color": "#7f9f7f",
"background-color": null,
"bold": true,
"italic": false,
"underline": false
},
"Keyword": {
"text-color": "#f0dfaf",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Operator": {
"text-color": "#f0efd0",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Other": {
"text-color": "#efef8f",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Preprocessor": {
"text-color": "#ffcfaf",
"background-color": null,
"bold": true,
"italic": false,
"underline": false
},
"SpecialChar": {
"text-color": "#dca3a3",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"SpecialString": {
"text-color": "#cc9393",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"String": {
"text-color": "#cc9393",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Variable": {
"text-color": null,
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"VerbatimString": {
"text-color": "#cc9393",
"background-color": null,
"bold": false,
"italic": false,
"underline": false
},
"Warning": {
"text-color": "#7f9f7f",
"background-color": null,
"bold": true,
"italic": false,
"underline": false
}
}
}

178
nyx/docs/templates/scss/base.scss vendored Normal file
View file

@ -0,0 +1,178 @@
*,
::before,
::after {
box-sizing: border-box;
}
// Base styles
h1 {
font-family: $font-family-secondary;
line-height: 1.15;
}
body {
font-size: 20px;
line-height: 1.5;
font-family: $font-family-primary;
margin: 0;
padding: 0;
background-color: $primary;
display: flex;
flex-direction: column;
min-height: 100vh;
@media (max-width: $screen-tablet) {
font-size: 18px;
}
}
header {
background-color: $primary;
color: $secondary;
padding: 10px 25px;
display: flex;
justify-content: space-between;
align-items: center;
max-width: 80ch;
width: 100%;
margin: 0 auto;
@media (max-width: $screen-tablet) {
font-size: 14px;
padding: 8px 4px;
}
}
nav {
ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
li {
a {
color: $secondary;
text-decoration: none;
}
}
}
}
main {
text-align: left;
color: $secondary;
padding: 10px 30px;
flex: 1;
margin: 0 auto;
max-width: Min(80ch, 100%);
a {
&:hover,
&:link,
&:visited,
&:active {
color: $hover-color;
text-decoration: none;
}
}
@media (max-width: $screen-tablet) {
padding: 12px;
}
}
// Buttons
/*
.primary-buttons,
.secondary-buttons,
*/
.dropbtn,
.nav-button {
font-weight: 800;
background-color: $primary;
color: $secondary;
cursor: pointer;
font-weight: 800;
background-color: $primary;
color: $secondary;
cursor: pointer;
font-weight: 800;
font-family: "Roboto Slab", Roboto, Arial, sans-serif;
font-size: 20px;
line-height: 1.5;
border: none;
align-items: center;
margin: 0px 5px;
&:hover {
color: lighten($secondary, 5%);
}
}
// Dropdown Button
.dropbtn:hover {
color: lighten($secondary, 5%);
}
.dropdown {
position: relative;
display: inline-block;
.dropdown-content {
display: none;
position: absolute;
background-color: $primary;
min-width: 240px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
a {
color: $secondary;
padding: 12px 16px;
text-decoration: none;
display: block;
&:hover {
background-color: #2b282d;
}
}
}
&:hover .dropdown-content {
display: block;
}
}
main aside {
overflow: scroll;
}
// Footer Styles
footer {
color: white;
padding: 7px 5px 7px 5px;
text-align: center;
margin-top: auto;
position: relative;
.footer-divider {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 20%;
height: 1px;
background-color: white;
}
.footer-icons {
margin: 15px 5px;
a {
color: white;
text-decoration: none;
margin-bottom: 5px;
}
}
}

View file

@ -0,0 +1,9 @@
div.sourceCode {
border: 1px solid #3b373d;
padding: 8px;
text-align: left;
background-color: lighten($primary, 3%);
overflow: scroll;
max-width: 100%;
border-radius: 8px;
}

View file

@ -0,0 +1,21 @@
table {
border-collapse: collapse;
width: 100%;
margin: 30px 0px;
th,
td {
border: 1px solid #3b373d;
padding: 8px;
text-align: left;
}
th {
background-color: #141215;
color: white;
}
tr:nth-child(even) {
background-color: #2b282d;
}
}

View file

@ -0,0 +1,30 @@
// Table Of Content element injected by Pandoc
#TOC {
// better spacing
margin: 20px;
padding: 10px;
// TOC elements are considered links
// so the below styling applies to all items
a {
text-decoration: none;
color: $secondary;
&:hover {
color: lighten($secondary, 5%);
}
}
// make sure all items are properly aligned in separate lines
li,
ul {
list-style-type: square;
margin-left: 20px;
display: block;
}
// hide the TOC on mobile devices
@media screen and (max-width: 768px) {
display: none;
}
}

6
nyx/docs/templates/scss/main.scss vendored Normal file
View file

@ -0,0 +1,6 @@
@import "modern-normalize.css";
@import "variables";
@import "base";
@import "components/toc";
@import "components/table";
@import "components/code";

View file

@ -0,0 +1,7 @@
// Define variables for colors and fonts
$primary: #17181c;
$secondary: #dee2e6;
$hover-color: #66b3ff;
$font-family-primary: "Roboto Slab", Roboto, Arial, sans-serif;
$font-family-secondary: "Courier Prime", Roboto, Arial, serif;
$screen-tablet: 768px;