Skip to content

Commit

Permalink
Merge pull request #84 from mudkipdev/redesign
Browse files Browse the repository at this point in the history
Redesign
  • Loading branch information
mudkipdev authored Dec 2, 2024
2 parents bbae0e8 + e8b4c31 commit 2d72e0d
Show file tree
Hide file tree
Showing 32 changed files with 206 additions and 261 deletions.
1 change: 0 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineConfig({
markdown: {
shikiConfig: {
theme: "catppuccin-macchiato"
// TODO: light theme
}
}
})
Binary file removed public/buttons/512kb-club.gif
Binary file not shown.
Binary file removed public/buttons/aman.webp
Binary file not shown.
Binary file removed public/buttons/astro.png
Binary file not shown.
Binary file removed public/buttons/aubrey.png
Binary file not shown.
Binary file removed public/buttons/dam.png
Binary file not shown.
Binary file removed public/buttons/emortal.png
Binary file not shown.
Binary file removed public/buttons/firefox.png
Binary file not shown.
Binary file removed public/buttons/golden.png
Binary file not shown.
Binary file removed public/buttons/mat.png
Binary file not shown.
Binary file removed public/buttons/mudkip.png
Binary file not shown.
Binary file removed public/buttons/niko.png
Binary file not shown.
Binary file removed public/buttons/paddy.png
Binary file not shown.
Binary file removed public/buttons/red.png
Binary file not shown.
Binary file removed public/buttons/ssi.gif
Binary file not shown.
Binary file removed public/buttons/ublock.png
Binary file not shown.
Binary file removed public/buttons/vsc.gif
Binary file not shown.
Binary file added public/terminus-bold.ttf
Binary file not shown.
Binary file added public/terminus.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions src/components/Date.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { date } = Astro.props;

<style>
time {
color: var(--surface-2);
font-size: 0.85em;
margin-top: 5px; /* for blog page */
color: var(--surface-5);
}
</style>
32 changes: 14 additions & 18 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
---
const year = new Date().getFullYear();
---
<footer>
<a href="https://mudkip.dev"><img alt="mudkip" src="/buttons/mudkip.png"></a>
<a href="https://matdoes.dev/retro"><img src="/buttons/mat.png"></a>
<a href="https://zeffo.me"><img src="/buttons/aman.webp" /></a>
<a href="https://goldenstack.net"><img src="/buttons/golden.png"></a>
<a href="https://damcraft.de"><img src="/buttons/dam.png"></a>
<a href="https://nikolan.xyz"><img src="/buttons/niko.png"></a>
<a href="https://paddyk45.de"><img src="/buttons/paddy.png"></a>
<a href="https://emortaldev.github.io"><img src="/buttons/emortal.png"></a>
<a href="https://aubrey.rs"><img src="/buttons/aubrey.png"></a>
<a href="https://redcatho.de"><img src="/buttons/red.png"></a>
<a href="https://mozilla.org/firefox"><img src="/buttons/firefox.png"></a>
<a href="https://code.visualstudio.com"><img src="/buttons/vsc.gif"></a>
<a href="https://ublockorigin.com"><img src="/buttons/ublock.png"></a>
<a href="https://512kb.club"><img src="/buttons/512kb-club.gif"></a>
<span id="footer">
copyright (c) mudkip {year}. all rights reserved.
<br>
website inspired by <a href="https://zptr.cc">zptr</a>
</span>
</footer>

<style>
footer a {
width: 88px;
height: 31px;
image-rendering: pixelated;
span#footer {
color: var(--surface-5);
user-select: none;
}

span#footer a {
--color: var(--surface-5);
font-size: inherit;
}
</style>
42 changes: 28 additions & 14 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
---
---
<nav>
<a href="/">home</a>
<a href="/about">about</a>
<a href="/projects">projects</a>
<a href="/blog">blog</a>
<a href="/">/home</a>
<span class="divider">|</span>
<a href="/about">/about</a>
<span class="divider">|</span>
<a href="/projects">/projects</a>
<span class="divider">|</span>
<a href="/blog">/blog</a>
</nav>

<style>
a:nth-child(1) {
color: #ED8796;
nav {
display: flex;
flex-direction: row;
user-select: none;
gap: 1em;
}

a:nth-child(2) {
color: #F5A97F;
nav span.divider {
color: var(--surface-5);
}

a:nth-child(3) {
color: #EED49E;
nav a:nth-of-type(1) {
--color: var(--ctp-macchiato-red);
}

a:nth-child(4) {
color: #A6DA95;
nav a:nth-of-type(2) {
--color: var(--ctp-macchiato-peach);
}

a:nth-child(5) {
color: #8AADF4;
nav a:nth-of-type(3) {
--color: var(--ctp-macchiato-yellow);
}

nav a:nth-of-type(4) {
--color: var(--ctp-macchiato-green);
}

nav a:nth-of-type(5) {
--color: var(--ctp-macchiato-blue);
}
</style>
37 changes: 37 additions & 0 deletions src/components/Profile.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
interface Props {
path: string;
}
const { path } = Astro.props;
---
<div id="profile">
<img src="https://avatars.githubusercontent.com/u/86132148" width="80" height="80">
<div id="text">
<h1>mudkip</h1>
<p>{path}</p>
</div>
</div>

<hr>

<style>
#profile {
display: flex;
flex-direction: row;
user-select: none;
gap: 1.25em;
}

/* fix all this */
#profile #text {
margin-top: -1em;
flex-direction: column;
gap: 0;
}

#profile p {
margin-top: -0.5em;
color: var(--surface-5);
}
</style>
21 changes: 8 additions & 13 deletions src/components/cards/Card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const { title, description, url } = Astro.props;
---
<div class="card">
<slot name="before" />
<h2>{
url == null
? title
: <a href={url}>{title}</a>
}</h2>
<p id="title">
<b>
{url == null ? title : <a href={url}>{title}</a>}
</b>
</p>
<p>{description}</p>
<slot name="after" />
</div>
Expand All @@ -26,19 +26,14 @@ const { title, description, url } = Astro.props;

padding: 1em;
background-color: var(--mantle);
border-radius: 0.5em;
}

.card * {
margin: 0;
border: 2px solid var(--surface-3);
}

.card a {
color: var(--text);
--color: var(--text);
}

.card p {
font-size: 0.85em;
.card #title {
margin-bottom: 5px;
}
</style>
2 changes: 2 additions & 0 deletions src/components/chat/Chat.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion src/content/blog/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
date: 2024-05-09
title: welcome
---
i have to add this page because of a stupid code limitation, anyways welcome to my blog
this page only exists because of a code limitation
34 changes: 23 additions & 11 deletions src/layouts/Page.astro
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
---
import Header from "@components/Header.astro";
import Footer from "@components/Footer.astro";
import Profile from "@components/Profile.astro";
import "../style.css";
const { title } = Astro.props;
interface Props {
title: string;
path?: string;
}
const { title, path = "~/" + title.toLowerCase().replaceAll(" ", "-") } = Astro.props;
---
<html lang="en">
<head>
<title>{title}</title>
<title>{path}</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link
rel="alternate" type="application/rss+xml"
title="mudkip's blog" href="/rss.xml"
rel="alternate" type="application/rss+xml"
title="mudkip's blog" href="/rss.xml"
/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="theme-color" content="#C6A0F6" />
<slot name="metadata">
<meta property="og:title" content={title} />
</slot>
<meta property="og:title" content={title} />
<slot name="metadata" />
</head>
<body>
<h1>{title}</h1>
<Header />
<main>
<slot name="profile">
<Profile path={path} />
</slot>

<Header />
<hr>
<slot />
<hr>
<Footer />
</main>
<script is:inline type="text/javascript" src="/oneko.js"></script>
</body>
</html>
20 changes: 18 additions & 2 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,21 @@
import Page from "@layouts/Page.astro";
---
<Page title="about">
<p>work in progress</p>
</Page>
<p>work in progress<span id="wip">...</span></p>
</Page>

<script>
const element = document.getElementById("wip");
let iteration = 3;

setInterval(() => {
if (!element) {
return;
} else if (iteration > 5) {
iteration = 0;
}

element.textContent = ".".repeat(iteration > 3 ? 3 : iteration);
iteration++;
}, 250);
</script>
40 changes: 3 additions & 37 deletions src/pages/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { InferGetStaticPropsType, GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import { stripContent } from "@content/config";
import Page from "@layouts/Page.astro";
import Date from "@components/Date.astro";
type Props = InferGetStaticPropsType<typeof getStaticPaths>;
Expand All @@ -21,46 +20,13 @@ export const getStaticPaths = (async () => {
const { post, data } = Astro.props;
const { Content } = await post.render();
const stripped = await stripContent(post);
const path = "~/blog/" + data.title.toLowerCase().replaceAll(" ", "-") + ".txt";
---
<Page title={data.title}>
<Page title={data.title} path={path}>
<Fragment slot="metadata">
<meta property="og:site_name" content="mudkip" />
<meta property="og:title" content={data.title} />
<meta property="og:description" content={stripped} />
</Fragment>

<Date date={data.date} />
<Content />

<div id="options">
<input type="checkbox" id="hide-cat">
<label for="hide-cat">hide cat</label>
</div>
</Page>

<style>
#options {
position: absolute;
bottom: 15px;
left: 15px;
}

label[for="hide-cat"] {
position: relative;
margin-left: 3px;
top: 2px;
}
</style>

<script is:inline>
let checkbox = document.querySelector("#hide-cat");
let cat = document.querySelector("#oneko");

checkbox.addEventListener("change", (event) => {
if (event.target.checked) {
cat.style.visibility = "hidden";
} else {
cat.style.visibility = "visible";
}
});
</script>
</Page>
14 changes: 7 additions & 7 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import Page from "@layouts/Page.astro";
const bio = "I'm a software developer and security researcher, my interests include programming, video games, and music.";
---
<Page title="mudkip">
<Page title="mudkip" path="~/">
<Fragment slot="metadata">
<title>~/</title>
<meta property="og:title" content="mudkip" />
<meta property="og:description" content={bio} />
</Fragment>

<p>
{bio}<br>
<span style="color: var(--surface-2)">(I also use NixOS btw)</span>
</p>
<ul>
<p>{bio}</p>
<span style="color: var(--surface-5)">(I also use NixOS btw)</span>

<!-- <ul>
<li>Matrix: <a href="https://matrix.to/#/@mudkip:nope.chat" target="_blank">@mudkip:nope.chat</a></li>
<li>GitHub: <a href="https://github.com/mudkipdev" target="_blank">mudkipdev</a></li>
<li>Email: <a href="mailto:[email protected]">[email protected]</a></li>
</ul>
</ul> -->
</Page>
6 changes: 0 additions & 6 deletions src/pages/projects.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,5 @@ import Cards from "@components/cards/Cards.astro";
description="A Minecraft server featuring fun and unique minigames."
url="https://github.com/skylite-network"
/>

<Card
title="scnewsbot"
description="A bot for the r/starcitizen Discord server."
url="https://github.com/mudkipdev/scnewsbot"
/>
</Cards>
</Page>
Loading

0 comments on commit 2d72e0d

Please sign in to comment.