Merge pull request #2 from J-onasJones/prefers-color-scheme

merge to main
This commit is contained in:
Jonas_Jones 2023-09-18 17:06:15 +02:00 committed by GitHub
commit 5d46775174
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 85 additions and 131 deletions

View file

@ -1,3 +1,7 @@
<script>
import "$lib/styles/style.css";
</script>
<!-- Footer.svelte -->
<footer>
<a href="/">Home</a>
@ -16,10 +20,6 @@
</nav>
</footer>
<script>
import '$lib/styles/style.css';
</script>
<style>
footer {
padding: 1rem;

View file

@ -1,7 +1,10 @@
<!-- Header.svelte -->
<header>
<div class="header-title">
<a href="/"><img src="/favicon.png" alt="logo" width="50" height="50"><h1 style="">wiki.jonasjones.dev</h1></a>
<a href="/"
><img src="/favicon.png" alt="logo" width="50" height="50" />
<h1 style="">wiki.jonasjones.dev</h1></a
>
</div>
<nav>
<ul>

View file

@ -1,18 +1,28 @@
<script>
let data = import.meta.glob('/src/routes/**/+page.md');
// @ts-nocheck
let data = import.meta.glob("/src/routes/**/+page.md");
let paths = data;
/**
* @param {Record<string, () => Promise<unknown>>} paths
*/
function buildHierarchy(paths) {
const nestedList = {};
let fixedpaths = [];
/**
* @type {string[]}
*/
let fixedpaths2 = [];
fixedpaths = Object.keys(paths);
fixedpaths.forEach((path) => {
const fixedpath = path.replace("/+page.md", "").replace("/src/routes", "");
const fixedpath = path
.replace("/+page.md", "")
.replace("/src/routes", "");
fixedpaths2.push(fixedpath);
});
fixedpaths2.forEach((folder) => {
const parts = folder.split('/').filter(Boolean);
const parts = folder.split("/").filter(Boolean);
let currentNode = nestedList;
parts.forEach((part) => {
@ -29,11 +39,19 @@
const nestedFolders = buildHierarchy(paths);
// Helper function to recursively render the nested list
function renderNestedList(node, prefix = '') {
return Object.keys(node).map((key) => {
/**
* @param {{ [x: string]: any; }} node
*/
function renderNestedList(node, prefix = "") {
return Object.keys(node)
.map((key) => {
const fullPath = `${prefix}/${key}`;
return `<li><a href="${fullPath}">${key}</a><ul>${renderNestedList(node[key], fullPath)}</ul></li>`;
}).join('');
return `<li><a href="${fullPath}">${key}</a><ul>${renderNestedList(
node[key],
fullPath
)}</ul></li>`;
})
.join("");
}
const renderedList = `<ul>${renderNestedList(nestedFolders)}</ul>`;

View file

@ -1,5 +1,4 @@
/* style.css */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
@font-face {
@ -8,7 +7,6 @@
url('/font/sary-soft.soft-semibold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
:root {
@ -49,6 +47,7 @@ body {
main {
padding: 2rem;
margin: 2rem;
margin-top: 0;
background-color: var(--container-background-color);
border-radius: 0.5rem;
float: left;

View file

@ -1,10 +1,10 @@
<script>
import Header from '$lib/components/Header.svelte';
import Footer from '$lib/components/Footer.svelte';
import Navbar from '$lib/components/Navbar.svelte';
import Header from "$lib/components/Header.svelte";
import Footer from "$lib/components/Footer.svelte";
import Navbar from "$lib/components/Navbar.svelte";
</script>
<div style="height:2rem"></div>
<div style="height:2rem" />
<Header />
<div class="container">
<div class="column"><Navbar /></div>
@ -12,10 +12,16 @@
<main>
<slot />
<!-- Please god forgive me -->
<h1 style="color: var(--container-background-color);margin:0;padding:0" class="unselectable">YOU CANT SEE THIS YOU CANT SEE THIS YOU CANT SEE THIS YOU CANT SEE THIS</h1>
<h1
style="color: var(--container-background-color);margin:0;padding:0"
class="unselectable"
>
YOU CANT SEE THIS YOU CANT SEE THIS YOU CANT SEE THIS YOU CANT
SEE THIS
</h1>
</main>
</div>
</div>
<Footer />
<div style="height:2rem"></div>
<div style="height:2rem" />

View file

@ -4,6 +4,8 @@ Every project of mine that requires a wiki will be hosted here.
---
If you notice any bugs, mistakes, or have any suggestions, feel free to open an issue on [GitHub](https://github.com/J-onasJones/wiki.jonasjones.dev/issues).
<script>
import Navbar from '$lib/components/Navbar.svelte';
</script>

View file

@ -1,8 +0,0 @@
# Microcraft
---
A mod that aims to provide tools to connect Microcontrollers to Minecraft.
This is still in the making but a wiki page will be made soon.
As of right now, only the GitHub wiki has been copied over.

View file

@ -1,16 +0,0 @@
# > Board Program Editors
---
A Board Program Editor is an editor that will be used to edit the Program that will be uploaded to the Microcontroller. This mod offers a sample program for each board that will manually be updated as pi-map entries are added by the user.
### Available Editors
The available editors and their ID for the config file are:
| Editor | config ID | Default |
| ------------- |:-------------:| -----:|
| The ingame editor provided by the mod itself | `igname` | YES |
| Arduino IDE | `arduinoide` | - |
| Notepad++ | `notepadpp` | - |
| Visual Studio Code | `code` | - |
| Sublime Text | `sublime` | - |
| Custom editor | `custom` | - |
| Open in file explorer | `filepath` | - |

View file

@ -1,24 +0,0 @@
# > Microcontroller Boards
---
### Supported Boards
As of the latest version the following boards are supported (and their's ID's for the config file):
- Arduino Nano [tested]: `A-nano`
- Arduino Pro Mini: `A-pro_mini`
- Arduino Uno: `A-uno`
| Board Name | config ID | Default |
| ------------- |:-------------:| -----:|
| Arduino Nano | `A-nano` | YES |
| Arduino Pro Mini | `A-pro_mini` | - |
| Arduino Uno | `A-uno` | - |
### Planned Boards
The following boards are planned to be added to the mod but are not yet implemented:
- Raspberry PI Pico
- Arduino Micro
- Arduino Zero
### What to do if my Microcontroller is not (yet) supported?
The mod offers a way for you to manually map functions to pins. Just select the `Custom` Board and add a pin entry.
You can also write an issue and **mark it as a board-request**

View file

@ -1,10 +0,0 @@
# > Pin Map Entries
---
A Pin-Map-Entry is an entry that can be mapped to a pin of a Microcontroller.
### List of all Entries
All currently supported entries are:
- no entries //TODO for later me: add entries (shout at me if I forget to add them when the first official version of the mod get's released and this is still not updated)
### Not supported Entries
If an entry is not supported by the mod it cannot be used natively. There are plans for a library that can be implemented into any mod to make any entry possible. This would open the doors to the implementation of any (even mod-specific) feature. BUT: Don't get too excited yet, it's only a plan.

View file

@ -1,16 +0,0 @@
# Minecraft-server-Status
---
This small python script allows you to view any Minecraft server's status Information
##### Usage
Download the file, install python (if not already installed), install `mcstatus` (`pip install mcstatus`) and `time` (`pip install time`) and launch the program by executing it with `python cmd.py` on windows and `python3 cmd.py` on MacOS and Linux (replace 'cmd.py' with correct filename). Make sure that you first locate your download location with the command `cd Downloads` (replace 'Downloads' with your custom location if needed).
##### Status Infos
1. Minecraft Version
2. MOTD (message of the day)
3. host (IP address of the server and port)
4. Software (Minecraft version and Mod/Plugin Loader if any installed on the server)
5. Plugins (if any installed)
6. Ping (number of miliseconds it took for the script to reach the server)
7. Players (`online Players`/`Max Players`)
8. Players Online (list of online Players)