From 3cf85cdde0987ed8f2e179790291634fa9bd1a3c Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 6 Feb 2024 17:05:46 +0000 Subject: [PATCH] Extracts table into own component, starts Progress component, adds icons to nav --- web/src/components/core/icon.tsx | 10 +++ web/src/components/furniture/nav.tsx | 10 ++- web/src/components/psc/checklist-table.tsx | 81 ++++++++++++++++++++++ web/src/components/psc/progress.tsx | 50 +++++++++++++ web/src/routes/checklist/[title]/index.tsx | 72 ++----------------- web/src/routes/index.tsx | 6 +- 6 files changed, 156 insertions(+), 73 deletions(-) create mode 100644 web/src/components/psc/checklist-table.tsx create mode 100644 web/src/components/psc/progress.tsx diff --git a/web/src/components/core/icon.tsx b/web/src/components/core/icon.tsx index edee290..db1b1d1 100644 --- a/web/src/components/core/icon.tsx +++ b/web/src/components/core/icon.tsx @@ -99,6 +99,16 @@ const getSvgPath = (icon: string) => { vb: "0 0 512 512", path: "M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z", }; + case 'articles': + return { + vb: "0 0 512 512", + path: "M96 96c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H80c-44.2 0-80-35.8-80-80V128c0-17.7 14.3-32 32-32s32 14.3 32 32V400c0 8.8 7.2 16 16 16s16-7.2 16-16V96zm64 24v80c0 13.3 10.7 24 24 24H296c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24H184c-13.3 0-24 10.7-24 24zm208-8c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16s-7.2-16-16-16H384c-8.8 0-16 7.2-16 16zm0 96c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16s-7.2-16-16-16H384c-8.8 0-16 7.2-16 16zM160 304c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16s-7.2-16-16-16H176c-8.8 0-16 7.2-16 16zm0 96c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16s-7.2-16-16-16H176c-8.8 0-16 7.2-16 16z", + }; + case 'about': + return { + vb: "0 0 512 512", + path: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z", + }; default: return { vb: "", path: "" }; // Default path or a placeholder icon } diff --git a/web/src/components/furniture/nav.tsx b/web/src/components/furniture/nav.tsx index 2482cb7..7e1780a 100644 --- a/web/src/components/furniture/nav.tsx +++ b/web/src/components/furniture/nav.tsx @@ -89,7 +89,7 @@ export default component$(() => {
  • Home
  • GitHub
  • - Checklists + Checklists
  • - Articles + + Articles +
  • - About + + About +