Compare commits
No commits in common. "d4396a5accca52007163e1bf61432f68c5c8bbf7" and "78dc90de5ecd06cb45f5b18ca05e589dbeb19489" have entirely different histories.
d4396a5acc
...
78dc90de5e
@ -4,15 +4,14 @@ interface Props {
|
|||||||
description: string;
|
description: string;
|
||||||
published?: Date;
|
published?: Date;
|
||||||
path: string;
|
path: string;
|
||||||
slug: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, description, published, path, slug } = Astro.props;
|
const { title, description, published, path } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={path} class="nostyle">
|
<a href={path} class="nostyle">
|
||||||
<div class="card" transition:name={`markdown-border-${slug}`}>
|
<div class="card">
|
||||||
<h3 transition:name={`markdown-title-${slug}`}>{title}</h3>
|
<h3>{title}</h3>
|
||||||
<p>{description}</p>
|
<p>{description}</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { Icon } from "astro-icon";
|
import { Icon } from "astro-icon";
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="switch" transition:persist="theme-switch">
|
<div class="switch">
|
||||||
<Icon name="mdi:language-javascript" title="Theme switching needs JS to be enabled." data-theme-ph />
|
<Icon name="mdi:language-javascript" title="Theme switching needs JS to be enabled." data-theme-ph />
|
||||||
<Icon name="mdi:white-balance-sunny" title="Switch to dark theme" data-theme-sun />
|
<Icon name="mdi:white-balance-sunny" title="Switch to dark theme" data-theme-sun />
|
||||||
<Icon name="mdi:weather-night" title="Switch to light theme" data-theme-moon />
|
<Icon name="mdi:weather-night" title="Switch to light theme" data-theme-moon />
|
||||||
@ -26,34 +26,18 @@ import { Icon } from "astro-icon";
|
|||||||
|
|
||||||
const switchThemeDark = () => {
|
const switchThemeDark = () => {
|
||||||
document.dispatchEvent(new CustomEvent('set-theme', { detail: 'dark' }));
|
document.dispatchEvent(new CustomEvent('set-theme', { detail: 'dark' }));
|
||||||
moons.forEach(m => m.classList.remove("fadeOut", "fadeOutDone"));
|
moons.forEach(m => m.classList.remove("fadeOut"));
|
||||||
moons.forEach(m => m.classList.add("fadeIn"));
|
moons.forEach(m => m.classList.add("fadeIn"));
|
||||||
setTimeout(() => moons.forEach(m => {
|
suns.forEach(s => s.classList.remove("fadeIn"));
|
||||||
m.classList.add("fadeInDone");
|
|
||||||
m.classList.remove("fadeIn");
|
|
||||||
}), 250); // After 0.2s animation is completed
|
|
||||||
suns.forEach(s => s.classList.remove("fadeIn", "fadeInDone"));
|
|
||||||
suns.forEach(s => s.classList.add("fadeOut"));
|
suns.forEach(s => s.classList.add("fadeOut"));
|
||||||
setTimeout(() => suns.forEach(s => {
|
|
||||||
s.classList.add("fadeOutDone");
|
|
||||||
s.classList.remove("fadeOut");
|
|
||||||
}), 250); // After 0.2s animation is completed
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const switchThemeLight = () => {
|
const switchThemeLight = () => {
|
||||||
document.dispatchEvent(new CustomEvent('set-theme', { detail: 'light' }));
|
document.dispatchEvent(new CustomEvent('set-theme', { detail: 'light' }));
|
||||||
moons.forEach(m => m.classList.remove("fadeIn", "fadeInDone"));
|
moons.forEach(m => m.classList.remove("fadeIn"));
|
||||||
moons.forEach(m => m.classList.add("fadeOut"));
|
moons.forEach(m => m.classList.add("fadeOut"));
|
||||||
setTimeout(() => moons.forEach(m => {
|
suns.forEach(s => s.classList.remove("fadeOut"));
|
||||||
m.classList.add("fadeOutDone");
|
|
||||||
m.classList.remove("fadeOut");
|
|
||||||
}), 250); // After 0.2s animation is completed
|
|
||||||
suns.forEach(s => s.classList.remove("fadeOut", "fadeOutDone"));
|
|
||||||
suns.forEach(s => s.classList.add("fadeIn"));
|
suns.forEach(s => s.classList.add("fadeIn"));
|
||||||
setTimeout(() => suns.forEach(s => {
|
|
||||||
s.classList.add("fadeInDone");
|
|
||||||
s.classList.remove("fadeIn");
|
|
||||||
}), 250); // After 0.2s animation is completed
|
|
||||||
}
|
}
|
||||||
|
|
||||||
moons.forEach(m => m.addEventListener("click", switchThemeLight));
|
moons.forEach(m => m.addEventListener("click", switchThemeLight));
|
||||||
@ -82,21 +66,11 @@ import { Icon } from "astro-icon";
|
|||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fadeOutDone {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translate(0, -100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fadeIn {
|
.fadeIn {
|
||||||
animation: fadeIn 0.2s ease-in-out;
|
animation: fadeIn 0.2s ease-in-out;
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fadeInDone {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.placeHolder {
|
.placeHolder {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
transform: translate(0, 0) !important;
|
transform: translate(0, 0) !important;
|
||||||
|
@ -5,7 +5,6 @@ const projectsCol = defineCollection({
|
|||||||
type: "content",
|
type: "content",
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
site_title: z.string().optional(),
|
|
||||||
description: z.string(),
|
description: z.string(),
|
||||||
descriptionShort: z.string(),
|
descriptionShort: z.string(),
|
||||||
repository: z.string().url().optional(),
|
repository: z.string().url().optional(),
|
||||||
@ -20,7 +19,6 @@ const diaryMainPages = defineCollection({
|
|||||||
type: "content",
|
type: "content",
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
site_title: z.string().optional(),
|
|
||||||
description: z.string(),
|
description: z.string(),
|
||||||
descriptionShort: z.string(),
|
descriptionShort: z.string(),
|
||||||
repository: z.string().url().optional(),
|
repository: z.string().url().optional(),
|
||||||
@ -35,7 +33,6 @@ const diarySubPages = defineCollection({
|
|||||||
type: "content",
|
type: "content",
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
site_title: z.string().optional(),
|
|
||||||
repository: z.string().url().optional(),
|
repository: z.string().url().optional(),
|
||||||
relatedWebsite: z.string().url().optional(),
|
relatedWebsite: z.string().url().optional(),
|
||||||
published: z.date().optional(),
|
published: z.date().optional(),
|
||||||
|
@ -6,4 +6,6 @@ descriptionShort: "Me learning Rust (German)."
|
|||||||
relatedWebsite: https://doc.rust-lang.org/book/
|
relatedWebsite: https://doc.rust-lang.org/book/
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Learning Rust
|
||||||
|
|
||||||
In this diary I want to document my progress through the [Rust book](https://doc.rust-lang.org/book/) and documenting some stuff for myself.
|
In this diary I want to document my progress through the [Rust book](https://doc.rust-lang.org/book/) and documenting some stuff for myself.
|
@ -8,6 +8,8 @@ published: 2022-06-13T13:07:27.205Z
|
|||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
import screenshot from "./data_infoscreen/screenshot.jpg";
|
import screenshot from "./data_infoscreen/screenshot.jpg";
|
||||||
|
|
||||||
|
# Infoscreen
|
||||||
|
|
||||||
This document is about a screen that shows information.
|
This document is about a screen that shows information.
|
||||||
Shocking, I know.
|
Shocking, I know.
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: Overleaf Sync with Git
|
title: Overleaf Git Sync
|
||||||
description: "Overleaf is a LaTeX editor for the web and honestly great to use. But there is no way to back up your project to a cloud drive or git without paying them money. Even the self-hosted community version has no such functionality. I decided that's BS and made my own script to sync a project to git."
|
description: "Overleaf is a LaTeX editor for the web and honestly great to use. But there is no way to back up your project to a cloud drive or git without paying them money. Even the self-hosted community version has no such functionality. I decided that's BS and made my own script to sync a project to git."
|
||||||
descriptionShort: "I created a script that pushes Overleaf projects to a git remote."
|
descriptionShort: "I created a script that pushes Overleaf projects to a git remote."
|
||||||
repository: "https://git.c0ntroller.de/c0ntroller/overleaf-git-sync"
|
repository: "https://git.c0ntroller.de/c0ntroller/overleaf-git-sync"
|
||||||
published: 2022-10-18T17:56:27+02:00
|
published: 2022-10-18T17:56:27+02:00
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Overleaf Sync with Git
|
||||||
|
|
||||||
## The Problem
|
## The Problem
|
||||||
|
|
||||||
When I was writing some important stuff for uni I wanted as many backups as possible.
|
When I was writing some important stuff for uni I wanted as many backups as possible.
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: Google Photo Sync
|
title: Photo Sync
|
||||||
description: "Giving random apps access to your Google Photos can be bad. To still use an album as screensaver etc. I wrote this script. It syncs all your photos to your drive while giving you maximum privacy."
|
description: "Giving random apps access to your Google Photos can be bad. To still use an album as screensaver etc. I wrote this script. It syncs all your photos to your drive while giving you maximum privacy."
|
||||||
descriptionShort: "A script that syncs a Google Photos album to your drive."
|
descriptionShort: "A script that syncs a Google Photos album to your drive."
|
||||||
repository: https://git.c0ntroller.de/c0ntroller/google-photo-album-sync
|
repository: https://git.c0ntroller.de/c0ntroller/google-photo-album-sync
|
||||||
published: 2022-08-08T12:19:20+02:00
|
published: 2022-08-08T12:19:20+02:00
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Google Photo Sync
|
||||||
|
|
||||||
Why give up privacy for a screensaver?
|
Why give up privacy for a screensaver?
|
||||||
|
|
||||||
## Storytime
|
## Storytime
|
||||||
|
@ -6,6 +6,8 @@ repository: "https://git.c0ntroller.de/c0ntroller/simple-callback-server"
|
|||||||
published: 2022-10-18T17:56:27+02:00
|
published: 2022-10-18T17:56:27+02:00
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Simple Callback Server
|
||||||
|
|
||||||
This is probably my simplest project.
|
This is probably my simplest project.
|
||||||
|
|
||||||
## What is this?
|
## What is this?
|
||||||
|
@ -6,6 +6,8 @@ repository: https://git.c0ntroller.de/c0ntroller/frontpage
|
|||||||
published: 2022-10-18T17:56:27+02:00
|
published: 2022-10-18T17:56:27+02:00
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Terminal
|
||||||
|
|
||||||
Hello and welcome to my website. This documentation is for the [cli on my website](https://c0ntroller.de/terminal) so check it out if you haven't!
|
Hello and welcome to my website. This documentation is for the [cli on my website](https://c0ntroller.de/terminal) so check it out if you haven't!
|
||||||
|
|
||||||
## Why did I do this?
|
## Why did I do this?
|
||||||
|
@ -7,6 +7,8 @@ relatedWebsite: https://tu-fast.de/
|
|||||||
published: 2022-06-23T12:53:07.207Z
|
published: 2022-06-23T12:53:07.207Z
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# TUfast
|
||||||
|
|
||||||
My work on a browser extension that is used by multiple thousand students.
|
My work on a browser extension that is used by multiple thousand students.
|
||||||
|
|
||||||
## What is TUfast?
|
## What is TUfast?
|
||||||
|
@ -5,6 +5,8 @@ sorting: 0
|
|||||||
slug: hello-world
|
slug: hello-world
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Hello world!
|
||||||
|
|
||||||
_[Link zum Buch](https://doc.rust-lang.org/book/ch01-02-hello-world.html)_
|
_[Link zum Buch](https://doc.rust-lang.org/book/ch01-02-hello-world.html)_
|
||||||
|
|
||||||
## How to `println!`
|
## How to `println!`
|
||||||
|
@ -5,6 +5,8 @@ sorting: 1
|
|||||||
slug: cargo
|
slug: cargo
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Cargo
|
||||||
|
|
||||||
_[Link zum Buch](https://doc.rust-lang.org/book/ch01-03-hello-cargo.html)_
|
_[Link zum Buch](https://doc.rust-lang.org/book/ch01-03-hello-cargo.html)_
|
||||||
|
|
||||||
## Was ist Cargo?
|
## Was ist Cargo?
|
||||||
|
@ -5,6 +5,8 @@ sorting: 2
|
|||||||
slug: higher-lower-game
|
slug: higher-lower-game
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Erstes Spiel
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html)
|
||||||
|
|
||||||
## Projekt erstellen
|
## Projekt erstellen
|
||||||
|
@ -5,6 +5,8 @@ sorting: 3
|
|||||||
slug: konzepte
|
slug: konzepte
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Konzepte
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch03-00-common-programming-concepts.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch03-00-common-programming-concepts.html)
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ sorting: 4
|
|||||||
slug: ownership
|
slug: ownership
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Ownership
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html)
|
||||||
|
|
||||||
## Was ist das?
|
## Was ist das?
|
||||||
|
@ -5,6 +5,8 @@ sorting: 5
|
|||||||
slug: structs
|
slug: structs
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Structs
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch05-00-structs.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch05-00-structs.html)
|
||||||
|
|
||||||
## Was sind Structs
|
## Was sind Structs
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: Enums & Matching
|
title: Enums & Matching
|
||||||
site_title: Enums und Pattern Matching
|
|
||||||
published: 2022-10-18T17:56:26+02:00
|
published: 2022-10-18T17:56:26+02:00
|
||||||
sorting: 6
|
sorting: 6
|
||||||
slug: enums
|
slug: enums
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Enums und Pattern Matching
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch06-00-enums.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch06-00-enums.html)
|
||||||
|
|
||||||
## Enums
|
## Enums
|
||||||
|
@ -5,6 +5,8 @@ sorting: 7
|
|||||||
slug: projektmanagement
|
slug: projektmanagement
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# How to: Projektmanagement
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html)
|
||||||
|
|
||||||
## Packages, Crates, Modules, was?
|
## Packages, Crates, Modules, was?
|
||||||
|
@ -5,6 +5,8 @@ sorting: 8
|
|||||||
slug: collections
|
slug: collections
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Standard Collections
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch08-00-common-collections.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch08-00-common-collections.html)
|
||||||
|
|
||||||
## `Vec<T>` - Vektoren
|
## `Vec<T>` - Vektoren
|
||||||
|
@ -5,6 +5,8 @@ sorting: 9
|
|||||||
slug: errors-and-panic
|
slug: errors-and-panic
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Errors und `panic!`
|
||||||
|
|
||||||
[Link zum Buch](https://doc.rust-lang.org/book/ch09-00-error-handling.html)
|
[Link zum Buch](https://doc.rust-lang.org/book/ch09-00-error-handling.html)
|
||||||
|
|
||||||
## `panic!`
|
## `panic!`
|
||||||
|
@ -1,24 +1,21 @@
|
|||||||
---
|
---
|
||||||
import { ViewTransitions } from 'astro:transitions';
|
import Navbar from "../components/LayoutComponents/Navbar.astro";
|
||||||
import Themes from "astro-themes";
|
import Themes from "astro-themes";
|
||||||
import Icon from "astro-icon";
|
import Icon from "astro-icon";
|
||||||
import Navbar from "../components/LayoutComponents/Navbar.astro";
|
|
||||||
import socials from "../data/socials.json";
|
import socials from "../data/socials.json";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
showAfterMain?: boolean;
|
showAfterMain?: boolean;
|
||||||
mainTransitionName?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, showAfterMain, mainTransitionName } = Astro.props;
|
const { title, showAfterMain } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<Themes defaultTheme="dark" />
|
<Themes defaultTheme="dark" />
|
||||||
<ViewTransitions />
|
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta
|
<meta
|
||||||
@ -118,18 +115,18 @@ const { title, showAfterMain, mainTransitionName } = Astro.props;
|
|||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<span id="top" aria-hidden="true"></span>
|
<span id="top" aria-hidden></span>
|
||||||
<header transition:persist="nav">
|
<header>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
</header>
|
</header>
|
||||||
<main transition:name={ mainTransitionName }>
|
<main>
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
{showAfterMain ? <div class="after-main">
|
{showAfterMain ? <div class="after-main">
|
||||||
<slot name="after-main" />
|
<slot name="after-main" />
|
||||||
</div> : null
|
</div> : null
|
||||||
}
|
}
|
||||||
<footer id="bottom" transition:persist="footer">
|
<footer id="bottom">
|
||||||
<span style="visibility:hidden">▲</span>
|
<span style="visibility:hidden">▲</span>
|
||||||
<span class="spacer"></span>
|
<span class="spacer"></span>
|
||||||
<span class="footerContent">
|
<span class="footerContent">
|
||||||
|
@ -4,7 +4,6 @@ import { Icon } from "astro-icon";
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
slug: string;
|
|
||||||
published?: Date;
|
published?: Date;
|
||||||
srcPath?: string;
|
srcPath?: string;
|
||||||
moreLinks?: {
|
moreLinks?: {
|
||||||
@ -13,11 +12,11 @@ interface Props {
|
|||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, srcPath, published, moreLinks, slug } = Astro.props;
|
const { title, srcPath, published, moreLinks } = Astro.props;
|
||||||
const gitUrl = `https://git.c0ntroller.de/c0ntroller/frontpage/src/branch/dev/src/content/${srcPath}`
|
const gitUrl = `https://git.c0ntroller.de/c0ntroller/frontpage/src/branch/dev/src/content/${srcPath}`
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title={title} showAfterMain={Astro.slots.has("footer-nav")} mainTransitionName={`markdown-border-${slug}`}>
|
<Layout title={title} showAfterMain={Astro.slots.has("footer-nav")}>
|
||||||
{Astro.slots.has("main-nav") ?
|
{Astro.slots.has("main-nav") ?
|
||||||
<slot name="main-nav" /> :
|
<slot name="main-nav" /> :
|
||||||
null}
|
null}
|
||||||
@ -27,7 +26,6 @@ const gitUrl = `https://git.c0ntroller.de/c0ntroller/frontpage/src/branch/dev/sr
|
|||||||
{ moreLinks.map(l => <a href={l.href} referrerpolicy="no-referrer" class="nostyle" style={{ display: "inline-block", width: "2em" }}><Icon name={l.icon} /></a>) }
|
{ moreLinks.map(l => <a href={l.href} referrerpolicy="no-referrer" class="nostyle" style={{ display: "inline-block", width: "2em" }}><Icon name={l.icon} /></a>) }
|
||||||
</div>
|
</div>
|
||||||
: null}
|
: null}
|
||||||
<h1 transition:name={`markdown-title-${slug}`}>{title}</h1>
|
|
||||||
<slot />
|
<slot />
|
||||||
{ published || srcPath ? <>
|
{ published || srcPath ? <>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -38,7 +38,7 @@ if (diaryMain.data.repository) {
|
|||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<MarkdownLayout title={diaryMain.data.site_title || diaryMain.data.title} slug={diaryMain.slug} srcPath={`diaryMainPages/${diaryMain.id}`} moreLinks={moreLinks}>
|
<MarkdownLayout title={diaryMain.data.title} srcPath={`diaryMainPages/${diaryMain.id}`} moreLinks={moreLinks}>
|
||||||
<Content />
|
<Content />
|
||||||
|
|
||||||
<h2>Pages</h2>
|
<h2>Pages</h2>
|
||||||
|
@ -27,7 +27,7 @@ const { entry } = Astro.props;
|
|||||||
const { Content } = await entry.render();
|
const { Content } = await entry.render();
|
||||||
---
|
---
|
||||||
|
|
||||||
<MarkdownLayout title={entry.data.site_title || entry.data.title} slug={entry.slug} srcPath={`${diary}/${entry.id}`} published={entry.data.published}>
|
<MarkdownLayout title={entry.data.title} srcPath={`${diary}/${entry.id}`} published={entry.data.published}>
|
||||||
<DiaryNavTop collectionName="rust" slot="main-nav" />
|
<DiaryNavTop collectionName="rust" slot="main-nav" />
|
||||||
<Content />
|
<Content />
|
||||||
<DiaryNavBar collectionName="rust" slot="footer-nav" />
|
<DiaryNavBar collectionName="rust" slot="footer-nav" />
|
||||||
|
@ -35,6 +35,6 @@ if (entry.data.repository) {
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<MarkdownLayout title={entry.data.site_title || entry.data.title} slug={entry.slug} srcPath={`projects/${entry.id}`} published={entry.data.published} moreLinks={moreLinks}>
|
<MarkdownLayout title={entry.data.title} srcPath={`projects/${entry.id}`} published={entry.data.published} moreLinks={moreLinks}>
|
||||||
<Content />
|
<Content />
|
||||||
</MarkdownLayout>
|
</MarkdownLayout>
|
||||||
|
@ -22,11 +22,11 @@ const diaries = (await getCollection("diaryMainPages")).sort((a, b) => a.data.la
|
|||||||
</p>
|
</p>
|
||||||
<h2>Projects</h2>
|
<h2>Projects</h2>
|
||||||
<div class="contentList">
|
<div class="contentList">
|
||||||
{ projects.map(p => <ContentCard title={p.data.title} description={p.data.description} path={`/blog/${p.slug}`} slug={p.slug} />) }
|
{ projects.map(p => <ContentCard title={p.data.title} description={p.data.description} path={`/blog/${p.slug}`} />) }
|
||||||
</div>
|
</div>
|
||||||
<h2>Diaries</h2>
|
<h2>Diaries</h2>
|
||||||
<div class="contentList">
|
<div class="contentList">
|
||||||
{ diaries.map(p => <ContentCard title={p.data.title} description={p.data.description} path={`/blog/${p.slug}`} slug={p.slug} />) }
|
{ diaries.map(p => <ContentCard title={p.data.title} description={p.data.description} path={`/blog/${p.slug}`} />) }
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
|
@ -20,14 +20,14 @@ const wasmVersion = wasmData.version;
|
|||||||
@@@@@ @@@@@@@@@@
|
@@@@@ @@@@@@@@@@
|
||||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@@
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@@
|
||||||
@@@@@@@@@@@@@@@W#MW@@@@@@@@@@@@@@@ @@@@@@@@@
|
@@@@@@@@@@@@@@@W#MW@@@@@@@@@@@@@@@ @@@@@@@@@
|
||||||
@@@@@######## pkaMB@@@@@@@@mb@@@@@ @@@@@@@
|
@@@@@########*****pkaMB@@@@@@@@mb@@@@@ @@@@@@@
|
||||||
@@@@@ pwdhoh@@@@@$OOOOOw ##@@@@ @ @@@@
|
@@@@@*************pwdhoh@@@@@$OOOOOw*##@@@@ @ @@@@
|
||||||
@@@@@ dOOOOOOOOOO0OOOOOO #@@ @ @@@
|
@@@@@************dOOOOOOOOOO0OOOOOO*******#@@ @ @@@
|
||||||
@@@@ pOOOOOOOOOOOOOOZ# #@@ @
|
@@@@************pOOOOOOOOOOOOOOZ#**********#@@ @
|
||||||
@@@@ oOOOOOOOOOOOOa #@
|
@@@@************oOOOOOOOOOOOOa***************#@
|
||||||
@@@@@ odwwpdda
|
@@@@@***********odwwpdda**********************
|
||||||
@@@@@
|
@@@@@**********************************
|
||||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</pre>
|
@@@@@@@@@$#*###MMB@@@@@@@@@@@@</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="input"><pre class="user">user@cer0</pre><pre>:</pre><pre class="pwd">/</pre><pre class="dollar">$ </pre><input type="text" data-terminal-input autofocus /></div>
|
<div class="input"><pre class="user">user@cer0</pre><pre>:</pre><pre class="pwd">/</pre><pre class="dollar">$ </pre><input type="text" data-terminal-input autofocus /></div>
|
||||||
</div>
|
</div>
|
||||||
@ -41,7 +41,7 @@ const wasmVersion = wasmData.version;
|
|||||||
(async () => {
|
(async () => {
|
||||||
const wasm = import("@c0ntroller/wasm-terminal");
|
const wasm = import("@c0ntroller/wasm-terminal");
|
||||||
|
|
||||||
const outputs = document.querySelectorAll("[data-terminal-output]") as NodeListOf<HTMLDivElement>;
|
const outputs = document.querySelectorAll("[data-terminal-output]") as NodeListOf<HTMLPreElement>;
|
||||||
const inputs = document.querySelectorAll("[data-terminal-input]") as NodeListOf<HTMLInputElement>;
|
const inputs = document.querySelectorAll("[data-terminal-input]") as NodeListOf<HTMLInputElement>;
|
||||||
const screens = document.querySelectorAll("[data-terminal-screen]") as NodeListOf<HTMLDivElement>;
|
const screens = document.querySelectorAll("[data-terminal-screen]") as NodeListOf<HTMLDivElement>;
|
||||||
const template = document.querySelector("[data-terminal-user-cmd]") as HTMLTemplateElement;
|
const template = document.querySelector("[data-terminal-user-cmd]") as HTMLTemplateElement;
|
||||||
@ -72,7 +72,6 @@ const wasmVersion = wasmData.version;
|
|||||||
output.prepend(inputLine);
|
output.prepend(inputLine);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (cmd) {
|
|
||||||
const resp = c.execute(cmd);
|
const resp = c.execute(cmd);
|
||||||
|
|
||||||
if (resp) {
|
if (resp) {
|
||||||
@ -82,17 +81,12 @@ const wasmVersion = wasmData.version;
|
|||||||
output.prepend(outputLine);
|
output.prepend(outputLine);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
input.value = "";
|
input.value = "";
|
||||||
updatePwd();
|
updatePwd();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
screens.forEach((screen) => {
|
|
||||||
new MutationObserver(() => screen.scrollTo(0, screen.scrollHeight)).observe(screen, { childList: true, subtree: true });
|
|
||||||
});
|
|
||||||
})()
|
})()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -112,7 +106,7 @@ const wasmVersion = wasmData.version;
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow-y: auto;
|
overflow-y: scroll;
|
||||||
|
|
||||||
pre > pre {
|
pre > pre {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -154,7 +148,6 @@ const wasmVersion = wasmData.version;
|
|||||||
input {
|
input {
|
||||||
font-family: "Cascadia Code", monospace;
|
font-family: "Cascadia Code", monospace;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user