···11+---
22+type Relation = "owner" | "maintainer";
33+const relationTitle: Record<Relation, string> = {
44+ owner: "I am an administrator of this project",
55+ maintainer: "I am a collaborator that helps maintain this project",
66+};
77+88+type Props = {
99+ relation: Relation;
1010+};
1111+1212+const { relation } = Astro.props;
1313+---
1414+<p><em class="badge" title={relationTitle[relation]}>{relation}</em></p>
+34-43
src/pages/projects.astro
···11---
22import BaseLayout from "../layouts/BaseLayout.astro";
33-import Paragraphs from "../components/Paragraphs.astro";
33+import ExternalLink from "../components/ExternalLink.astro";
44+import ProjectHeading from "../components/ProjectHeading.astro";
55+import ProjectRelation from "../components/ProjectRelation.astro";
46const title = "Projects";
55-66-type Relation = "owner" | "maintainer";
77-const relationTitle: Record<Relation, string> = {
88- owner: "I am an administrator of this project",
99- maintainer: "I am a collaborator that helps maintain this project",
1010-};
1111-type Project = {
1212- relation: Relation;
1313- link: string;
1414- description: string[];
1515-};
1616-const projects: Record<string, Project> = {
1717- gengo: {
1818- relation: "owner",
1919- link: "https://github.com/spenserblack/gengo",
2020- description: [
2121- "A multi-purpose tool to help identify the code languages within a project.",
2222- "Works on both work trees and bare repositories."
2323- ],
2424- },
2525- onefetch: {
2626- relation: "maintainer",
2727- link: "https://github.com/o2sh/onefetch",
2828- description: [
2929- "A CLI tool that analyzes your repository and prints an ASCII logo for its primary language and various repository statistics.",
3030- ],
3131- },
3232- steamdown: {
3333- relation: "owner",
3434- link: "https://github.com/spenserblack/steamdown",
3535- description: [
3636- "A parser and renderer for a markdown-like syntax. Content can be rendered as Steam's formatting language, or as HTML for a preview.",
3737- ],
3838- },
3939-};
407---
418<BaseLayout title={title}>
429 <p>
4310 Here are some of the open-source projects that I work on.
4411 </p>
4545- {
4646- Object.entries(projects).map(([project, { relation, link, description }]) => (
4747- <h2><a href={link}>{project}</a></h2>
4848- <p><em class="badge" title={relationTitle[relation]}>{relation}</em></p>
4949- <Paragraphs paragraphs={description} />
5050- ))
5151- }
1212+ <ProjectHeading link="https://github.com/spenserblack/fancy-tree">fancy-tree</ProjectHeading>
1313+ <ProjectRelation relation="owner" />
1414+ <p>
1515+ An alternative to <ExternalLink link="https://en.wikipedia.org/wiki/Tree_(command)"><code>tree</code></ExternalLink> with
1616+ support for Git status and code language detection.
1717+ It uses <ExternalLink link="https://www.lua.org/">Lua</ExternalLink> configuration files to
1818+ support fine-grained customization.
1919+ </p>
2020+2121+ <ProjectHeading link="https://github.com/spenserblack/gengo">gengo</ProjectHeading>
2222+ <ProjectRelation relation="owner" />
2323+ <p>
2424+ A multi-purpose tool to help identify the code languages within a project. Works on both work trees and bare git repositories.
2525+ </p>
2626+2727+ <ProjectHeading link="https://github.com/o2sh/onefetch">Onefetch</ProjectHeading>
2828+ <ProjectRelation relation="maintainer" />
2929+ <p>
3030+ A CLI tool that analyzes your repository and prints an ASCII logo for its primary language and
3131+ various repository statistics.
3232+ Think like <ExternalLink link="https://github.com/dylanaraps/neofetch"><code>neofetch</code></ExternalLink>,
3333+ but for a Git repository.
3434+ </p>
3535+3636+ <ProjectHeading link="https://github.com/spenserblack/steamdown">Steamdown</ProjectHeading>
3737+ <ProjectRelation relation="owner" />
3838+ <p>
3939+ A parser and renderer for a markdown-like syntax. Content can be rendered
4040+ as <ExternalLink link="https://steamcommunity.com/comment/Recommendation/formattinghelp">Steam's formatting language</ExternalLink>,
4141+ or as HTML for a preview.
4242+ </p>
5243</BaseLayout>