Compare commits
1 Commits
master
...
app-router
Author | SHA1 | Date | |
---|---|---|---|
0ed07ae377 |
1
next-env.d.ts
vendored
1
next-env.d.ts
vendored
@ -1,6 +1,5 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
/// <reference types="next/navigation-types/compat/navigation" />
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
@ -7,6 +7,13 @@ refer to someone or within something.
|
|||||||
|
|
||||||
- https://www.gingerbill.org/series/memory-allocation-strategies/
|
- https://www.gingerbill.org/series/memory-allocation-strategies/
|
||||||
|
|
||||||
|
## Untangling Lifetimes: The Arena Allocator
|
||||||
|
|
||||||
|
Making performant dynamic manual memory management in C feel almost like
|
||||||
|
garbage collection.
|
||||||
|
|
||||||
|
- https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator
|
||||||
|
|
||||||
## Immediate-Mode Graphical User Interfaces (2005)
|
## Immediate-Mode Graphical User Interfaces (2005)
|
||||||
|
|
||||||
- https://caseymuratori.com/blog_0001
|
- https://caseymuratori.com/blog_0001
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
# References
|
|
||||||
|
|
||||||
## [Intel® 64 and IA-32 Architectures Software Developer’s Manual](https://software.intel.com/en-us/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4)
|
|
@ -2,8 +2,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "node ./scripts/generate-metadata.js",
|
"prebuild": "node ./scripts/generate-metadata.js",
|
||||||
"dev": "next dev",
|
"dev": "next dev --turbopack",
|
||||||
"build": "next build",
|
"build": "next build --turbopack",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
|
@ -27,7 +27,7 @@ export default function Title() {
|
|||||||
// TODO(Paul): clean this up
|
// TODO(Paul): clean this up
|
||||||
let currRoot: Sites = SiteMap.pages;
|
let currRoot: Sites = SiteMap.pages;
|
||||||
let title: string | null = null;
|
let title: string | null = null;
|
||||||
if (pagePath && pagePath !== '/') {
|
if (pagePath !== '/') {
|
||||||
const subPaths = pagePath.split('?')[0].split('#')[0].split('/');
|
const subPaths = pagePath.split('?')[0].split('#')[0].split('/');
|
||||||
for (const p of subPaths.slice(1, subPaths.length)) {
|
for (const p of subPaths.slice(1, subPaths.length)) {
|
||||||
if (!p || !currRoot[p])
|
if (!p || !currRoot[p])
|
||||||
@ -48,15 +48,15 @@ export default function Title() {
|
|||||||
const pathElements = splitPath && createPathElements(splitPath) || <></>;
|
const pathElements = splitPath && createPathElements(splitPath) || <></>;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <head>
|
<head>
|
||||||
<title>{title && `${title} | PaulW.XYZ` || 'PaulW.XYZ'}</title>
|
<title>{title && `${title} | PaulW.XYZ` || 'PaulW.XYZ'}</title>
|
||||||
</head> */}
|
</head>
|
||||||
<div className={style.container}>
|
<div className={style.container}>
|
||||||
<h1 className={style.title}>
|
<h1 className={style.title}>
|
||||||
{title || 'PaulW.XYZ'}
|
{title || 'PaulW.XYZ'}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.nav}>
|
<div className={`${style.nav} h1`}>
|
||||||
{
|
{
|
||||||
title
|
title
|
||||||
? <><Link href='/'>PaulW.XYZ</Link> / {pathElements}{title}</>
|
? <><Link href='/'>PaulW.XYZ</Link> / {pathElements}{title}</>
|
||||||
@ -65,4 +65,4 @@ export default function Title() {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -4,6 +4,11 @@ import './global.css'
|
|||||||
import Container from './components/container'
|
import Container from './components/container'
|
||||||
import Title from './components/title'
|
import Title from './components/title'
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'PaulW.XYZ',
|
||||||
|
description: `Paul's Website`
|
||||||
|
}
|
||||||
|
|
||||||
export default function RootLayout({children,}: Readonly<{children: React.ReactNode}>) {
|
export default function RootLayout({children,}: Readonly<{children: React.ReactNode}>) {
|
||||||
return (
|
return (
|
||||||
<html lang='en'>
|
<html lang='en'>
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
'use client'
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import style from '../components/title.module.css';
|
import style from './components/title.module.css';
|
||||||
|
|
||||||
function NotFoundPage() {
|
function NotFoundPage() {
|
||||||
// TODO: figure out a way to somehow get next to ignore layout in special cases. tried /not-found/page.tsx but it doesn't work :X
|
// clean this page up
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <head>
|
<head>
|
||||||
<title>404: Not Found | PaulW.XYZ</title>
|
<title>404: Not Found | PaulW.XYZ</title>
|
||||||
</head>
|
</head>
|
||||||
<div className={style.container}>
|
<div className={style.container}>
|
||||||
@ -15,7 +16,7 @@ function NotFoundPage() {
|
|||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className={`${style.nav} h1`}><Link href='/'>PaulW.XYZ</Link> / ... ??? / 404: Not Found</div>
|
<div className={`${style.nav} h1`}><Link href='/'>PaulW.XYZ</Link> / ... ??? / 404: Not Found</div>
|
||||||
<div className='container'>*/}
|
<div className='container'>
|
||||||
<section className='block text center'>
|
<section className='block text center'>
|
||||||
<h1>Error 404</h1>
|
<h1>Error 404</h1>
|
||||||
<p>
|
<p>
|
||||||
@ -26,7 +27,7 @@ function NotFoundPage() {
|
|||||||
More on HTTP status codes
|
More on HTTP status codes
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
{/*</div>*/}
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -46,8 +46,8 @@ function Markdown({ content }: any) {
|
|||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Note({params}: {params: Promise<{note: string}>}) {
|
export default async function Note({params}: {params: { note: string}}) {
|
||||||
const note = (await params).note
|
const note = params.note
|
||||||
const n = await getNotes(note)
|
const n = await getNotes(note)
|
||||||
return (<>
|
return (<>
|
||||||
<span className={style['last-updated']}>
|
<span className={style['last-updated']}>
|
||||||
@ -63,4 +63,4 @@ export default async function Note({params}: {params: Promise<{note: string}>})
|
|||||||
async function getNotes(name: string) {
|
async function getNotes(name: string) {
|
||||||
const notesInfo: Notes = NotesInfo;
|
const notesInfo: Notes = NotesInfo;
|
||||||
return {...notesInfo[name], content: await readMarkdown('notes', name, true)}
|
return {...notesInfo[name], content: await readMarkdown('notes', name, true)}
|
||||||
}
|
}
|
@ -45,13 +45,13 @@ function TimeBlock({ mtime, otime }: { mtime: string, otime: string }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
// post: IPost & { content: string, cover?: string, otime: string, mtime?: string }
|
// post: IPost & { content: string, cover?: string, otime: string, mtime?: string }
|
||||||
export default async function Post({ params }: {params: Promise<{post: string}>}) {
|
export default async function Post({ params }: { params: {post: string} }) {
|
||||||
const post = await getPost((await params).post);
|
const post = await getPost(params.post);
|
||||||
if (!post)
|
if (!post)
|
||||||
return <></>;
|
return <></>;
|
||||||
return (<>
|
return (<>
|
||||||
<div className='container'>
|
<div className='container'>
|
||||||
{ post.otime !== post.mtime && post.mtime &&
|
{ post.otime !== post.mtime &&
|
||||||
<span className={style.time}>
|
<span className={style.time}>
|
||||||
Last updated: {toLocaleString(post.mtime)}
|
Last updated: {toLocaleString(post.mtime)}
|
||||||
</span>
|
</span>
|
||||||
@ -79,7 +79,7 @@ export default async function Post({ params }: {params: Promise<{post: string}>}
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getPost(n: string) {
|
export async function getPost(n: string) {
|
||||||
const postsInfo: Record<string, (IPost & { cover?: string, otime: string, mtime?: string })> = PostsInfo;
|
const postsInfo: Record<string, (IPost & { cover?: string, otime: string, mtime?: string })> = PostsInfo;
|
||||||
return {...postsInfo[n], content: await readMarkdown('posts', n, true)};
|
return {...postsInfo[n], content: await readMarkdown('posts', n, true)};
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user