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/image-types/global" />
|
||||
/// <reference types="next/navigation-types/compat/navigation" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// 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/
|
||||
|
||||
## 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)
|
||||
|
||||
- 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,
|
||||
"scripts": {
|
||||
"prebuild": "node ./scripts/generate-metadata.js",
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"dev": "next dev --turbopack",
|
||||
"build": "next build --turbopack",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
|
@ -27,7 +27,7 @@ export default function Title() {
|
||||
// TODO(Paul): clean this up
|
||||
let currRoot: Sites = SiteMap.pages;
|
||||
let title: string | null = null;
|
||||
if (pagePath && pagePath !== '/') {
|
||||
if (pagePath !== '/') {
|
||||
const subPaths = pagePath.split('?')[0].split('#')[0].split('/');
|
||||
for (const p of subPaths.slice(1, subPaths.length)) {
|
||||
if (!p || !currRoot[p])
|
||||
@ -48,15 +48,15 @@ export default function Title() {
|
||||
const pathElements = splitPath && createPathElements(splitPath) || <></>;
|
||||
return (
|
||||
<>
|
||||
{/* <head>
|
||||
<head>
|
||||
<title>{title && `${title} | PaulW.XYZ` || 'PaulW.XYZ'}</title>
|
||||
</head> */}
|
||||
</head>
|
||||
<div className={style.container}>
|
||||
<h1 className={style.title}>
|
||||
{title || 'PaulW.XYZ'}
|
||||
</h1>
|
||||
</div>
|
||||
<div className={style.nav}>
|
||||
<div className={`${style.nav} h1`}>
|
||||
{
|
||||
title
|
||||
? <><Link href='/'>PaulW.XYZ</Link> / {pathElements}{title}</>
|
||||
@ -65,4 +65,4 @@ export default function Title() {
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
@ -4,6 +4,11 @@ import './global.css'
|
||||
import Container from './components/container'
|
||||
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}>) {
|
||||
return (
|
||||
<html lang='en'>
|
||||
|
@ -1,12 +1,13 @@
|
||||
'use client'
|
||||
import Link from 'next/link';
|
||||
|
||||
import style from '../components/title.module.css';
|
||||
import style from './components/title.module.css';
|
||||
|
||||
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 (
|
||||
<>
|
||||
{/* <head>
|
||||
<head>
|
||||
<title>404: Not Found | PaulW.XYZ</title>
|
||||
</head>
|
||||
<div className={style.container}>
|
||||
@ -15,7 +16,7 @@ function NotFoundPage() {
|
||||
</h1>
|
||||
</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'>
|
||||
<h1>Error 404</h1>
|
||||
<p>
|
||||
@ -26,7 +27,7 @@ function NotFoundPage() {
|
||||
More on HTTP status codes
|
||||
</a>
|
||||
</section>
|
||||
{/*</div>*/}
|
||||
</div>
|
||||
</>
|
||||
|
||||
);
|
||||
|
@ -46,8 +46,8 @@ function Markdown({ content }: any) {
|
||||
</ReactMarkdown>
|
||||
}
|
||||
|
||||
export default async function Note({params}: {params: Promise<{note: string}>}) {
|
||||
const note = (await params).note
|
||||
export default async function Note({params}: {params: { note: string}}) {
|
||||
const note = params.note
|
||||
const n = await getNotes(note)
|
||||
return (<>
|
||||
<span className={style['last-updated']}>
|
||||
@ -63,4 +63,4 @@ export default async function Note({params}: {params: Promise<{note: string}>})
|
||||
async function getNotes(name: string) {
|
||||
const notesInfo: Notes = NotesInfo;
|
||||
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 }
|
||||
export default async function Post({ params }: {params: Promise<{post: string}>}) {
|
||||
const post = await getPost((await params).post);
|
||||
export default async function Post({ params }: { params: {post: string} }) {
|
||||
const post = await getPost(params.post);
|
||||
if (!post)
|
||||
return <></>;
|
||||
return (<>
|
||||
<div className='container'>
|
||||
{ post.otime !== post.mtime && post.mtime &&
|
||||
{ post.otime !== post.mtime &&
|
||||
<span className={style.time}>
|
||||
Last updated: {toLocaleString(post.mtime)}
|
||||
</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;
|
||||
return {...postsInfo[n], content: await readMarkdown('posts', n, true)};
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user