works: add dates and some cosmetic changes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Dmitriy Pleshevskiy 2023-06-20 01:46:23 +03:00
parent ddd2ff6d06
commit ced8cc8e4d
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985
2 changed files with 80 additions and 58 deletions

7
render.ts Normal file
View file

@ -0,0 +1,7 @@
export function renderDate(date: Date): string {
return date.toLocaleDateString(undefined, {
year: "numeric",
month: "2-digit",
day: "2-digit",
});
}

View file

@ -4,6 +4,7 @@ import { classNames } from "ren/attrs.ts";
import { Context } from "../../context.ts";
import { H3 } from "../uikit/typo.ts";
import { Link, RepoLink } from "../uikit/link.ts";
import { renderDate } from "../../render.ts";
const tr = E.bind(null, "tr", []);
const td = E.bind(null, "td", []);
@ -42,8 +43,12 @@ function ChronologicalWorksTable(ctx: Context, works: Work[]): AnyNode {
td(work.description),
td(work.roles.join(", ")),
td(work.technologies.join(", ")),
td(work.startDate),
td(work.endDate ? work.endDate : (work.statuses ?? []).join(", ")),
td(renderDate(work.startDate)),
td(
work.endDate
? renderDate(work.endDate)
: (work.statuses ?? []).join(", "),
),
]);
}),
),
@ -55,9 +60,8 @@ interface Work {
description: string;
roles: Role[];
technologies: Technology[];
// TODO: use Date instead of string
startDate: string;
endDate?: string;
startDate: Date;
endDate?: Date;
statuses?: Status[];
}
@ -87,6 +91,7 @@ enum Technology {
Bash = "Bash",
TreeSitter = "TreeSitter",
Nix = "Nix",
Lua = "Lua",
}
enum Status {
@ -120,8 +125,13 @@ const CHRONOLOGICAL_WORKS: Work[] = [
name: RepoLink("tree-sitter-plpgsql", "/pleshevskiy/tree-sitter-plpgsql"),
description: "plpgsql grammar for tree-sitter",
roles: [Role.Author],
technologies: [Technology.C, Technology.JavaScript, Technology.TreeSitter],
startDate: "2022",
technologies: [
Technology.C,
Technology.JavaScript,
Technology.TreeSitter,
Technology.Nix,
],
startDate: new Date("2023-01-05"),
statuses: [Status.PassivelyMaintained],
},
{
@ -129,25 +139,30 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description:
"A wrapper over d2 which allows to use additional configs from d2 file",
roles: [Role.Author],
technologies: [Technology.Bash],
startDate: "2022",
technologies: [Technology.Bash, Technology.Nix],
startDate: new Date("2022-12-12"),
statuses: [Status.PassivelyMaintained],
},
{
name: RepoLink("tree-sitter-d2", "/pleshevskiy/tree-sitter-d2"),
description: "d2 grammar for tree-sitter",
roles: [Role.Author],
technologies: [Technology.C, Technology.JavaScript, Technology.TreeSitter],
startDate: "2022",
statuses: [Status.PassivelyMaintained],
technologies: [
Technology.C,
Technology.JavaScript,
Technology.TreeSitter,
Technology.Nix,
],
startDate: new Date("2022-12-04"),
statuses: [Status.ActiveDeveloped],
},
{
name: RepoLink("nix2lua", "/mynix/nix2lua"),
description:
"This is a small but functional library that converts your nix configurations into lua format.",
roles: [Role.Author],
technologies: [Technology.Nix],
startDate: "2022",
technologies: [Technology.Nix, Technology.Lua],
startDate: new Date("2022-11-22"),
statuses: [Status.PassivelyMaintained],
},
{
@ -155,7 +170,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "Dotenv section switcher",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2022",
startDate: new Date("2022-07-29"),
statuses: [Status.PassivelyMaintained],
},
{
@ -163,7 +178,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "A simple way to parse a string using type annotations.",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2022",
startDate: new Date("2022-07-23"),
statuses: [Status.PassivelyMaintained],
},
{
@ -172,7 +187,15 @@ const CHRONOLOGICAL_WORKS: Work[] = [
"It helps you work with environment variables and convert it to any type using only type annotations",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2022",
startDate: new Date("2022-07-18"),
statuses: [Status.PassivelyMaintained],
},
{
name: RepoLink("docker stack drone plugin", "/drone_plugins/docker_stack"),
description: "Deploy to production using `docker stack deploy`",
roles: [Role.Author],
technologies: [Technology.Docker, Technology.Drone],
startDate: new Date("2022-06-06"),
statuses: [Status.PassivelyMaintained],
},
{
@ -181,23 +204,15 @@ const CHRONOLOGICAL_WORKS: Work[] = [
"Dexios is a fast, secure, and open source command-line encryption tool.",
roles: [Role.Collaborator],
technologies: [Technology.Rust],
startDate: "2022",
statuses: [Status.PassivelyMaintained],
},
{
name: RepoLink("paren", "/pleshevskiy/paren"),
description: "Library for parsing and rendering information.",
roles: [Role.Author],
technologies: [Technology.TypeScript, Technology.Deno],
startDate: "2022",
statuses: [Status.AsIs, Status.Experimental],
startDate: new Date("2022-06-01"),
endDate: new Date("2023-02-28"),
},
{
name: RepoLink("recipes", "/pleshevskiy/recipes"),
description: "Site with recipes which cares about privacy",
roles: [Role.Author],
technologies: [Technology.TypeScript, Technology.Deno, Technology.Rust],
startDate: "2022",
startDate: new Date("2022-05-04"),
statuses: [Status.PassivelyMaintained],
},
{
@ -210,16 +225,16 @@ const CHRONOLOGICAL_WORKS: Work[] = [
Technology.Docker,
Technology.Drone,
],
startDate: "2022",
startDate: new Date("2022-03-16"),
statuses: [Status.PassivelyMaintained],
},
{
name: RepoLink("docker stack drone plugin", "/drone_plugins/docker_stack"),
description: "Deploy to production using `docker stack deploy`",
name: RepoLink("paren", "/pleshevskiy/paren"),
description: "Library for parsing and rendering information.",
roles: [Role.Author],
technologies: [Technology.Docker, Technology.Drone],
startDate: "2022",
statuses: [Status.PassivelyMaintained],
technologies: [Technology.TypeScript, Technology.Deno],
startDate: new Date("2022-03-14"),
statuses: [Status.AsIs, Status.Experimental],
},
{
name: RepoLink("hwt", "/pleshevskiy/hwt"),
@ -227,15 +242,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
"healthy workaholic timer A tool that keeps you from breaking your health by working all day.",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2022",
statuses: [Status.AsIs],
},
{
name: RepoLink("migra", "/pleshevskiy/migra"),
description: "Simple SQL migration manager for your project.",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2021",
startDate: new Date("2022-02-04"),
statuses: [Status.AsIs],
},
{
@ -247,9 +254,17 @@ const CHRONOLOGICAL_WORKS: Work[] = [
"Asynchronous and synchronous interfaces and persistence implementations for your OOD architecture ",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2021",
startDate: new Date("2021-10-12"),
statuses: [Status.Deprecated, Status.Experimental],
},
{
name: RepoLink("migra", "/pleshevskiy/migra"),
description: "Simple SQL migration manager for your project.",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: new Date("2021-01-31"),
statuses: [Status.AsIs],
},
{
name: RepoLink(
"espruino-starter",
@ -259,7 +274,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
"Quickly start creating your new project on the espruino board or a board based on it.",
roles: [Role.Author],
technologies: [Technology.JavaScript],
startDate: "2021",
startDate: new Date("2021"),
statuses: [Status.AsIs],
},
{
@ -270,7 +285,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "Rust client for sonic search backend.",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2020",
startDate: new Date("2020"),
statuses: [Status.PassivelyMaintained],
},
{
@ -281,7 +296,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "Minimalistic REST API client for React inspired by Apollo.",
roles: [Role.Author],
technologies: [Technology.TypeScript, Technology.React],
startDate: "2020",
startDate: new Date("2020"),
statuses: [Status.AsIs],
},
{
@ -290,7 +305,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
"Easy build a configs from environment variables and use it in globally.",
roles: [Role.Author],
technologies: [Technology.Rust],
startDate: "2019",
startDate: new Date("2019"),
statuses: [Status.Deprecated],
},
{
@ -298,7 +313,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "Simple full-featured finite state machine for your project",
roles: [Role.Author],
technologies: [Technology.TypeScript, Technology.NodeJS, Technology.Deno],
startDate: "2019",
startDate: new Date("2019"),
statuses: [Status.PassivelyMaintained],
},
{
@ -318,7 +333,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
Technology.Drone,
Technology.Nix,
],
startDate: "2019",
startDate: new Date("2019"),
statuses: [Status.PassivelyMaintained],
},
{
@ -326,7 +341,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "RSS generator for python",
roles: [Role.Author],
technologies: [Technology.Python],
startDate: "2019",
startDate: new Date("2019"),
statuses: [Status.PassivelyMaintained],
},
{
@ -337,7 +352,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "Page info marshmallow schema for api",
roles: [Role.Author],
technologies: [Technology.Python],
startDate: "2019",
startDate: new Date("2019"),
statuses: [Status.AsIs],
},
{
@ -356,7 +371,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
Technology.Rust,
Technology.Nix,
],
startDate: "2018",
startDate: new Date("2018"),
statuses: [Status.ActiveDeveloped],
},
{
@ -369,8 +384,8 @@ const CHRONOLOGICAL_WORKS: Work[] = [
Technology.React,
Technology.Docker,
],
startDate: "2018",
endDate: "2019",
startDate: new Date("2018"),
endDate: new Date("2019"),
},
{
name: Link("Master Progress", { href: "https://masterprogress.ru" }),
@ -384,7 +399,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
Technology.Docker,
Technology.Drone,
],
startDate: "2018",
startDate: new Date("2018"),
statuses: [Status.PassivelyMaintained],
},
{
@ -392,7 +407,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "Generate projects from templates",
roles: [Role.Author],
technologies: [Technology.Python],
startDate: "2018",
startDate: new Date("2018"),
statuses: [Status.AsIs],
},
{
@ -400,7 +415,7 @@ const CHRONOLOGICAL_WORKS: Work[] = [
description: "Javascript encoder and decoder",
roles: [Role.Author],
technologies: [Technology.Php],
startDate: "2015",
startDate: new Date("2015"),
statuses: [Status.AsIs],
},
];