From c839ead325d552496c7faf6d72428d3589d88304 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 12 Nov 2024 01:07:20 +0200 Subject: [PATCH] Committing with a bunch of changes --- astro.config.mjs | 8 +- public/logo.svg | 35 +++++ src/components/Nav.astro | 50 ++++++ src/components/TerminalBorder.astro | 36 +++++ src/content/docs/docs/index.md | 23 ++- src/layouts/Layout.astro | 106 +++++++++---- src/layouts/MarkdownLayout.astro | 53 ------- src/pages/.test.astro.swp | Bin 12288 -> 0 bytes src/pages/index.astro | 228 ++++++++++++++-------------- src/pages/main.astro | 123 +++++++++++++++ src/pages/test.astro | 12 +- src/styles/JetBrainsMono.css | 108 +++++++++++++ src/styles/custom.css | 5 +- tailwind.config.mjs | 8 +- 14 files changed, 582 insertions(+), 213 deletions(-) create mode 100644 public/logo.svg create mode 100644 src/components/Nav.astro create mode 100644 src/components/TerminalBorder.astro delete mode 100644 src/layouts/MarkdownLayout.astro delete mode 100644 src/pages/.test.astro.swp create mode 100644 src/pages/main.astro create mode 100644 src/styles/JetBrainsMono.css diff --git a/astro.config.mjs b/astro.config.mjs index 6cb5b8b..3ca0b57 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,15 +4,17 @@ import mdx from "@astrojs/mdx"; import starlight from "@astrojs/starlight"; +import tailwind from "@astrojs/tailwind"; + // https://astro.build/config export default defineConfig({ integrations: [ + tailwind(), starlight({ title: "My delightful docs site", - customCss: [ - './src/styles/custom.css', - ], + customCss: ["./src/styles/custom.css"], }), mdx(), ], }); + diff --git a/public/logo.svg b/public/logo.svg new file mode 100644 index 0000000..0d5ed0b --- /dev/null +++ b/public/logo.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/Nav.astro b/src/components/Nav.astro new file mode 100644 index 0000000..3c41d0d --- /dev/null +++ b/src/components/Nav.astro @@ -0,0 +1,50 @@ +--- +interface Props { + path: string; +} + +const { path } = Astro.props; + +const directories = ["about", "works", "links"] + +--- + + + diff --git a/src/components/TerminalBorder.astro b/src/components/TerminalBorder.astro new file mode 100644 index 0000000..6add2b7 --- /dev/null +++ b/src/components/TerminalBorder.astro @@ -0,0 +1,36 @@ +--- +interface Props { + header: string; + margin?: string; +} + +const { header, margin = "-1px" } = Astro.props; +--- +
+ {header} + +
+ + diff --git a/src/content/docs/docs/index.md b/src/content/docs/docs/index.md index 3da1b57..dfab5a3 100644 --- a/src/content/docs/docs/index.md +++ b/src/content/docs/docs/index.md @@ -17,17 +17,26 @@ If you have ever accessed a remote server it was most likely by ssh-ing into it. You have also most likely had to copy paste something similar to this: -```pub +``` ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBSSj+yfJLWEb+Df4r4603TOFAUBREYS43qQB+c9i9UW ``` -Let's break it down: +Let's break it down - The first part `ssh-ed25519` is the algorithm type, other common algorithms are `ssh-rsa` and `ssh-ecdsa` -- The second part is a base64-encoded binary format consiting of: - * the length of the algorithm string, for ed25519 it's always 11 (4 bytes long) - * the algorithm type, for ed25519 it's always `ssh-ed25519` in binary (11 bytes long) - * the length of the key, 32 bytes for ed25519 (4 bytes long) - * the actual ed25519 key (32 bytes long) +- The second part is a base64-encoded binary format consiting of + - the length of the algorithm string, for ed25519 it's always 11 (4 bytes long) + - the algorithm type, for ed25519 it's always `ssh-ed25519` in binary (11 bytes long) + - the length of the key, 32 bytes for ed25519 (4 bytes long) + - the actual ed25519 key (32 bytes long) +### Embedding a word in base64 +Base64 is a widely used format for writing binary in a compact and human readable way, +it uses A-Z, a-z, 0-9, '/' and '+' adding up to 64 unique characters. + +It's possible to choose specific bytes in a way that when encoding it with base64 +it will form a word. + +For example, to encode "Kyren" in base64, we can use the following bytes +`00101011 00101010 01001110` or in hex `2b 2a de` diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 1810971..bed38f4 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -20,31 +20,85 @@ const { title } = Astro.props; + diff --git a/src/layouts/MarkdownLayout.astro b/src/layouts/MarkdownLayout.astro deleted file mode 100644 index becb8e9..0000000 --- a/src/layouts/MarkdownLayout.astro +++ /dev/null @@ -1,53 +0,0 @@ ---- -interface Props { - title: string; -} - -const { title } = Astro.props; ---- - - - - - - - - - - - {title} - - - - - - diff --git a/src/pages/.test.astro.swp b/src/pages/.test.astro.swp deleted file mode 100644 index 96ddfdf5ac0c599b4439e7b2e9d507e309c2fa1f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmYc?2=nw+u+%eTU|?VnU|=})Q9u3URbGabatsXFl|`v}AaMfN(8I#Sz|8 zI7D9wmQL%E~WXb6mkz-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDjE2Av z41vTH28Lcf28Nq_kokXD|Njp^1H)N<28Q|k3=F0G3=Adw3=H=C3=E?D3=D$&3=ACn z3=IGH7#QC1F)%!a>c0UpV+e-9sFO!SU^E0qLtr!nMnhmU1V%$(Gz3ONU^E0qLtr!n zhHwbj==&sA=9iY(F(@e5=m!+#7pH=l3JNyP`FSO&c_j+^AifP$#s;QZS67!IIX|zs zM4?&%rm|MSRw1!GF|$M=HLs+oQm-gAFD11|L(>|n5-bW=lb%}Q3R0$_o}8bPlbT$T znV+Ywqo58}rLJksz>t|+kY5C{0H#!-Rw1n@KUYB=y!PEH8R9~9YnV!i -
- -

Welcome to Kyren's Site

-

- To get started, open the directory src/pages in your project.
- Code Challenge: Tweak HMMM "Welcome to Astro" message above. -

- -
+
+
+ + diff --git a/src/pages/main.astro b/src/pages/main.astro new file mode 100644 index 0000000..0c1233f --- /dev/null +++ b/src/pages/main.astro @@ -0,0 +1,123 @@ +--- +import Layout from '../layouts/Layout.astro'; +import Card from '../components/Card.astro'; +--- + + +
+ +

Welcome to Kyren's Site

+

+ To get started, open the directory src/pages in your project.
+ Code Challenge: Tweak HMMM "Welcome to Astro" message above. +

+ +
+
+ + diff --git a/src/pages/test.astro b/src/pages/test.astro index e11b196..7a7ec7b 100644 --- a/src/pages/test.astro +++ b/src/pages/test.astro @@ -1,14 +1,12 @@ --- -import Prose from '../components/Prose.astro'; -import MarkdownLayout from '../layouts/MarkdownLayout.astro'; +// import Prose from '../components/Prose.astro'; +// import Layout from '../layouts/Layout.astro'; import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; import { getEntry } from 'astro:content'; const entry = await getEntry('blogs', 'blog-1'); const { Content } = await entry.render(); --- - - - - - + + + diff --git a/src/styles/JetBrainsMono.css b/src/styles/JetBrainsMono.css new file mode 100644 index 0000000..fc6fa3e --- /dev/null +++ b/src/styles/JetBrainsMono.css @@ -0,0 +1,108 @@ +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-Thin.woff2") format("woff2"); + font-weight: 100; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-ThinItalic.woff2") format("woff2"); + font-weight: 100; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-ExtraLight.woff2") format("woff2"); + font-weight: 200; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-ExtraLightItalic.woff2") format("woff2"); + font-weight: 200; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-Light.woff2") format("woff2"); + font-weight: 300; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-LightItalic.woff2") format("woff2"); + font-weight: 300; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-Regular.woff2") format("woff2"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-Italic.woff2") format("woff2"); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-Medium.woff2") format("woff2"); + font-weight: 500; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-MediumItalic.woff2") format("woff2"); + font-weight: 500; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-SemiBold.woff2") format("woff2"); + font-weight: 600; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-SemiBoldItalic.woff2") format("woff2"); + font-weight: 600; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-Bold.woff2") format("woff2"); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-BoldItalic.woff2") format("woff2"); + font-weight: 700; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-ExtraBold.woff2") format("woff2"); + font-weight: 800; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-ExtraBoldItalic.woff2") format("woff2"); + font-weight: 800; + font-style: italic; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-ExtraBold.woff2") format("woff2"); + font-weight: 900; + font-style: normal; +} +@font-face { + font-family: "Jetbrains Mono"; + src: url("JetBrainsMono-ExtraBoldItalic.woff2") format("woff2"); + font-weight: 900; + font-style: italic; +} diff --git a/src/styles/custom.css b/src/styles/custom.css index e8750d5..52983d8 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -1,7 +1,10 @@ :root { width: 70%; margin: auto; + /* --sl-text-body-sm: var(--sl-text-sm * 10); */ + /* --sl-text-code-sm: var(--sl-text-xs * 10); */ + /* font-size: 130%; */ } p { - font-size: 1.625rem; + /* font-size: 1.625rem; */ } diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 2e9b1f7..16b793f 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -1,8 +1,14 @@ /** @type {import('tailwindcss').Config} */ export default { + corePlugins: { + preflight: false, + }, content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], + // content: ["./src/**/*.{astro,html,js,jsx,svelte,ts,tsx,vue}"], theme: { extend: {}, }, - plugins: [require("@tailwindcss/typography")], + plugins: [ + // require("@tailwindcss/typography") + ], };