Initial commit

This commit is contained in:
davidontop 2024-03-16 18:58:25 +01:00
commit b5a0686832
Signed by: DavidOnTop
GPG key ID: 5D05538A45D5149F
27 changed files with 4560 additions and 0 deletions

13
.editorconfig Normal file
View file

@ -0,0 +1,13 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
[*.{yml,yaml}]
indent_style = space
indent_size = 2

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
dist/
.astro/
node_modules/
pnpm-debug.log*
.env
.env.production

9
astro.config.mjs Normal file
View file

@ -0,0 +1,9 @@
import { defineConfig } from 'astro/config';
import tailwind from "@astrojs/tailwind";
import mdx from "@astrojs/mdx";
// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), mdx()],
output: "static"
});

23
package.json Normal file
View file

@ -0,0 +1,23 @@
{
"name": "davidontop",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.2.0",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.5.5",
"tailwindcss": "^3.4.1"
},
"devDependencies": {
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.7",
"daisyui": "^4.7.3"
}
}

4304
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

1
public/_redirects Normal file
View file

@ -0,0 +1 @@
/l/* https://l.davidon.top/:splat

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
public/img/logo-notext.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

View file

@ -0,0 +1,9 @@
---
const {class: classname} = Astro.props;
let classmod = "font-bold text-4xl text-center "
if (classname) {
classmod = classmod.concat(classname)
}
---
<h1 class={classmod}><slot /></h1>

21
src/components/Nav.astro Normal file
View file

@ -0,0 +1,21 @@
---
---
<div class="z-[5] flex justify-around items-center bg-bckgl fixed top-0 h-12 w-full">
<div>
<img src="/img/logo-transparent.png" alt="DavidOnTop" class="max-h-10">
</div>
<div>
<a href="/" class="hover:text-accent btn btn-ghost !min-h-8 h-1 px-3">Home</a>
<a href="/about" class="hover:text-accent btn btn-ghost !min-h-8 h-1 px-3">About</a>
<a href="/projects" class="hover:text-accent btn btn-ghost !min-h-8 h-1 px-3">Projects</a>
</div>
<div class="dropdown dropdown-hover dropdown-end">
<div role="button" tabindex="-1" class="text-white btn btn-ghost !min-h-8 h-1 px-3">Contact Me</div>
<div tabindex="-1" class="menu dropdown-content z-10 pl-10 pb-7">
<ul tabindex="-1" class="shadow rounded-box bg-bckgl mt-1 p-1">
<li><a href="mailto:me@davidon.top">Mail</a></li>
</ul>
</div>
</div>
</div>

11
src/components/Text.astro Normal file
View file

@ -0,0 +1,11 @@
---
const {class: classname} = Astro.props;
let classmod = "max-w-[800px] mx-auto text-justify p-5 "
if (classname) {
classmod = classmod.concat(classname)
}
---
<div class={classmod}>
<slot />
</div>

1
src/env.d.ts vendored Normal file
View file

@ -0,0 +1 @@
/// <reference types="astro/client" />

31
src/layouts/Layout.astro Normal file
View file

@ -0,0 +1,31 @@
---
import Nav from "../components/Nav.astro";
import { ViewTransitions } from "astro:transitions";
---
<!doctype html>
<html lang="en" class="text-white bg-bckg">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/png" href="/img/logo-notext-transparent.png" />
<ViewTransitions />
<title>DavidOnTop</title>
</head>
<body class="text-white bg-bckg">
<nav transition:persist></nav>
<Nav></Nav>
</nav>
<main class="mt-12"><slot /></main>
</body>
</html>
<style is:global>
@font-face {
font-family: "MonaspiceNe NF";
src: url("/fonts/MonaspiceNeNerdFont-Regular.otf") format("truetype");
}
html body {
font-family: "MonaspiceNe NF";
}
</style>

10
src/pages/404.astro Normal file
View file

@ -0,0 +1,10 @@
---
import Layout from "../layouts/Layout.astro";
---
<Layout>
<div class="fixed inset-x-0 inset-y-0 mx-auto my-auto flex flex-wrap flex-col justify-center items-center">
<h1 class="text-6xl font-bold text-center">404 Not Found</h1>
<p class="text-xl text-center">Whatever you're looking for isn't here or isn't done yet.<br/> Unless you were looking for this message.</p>
</div>
</Layout>

40
src/pages/about.astro Normal file
View file

@ -0,0 +1,40 @@
---
import Layout from "../layouts/Layout.astro";
import Text from "../components/Text.astro";
import Heading from "../components/Heading.astro";
---
<Layout>
<Text class="pt-12">
<Heading>About me</Heading>
My name is David.
I live in Middle Europe.
I am 18 years old.
I like programming, gaming, maths, and the number  (I know 32 decimal digits of .).
I am a working student at <a class="text-accent underline" href="https://softwareag.com">Software<sup>AG</sup></a>.
I have been using Linux since around 2017/2018.
I have been a hobby developer since around 2018/2019.
<br /><br />
Programing languages i know relativly well:
<ul class="pl-10">
<li class="tooltip tooltip-left" data-tip="The only functional language with a big enaugh ecosystem for me."> F# (Currently using the most)</li><br />
<li class="tooltip tooltip-left" data-tip="Complexity, foundation drama, realization that i don't need the performance and mainly compile times made me go to f#."> Rust</li><br />
<li class="tooltip tooltip-left" data-tip="Please no."> TypeScript/JavaScript</li><br />
<li class="tooltip tooltip-left" data-tip="Minecraft modding."> Java</li><br />
</ul><br />
Programing languages i have used in the past or ones that i know a bit:
<ul class="pl-10">
<li class="tooltip tooltip-left" data-tip="Linux shell."> Zsh/Bash</li><br />
<li class="tooltip tooltip-left" data-tip="Too complex. What the fuck is a virtual constructor."> C++</li><br />
<li class="tooltip tooltip-left" data-tip="Better java."> Kotlin</li><br />
<li class="tooltip tooltip-left" data-tip="Java with better ecosystem and tooling. (Aspecialy if your on windows which im not.)"> C#</li><br />
<li class="tooltip tooltip-left" data-tip="I don't need a language thats just for servers. Almost every language has ok server libraries."> Go</li><br />
<li class="tooltip tooltip-left" data-tip="Neovim config."> Lua</li><br />
<li class="tooltip tooltip-left" data-tip="The best language there is imo. Just shitty ecosystem and tooling."> Nim</li><br />
<li class="tooltip tooltip-left" data-tip="C replacement. I just wish it could interop with c++ as seamlesly as with c."> Zig</li><br />
<li class="tooltip tooltip-left" data-tip="The first programing language i learned."> Python</li><br />
</ul><br />
You can hover over some language to see my opinion of it/why i use it.
</Text>
</Layout>

37
src/pages/index.astro Normal file
View file

@ -0,0 +1,37 @@
---
import Layout from "../layouts/Layout.astro";
---
<Layout>
<div class="fixed inset-x-0 inset-y-0 mx-auto my-auto flex justify-center items-center">
<div>
<p class="text-2xl font-bold">Hello there, I'm David.</p>
<div class="flex justify-around items-center text-4xl pr-3">
<a href="mailto:me@davidon.top" class="p-3 tooltip tooltip-bottom" data-tip="me@davidon.top"> </a>
<a href="https://l.davidon.top/pubkey" class="p-3 tooltip tooltip-bottom" data-tip="GPG pubkey">󰌾 </a>
<a id="discord-btn" class="p-3 tooltip tooltip-bottom" data-tip="davidon_top">󰙯 </a>
<a href="https://srht.davidon.top" class="p-3 tooltip tooltip-bottom" data-tip="Sourcehut instance"> </a>
<a href="https://github.com/davidon-top" class="p-3 tooltip tooltip-bottom" data-tip="Github"> </a>
</div>
</div>
</div>
<dialog id="discord-modal" class="modal">
<div class="modal-box">
<form method="dialog">
<button class="btn btn-circle btn-ghost absolute right-2 top-2">✕</button>
</form>
<input readonly id="discord-inp" type="text" value="davidon_top" class="input">
</div>
</dialog>
</Layout>
<script>
document.getElementById("discord-btn").onclick = function () {
document.getElementById("discord-modal").showModal();
let inp = document.getElementById("discord-inp")!;
inp.focus();
inp.select();
document.execCommand("copy");
}
</script>

44
tailwind.config.mjs Normal file
View file

@ -0,0 +1,44 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {
colors: {
primary: "#22d3ee",
secondary: "#0891b2",
accent: "#16a34a",
neutral: "#0a0a0a",
info: "#3abff8",
success: "#36d399",
warning: "#fbbd23",
error: "#f87272",
bckgd: "#050505",
bckg: "#0a0a0a",
bckgl: "#242424",
bckg2l: "#3d3d3d",
}
},
},
daisyui: {
themes: [
{
theme: {
primary: "#22d3ee",
secondary: "#0891b2",
accent: "#16a34a",
neutral: "#0a0a0a",
"base-100": "#0a0a0a",
info: "#3abff8",
success: "#36d399",
warning: "#fbbd23",
error: "#f87272",
}
}
]
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/aspect-ratio'),
require('daisyui')
],
}