Compare commits

...

9 Commits

Author SHA1 Message Date
bd7588b819 Change directory for deployment
All checks were successful
Deploy Astro / Build and Deploy (push) Successful in 1m41s
Signed-off-by: Daniel Kluge <c0ntroller@noreply.git.c0ntroller.de>
2025-01-05 18:56:47 +01:00
138ad075ea footer-nav ohne transition (fehleranfällig)
All checks were successful
Deploy Astro / Build and Deploy (push) Successful in 27m28s
2024-03-03 16:26:46 +01:00
c2d70f0988 Astro audit
Some checks failed
Deploy Astro / Build and Deploy (push) Has been cancelled
2024-03-03 16:06:35 +01:00
e339b21f66 Uniform icon size class 2024-03-03 15:58:24 +01:00
c40af33d1d Upgrade astro 2024-03-03 15:49:13 +01:00
dafbda9509 Upgrade astro-icons
All checks were successful
Deploy Astro / Build and Deploy (push) Successful in 24m55s
2024-03-03 15:18:06 +01:00
8a670bd0bb Add icons json
Some checks failed
Deploy Astro / Build and Deploy (push) Failing after 23m8s
2024-03-03 12:13:17 +01:00
bd9c74d6f3 More styling
Some checks failed
Deploy Astro / Build and Deploy (push) Failing after 24m25s
2024-03-02 21:04:14 +01:00
5d5af62baf npm audit fix
Some checks failed
Deploy Astro / Build and Deploy (push) Failing after 24m25s
2024-03-02 18:20:44 +01:00
15 changed files with 3582 additions and 8306 deletions

View File

@ -26,6 +26,6 @@ jobs:
username: ${{ secrets.SSH_USERNAME }} username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }} key: ${{ secrets.SSH_KEY }}
source: "dist/*" source: "dist/*"
target: /var/www/website/dev target: /srv/website/dev
overwrite: true overwrite: true
strip_components: 1 strip_components: 1

View File

@ -1,24 +1,23 @@
import { defineConfig } from "astro/config"; import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx"; import mdx from "@astrojs/mdx";
import a11yEmoji from "@fec/remark-a11y-emoji"; import a11yEmoji from "@fec/remark-a11y-emoji";
import wasmPack from 'vite-plugin-wasm-pack'; import wasmPack from 'vite-plugin-wasm-pack';
import icon from "astro-icon";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
integrations: [mdx()], prefetch: {
prefetchAll: true
},
integrations: [mdx(), icon()],
markdown: { markdown: {
remarkPlugins: [ remarkPlugins: [a11yEmoji],
a11yEmoji
],
shikiConfig: { shikiConfig: {
theme: "one-dark-pro" theme: "one-dark-pro"
} }
}, },
// Copy wasm-terminal to the build directory // Copy wasm-terminal to the build directory
vite: { vite: {
plugins: [ plugins: [wasmPack([], ['@c0ntroller/wasm-terminal'])]
wasmPack([],['@c0ntroller/wasm-terminal'])
]
} }
}); });

11738
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,16 +10,18 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.3.1", "@astrojs/check": "^0.5.6",
"@astrojs/mdx": "^1.1.5", "@astrojs/mdx": "^2.1.1",
"@c0ntroller/wasm-terminal": ">=0.1.0", "@c0ntroller/wasm-terminal": ">=0.1.0",
"astro": "^3.6.0", "astro": "^4.4.9",
"astro-icon": "^0.8.1", "astro-icon": "^1.1.0",
"sass": "^1.69.5", "sass": "^1.69.5",
"typescript": "^5.3.2" "typescript": "^5.3.2"
}, },
"devDependencies": { "devDependencies": {
"@fec/remark-a11y-emoji": "^4.0.2", "@fec/remark-a11y-emoji": "^4.0.2",
"@iconify-json/mdi": "^1.1.64",
"@iconify-json/simple-icons": "^1.1.93",
"astro-themes": "^0.2.4", "astro-themes": "^0.2.4",
"remark-code-extra": "^1.0.1", "remark-code-extra": "^1.0.1",
"vite-plugin-wasm-pack": "0.1.11" "vite-plugin-wasm-pack": "0.1.11"

View File

@ -7,7 +7,7 @@ interface Props {
slug: string; slug: string;
} }
const { title, description, published, path, slug } = Astro.props; const { title, description, /*published, */path, slug } = Astro.props;
--- ---
<a href={path} class="nostyle"> <a href={path} class="nostyle">

View File

@ -1,6 +1,5 @@
--- ---
import { getCollection, getEntry } from "astro:content"; import { getCollection, getEntry, type CollectionEntry } from "astro:content";
import type { CollectionEntry } from "astro:content";
interface Props { interface Props {
collectionName: CollectionEntry<"diaryMainPages">["slug"]; collectionName: CollectionEntry<"diaryMainPages">["slug"];

View File

@ -1,6 +1,5 @@
--- ---
import { getCollection, getEntry } from "astro:content"; import { getCollection, getEntry, type CollectionEntry } from "astro:content";
import type { CollectionEntry } from "astro:content";
interface Props { interface Props {
collectionName: CollectionEntry<"diaryMainPages">["slug"]; collectionName: CollectionEntry<"diaryMainPages">["slug"];
@ -104,6 +103,7 @@ select {
border-radius: 1em; border-radius: 1em;
border: 1px solid var(--blog_content-border); border: 1px solid var(--blog_content-border);
background: var(--blog_background-main); background: var(--blog_background-main);
color: var(--blog_color);
} }

View File

@ -1,13 +1,13 @@
--- ---
import { Image } from "astro:assets"; import { Image } from "astro:assets";
import { Icon } from "astro-icon"; import { Icon } from "astro-icon/components";
import ThemeSwitch from "./ThemeSwitch.astro"; import ThemeSwitch from "./ThemeSwitch.astro";
import logo from "./logo.png"; import logo from "./logo.png";
--- ---
<nav class="navigation"> <nav class="navigation">
<a href="/" class="nostyle imgContainer"> <a href="/" class="nostyle imgContainer">
<Image src={logo} alt="Logo" class="logoImg" /> <Image src={logo} alt="Logo" class="logoImg" loading="eager" />
</a> </a>
<div class="navLink"> <div class="navLink">
<a href="/" class="nostyle"> <a href="/" class="nostyle">
@ -15,9 +15,9 @@ import logo from "./logo.png";
<span class="linkIcon" <span class="linkIcon"
><Icon ><Icon
name="mdi:home" name="mdi:home"
size="2em"
title="Home and Projects" title="Home and Projects"
id="mdi_nav_home" id="mdi_nav_home"
class="icon-2em"
/></span /></span
> >
</a> </a>
@ -28,7 +28,7 @@ import logo from "./logo.png";
<span class="linkIcon" <span class="linkIcon"
><Icon ><Icon
name="mdi:account" name="mdi:account"
size="2em" class="icon-2em"
title="About Me" title="About Me"
id="mdi_nav_aboutme" id="mdi_nav_aboutme"
/></span /></span
@ -40,7 +40,7 @@ import logo from "./logo.png";
<a href="/terminal" class="nostyle"> <a href="/terminal" class="nostyle">
<Icon <Icon
name="mdi:console" name="mdi:console"
size="2em" class="icon-2em"
title="Terminal" title="Terminal"
id="mdi_nav_terminal" id="mdi_nav_terminal"
/> />

View File

@ -1,11 +1,11 @@
--- ---
import { Icon } from "astro-icon"; import { Icon } from "astro-icon/components";
--- ---
<div class="switch" transition:persist="theme-switch"> <div class="switch" transition:persist="theme-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 class="icon-15em" />
<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 class="icon-15em" />
<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 class="icon-15em" />
</div> </div>
<script> <script>

View File

@ -1,5 +1,5 @@
--- ---
import { Icon } from "astro-icon"; import { Icon } from "astro-icon/components";
import Skills from "../data/skills.json"; import Skills from "../data/skills.json";
type Skill = (typeof Skills.cards)[number]; type Skill = (typeof Skills.cards)[number];
@ -40,7 +40,7 @@ const cardStyle = {
.map((skill) => ( .map((skill) => (
<div class="skillBar"> <div class="skillBar">
<div class="barName"> <div class="barName">
<Icon name={skill.icon} /> <Icon name={skill.icon} class="icon-2em" />
</div> </div>
<div <div
class="percentBar" class="percentBar"
@ -61,7 +61,7 @@ const cardStyle = {
<> <>
<div class="badge"> <div class="badge">
<span> <span>
<Icon name={additional.icon} /> <Icon name={additional.icon} class="icon-1em" />
</span> </span>
<span>{additional.name}</span> <span>{additional.name}</span>
</div> </div>
@ -202,7 +202,6 @@ const cardStyle = {
} }
& > div:first-of-type { & > div:first-of-type {
height: 2em;
grid-row: 1/3; grid-row: 1/3;
} }

View File

@ -1,7 +1,7 @@
--- ---
import { ViewTransitions } from 'astro:transitions'; import { ViewTransitions } from 'astro:transitions';
import Themes from "astro-themes"; import Themes from "astro-themes";
import Icon from "astro-icon"; import { Icon } from "astro-icon/components";
import Navbar from "../components/LayoutComponents/Navbar.astro"; import Navbar from "../components/LayoutComponents/Navbar.astro";
import socials from "../data/socials.json"; import socials from "../data/socials.json";
@ -122,7 +122,7 @@ const { title, showAfterMain, mainTransitionName } = Astro.props;
<header transition:persist="nav"> <header transition:persist="nav">
<Navbar /> <Navbar />
</header> </header>
<main transition:name={ mainTransitionName }> <main transition:name={ mainTransitionName || "main" }>
<slot /> <slot />
</main> </main>
{showAfterMain ? <div class="after-main"> {showAfterMain ? <div class="after-main">
@ -137,8 +137,8 @@ const { title, showAfterMain, mainTransitionName } = Astro.props;
<span class="divider">|</span> <span class="divider">|</span>
{socials.flatMap((social, i) => ( {socials.flatMap((social, i) => (
i !== 0 ? i !== 0 ?
[<span class="divider">|</span>, <a href={social.url} target="_blank" rel="noreferrer" class="socialIcon"><Icon name={social.icon} title={social.name} /></a>] : [<span class="divider">|</span>, <a href={social.url} target="_blank" rel="noreferrer" class="socialIcon"><Icon name={social.icon} title={social.name} class="socialIcon" /></a>] :
[<a href={social.url} target="_blank" rel="noreferrer" class="socialIcon"><Icon name={social.icon} title={social.name} /></a>] [<a href={social.url} target="_blank" rel="noreferrer" class="socialIcon"><Icon name={social.icon} title={social.name} class="socialIcon" /></a>]
))} ))}
<span class="divider">|</span> <span class="divider">|</span>
<a class="nocolor" target="_blank" href="mailto:admin-website@c0ntroller.de" rel="noreferrer">Contact</a> <a class="nocolor" target="_blank" href="mailto:admin-website@c0ntroller.de" rel="noreferrer">Contact</a>
@ -304,4 +304,20 @@ const { title, showAfterMain, mainTransitionName } = Astro.props;
h6 { h6 {
color: var(--blog_color-accent-dark); color: var(--blog_color-accent-dark);
} }
.icon-1em {
height: 1em;
width: 1em;
}
.icon-15em {
height: 1.5em;
width: 1.5em;
}
.icon-2em {
height: 2em;
width: 2em;
}
</style> </style>

View File

@ -1,6 +1,6 @@
--- ---
import Layout from "./Layout.astro"; import Layout from "./Layout.astro";
import { Icon } from "astro-icon"; import { Icon } from "astro-icon/components";
interface Props { interface Props {
title: string; title: string;
@ -24,7 +24,7 @@ const gitUrl = `https://git.c0ntroller.de/c0ntroller/frontpage/src/branch/dev/sr
{ moreLinks && moreLinks.length !== 0 ? { moreLinks && moreLinks.length !== 0 ?
<div class="more"> <div class="more">
{ 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"><Icon name={l.icon} class="icon-2em" /></a>) }
</div> </div>
: null} : null}
<h1 transition:name={`markdown-title-${slug}`}>{title}</h1> <h1 transition:name={`markdown-title-${slug}`}>{title}</h1>

View File

@ -29,7 +29,7 @@ if (entry.data.relatedWebsite) {
if (entry.data.repository) { if (entry.data.repository) {
moreLinks.push({ moreLinks.push({
href: entry.data.repository, href: entry.data.repository,
icon: "bi:git", icon: "simple-icons:git",
}); });
} }

View File

@ -1,6 +1,6 @@
--- ---
import { Image } from "astro:assets"; import { Image } from "astro:assets";
import { Icon } from "astro-icon"; import { Icon } from "astro-icon/components";
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
import SkillCard from "../components/SkillCard.astro"; import SkillCard from "../components/SkillCard.astro";
@ -15,7 +15,7 @@ const age = new Date().getFullYear() - 1998 - (new Date().getMonth() <= 10 ? 1 :
<Layout title="About me"> <Layout title="About me">
<h1>This is me.</h1> <h1>This is me.</h1>
<div class="photo"> <div class="photo">
<Image src={pic} alt="Me" /> <Image src={pic} alt="Me" loading="eager" />
</div> </div>
<div class="personal"> <div class="personal">
<p class="preText"> <p class="preText">
@ -67,16 +67,16 @@ const age = new Date().getFullYear() - 1998 - (new Date().getMonth() <= 10 ? 1 :
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
class="nocolor" class="nocolor"
style={{ width: "2em" }} aria-label={`Link to my ${social.name} profile`}
> >
<Icon name={social.icon} /> <Icon name={social.icon} class="icon-2em" />
</a> </a>
)) ))
} }
</div> </div>
<h2>Achievements</h2> <h2>Achievements</h2>
{achievements.map((achievement) => <div class="achievement"> {achievements.map((achievement) => <div class="achievement">
<Icon name={achievement.icon} /><span>{achievement.description}</span> <Icon name={achievement.icon} class="icon-2em" /><span>{achievement.description}</span>
</div>)} </div>)}
<h2>Skills</h2> <h2>Skills</h2>
{skills.cards.map((card) => <SkillCard card={card} />)} {skills.cards.map((card) => <SkillCard card={card} />)}

View File

@ -7,7 +7,7 @@ const screenVersion = `${date.getFullYear()}${date.getMonth()+1}${date.getDate()
const wasmVersion = wasmData.version; const wasmVersion = wasmData.version;
--- ---
<Layout title="Terminal"> <Layout title="Terminal" showAfterMain>
<div class="screen" data-terminal-screen> <div class="screen" data-terminal-screen>
<div data-terminal-output> <div data-terminal-output>
<noscript><pre>You need to enable JavaScript to use this terminal.</pre></noscript> <noscript><pre>You need to enable JavaScript to use this terminal.</pre></noscript>
@ -29,12 +29,16 @@ const wasmVersion = wasmData.version;
@@@@@ @@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</pre> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</pre>
</div> </div>
<div class="input"><pre class="user">user@cer0</pre><pre>:</pre><pre class="pwd">/</pre><pre class="dollar">$&nbsp;</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">$&nbsp;</pre><input type="text" data-terminal-input /></div>
</div> </div>
<template data-terminal-user-cmd> <template data-terminal-user-cmd>
<pre><pre class="user">user@cer0</pre><pre>:</pre><pre class="pwd"></pre><pre class="dollar">$&nbsp;</pre><pre class="user-cmd"></pre></pre> <pre><pre class="user">user@cer0</pre><pre>:</pre><pre class="pwd"></pre><pre class="dollar">$&nbsp;</pre><pre class="user-cmd"></pre></pre>
</template> </template>
<div slot="after-main" class="more">
Read more about the development of this terminal&nbsp;<a href="/blog/wasm-terminal" class="nocolor">here</a>.
</div>
</Layout> </Layout>
<script> <script>
@ -46,7 +50,20 @@ const wasmVersion = wasmData.version;
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;
screens.forEach((s) => s.addEventListener("click", () => inputs[0]?.focus())) screens.forEach((s) => s.addEventListener("click", () => inputs[0]?.focus()));
screens.forEach((screen) => {
new MutationObserver((changes) => {
const totalNewHeight = changes.reduce((prev, change) => {
change.addedNodes.forEach(n => prev += (n as HTMLPreElement).clientHeight || 0);
return prev;
}, 0);
if (screen.scrollTop + screen.clientHeight >= screen.scrollHeight - totalNewHeight - 40) {
screen.scrollTo(0, screen.scrollHeight);
}
}).observe(screen, { childList: true, subtree: true });
});
const { default: init, Console } = await wasm; const { default: init, Console } = await wasm;
@ -69,9 +86,11 @@ const wasmVersion = wasmData.version;
inputLine.querySelector(".user-cmd")!.textContent = cmd; inputLine.querySelector(".user-cmd")!.textContent = cmd;
inputLine.querySelector(".pwd")!.textContent = prevPwd; inputLine.querySelector(".pwd")!.textContent = prevPwd;
outputs.forEach((output) => { outputs.forEach((output) => {
output.prepend(inputLine); output.append(inputLine);
}); });
input.value = "";
if (cmd) { if (cmd) {
const resp = c.execute(cmd); const resp = c.execute(cmd);
@ -79,20 +98,15 @@ const wasmVersion = wasmData.version;
const outputLine = document.createElement("pre"); const outputLine = document.createElement("pre");
outputLine.textContent = resp outputLine.textContent = resp
outputs.forEach((output) => { outputs.forEach((output) => {
output.prepend(outputLine); output.append(outputLine);
}); });
} }
} }
input.value = "";
updatePwd(); updatePwd();
} }
}); });
}); });
screens.forEach((screen) => {
new MutationObserver(() => screen.scrollTo(0, screen.scrollHeight)).observe(screen, { childList: true, subtree: true });
});
})() })()
</script> </script>
@ -127,7 +141,7 @@ const wasmVersion = wasmData.version;
[data-terminal-output] { [data-terminal-output] {
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column;
} }
} }
@ -164,6 +178,7 @@ const wasmVersion = wasmData.version;
appearance: none !important; appearance: none !important;
outline: none; outline: none;
caret-shape: block; caret-shape: block;
color: #fff;
&::-moz-focus-outer, &::-moz-focus-inner, &:focus, &:focus *, &:-moz-focusring, &:-moz-focusring * { &::-moz-focus-outer, &::-moz-focus-inner, &:focus, &:focus *, &:-moz-focusring, &:-moz-focusring * {
border: none !important; border: none !important;
@ -173,4 +188,12 @@ const wasmVersion = wasmData.version;
} }
} }
.more {
display: flex;
justify-content: center;
align-items: center;
font-style: italic;
padding: 5px;
}
</style> </style>