move chronological block to the separated component
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dmitriy Pleshevskiy 2022-06-22 11:07:47 +03:00
parent b4b877cfff
commit de56865864
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -13,7 +13,131 @@ export function WorksPage(ctx: Context): AnyNode {
return PageLayout(ctx, [ return PageLayout(ctx, [
E("div", classNames("content-width gap-v-1x5 responsive-typography"), [ E("div", classNames("content-width gap-v-1x5 responsive-typography"), [
H3(ctx.tr.Chronological), H3(ctx.tr.Chronological),
E("table", [], [ ChronologicalWorksTable([
{
name: RepoLink("paren", "/pleshevskiy/paren"),
description: "Library for parsing and rendering information.",
roles: [Role.Author],
technologies: [Technology.TypeScript, Technology.Deno],
start: "2022",
statuses: [Status.ActiveDeveloped, Status.Experimental],
},
{
name: RepoLink("hwt", "//github.com/pleshevskiy/hwt"),
description:
"healthy workaholic timer A tool that keeps you from breaking your health by working all day.",
roles: [Role.Author],
technologies: [Technology.Rust],
start: "2022",
statuses: [Status.ActiveDeveloped],
},
{
name: RepoLink("migra", "//github.com/pleshevskiy/migra"),
description: "Simple SQL migration manager for your project.",
roles: [Role.Author],
technologies: [Technology.Rust],
start: "2021",
statuses: [Status.AsIs],
},
{
name: RepoLink(
"ood_persistence",
"//github.com/pleshevskiy/ood_persistence",
),
description:
"Asynchronous and synchronous interfaces and persistence implementations for your OOD architecture ",
roles: [Role.Author],
technologies: [Technology.Rust],
start: "2021",
statuses: [Status.Deprecated, Status.Experimental],
},
{
name: RepoLink(
"espruino-starter",
"//github.com/pleshevskiy/espruino-starter",
),
description:
"Quickly start creating your new project on the espruino board or a board based on it.",
roles: [Role.Author],
technologies: [Technology.JavaScript],
start: "2021",
statuses: [Status.AsIs],
},
{
name: RepoLink(
"sonic-channel",
"//github.com/pleshevskiy/sonic-channel",
),
description: "Rust client for sonic search backend.",
roles: [Role.Author],
technologies: [Technology.Rust],
start: "2020",
statuses: [Status.PassivelyMaintained],
},
{
name: RepoLink(
"react-rest-request",
"//github.com/pleshevskiy/react-rest-request",
),
description:
"Minimalistic REST API client for React inspired by Apollo.",
roles: [Role.Author],
technologies: [Technology.TypeScript, Technology.React],
start: "2020",
statuses: [Status.AsIs],
},
{
name: RepoLink("itconfig", "/pleshevskiy/itconfig"),
description:
"Easy build a configs from environment variables and use it in globally.",
roles: [Role.Author],
technologies: [Technology.Rust],
start: "2019",
statuses: [Status.PassivelyMaintained],
},
{
name: Link("Cabinet Master Progress", {
href: "https://cabinet.masterprogress.ru",
}),
description:
"Student's cabinet of the educational center Master Progress (SSR + SPA)",
roles: [Role.TechLead],
technologies: [Technology.Python, Technology.Flask, Technology.React],
start: "2019",
statuses: [Status.PassivelyMaintained],
},
{
name: Link("Master Progress", { href: "https://masterprogress.ru" }),
description:
"Main website of the educational center Master Progress (SSR + Forms)",
roles: [Role.TechLead],
technologies: [Technology.Python, Technology.Flask],
start: "2018",
statuses: [Status.PassivelyMaintained],
},
{
name: RepoLink("ictmpl", "//github.com/pleshevskiy/ictmpl"),
description: "Generate projects from templates",
roles: [Role.Author],
technologies: [Technology.Python],
start: "2018",
statuses: [Status.AsIs],
},
{
name: RepoLink("jjcrypto", "//github.com/pleshevskiy/ictmpl"),
description: "Javascript encoder and decoder",
roles: [Role.Author],
technologies: [Technology.Php],
start: "2015",
statuses: [Status.AsIs],
},
]),
]),
]);
}
function ChronologicalWorksTable(works: Work[]): AnyNode {
return E("table", [], [
E("thead", [], [ E("thead", [], [
tr([ tr([
th("Name"), th("Name"),
@ -24,145 +148,47 @@ export function WorksPage(ctx: Context): AnyNode {
th("Status"), th("Status"),
]), ]),
]), ]),
E("tbody", [], [ E(
tr([ "tbody",
td([RepoLink("paren", "/pleshevskiy/paren")]), [],
td("Library for parsing and rendering information."), works.map((work) => {
td("author"), return tr([
td("TS, Deno"), td([work.name]),
td("2022"), td(work.description),
td(`${Status.ActiveDeveloped}, ${Status.Experimental}`), td(work.roles.join(", ")),
]), td(work.technologies.join(", ")),
tr([ td(work.start),
td([RepoLink("hwt", "//github.com/pleshevskiy/hwt")]), td(work.statuses.join(", ")),
td(
"healthy workaholic timer A tool that keeps you from breaking your health by working all day.",
),
td("author"),
td("Rust"),
td("2022"),
td(Status.ActiveDeveloped),
]),
tr([
td([RepoLink("migra", "//github.com/pleshevskiy/migra")]),
td("Simple SQL migration manager for your project."),
td("author"),
td("Rust"),
td("2021"),
td(Status.AsIs),
]),
tr([
td([
RepoLink(
"ood_persistence",
"//github.com/pleshevskiy/ood_persistence",
),
]),
td(
"Asynchronous and synchronous interfaces and persistence implementations for your OOD architecture ",
),
td("author"),
td("Rust"),
td("2021"),
td(`${Status.Deprecated}, ${Status.Experimental}`),
]),
tr([
td([
RepoLink(
"espruino-starter",
"//github.com/pleshevskiy/espruino-starter",
),
]),
td(
"Quickly start creating your new project on the espruino board or a board based on it.",
),
td("author"),
td("JS"),
td("2021"),
td(Status.AsIs),
]),
tr([
td([
RepoLink(
"sonic-channel",
"//github.com/pleshevskiy/sonic-channel",
),
]),
td("Rust client for sonic search backend."),
td("author"),
td("Rust"),
td("2020"),
td(Status.PassivelyMaintained),
]),
tr([
td([
RepoLink(
"react-rest-request",
"//github.com/pleshevskiy/react-rest-request",
),
]),
td("Minimalistic REST API client for React inspired by Apollo."),
td("author"),
td("TS, React"),
td("2020"),
td(Status.AsIs),
]),
tr([
td([RepoLink("itconfig", "/pleshevskiy/itconfig")]),
td(
"Easy build a configs from environment variables and use it in globally.",
),
td("author"),
td("Rust"),
td("2019"),
td(Status.PassivelyMaintained),
]),
tr([
td([
Link("Cabinet Master Progress", {
href: "https://cabinet.masterprogress.ru",
}),
]),
td(
"Student's cabinet of the educational center Master Progress (SSR + SPA)",
),
td("Tech lead"),
td("Python, Flask, React"),
td("2019"),
td(Status.PassivelyMaintained),
]),
tr([
td([
Link("Master Progress", { href: "https://masterprogress.ru" }),
]),
td(
"Main website of the educational center Master Progress (SSR + Forms)",
),
td("Tech lead"),
td("Python, Flask"),
td("2018"),
td(Status.PassivelyMaintained),
]),
tr([
td([RepoLink("ictmpl", "//github.com/pleshevskiy/ictmpl")]),
td("Generate projects from templates"),
td("author"),
td("Python"),
td("2018"),
td(Status.AsIs),
]),
tr([
td([RepoLink("jjcrypto", "//github.com/pleshevskiy/ictmpl")]),
td("Javascript encoder and decoder"),
td("author"),
td("PHP"),
td("2015"),
td(Status.AsIs),
]),
]),
]),
]),
]); ]);
}),
),
]);
}
interface Work {
name: AnyNode;
description: string;
roles: Role[];
technologies: Technology[];
start: string;
statuses: Status[];
}
enum Role {
Author = "author",
TechLead = "tech lead",
}
enum Technology {
JavaScript = "JS",
TypeScript = "TS",
Rust = "Rust",
Python = "Python",
Php = "PHP",
Deno = "Deno",
NodeJS = "NodeJS",
Flask = "Flask",
React = "React",
} }
enum Status { enum Status {