From ea8153a44147fa2db45e2be9dedc418115d83226 Mon Sep 17 00:00:00 2001 From: Kirk Scheibelhut Date: Fri, 3 Nov 2023 21:31:33 -0700 Subject: [PATCH] initial formatting for research page --- src/site/index.css | 4 ++++ src/site/research.ts | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/site/index.css b/src/site/index.css index ff635bb..90aab4e 100644 --- a/src/site/index.css +++ b/src/site/index.css @@ -162,6 +162,10 @@ footer img { align-items: center; } +#research li { + margin-bottom: 0.5em; +} + .hide { display: none; } diff --git a/src/site/research.ts b/src/site/research.ts index c0abe57..c7ab1b9 100644 --- a/src/site/research.ts +++ b/src/site/research.ts @@ -3,17 +3,25 @@ import * as path from 'path'; import * as bibtex from '@retorquere/bibtex-parser'; -// TODO generate listing from research.bib (and tags) - link externally always export function page(dir: string) { + const buf: string[] = []; + const bib = bibtex.parse(fs.readFileSync(path.join(dir, 'research.bib'), 'utf8')); if (bib.errors.length) throw new Error(`Error parsing research.bib: ${bib.errors.join(', ')}`); - const bibliography: {[id: string]: bibtex.Entry} = {}; - for (const entry of bib.entries) bibliography[entry.key] = entry; + + buf.push(''); return { title: 'Research | pkmn.ai', header: '

Research

', - content: '

TODO

', + content: `
${buf.join('')}
`, edit: 'https://github.com/pkmn/ai/edit/main/src/site/research.bib', }; }