Web Dev Solutions

Catalin Mititiuc

From 51974436fff22bcd2c37471351165179bb5daa23 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Thu, 30 May 2024 10:44:22 -0700 Subject: WIP: dynamically add references to scenario svg --- esbuild-server.mjs | 2 +- public/assets/images/scenario-dragon_hunting.svg | 165 +++++++++++++++++++---- public/assets/images/scenario-side_show.svg | 44 +++--- src/import_external_resources.js | 25 ++-- 4 files changed, 168 insertions(+), 68 deletions(-) diff --git a/esbuild-server.mjs b/esbuild-server.mjs index 01629d1..10816d5 100644 --- a/esbuild-server.mjs +++ b/esbuild-server.mjs @@ -129,7 +129,7 @@ const ctx = await esbuild.context({ outdir: 'build', plugins: [resolveImportedSvg], loader: { - '.svg': 'file' + '.svg': 'text' }, assetNames: 'assets/images/[name]-[hash]', }); diff --git a/public/assets/images/scenario-dragon_hunting.svg b/public/assets/images/scenario-dragon_hunting.svg index 5f16d7a..9a41451 100644 --- a/public/assets/images/scenario-dragon_hunting.svg +++ b/public/assets/images/scenario-dragon_hunting.svg @@ -1,6 +1,5 @@ - - @@ -46,13 +44,68 @@ - 1 - 2 - 3 - 4 - 5 - 6 - 7 + + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -61,9 +114,9 @@ - - - + + + @@ -72,57 +125,113 @@ - + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + diff --git a/public/assets/images/scenario-side_show.svg b/public/assets/images/scenario-side_show.svg index 543475e..c95b0f1 100644 --- a/public/assets/images/scenario-side_show.svg +++ b/public/assets/images/scenario-side_show.svg @@ -1,5 +1,5 @@ - +