Skip to content

Commit

Permalink
fix: move the assets into the src and reference them relatively
Browse files Browse the repository at this point in the history
When the app's build is deployed in github pages under the subdir
/ner-annotator/, the image files aren't loading as they are
referenced using absolute paths in the components. Vite build doesn't
automatically update absolute paths to include the BASE. So the files
are moved into the src dir and referenced using relative paths.
  • Loading branch information
tecoholic committed Dec 3, 2024
1 parent cda0ee8 commit 4a4b1f6
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 23 deletions.
16 changes: 8 additions & 8 deletions docs/assets/index-BXYN3bSs.js → docs/assets/index-Bz3un_3O.js

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes
File renamed without changes
5 changes: 0 additions & 5 deletions docs/assets/styles.scss

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>NER Annotator for SpaCy</title>
<script type="module" crossorigin src="/ner-annotator/assets/index-BXYN3bSs.js"></script>
<script type="module" crossorigin src="/ner-annotator/assets/index-Bz3un_3O.js"></script>
<link rel="stylesheet" crossorigin href="/ner-annotator/assets/index-eh-puVY4.css">
</head>
<body>
Expand Down
Binary file removed public/assets/icon_32.png
Binary file not shown.
5 changes: 0 additions & 5 deletions public/assets/styles.scss

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 3 additions & 3 deletions src/components/HelpDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
color="blue"
>
<q-img
src="/assets/step-1.png"
src="../assets/step-1.png"
spinner-color="white"
class="rounded-borders"
style="border: 1px solid #ccc; width: 80%"
Expand Down Expand Up @@ -56,7 +56,7 @@
color="pink"
>
<q-img
src="/assets/step-2.png"
src="../assets/step-2.png"
spinner-color="white"
class="rounded-borders"
style="border: 1px solid #ccc"
Expand Down Expand Up @@ -90,7 +90,7 @@
color="green"
>
<q-img
src="/assets/step-3.png"
src="../assets/step-3.png"
spinner-color="white"
class="rounded-borders"
style="border: 1px solid #ccc; width: 70%"
Expand Down
4 changes: 3 additions & 1 deletion src/components/menubar/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="q-pa-sm q-pl-md row items-center">
<div>
<q-avatar size="xs">
<img src="/assets/icon_32.png" />
<img :src="appIconUrl" />
</q-avatar>
<span class="q-ml-sm">
<strong> NER Annotator </strong>
Expand Down Expand Up @@ -168,6 +168,7 @@ import { useQuasar } from "quasar";
import AboutDialog from "../AboutDialog.vue";
import ExitDialog from "../ExitDialog.vue";
import HelpDialog from "../HelpDialog.vue";
import AppIcon from "../../assets/icon_32.png";
export default {
name: "MenuBar",
Expand Down Expand Up @@ -199,6 +200,7 @@ export default {
showAbout: false,
pendingClick: null,
showHelp: false,
appIconUrl: AppIcon,
};
},
computed: {
Expand Down

0 comments on commit 4a4b1f6

Please sign in to comment.