Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
|
30083a572d |
6
.gitignore
vendored
|
@ -1,3 +1,3 @@
|
||||||
/target
|
.hugo_build.lock
|
||||||
/dist
|
public
|
||||||
Cargo.lock
|
resources/_gen
|
||||||
|
|
10
Cargo.toml
|
@ -1,10 +0,0 @@
|
||||||
[workspace]
|
|
||||||
|
|
||||||
resolver = "2"
|
|
||||||
|
|
||||||
default-members = [ "backend" ]
|
|
||||||
|
|
||||||
members = [
|
|
||||||
"backend",
|
|
||||||
"frontend"
|
|
||||||
]
|
|
5
archetypes/default.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
+++
|
||||||
|
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||||
|
date = {{ .Date }}
|
||||||
|
draft = true
|
||||||
|
+++
|
|
@ -1,10 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "backend"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
actix-files = "0.6.6"
|
|
||||||
actix-web = "4.9.0"
|
|
||||||
env_logger = "0.11.6"
|
|
||||||
tokio = { version = "1.42.0", features = ["full"] }
|
|
|
@ -1,16 +0,0 @@
|
||||||
use actix_files::Files;
|
|
||||||
use actix_web::{middleware::Logger, App, HttpServer};
|
|
||||||
|
|
||||||
#[actix_web::main]
|
|
||||||
async fn main() -> std::io::Result<()> {
|
|
||||||
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
|
|
||||||
HttpServer::new(|| {
|
|
||||||
App::new()
|
|
||||||
.wrap(Logger::default())
|
|
||||||
.service(Files::new("/fs", "fs").index_file("index.html"))
|
|
||||||
.service(Files::new("/", "dist").index_file("index.html"))
|
|
||||||
})
|
|
||||||
.bind(("127.0.0.1", 8080))?
|
|
||||||
.run()
|
|
||||||
.await
|
|
||||||
}
|
|
29
content/_index.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
+++
|
||||||
|
title = "Vanten"
|
||||||
|
date = "2024-07-20T22:26:48+02:00"
|
||||||
|
draft = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Hii
|
||||||
|
|
||||||
|
I'm vanten. A software engineer and child from Sweden.
|
||||||
|
|
||||||
|
My [geekcode](https://geekcode.xyz):
|
||||||
|
```text
|
||||||
|
-----BEGIN GEEK CODE BLOCK-----
|
||||||
|
version: 3.1
|
||||||
|
gcs/gg d--(---) s+ a---- C++ UL+++ P L+++>++++ E- W++ N+ o? K? w--
|
||||||
|
O? M- V? PS++ PE-- Y+ PGP++ t- 5? X? R tv b+ DI? D+ G e-- h! r-
|
||||||
|
------END GEEK CODE BLOCK------
|
||||||
|
```
|
||||||
|
|
||||||
|
My Funny [buttons](/buttons) :3
|
||||||
|
|
||||||
|
<p>Help John is in my basement and I dont know what to do</p>
|
||||||
|
<iframe src="https://john.citrons.xyz/embed?ref=vanten-s.com" style="margin-left:auto;display:block;margin-right:auto;max-width:732px;width:100%;height:94px;border:none;"></iframe>
|
||||||
|
<p style="
|
||||||
|
font-family: Times New Roman;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #00AAFF;
|
||||||
|
">the depths of john call upon you</p>
|
BIN
content/buttons/MavenButton.png
Normal file
After Width: | Height: | Size: 713 B |
64
content/buttons/_index.html
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<h1>People</h1>
|
||||||
|
<a href="https://maven.pages.gay/"> <img src="/buttons/MavenButton.png"> </a>
|
||||||
|
<a href="https://leap123.neocities.org"> <img src="/buttons/leap123.gif"> </a>
|
||||||
|
<a href="https://authenyo.xyz"> <img src="/buttons/button.gif"> </a>
|
||||||
|
<a href="https://motan.gay"> <img src="/buttons/motan.png"> </a>
|
||||||
|
<a href="https://nelle.observer"> <img src="/buttons/nelleobserver.gif"></a>
|
||||||
|
|
||||||
|
<div class="separator"></div>
|
||||||
|
|
||||||
|
<h1>Opinions</h1>
|
||||||
|
|
||||||
|
<img src="/buttons/no_fkn_thanks.gif">
|
||||||
|
<img src="/buttons/wikipedia.gif">
|
||||||
|
<img src="/buttons/crushit.gif">
|
||||||
|
<img src="/buttons/scouting.gif">
|
||||||
|
<img src="/buttons/anythingbut.gif">
|
||||||
|
<img src="/buttons/dbd.gif">
|
||||||
|
<img src="/buttons/web3.gif">
|
||||||
|
<img src="/buttons/animegay.gif">
|
||||||
|
<img src="/buttons/tyg.gif">
|
||||||
|
<img src="/buttons/nft.gif">
|
||||||
|
<img src="/buttons/web11badge.gif">
|
||||||
|
<img src="/buttons/bufreepalestine.gif">
|
||||||
|
<img src="/buttons/discord-no-way.gif">
|
||||||
|
<img src="/buttons/graphic-design.gif">
|
||||||
|
<a href="https://cyber.dabamos.de/88x31/">
|
||||||
|
<img src="/buttons/eightyeight.gif">
|
||||||
|
</a>
|
||||||
|
<img src="/buttons/transnow2.gif">
|
||||||
|
<img src="/buttons/tiktok.gif">
|
||||||
|
<img src="/buttons/nocookie.gif">
|
||||||
|
<img src="/buttons/fspeech.gif">
|
||||||
|
<img src="/buttons/antifa.gif">
|
||||||
|
<img src="/buttons/hehimm.png">
|
||||||
|
<img src="/buttons/say-no-to-web3.gif">
|
||||||
|
<img src="/buttons/onyx.gif">
|
||||||
|
|
||||||
|
<div class="separator"></div>
|
||||||
|
|
||||||
|
<h1>Programs</h1>
|
||||||
|
|
||||||
|
<img src="/buttons/vi-best.gif">
|
||||||
|
<img src="/buttons/vim_a.gif">
|
||||||
|
<img src="/buttons/home-assistant.gif">
|
||||||
|
<img src="/buttons/doomrl.gif">
|
||||||
|
<a href="https://neocities.org">
|
||||||
|
<img src="/buttons/neocities.gif">
|
||||||
|
</a>
|
||||||
|
<img src="/buttons/webpassion.gif">
|
||||||
|
<img src="/buttons/ddg.gif">
|
||||||
|
<img src="/buttons/vim.vialle.love.anim.gif">
|
||||||
|
<img src="/buttons/ublock.png">
|
||||||
|
<img src="/buttons/vim.gif">
|
||||||
|
<img src="/buttons/linux-now.gif">
|
||||||
|
<img src="/buttons/fediverse.gif">
|
||||||
|
|
||||||
|
<a href="https://citrons.xyz/a/memetic-apioform-page.html"><img src="https://citrons.xyz/a/static/apiopage.png"/></a>
|
||||||
|
|
||||||
|
<div class="separator"></div>
|
||||||
|
|
||||||
|
<h1>My button</h1>
|
||||||
|
<p>If you think I'm cool please add my button :3. If you tell me about it I might add yours to</p>
|
||||||
|
<a href="https://vanten-s.com"> <img src="/buttons/vanten-s.gif"> </a>
|
||||||
|
|
BIN
content/buttons/animegay.gif
Executable file
After Width: | Height: | Size: 2.8 KiB |
BIN
content/buttons/antifa.gif
Executable file
After Width: | Height: | Size: 2.5 KiB |
BIN
content/buttons/anythingbut.gif
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
content/buttons/bufreepalestine.gif
Executable file
After Width: | Height: | Size: 4.1 KiB |
BIN
content/buttons/button.gif
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
content/buttons/crushit.gif
Executable file
After Width: | Height: | Size: 253 B |
BIN
content/buttons/dbd.gif
Executable file
After Width: | Height: | Size: 6.5 KiB |
BIN
content/buttons/ddg.gif
Executable file
After Width: | Height: | Size: 7.8 KiB |
BIN
content/buttons/discord-no-way.gif
Executable file
After Width: | Height: | Size: 1.9 KiB |
BIN
content/buttons/doomrl.gif
Executable file
After Width: | Height: | Size: 3.3 KiB |
BIN
content/buttons/eightyeight.gif
Executable file
After Width: | Height: | Size: 820 B |
BIN
content/buttons/evilnet.gif
Executable file
After Width: | Height: | Size: 2.3 KiB |
BIN
content/buttons/fediverse.gif
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
content/buttons/fspeech.gif
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
content/buttons/graphic-design.gif
Executable file
After Width: | Height: | Size: 3 KiB |
BIN
content/buttons/hehimm.png
Executable file
After Width: | Height: | Size: 531 B |
BIN
content/buttons/home-assistant.gif
Executable file
After Width: | Height: | Size: 439 B |
BIN
content/buttons/leap123.gif
Executable file
After Width: | Height: | Size: 1.6 KiB |
BIN
content/buttons/linux-now.gif
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
content/buttons/motan.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
content/buttons/nelleobserver.gif
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
content/buttons/neocities.gif
Executable file
After Width: | Height: | Size: 2.3 KiB |
BIN
content/buttons/nft.gif
Executable file
After Width: | Height: | Size: 2.6 KiB |
BIN
content/buttons/no_fkn_thanks.gif
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
content/buttons/nocookie.gif
Executable file
After Width: | Height: | Size: 581 B |
BIN
content/buttons/onyx.gif
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
content/buttons/onyx.xcf
Executable file
BIN
content/buttons/say-no-to-web3.gif
Executable file
After Width: | Height: | Size: 43 KiB |
BIN
content/buttons/scouting.gif
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
content/buttons/scouting.xcf
Executable file
BIN
content/buttons/tiktok.gif
Executable file
After Width: | Height: | Size: 2.1 KiB |
BIN
content/buttons/transnow2.gif
Executable file
After Width: | Height: | Size: 471 B |
BIN
content/buttons/tyg.gif
Executable file
After Width: | Height: | Size: 3.1 KiB |
BIN
content/buttons/ublock.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
content/buttons/vanten-s.gif
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
content/buttons/vanten-s.xcf
Executable file
BIN
content/buttons/vi-best.gif
Executable file
After Width: | Height: | Size: 3 KiB |
BIN
content/buttons/vim.gif
Executable file
After Width: | Height: | Size: 411 B |
BIN
content/buttons/vim.vialle.love.anim.gif
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
content/buttons/vim_a.gif
Executable file
After Width: | Height: | Size: 3.8 KiB |
BIN
content/buttons/web11badge.gif
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
content/buttons/web3.gif
Executable file
After Width: | Height: | Size: 483 B |
BIN
content/buttons/webpassion.gif
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
content/buttons/wikipedia.gif
Executable file
After Width: | Height: | Size: 2.5 KiB |
62
content/key.asc
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
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
|
||||||
|
=/DOI
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
7
content/posts/_index.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
+++
|
||||||
|
title = 'Posts'
|
||||||
|
date = 2024-07-21T14:52:15+02:00
|
||||||
|
draft = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
Here you'll find things I have written :)
|
29
content/posts/os/2024-08-05.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
+++
|
||||||
|
title = 'Os Devlog: Intro'
|
||||||
|
date = 2024-08-05T00:00:00+02:00
|
||||||
|
categories = ["os"]
|
||||||
|
tags = ["lowlevel"]
|
||||||
|
summary = "OSDev is painfull"
|
||||||
|
draft = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
I've been trying osdev for a few weeks now, and I decided that I would start writing a devlog :).
|
||||||
|
My end goal is a simple unix-like system, that doesn't have to be posix-compliant.
|
||||||
|
If you want a look on the source, it's available on my [forgejo](https://forgejo.vanten-s.com/vanten-s/os/src/commit/c8ce4a2de0d69d4378447fb4f7e87278b942b313).
|
||||||
|
|
||||||
|
I will write devlogs here every once in a while. I won't really be getting to the more low-level stuff, unless someone requests that. (see navbar)
|
||||||
|
|
||||||
|
## Things done
|
||||||
|
As I previously stated, I have written this for a while now. I have been able to implement:
|
||||||
|
- A functioning GDT
|
||||||
|
- A functioning IDT
|
||||||
|
- A extremely simple keyboard driver
|
||||||
|
- A extremely simple display driver
|
||||||
|
|
||||||
|
## Missing features
|
||||||
|
- I can't get to Ring 3 for some reason (heelpp)
|
||||||
|
- No multitasking
|
||||||
|
- 2 System calls
|
||||||
|
|
52
content/posts/os/2024-08-11.md
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
+++
|
||||||
|
title = 'Os Devlog: Lisp Compiler'
|
||||||
|
date = 2024-09-08T12:00:00+02:00
|
||||||
|
categories = ["os"]
|
||||||
|
tags = ["lowlevel", "lisp", "compiler"]
|
||||||
|
summary = "LISP :3"
|
||||||
|
draft = true
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
In my previous article I wrote about my [os](https://forgejo.vanten-s.com/vanten-s/os).
|
||||||
|
In this article I will explore the [compiler I have made for the system](https://forgejo.vanten-s.com/vanten-s/lisp-8bit).
|
||||||
|
|
||||||
|
## Goals for the compiler
|
||||||
|
Goals are important for getting stuff done. With this compiler I want to:
|
||||||
|
- Implement a simple LISP language
|
||||||
|
- Compile to a format that my OS supports
|
||||||
|
- Functions
|
||||||
|
- Variables
|
||||||
|
- Loops
|
||||||
|
- If statements
|
||||||
|
- First-class functions
|
||||||
|
|
||||||
|
## AST
|
||||||
|
|
||||||
|
For the program
|
||||||
|
```lisp
|
||||||
|
(+ 1 (+
|
||||||
|
a b ))
|
||||||
|
```
|
||||||
|
The AST looks like this:
|
||||||
|
```text
|
||||||
|
/ \
|
||||||
|
+ / \
|
||||||
|
1 / \
|
||||||
|
/ \ NIL
|
||||||
|
+ / \
|
||||||
|
a / \
|
||||||
|
b NIL
|
||||||
|
```
|
||||||
|
|
||||||
|
## Compilation
|
||||||
|
My lisp-implementation is heavily stack-based, and only uses registers when using instructions that need them.
|
||||||
|
|
||||||
|
For example, a + function could compiler to this:
|
||||||
|
```asm
|
||||||
|
pop eax
|
||||||
|
pop ebx
|
||||||
|
add eax, ebx
|
||||||
|
push eax
|
||||||
|
```
|
||||||
|
|
12
content/posts/postage.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
+++
|
||||||
|
title = "Postage"
|
||||||
|
date = "2024-07-20T22:26:48+02:00"
|
||||||
|
tags = ["lowlevel"]
|
||||||
|
draft = true
|
||||||
|
summary = "IPoL (IP over Letters) + kernel module == true"
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
I was talking with some friends...
|
||||||
|
|
41
content/posts/yali/2024-08-06.md
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
+++
|
||||||
|
title = 'Yali Devlog: Intro'
|
||||||
|
date = 2024-08-06T22:45:00+02:00
|
||||||
|
tags = ["encryption", "rust"]
|
||||||
|
categories = ["yali"]
|
||||||
|
draft = false
|
||||||
|
summary = "*Blazingly* 🚀 fast large #️⃣ numbers written in 100% safe Rust 🦀"
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
I have always been fascinated by modern encryption. I have tried multiple times to implement RSA.
|
||||||
|
But I have failed every single time. Why? Because ~~I wrote it in Python~~ I didn't make it *blazingly* fast by writing it from scratch in 100% safe Rust.
|
||||||
|
|
||||||
|
So I started writing my own [large int library](https://github.com/vanten-s/yali) from scratch. And I am finally able to perform 1024-bit RSA decryption under 500 ms on my desktop computer :)
|
||||||
|
```text
|
||||||
|
[svante@desktop-nixos ~/development/yali]$ time target/release/yali
|
||||||
|
target/release/yali 0,25s user 0,00s system 99% cpu 0,250 total
|
||||||
|
```
|
||||||
|
|
||||||
|
## How did I get here
|
||||||
|
I started out, thinking it was easy, by just storing all data in a simple `Vec<u8>`, and using a lot of greedy algorithms.
|
||||||
|
This was extremely slow, taking multiple seconds just performing RSA encryption.
|
||||||
|
|
||||||
|
As I continued, I made a couple of optimisations:
|
||||||
|
1. Implement a more efficient multiplication alogorithm
|
||||||
|
2. Implement a more efficient exponetiation algorithm
|
||||||
|
3. Implement a more efficient division algorithm
|
||||||
|
|
||||||
|
And one of the most effective changes was:
|
||||||
|
Changing the underlying datatype from `Vec<u8>` to `[u8; N]`. This avoids allocating memory on the heap every time you perform an operation.
|
||||||
|
|
||||||
|
## Future plans
|
||||||
|
In the future, I'm planning to implement:
|
||||||
|
- [Toom-Cook multiplication](https://en.wikipedia.org/wiki/Toom%E2%80%93Cook_multiplication)
|
||||||
|
- [Montgomery modular multiplication](https://en.wikipedia.org/wiki/Montgomery_modular_multiplication)
|
||||||
|
|
||||||
|
My current goal is reaching <100 ms.
|
||||||
|
|
||||||
|
Bye bye :33
|
||||||
|
|
BIN
content/posts/yali/time.png
Normal file
After Width: | Height: | Size: 110 KiB |
|
@ -1,14 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "vanten-s"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
log = "0.4.22"
|
|
||||||
wasm-logger = "0.2.0"
|
|
||||||
web-sys = "0.3.76"
|
|
||||||
yew = { git = "https://github.com/yewstack/yew/", features = ["csr"] }
|
|
||||||
serde-wasm-bindgen = "0.6.5"
|
|
||||||
wasm-bindgen-futures = "0.4.49"
|
|
||||||
futures = "0.3.31"
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
:root {
|
|
||||||
--base: #1e1e2e;
|
|
||||||
--mantle: #181825;
|
|
||||||
--text: #cdd6f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: var(--mantle);
|
|
||||||
color: var(--text);
|
|
||||||
font-family: monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input {
|
|
||||||
background-color: inherit;
|
|
||||||
color: inherit;
|
|
||||||
font: inherit;
|
|
||||||
padding: 0;
|
|
||||||
border: none;
|
|
||||||
width: max;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input:focus {
|
|
||||||
outline: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.terminal {
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
use wasm_bindgen_futures::{spawn_local, JsFuture};
|
|
||||||
use web_sys::{console, wasm_bindgen::UnwrapThrowExt, window, Response};
|
|
||||||
use super::{Environment, Handle, Rader};
|
|
||||||
|
|
||||||
#[derive(Clone)]
|
|
||||||
struct Fetcher {
|
|
||||||
next: Option<Arc<Fetcher>>,
|
|
||||||
filename: String,
|
|
||||||
previous_text: String,
|
|
||||||
rader: Rader,
|
|
||||||
handle: Handle
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn cat(mut env: Environment) {
|
|
||||||
if env.arguments.len() == 1 {
|
|
||||||
env.rader.push("cat: no filename provided\n".to_string());
|
|
||||||
env.handle.set(env.rader);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut previous_fetcher = None;
|
|
||||||
for filename in env.arguments[1..].iter().rev() {
|
|
||||||
let next_fetcher = Fetcher {
|
|
||||||
next: previous_fetcher,
|
|
||||||
filename: filename.to_string(),
|
|
||||||
previous_text: String::new(),
|
|
||||||
rader: env.rader.clone(),
|
|
||||||
handle: env.handle.clone(),
|
|
||||||
};
|
|
||||||
previous_fetcher = Some(Arc::new(next_fetcher));
|
|
||||||
}
|
|
||||||
|
|
||||||
spawn_local(fetch((*previous_fetcher.unwrap_throw()).clone()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn fetch(mut fetcher: Fetcher) {
|
|
||||||
let text = fetch_single_file(fetcher.filename).await;
|
|
||||||
|
|
||||||
let text = fetcher.previous_text + &text;
|
|
||||||
|
|
||||||
if let Some(fetcher) = fetcher.next {
|
|
||||||
let mut fetcher = (*fetcher).clone();
|
|
||||||
fetcher.previous_text = text;
|
|
||||||
Box::pin(fetch(fetcher.clone())).await
|
|
||||||
} else {
|
|
||||||
fetcher.rader.push(text.clone());
|
|
||||||
fetcher.handle.set(fetcher.rader);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn fetch_single_file(filename: String) -> String {
|
|
||||||
let resource = format!("/fs/{filename}");
|
|
||||||
|
|
||||||
let window = window().unwrap_throw();
|
|
||||||
|
|
||||||
console::log_1(&"Got Window".into());
|
|
||||||
|
|
||||||
let future: JsFuture = window.fetch_with_str(&resource).into();
|
|
||||||
let response = future.await.unwrap_throw();
|
|
||||||
let response = Response::from(response);
|
|
||||||
|
|
||||||
if response.status() == 404 {
|
|
||||||
return format!("cat: {filename}: No such file or directory\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
console::log_1(&"Got Response".into());
|
|
||||||
|
|
||||||
let text: JsFuture = response.text().unwrap_throw().into();
|
|
||||||
let text = text.await.unwrap_throw();
|
|
||||||
let text = text.as_string().unwrap_throw();
|
|
||||||
|
|
||||||
console::log_1(&"Got Text".into());
|
|
||||||
|
|
||||||
text
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
use super::Environment;
|
|
||||||
|
|
||||||
pub fn clear(env: Environment) {
|
|
||||||
env.handle.set(vec![]);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
use super::Environment;
|
|
||||||
|
|
||||||
pub fn echo(mut env: Environment) {
|
|
||||||
let mut text = "".to_string();
|
|
||||||
for argument in &env.arguments[1..] {
|
|
||||||
text += argument;
|
|
||||||
text += " ";
|
|
||||||
};
|
|
||||||
text += "\n";
|
|
||||||
env.rader.push(text);
|
|
||||||
env.handle.set(env.rader);
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
use log::{error, info};
|
|
||||||
use yew::UseStateHandle;
|
|
||||||
|
|
||||||
mod clear;
|
|
||||||
mod cat;
|
|
||||||
mod echo;
|
|
||||||
|
|
||||||
pub type Rader = Vec<String>;
|
|
||||||
pub type Handle = UseStateHandle<Rader>;
|
|
||||||
|
|
||||||
struct Environment<'a> {
|
|
||||||
pub rader: Rader,
|
|
||||||
pub handle: Handle,
|
|
||||||
pub arguments: Vec<&'a str>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn run(command: String, rader: Rader, handle: Handle) {
|
|
||||||
let arguments = command.trim().split_whitespace().collect::<Vec<_>>();
|
|
||||||
|
|
||||||
info!("{:?}", arguments);
|
|
||||||
|
|
||||||
if arguments.len() == 0 {
|
|
||||||
handle.set(rader);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let environment = Environment {
|
|
||||||
rader,
|
|
||||||
handle,
|
|
||||||
arguments,
|
|
||||||
};
|
|
||||||
|
|
||||||
match environment.arguments[0] {
|
|
||||||
"clear" => clear::clear(environment),
|
|
||||||
"cat" => cat::cat(environment),
|
|
||||||
"echo" => echo::echo(environment),
|
|
||||||
_ => unrecognized_command(environment),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn unrecognized_command(mut env: Environment) {
|
|
||||||
env.rader.push(format!("vsh: {}: command not found\n", env.arguments[0]));
|
|
||||||
env.handle.set(env.rader);
|
|
||||||
error!("Unrecognized Command");
|
|
||||||
}
|
|
|
@ -1,91 +0,0 @@
|
||||||
use log::info;
|
|
||||||
use web_sys::{
|
|
||||||
wasm_bindgen::{JsCast, UnwrapThrowExt},
|
|
||||||
HtmlInputElement,
|
|
||||||
};
|
|
||||||
use yew::prelude::*;
|
|
||||||
|
|
||||||
mod commands;
|
|
||||||
|
|
||||||
fn get_prompt() -> String {
|
|
||||||
"[user@vanten-s.com ~]$ ".to_string()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[function_component]
|
|
||||||
fn App() -> Html {
|
|
||||||
let rader: UseStateHandle<Vec<String>> = use_state(Vec::new);
|
|
||||||
|
|
||||||
let rader_handle = rader.clone();
|
|
||||||
let push_rad = move |rad: String| {
|
|
||||||
info!("{}", rad);
|
|
||||||
let handle = rader_handle.clone();
|
|
||||||
let mut val = (*handle).clone();
|
|
||||||
val.push(get_prompt() + &rad + "\n");
|
|
||||||
commands::run(rad, val, handle);
|
|
||||||
};
|
|
||||||
|
|
||||||
html! {
|
|
||||||
<div>
|
|
||||||
<Terminal rader = { (*rader).clone() } />
|
|
||||||
<Input { push_rad } />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Properties, PartialEq)]
|
|
||||||
struct InputProps {
|
|
||||||
pub push_rad: Callback<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[function_component]
|
|
||||||
fn Input(props: &InputProps) -> Html {
|
|
||||||
let push_rad = props.push_rad.clone();
|
|
||||||
|
|
||||||
let onkeydown = move |e: KeyboardEvent| {
|
|
||||||
if e.code() != "Enter" {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let target: HtmlInputElement = e.target().unwrap_throw().dyn_into().unwrap_throw();
|
|
||||||
let value = target.value();
|
|
||||||
let value = value;
|
|
||||||
target.set_value("");
|
|
||||||
push_rad.emit(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
html! {
|
|
||||||
<>
|
|
||||||
<code>{ get_prompt() }</code><input { onkeydown } type="text" class="input"/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Properties, PartialEq)]
|
|
||||||
struct TerminalProps {
|
|
||||||
pub rader: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[function_component]
|
|
||||||
fn Terminal(props: &TerminalProps) -> Html {
|
|
||||||
let rader: Vec<_> = props
|
|
||||||
.rader
|
|
||||||
.iter()
|
|
||||||
.map(|rad| {
|
|
||||||
html! {
|
|
||||||
<>
|
|
||||||
<code> { rad } </code>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
html! {
|
|
||||||
<div id="terminal" class="terminal">
|
|
||||||
{ rader }
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
wasm_logger::init(wasm_logger::Config::default());
|
|
||||||
yew::Renderer::<App>::new().render();
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
:3
|
|
24
hugo.toml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
baseURL = 'https://vanten-s.com/'
|
||||||
|
languageCode = 'en-us'
|
||||||
|
title = 'Vanten'
|
||||||
|
theme = 'vanten'
|
||||||
|
|
||||||
|
[markup]
|
||||||
|
[markup.highlight]
|
||||||
|
anchorLineNos = false
|
||||||
|
codeFences = true
|
||||||
|
guessSyntax = false
|
||||||
|
hl_Lines = ''
|
||||||
|
hl_inline = false
|
||||||
|
lineAnchors = ''
|
||||||
|
lineNoStart = 1
|
||||||
|
lineNos = true
|
||||||
|
lineNumbersInTable = true
|
||||||
|
noClasses = false
|
||||||
|
noHl = false
|
||||||
|
style = 'false'
|
||||||
|
tabWidth = 4
|
||||||
|
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe = true # Allow HTML in md files
|
||||||
|
|
12
index.html
|
@ -1,12 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>Yew App</title>
|
|
||||||
<link data-trunk rel="css" href="frontend/main.css"/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<link data-trunk rel="rust" data-type="main" href="frontend/Cargo.toml"/>
|
|
||||||
<link data-trunk rel="copy-dir" href="fs/"/>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
10
shell.nix
|
@ -2,14 +2,6 @@
|
||||||
|
|
||||||
pkgs.mkShell rec {
|
pkgs.mkShell rec {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
rustup
|
hugo
|
||||||
trunk
|
|
||||||
];
|
];
|
||||||
RUSTC_VERSION = "stable";
|
|
||||||
shellHook = ''
|
|
||||||
rustup default $RUSTC_VERSION
|
|
||||||
rustup component add rust-analyzer
|
|
||||||
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
|
|
||||||
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
1
static/.well-known/openpgpkey/vanten-s.com/policy
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Policy flags for domain vanten-s.com
|
21
themes/vanten/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) [year] [fullname]
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
7
themes/vanten/README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Theme Name
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
## Configuration
|
5
themes/vanten/archetypes/default.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
+++
|
||||||
|
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||||
|
date = {{ .Date }}
|
||||||
|
draft = true
|
||||||
|
+++
|
278
themes/vanten/assets/css/chroma.css
Normal file
|
@ -0,0 +1,278 @@
|
||||||
|
.chroma {
|
||||||
|
color: #cdd6f4;
|
||||||
|
background-color: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chroma .cl {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .err {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
||||||
|
.chroma .x {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .lntd {
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.chroma .lntable {
|
||||||
|
width: auto;
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
overflow: auto;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
.chroma .hl {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
background-color: #45475a;
|
||||||
|
}
|
||||||
|
.chroma .lnt {
|
||||||
|
color: #7f849c;
|
||||||
|
padding: 0 0.4em 0 0.4em;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
margin-right: 0.4em;
|
||||||
|
}
|
||||||
|
.chroma .ln {
|
||||||
|
color: #7f849c;
|
||||||
|
padding: 0 0.4em 0 0.4em;
|
||||||
|
margin-right: 0.4em;
|
||||||
|
}
|
||||||
|
.chroma .k {
|
||||||
|
color: #cba6f7;
|
||||||
|
}
|
||||||
|
.chroma .kr {
|
||||||
|
color: #cba6f7;
|
||||||
|
}
|
||||||
|
.chroma .kp {
|
||||||
|
color: #cba6f7;
|
||||||
|
}
|
||||||
|
.chroma .kc {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .kd {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
||||||
|
.chroma .kn {
|
||||||
|
color: #94e2d5;
|
||||||
|
}
|
||||||
|
.chroma .kt {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
||||||
|
.chroma .n {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .nc {
|
||||||
|
color: #f9e2af;
|
||||||
|
}
|
||||||
|
.chroma .no {
|
||||||
|
color: #f9e2af;
|
||||||
|
}
|
||||||
|
.chroma .nd {
|
||||||
|
color: #89b4fa;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .ni {
|
||||||
|
color: #94e2d5;
|
||||||
|
}
|
||||||
|
.chroma .ne {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .nf {
|
||||||
|
color: #89b4fa;
|
||||||
|
}
|
||||||
|
.chroma .fm {
|
||||||
|
color: #89b4fa;
|
||||||
|
}
|
||||||
|
.chroma .nl {
|
||||||
|
color: #89dceb;
|
||||||
|
}
|
||||||
|
.chroma .nn {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .py {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .nt {
|
||||||
|
color: #cba6f7;
|
||||||
|
}
|
||||||
|
.chroma .nv {
|
||||||
|
color: #f5e0dc;
|
||||||
|
}
|
||||||
|
.chroma .vc {
|
||||||
|
color: #f5e0dc;
|
||||||
|
}
|
||||||
|
.chroma .vg {
|
||||||
|
color: #f5e0dc;
|
||||||
|
}
|
||||||
|
.chroma .vi {
|
||||||
|
color: #f5e0dc;
|
||||||
|
}
|
||||||
|
.chroma .vm {
|
||||||
|
color: #f5e0dc;
|
||||||
|
}
|
||||||
|
.chroma .na {
|
||||||
|
color: #89b4fa;
|
||||||
|
}
|
||||||
|
.chroma .nb {
|
||||||
|
color: #89dceb;
|
||||||
|
}
|
||||||
|
.chroma .bp {
|
||||||
|
color: #89dceb;
|
||||||
|
}
|
||||||
|
.chroma .nx {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .l {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .ld {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .s {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .sc {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .s1 {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .s2 {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .sb {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .sx {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .ss {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .si {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
.chroma .sa {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
||||||
|
.chroma .dl {
|
||||||
|
color: #89b4fa;
|
||||||
|
}
|
||||||
|
.chroma .se {
|
||||||
|
color: #89b4fa;
|
||||||
|
}
|
||||||
|
.chroma .sr {
|
||||||
|
color: #94e2d5;
|
||||||
|
}
|
||||||
|
.chroma .sd {
|
||||||
|
color: #6c7086;
|
||||||
|
}
|
||||||
|
.chroma .sh {
|
||||||
|
color: #6c7086;
|
||||||
|
}
|
||||||
|
.chroma .m {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .mb {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .mh {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .mi {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .mf {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .il {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .mo {
|
||||||
|
color: #fab387;
|
||||||
|
}
|
||||||
|
.chroma .o {
|
||||||
|
color: #89dceb;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .ow {
|
||||||
|
color: #89dceb;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .c {
|
||||||
|
color: #6c7086;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .c1 {
|
||||||
|
color: #6c7086;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cm {
|
||||||
|
color: #6c7086;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cs {
|
||||||
|
color: #6c7086;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .ch {
|
||||||
|
color: #585b70;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cp {
|
||||||
|
color: #6c7086;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cpf {
|
||||||
|
color: #6c7086;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .g {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .gi {
|
||||||
|
color: #a6e3a1;
|
||||||
|
background-color: #313244;
|
||||||
|
}
|
||||||
|
.chroma .gd {
|
||||||
|
color: #f38ba8;
|
||||||
|
background-color: #313244;
|
||||||
|
}
|
||||||
|
.chroma .ge {
|
||||||
|
color: #cdd6f4;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .gs {
|
||||||
|
color: #cdd6f4;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .gl {
|
||||||
|
color: #cdd6f4;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.chroma .gh {
|
||||||
|
color: #fab387;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .gu {
|
||||||
|
color: #fab387;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .go {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .gp {
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
.chroma .gr {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
||||||
|
.chroma .gt {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
279
themes/vanten/assets/css/latte.css
Normal file
|
@ -0,0 +1,279 @@
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
.chroma {
|
||||||
|
color: #4c4f69;
|
||||||
|
background-color: #eff1f5;
|
||||||
|
}
|
||||||
|
.chroma .cl {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .err {
|
||||||
|
color: #d20f39;
|
||||||
|
}
|
||||||
|
.chroma .x {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .lntd {
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.chroma .lntable {
|
||||||
|
width: auto;
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
overflow: auto;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
.chroma .hl {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
background-color: #bcc0cc;
|
||||||
|
}
|
||||||
|
.chroma .lnt {
|
||||||
|
color: #8c8fa1;
|
||||||
|
padding: 0 0.4em 0 0.4em;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
margin-right: 0.4em;
|
||||||
|
}
|
||||||
|
.chroma .ln {
|
||||||
|
color: #8c8fa1;
|
||||||
|
padding: 0 0.4em 0 0.4em;
|
||||||
|
margin-right: 0.4em;
|
||||||
|
}
|
||||||
|
.chroma .k {
|
||||||
|
color: #8839ef;
|
||||||
|
}
|
||||||
|
.chroma .kr {
|
||||||
|
color: #8839ef;
|
||||||
|
}
|
||||||
|
.chroma .kp {
|
||||||
|
color: #8839ef;
|
||||||
|
}
|
||||||
|
.chroma .kc {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .kd {
|
||||||
|
color: #d20f39;
|
||||||
|
}
|
||||||
|
.chroma .kn {
|
||||||
|
color: #179299;
|
||||||
|
}
|
||||||
|
.chroma .kt {
|
||||||
|
color: #d20f39;
|
||||||
|
}
|
||||||
|
.chroma .n {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .nc {
|
||||||
|
color: #df8e1d;
|
||||||
|
}
|
||||||
|
.chroma .no {
|
||||||
|
color: #df8e1d;
|
||||||
|
}
|
||||||
|
.chroma .nd {
|
||||||
|
color: #1e66f5;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .ni {
|
||||||
|
color: #179299;
|
||||||
|
}
|
||||||
|
.chroma .ne {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .nf {
|
||||||
|
color: #1e66f5;
|
||||||
|
}
|
||||||
|
.chroma .fm {
|
||||||
|
color: #1e66f5;
|
||||||
|
}
|
||||||
|
.chroma .nl {
|
||||||
|
color: #04a5e5;
|
||||||
|
}
|
||||||
|
.chroma .nn {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .py {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .nt {
|
||||||
|
color: #8839ef;
|
||||||
|
}
|
||||||
|
.chroma .nv {
|
||||||
|
color: #dc8a78;
|
||||||
|
}
|
||||||
|
.chroma .vc {
|
||||||
|
color: #dc8a78;
|
||||||
|
}
|
||||||
|
.chroma .vg {
|
||||||
|
color: #dc8a78;
|
||||||
|
}
|
||||||
|
.chroma .vi {
|
||||||
|
color: #dc8a78;
|
||||||
|
}
|
||||||
|
.chroma .vm {
|
||||||
|
color: #dc8a78;
|
||||||
|
}
|
||||||
|
.chroma .na {
|
||||||
|
color: #1e66f5;
|
||||||
|
}
|
||||||
|
.chroma .nb {
|
||||||
|
color: #04a5e5;
|
||||||
|
}
|
||||||
|
.chroma .bp {
|
||||||
|
color: #04a5e5;
|
||||||
|
}
|
||||||
|
.chroma .nx {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .l {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .ld {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .s {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .sc {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .s1 {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .s2 {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .sb {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .sx {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .ss {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .si {
|
||||||
|
color: #40a02b;
|
||||||
|
}
|
||||||
|
.chroma .sa {
|
||||||
|
color: #d20f39;
|
||||||
|
}
|
||||||
|
.chroma .dl {
|
||||||
|
color: #1e66f5;
|
||||||
|
}
|
||||||
|
.chroma .se {
|
||||||
|
color: #1e66f5;
|
||||||
|
}
|
||||||
|
.chroma .sr {
|
||||||
|
color: #179299;
|
||||||
|
}
|
||||||
|
.chroma .sd {
|
||||||
|
color: #9ca0b0;
|
||||||
|
}
|
||||||
|
.chroma .sh {
|
||||||
|
color: #9ca0b0;
|
||||||
|
}
|
||||||
|
.chroma .m {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .mb {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .mh {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .mi {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .mf {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .il {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .mo {
|
||||||
|
color: #fe640b;
|
||||||
|
}
|
||||||
|
.chroma .o {
|
||||||
|
color: #04a5e5;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .ow {
|
||||||
|
color: #04a5e5;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .c {
|
||||||
|
color: #9ca0b0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .c1 {
|
||||||
|
color: #9ca0b0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cm {
|
||||||
|
color: #9ca0b0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cs {
|
||||||
|
color: #9ca0b0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .ch {
|
||||||
|
color: #acb0be;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cp {
|
||||||
|
color: #9ca0b0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .cpf {
|
||||||
|
color: #9ca0b0;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .g {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .gi {
|
||||||
|
color: #40a02b;
|
||||||
|
background-color: #ccd0da;
|
||||||
|
}
|
||||||
|
.chroma .gd {
|
||||||
|
color: #d20f39;
|
||||||
|
background-color: #ccd0da;
|
||||||
|
}
|
||||||
|
.chroma .ge {
|
||||||
|
color: #4c4f69;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chroma .gs {
|
||||||
|
color: #4c4f69;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .gl {
|
||||||
|
color: #4c4f69;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.chroma .gh {
|
||||||
|
color: #fe640b;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .gu {
|
||||||
|
color: #fe640b;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chroma .go {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .gp {
|
||||||
|
color: #4c4f69;
|
||||||
|
}
|
||||||
|
.chroma .gr {
|
||||||
|
color: #d20f39;
|
||||||
|
}
|
||||||
|
.chroma .gt {
|
||||||
|
color: #d20f39;
|
||||||
|
}
|
||||||
|
}
|
77
themes/vanten/assets/css/main.css
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
:root {
|
||||||
|
--bg: #181825;
|
||||||
|
--navbar: #1e1e2e;
|
||||||
|
--text: #cdd6f4;
|
||||||
|
--link: #94e2d5;
|
||||||
|
--link-highligt: #fff;
|
||||||
|
--border: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root {
|
||||||
|
--bg: #e6e9ef;
|
||||||
|
--navbar: #eff1f5;
|
||||||
|
--text: #4c4f69;
|
||||||
|
--link: #179299;
|
||||||
|
--link-highligt: #000;
|
||||||
|
--border: #eff1f5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: var(--text);
|
||||||
|
background-color: var(--bg);
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 1.2em;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 1rem;
|
||||||
|
max-width: 43em;
|
||||||
|
margin-right: 8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--link);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
position: fixed;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: var(--navbar);
|
||||||
|
bottom: 0;
|
||||||
|
padding-right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar > ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar > ul > li > a {
|
||||||
|
transition: color 200ms;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar > ul > li > a:hover {
|
||||||
|
color: var(--link-highligt);
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background-color: var(--navbar);
|
||||||
|
}
|
1
themes/vanten/assets/js/main.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
console.log('This site was generated by Hugo.');
|
9
themes/vanten/content/_index.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
+++
|
||||||
|
title = 'Home'
|
||||||
|
date = 2023-01-01T08:00:00-07:00
|
||||||
|
draft = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat
|
||||||
|
pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim
|
||||||
|
excepteur excepteur pariatur nostrud qui irure ullamco.
|
7
themes/vanten/content/posts/_index.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
+++
|
||||||
|
title = 'Posts'
|
||||||
|
date = 2023-01-01T08:30:00-07:00
|
||||||
|
draft = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
Tempor est exercitation ad qui pariatur quis adipisicing aliquip nisi ea consequat ipsum occaecat. Nostrud consequat ullamco laboris fugiat esse esse adipisicing velit laborum ipsum incididunt ut enim. Dolor pariatur nulla quis fugiat dolore excepteur. Aliquip ad quis aliqua enim do consequat.
|
23
themes/vanten/hugo.toml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
baseURL = 'https://example.org/'
|
||||||
|
languageCode = 'en-us'
|
||||||
|
title = 'My New Hugo Site'
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Home'
|
||||||
|
pageRef = '/'
|
||||||
|
weight = 10
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Posts'
|
||||||
|
pageRef = '/posts'
|
||||||
|
weight = 20
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Tags'
|
||||||
|
pageRef = '/tags'
|
||||||
|
weight = 30
|
||||||
|
|
||||||
|
[module]
|
||||||
|
[module.hugoVersion]
|
||||||
|
extended = false
|
||||||
|
min = "0.116.0"
|
17
themes/vanten/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ or site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
|
||||||
|
<head>
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
{{ block "main" . }}{{ end }}
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
9
themes/vanten/layouts/_default/home.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
{{ .Content }}
|
||||||
|
<div class="separator"></div>
|
||||||
|
<h1> Posts </h1>
|
||||||
|
{{ range site.RegularPages }}
|
||||||
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
<p> {{ .Summary }} </p>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
8
themes/vanten/layouts/_default/list.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ .Content }}
|
||||||
|
{{ range .Pages }}
|
||||||
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
{{ .Summary }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
11
themes/vanten/layouts/_default/single.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||||
|
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||||
|
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
<div class="separator" style="padding-bottom: 1em;"></div>
|
||||||
|
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||||
|
{{ end }}
|
3
themes/vanten/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<p>No Copyright.</p>
|
||||||
|
<p><a href="https://fediring.net/previous?host=vanten-s.com">previous</a> <a href="https://fediring.net">fediring</a> <a href="https://fediring.net/next?host=vanten-s.com">next</a></p>
|
||||||
|
<p>Built with <a href="https://gohugo.io/">Hugo<p>
|
5
themes/vanten/layouts/partials/head.html
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
|
||||||
|
{{ partialCached "head/css.html" . }}
|
||||||
|
{{ partialCached "head/js.html" . }}
|
30
themes/vanten/layouts/partials/head/css.html
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{{- with resources.Get "css/main.css" }}
|
||||||
|
{{- if eq hugo.Environment "development" }}
|
||||||
|
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||||
|
{{- else }}
|
||||||
|
{{- with . | minify | fingerprint }}
|
||||||
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- with resources.Get "css/chroma.css" }}
|
||||||
|
{{- if eq hugo.Environment "development" }}
|
||||||
|
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||||
|
{{- else }}
|
||||||
|
{{- with . | minify | fingerprint }}
|
||||||
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- with resources.Get "css/latte.css" }}
|
||||||
|
{{- if eq hugo.Environment "development" }}
|
||||||
|
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||||
|
{{- else }}
|
||||||
|
{{- with . | minify | fingerprint }}
|
||||||
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
12
themes/vanten/layouts/partials/head/js.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{{- with resources.Get "js/main.js" }}
|
||||||
|
{{- if eq hugo.Environment "development" }}
|
||||||
|
{{- with . | js.Build }}
|
||||||
|
<script src="{{ .RelPermalink }}"></script>
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $opts := dict "minify" true }}
|
||||||
|
{{- with . | js.Build $opts | fingerprint }}
|
||||||
|
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
2
themes/vanten/layouts/partials/header.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<h1>{{ site.Title }}</h1>
|
||||||
|
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
60
themes/vanten/layouts/partials/menu.html
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
{{- /*
|
||||||
|
Renders a menu for the given menu ID.
|
||||||
|
|
||||||
|
@context {page} page The current page.
|
||||||
|
@context {string} menuID The menu ID.
|
||||||
|
|
||||||
|
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- $page := .page }}
|
||||||
|
{{- $menuID := .menuID }}
|
||||||
|
|
||||||
|
{{- with index site.Menus $menuID }}
|
||||||
|
<nav class="navbar">
|
||||||
|
<ul>
|
||||||
|
{{/*- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) */}}
|
||||||
|
<li> <a href="/">Home</a> </li>
|
||||||
|
<li> <a href="/posts">Posts</a> </li>
|
||||||
|
<li> <a href="/tags">Tags</a> </li>
|
||||||
|
<li> <a href="/categories">Categories</a> </li>
|
||||||
|
<li> <a href="https://matrix.to/#/@vanten-s:matrix.ungdata.org">Matrix</a> </li>
|
||||||
|
<li> <a href="mailto:vanten-s@vanten-s.com">Mail</a> </li>
|
||||||
|
<li> <a href="/key.asc">PGP Key</a> </li>
|
||||||
|
<li> <a rel="me" href="https://tech.lgbt/@vanten_s">Fedi</a> </li>
|
||||||
|
<li> <a href="https://forgejo.vanten-s.com/vanten-s">Git</a> </li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "partials/inline/menu/walk.html" }}
|
||||||
|
{{- $page := .page }}
|
||||||
|
{{- range .menuEntries }}
|
||||||
|
{{- $attrs := dict "href" .URL }}
|
||||||
|
{{- if $page.IsMenuCurrent .Menu . }}
|
||||||
|
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
|
||||||
|
{{- else if $page.HasMenuCurrent .Menu .}}
|
||||||
|
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $name := .Name }}
|
||||||
|
{{- with .Identifier }}
|
||||||
|
{{- with T . }}
|
||||||
|
{{- $name = . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
{{- range $k, $v := $attrs }}
|
||||||
|
{{- with $v }}
|
||||||
|
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
>{{ $name }}</a>
|
||||||
|
{{- with .Children }}
|
||||||
|
<ul>
|
||||||
|
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
</li>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
23
themes/vanten/layouts/partials/terms.html
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{{- /*
|
||||||
|
For a given taxonomy, renders a list of terms assigned to the page.
|
||||||
|
|
||||||
|
@context {page} page The current page.
|
||||||
|
@context {string} taxonomy The taxonomy.
|
||||||
|
|
||||||
|
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- $page := .page }}
|
||||||
|
{{- $taxonomy := .taxonomy }}
|
||||||
|
|
||||||
|
{{- with $page.GetTerms $taxonomy }}
|
||||||
|
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||||
|
<div>
|
||||||
|
<div>{{ $label }}:</div>
|
||||||
|
<ul>
|
||||||
|
{{- range . }}
|
||||||
|
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||||
|
{{- end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
BIN
themes/vanten/static/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
31
themes/vanten/theme.toml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name = 'Theme name'
|
||||||
|
license = 'MIT'
|
||||||
|
licenselink = 'https://github.com/owner/repo/LICENSE'
|
||||||
|
description = 'Theme description'
|
||||||
|
|
||||||
|
# The home page of the theme, where the source can be found
|
||||||
|
homepage = 'https://github.com/owner/repo'
|
||||||
|
|
||||||
|
# If you have a running demo of the theme
|
||||||
|
demosite = 'https://owner.github.io/repo'
|
||||||
|
|
||||||
|
# Taxonomy terms
|
||||||
|
tags = ['blog', 'company']
|
||||||
|
features = ['some', 'awesome', 'features']
|
||||||
|
|
||||||
|
# If the theme has multiple authors
|
||||||
|
authors = [
|
||||||
|
{name = 'Name of author', homepage = 'Website of author'},
|
||||||
|
{name = 'Name of author', homepage = 'Website of author'}
|
||||||
|
]
|
||||||
|
|
||||||
|
# If the theme has a single author
|
||||||
|
[author]
|
||||||
|
name = 'Your name'
|
||||||
|
homepage = 'Your website'
|
||||||
|
|
||||||
|
# If porting an existing theme
|
||||||
|
[original]
|
||||||
|
author = 'Name of original author'
|
||||||
|
homepage = 'Website of original author'
|
||||||
|
repo = 'https://github.com/owner/repo'
|