Compare commits
No commits in common. "3c94aeb3fd85aa6935f29da979dbdbc521e9cb74" and "3b1589dde05bab8b7a2dada7e3bfc5106ea02e12" have entirely different histories.
3c94aeb3fd
...
3b1589dde0
15 changed files with 32 additions and 75 deletions
Binary file not shown.
Before Width: | Height: | Size: 186 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 25 KiB |
|
@ -1,11 +1,8 @@
|
|||
---
|
||||
title: Markdown Elements
|
||||
date: [2023, 02, 19]
|
||||
hidden: true
|
||||
date: 19-02-2023
|
||||
---
|
||||
|
||||
> this is my testing page for markdown elements, ignore this
|
||||
|
||||
# Hi ~~Mars~~ Venus! 1
|
||||
|
||||
## Hi ~~Mars~~ Venus! 2
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
title: Mouse losing focus in Overwatch 2 on Linux
|
||||
date: [2023, 03, 11]
|
||||
---
|
||||
|
||||
# Mouse losing focus in Overwatch 2 on Linux
|
||||
|
||||
I moved to Fedora a while ago because I got sick of writing my things on Windows, but that, of course, means I need workarounds for the games I want to play.
|
||||
|
||||
One of those games being Overwatch 2.
|
||||
|
||||
I tried using Lutris for a while, which worked fine until an Update to the Battle.net launcher broke itself, so I switched over to [Bottles](https://usebottles.com), which for now runs the game pretty well.
|
||||
|
||||
Though one of the Issues I ran into while playing, was that my Mouse wouldn't be captured by the game anymore, forcing me to `Alt+Tab` out and back into the game.
|
||||
|
||||
Though thanks to their Discord I found an easy fix for that, I simply had to change my Runner to `wine-ge-proton7-34` instead of the default `soda-7.0-9` runner.
|
6
src/blog/testing.md
Normal file
6
src/blog/testing.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: Testing
|
||||
date: 19-02-2023
|
||||
---
|
||||
|
||||
# Hi ~~Mars~~ Venus!
|
|
@ -4,6 +4,8 @@ import styles from "@/styles/PostList.module.sass"
|
|||
const PostList = ({ posts }: {
|
||||
posts: [{ title: string, date: string, link: string }]
|
||||
}) => {
|
||||
|
||||
|
||||
return (
|
||||
<ul className={styles.blog_posts}>
|
||||
{posts.map(post => (
|
||||
|
|
|
@ -9,9 +9,10 @@ const constants = {
|
|||
cohost: "https://cohost.org/lio",
|
||||
twitter: "https://twitter.com/@himbolion",
|
||||
git: "https://git.lio.cat/l",
|
||||
github: "https://github.com/himbolion",
|
||||
libera: "https://liberapay.com/himbolion/",
|
||||
github: "https://github.com/@himbolion",
|
||||
email: "mailto:twilight@lio.zone",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default constants
|
|
@ -1,22 +1,7 @@
|
|||
import { readFileSync } from "fs";
|
||||
import matter from "gray-matter";
|
||||
|
||||
type Frontmatter<I extends string | Buffer> = {
|
||||
data: Partial<{
|
||||
title: string
|
||||
date: number[]
|
||||
hidden: boolean
|
||||
draft: boolean
|
||||
}>
|
||||
content: string
|
||||
excerpt?: string
|
||||
orig: Buffer | I
|
||||
language: string
|
||||
matter: string
|
||||
stringify(lang: string): string
|
||||
}
|
||||
|
||||
export default function (path: string): Frontmatter<string> {
|
||||
export default function (path: string) {
|
||||
return matter(readFileSync(path, 'utf8'))
|
||||
|
||||
}
|
|
@ -4,7 +4,6 @@ const getProfiles = () => {
|
|||
return [
|
||||
{ site: "fediverse", link: constants.socials.fedi },
|
||||
{ site: "twitter", link: constants.socials.twitter },
|
||||
{ site: "liberapay", link: constants.socials.libera },
|
||||
{ site: "cohost", link: constants.socials.cohost },
|
||||
{ site: "forgejo", link: constants.socials.git },
|
||||
{ site: "github", link: constants.socials.github },
|
||||
|
|
|
@ -9,15 +9,13 @@ import listFiles from "@/lib/listFiles";
|
|||
import Markdown from 'markdown-to-jsx';
|
||||
import Link from "@/components/Link";
|
||||
import Image from "@/components/Image";
|
||||
import Head from "next/head";
|
||||
import matter from "gray-matter";
|
||||
const Post = (props: { post: string, slug: string, matter: any }) => {
|
||||
import Header from "@/components/Header";
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
const Post = (props: { post: string, slug: string }) => {
|
||||
const router = useRouter()
|
||||
let Index = (
|
||||
<main id={index.layout}>
|
||||
<Head>
|
||||
<title>{props.matter.title}</title>
|
||||
</Head>
|
||||
<Sidebar />
|
||||
<section id={index.main}>
|
||||
<Markdown
|
||||
|
@ -30,6 +28,13 @@ const Post = (props: { post: string, slug: string, matter: any }) => {
|
|||
const ParaComponent = children[0]?.type?.name === 'img' ? 'div' : 'p'
|
||||
return <ParaComponent {...props}>{children}</ParaComponent>
|
||||
},
|
||||
// h1: ({ ...props }) => <Header kind="h1" href={`${router.asPath}#${props.id}`} title={props.children} withArrow />,
|
||||
// h2: ({ ...props }) => <Header kind="h2" href={`${router.asPath}#${props.id}`} title={props.children} withArrow />,
|
||||
// h3: ({ ...props }) => <Header kind="h3" href={`${router.asPath}#${props.id}`} title={props.children} withArrow />,
|
||||
// h4: ({ ...props }) => <Header kind="h4" href={`${router.asPath}#${props.id}`} title={props.children} withArrow />,
|
||||
// h5: ({ ...props }) => <Header kind="h5" href={`${router.asPath}#${props.id}`} title={props.children} withArrow />,
|
||||
// h6: ({ ...props }) => <Header kind="h6" href={`${router.asPath}#${props.id}`} title={props.children} withArrow />,
|
||||
// h6: ({ pass_this, ...props }) => { console.log("h6", { pass_this, props }) },
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
@ -46,10 +51,10 @@ export async function getStaticProps(context: any) {
|
|||
let post = await remark()
|
||||
.use(remarkFrontmatter)
|
||||
.process(await read(`${listFiles('./src/blog').find(file => file.includes(context.params.slug))}`))
|
||||
// .then(r => r.value.)
|
||||
return {
|
||||
props: {
|
||||
post: (post.value as string).replace(/(---)\n*([a-zA-Z0-9\/\[\]_:,\-\s*]*)*/mi, ""),
|
||||
matter: matter(post.value).data,
|
||||
post: (post.value as string).replace(/(---)\n*([a-zA-Z0-9\/_:-\s*]*)*/mi, ""),
|
||||
slug: context.params.slug
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,14 +6,10 @@ import Lanyard from "@/components/Lanyard"
|
|||
import listFiles from "@/lib/listFiles";
|
||||
import getFrontmatter from "@/lib/getFrontmatter";
|
||||
import PostList from "@/components/PostList";
|
||||
import Head from "next/head"
|
||||
|
||||
const IndexPage = (props: { posts: [{ title: string, date: string, link: string }] }) => {
|
||||
let Index = (
|
||||
<main id={index.layout}>
|
||||
<Head>
|
||||
<title>blog</title>
|
||||
</Head>
|
||||
<Sidebar />
|
||||
<section id={index.blogMain}>
|
||||
<h1>blog</h1>
|
||||
|
@ -33,21 +29,11 @@ export async function getStaticProps() {
|
|||
let posts = listFiles(blogPath) //
|
||||
let frontmatter = posts.map(post => {
|
||||
let matter = getFrontmatter(post).data
|
||||
// @ts-ignore
|
||||
let date = new Date(matter.date)
|
||||
return {
|
||||
...matter,
|
||||
sort_date: date.toDateString(),
|
||||
date: `${date.toLocaleDateString()}`,
|
||||
link: post.replace(blogPath, "/blog").replace('.md', "").replace('.mdx', "")
|
||||
link: post.replace(blogPath, "/blog/").replace('.md', "").replace('.mdx', "")
|
||||
}
|
||||
})
|
||||
.filter((v, i) => { return !v.hidden })
|
||||
.filter((v, i) => { return !v.draft })
|
||||
.sort((a, b) => {
|
||||
// @ts-ignore
|
||||
return new Date(b.sort_date) - new Date(a.sort_date)
|
||||
})
|
||||
return {
|
||||
props: {
|
||||
posts: frontmatter
|
||||
|
|
|
@ -3,24 +3,17 @@ import RenderWithoutJS from "@/components/RenderWithoutJS";
|
|||
import Sidebar from "@/components/Sidebar";
|
||||
import index from "@/styles/Index.module.sass"
|
||||
import Lanyard from "@/components/Lanyard"
|
||||
import Head from "next/head"
|
||||
import Link from "@/components/Link";
|
||||
|
||||
const IndexPage = () => {
|
||||
let Index = (
|
||||
<main id={index.layout}>
|
||||
<Head>
|
||||
<title>lio</title>
|
||||
</Head>
|
||||
<Sidebar />
|
||||
<section id={index.main}>
|
||||
<h1>hi there!</h1>
|
||||
<h1>hey!</h1>
|
||||
<p>
|
||||
my name's lio. i'm a 21y/o software engineer and student from germany.
|
||||
my name's Lio, and I code sometimes
|
||||
{/* my name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimesmy name's Lio, and I code sometimes */}
|
||||
</p>
|
||||
{/* <p>
|
||||
you might know me from Projects like <Link />
|
||||
</p> */}
|
||||
</section>
|
||||
<Lanyard />
|
||||
{/* <Copyright /> */}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#layout
|
||||
max-width: 1000px
|
||||
margin: 5rem 0 0 1rem
|
||||
margin: 6rem 0 4rem 4rem
|
||||
display: inline-flex
|
||||
@media (max-width:600px)
|
||||
display: inline-block
|
||||
|
|
|
@ -10,6 +10,5 @@
|
|||
|
||||
.listLink
|
||||
display: table
|
||||
line-height: 1rem
|
||||
@media (max-width:600px)
|
||||
display: inline-block
|
||||
|
|
|
@ -11,7 +11,7 @@ html
|
|||
background: $dark
|
||||
color: $light
|
||||
font-size: 20px
|
||||
line-height: 1.3
|
||||
line-height: 1
|
||||
scroll-behavior: smooth
|
||||
|
||||
@font-face
|
||||
|
|
Loading…
Add table
Reference in a new issue