diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index fd05e94..9bc6f3d 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -25,7 +25,7 @@ jobs: uses: dtolnay/rust-toolchain@stable - name: Build website - run: cargo run + run: cargo run build - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..7d479c6 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "printWidth": 100 +} diff --git a/config.toml b/config.toml index 7969ee3..6413675 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ [slides] talks = [ - "2024-01-17-how-to-contribute-to-the-rust-project" + { name = "How to contribute to the Rust project", location = "Rust Zürisee", date = "2024-01-17" }, ] diff --git a/src/build/slides.rs b/src/build/slides.rs index 94ddd8c..7c0ac10 100644 --- a/src/build/slides.rs +++ b/src/build/slides.rs @@ -16,8 +16,8 @@ pub fn build(config: &SlidesConfig, slides: &Path, dist: &Path) -> Result<()> { utils::cp_r(&slides.join("plugin"), &dist.join("plugin")).wrap_err("copying reveal.js dist")?; for talk in &config.talks { - let path = slides.join(talk); - let dist = dist.join(talk); + let path = slides.join(talk.dirname()); + let dist = dist.join(talk.dirname()); utils::cp_r(&path, &dist).wrap_err("copying slide data")?; } diff --git a/src/build/statics.rs b/src/build/statics.rs index f3f285f..b85badd 100644 --- a/src/build/statics.rs +++ b/src/build/statics.rs @@ -5,12 +5,12 @@ use std::{fs, path::Path}; use askama::Template; use color_eyre::{eyre::WrapErr, Result}; -use crate::{utils, SlidesConfig}; +use crate::{utils, SlidesConfig, Talk}; #[derive(askama::Template)] #[template(path = "slides.html")] struct Slides { - talks: Vec, + talks: Vec, } pub fn build(config: &SlidesConfig, statics: &Path, dist: &Path) -> Result<()> { diff --git a/src/main.rs b/src/main.rs index 57d3287..6e5f187 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,24 @@ struct Config { #[derive(Deserialize)] struct SlidesConfig { - talks: Vec, + talks: Vec, +} + +#[derive(Deserialize, Clone)] +struct Talk { + name: String, + date: String, + location: String, +} + +impl Talk { + fn dirname(&self) -> String { + format!( + "{}-{}", + self.date, + self.name.replace(" ", "-").to_lowercase() + ) + } } fn main() -> Result<()> { @@ -64,6 +81,7 @@ fn main() -> Result<()> { } fn watch(root: &'static Path) -> Result<()> { + build(root).wrap_err("initial build")?; let (send, recv) = std::sync::mpsc::sync_channel(1); let mut watcher = notify::recommended_watcher(move |res| match res { Ok(_) => { diff --git a/static/root/back-alley.html b/static/root/back-alley.html new file mode 100644 index 0000000..5708d3f --- /dev/null +++ b/static/root/back-alley.html @@ -0,0 +1,84 @@ + + + + + + nilstrieb.dev + + + +
+
+

secret back alley

+ getting out +
+

+ hey! psst! you might have found the secret back alley. granted, it was not very secret. + but that's the thing with back alleys, they're not really secret, yet people usually + don't go there. +

+

+ so while you're here, i have some things for you. secret websites i host. you may use + them, but don't abuse them. i really mean it! or else i will be forced to move them out + of the secret back alley into my secret bunker, where you won't have access to them at + all. and you don't want that, do you? +

+
+
+

uptime

+

+ uptime is my + personal hand-written status page website. how do you know that it's handwritten? its performance is absolutely horrible, that's + why! +

+ + uptime.nilstrieb.dev + +
+
+

OLAT

+

+ you've ever wanted to use a + professional learning platform that's used by + real schools for things that may not be very appropriate on the school instance? i + kinda, uh... do, so that's why this exists. +

+ + olat.nilstrieb.dev + +
+
+

HugoChat

+

+ the brilliant chat platform for all + your needs. +

+ + hugo-chat.nilstrieb.dev + +
+
+

CORS

+

+ running CORS, for your + creative organized relaxed school life. +

+ + cors-school.nilstrieb.dev + +
+
+

cargo-bisect-rustc-service

+

+ webscale bisection at your fingertips +

+ + bisect-rustc.nilstrieb.dev + +
+
+
+ + diff --git a/static/root/index.html b/static/root/index.html index ad44eb3..beff84f 100644 --- a/static/root/index.html +++ b/static/root/index.html @@ -1,18 +1,118 @@ - - - + + + nilstrieb.dev - - -

hi!

-

This is my website. It is work in progress.

-

my blog

-

I have a blog, it might be interesting, maybe.

- blog -

slides

-

i have given one talk, here are its slides, isnt this amazing

- slides from talks - - \ No newline at end of file + + + + +
+
+

Nilstrieb's website

+
+

+ this is my website. you'll find lots of interesting and not very interesting stuff here, + depending on where you look. +

+

+ there may be many + secrets + depending on where you look.... +

+
+
+

socials

+

+ these two are not everything, but you may find more there, like a choose your own + adventure story: choose your own nils +

+ + +
+
+

my blog

+

i have a blog, it might be interesting, maybe.

+ + blog + +
+
+

slides

+

i have given one talk, here are its slides, isnt this amazing

+ + slides from talks + +
+
+

random projects

+

+ in addition to all the other stuff mentioned above, i also have some random projects + hosted on my server. they are pretty bad and i won't promote them this openly, but you + will be able to find them if you *really* want to. +

+
+
+
+ +
+ +
+ + + + diff --git a/static/root/static/ferrisuwu.webp b/static/root/static/ferrisuwu.webp new file mode 100644 index 0000000..06ce71e Binary files /dev/null and b/static/root/static/ferrisuwu.webp differ diff --git a/static/root/static/github.svg b/static/root/static/github.svg new file mode 100644 index 0000000..0b77f92 --- /dev/null +++ b/static/root/static/github.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/root/static/mastodon.png b/static/root/static/mastodon.png new file mode 100644 index 0000000..10466dc Binary files /dev/null and b/static/root/static/mastodon.png differ diff --git a/static/root/static/theme.css b/static/root/static/theme.css new file mode 100644 index 0000000..a39efcf --- /dev/null +++ b/static/root/static/theme.css @@ -0,0 +1,65 @@ +body { + font-family: Verdana, sans-serif; + background-color: #e6dae9; + color: #1b191c; + overflow-x: hidden; +} + +.main-content { + display: flex; + flex-direction: column; + align-items: center; +} + +@media (min-width: 700px) { + .main-content-inner { + width: 70vw; + } +} + +@media (min-width: 1200px) { + .main-content-inner { + width: 50vw; + } +} + +.call-to-action { + width: 400px; + height: 50px; + background-color: #8c499d; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + text-decoration: none; +} + +.call-to-action:hover { + background-color: #ac78b8; +} + +.call-to-action * { + color: white; +} + +@media (prefers-color-scheme: light) { + body { + background-color: #e6dae9; + color: #1b191c; + } + + .secret { + color: #5b4561; + } +} + +@media (prefers-color-scheme: dark) { + body { + background-color: #1b191c; + color: #e6dae9; + } + + .secret { + color: #a081a9; + } +} diff --git a/templates/slides.html b/templates/slides.html index c8d7624..99f9131 100644 --- a/templates/slides.html +++ b/templates/slides.html @@ -1,17 +1,25 @@ - - - + + + + Slides - - -

Slides

-

Talks I have given with slides available:

-
+ + +
+
+

slides

+

slides from talks that i have given

+ {% for talk in talks %} - {{ talk }} +
+

{{ talk.date }} - {{ talk.name }}

+

{{ talk.location }}

+ {{ talk.dirname() }} +
{% endfor %} +
- - \ No newline at end of file + +