Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit d8ed152

Browse files
authored
Asset fixv2 (#43)
* lets try importing assets to fix the asset issue * Assets finally fixed
1 parent 3f056f7 commit d8ed152

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

rsbuild.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import { pluginSvelte } from "@rsbuild/plugin-svelte";
33

44
export default defineConfig({
55
plugins: [pluginSvelte()],
6-
dev: {
7-
assetPrefix: "/LES/",
8-
},
96
output: {
107
assetPrefix: "/LES/",
118
},

src/App.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
} from "./state.svelte";
2525
2626
import HomepageLogo from "/public/homepagelogo.png";
27+
import Favicon from "/public/favicon.png";
2728
2829
const dashboard = getDashboard();
2930
const currentComponent = getComponent();
@@ -73,7 +74,7 @@
7374
name="description"
7475
content="A simulation tool for comparing schedulable load algorithms and twinworlds in a local energy system environment." />
7576
<meta name="viewport" content="width=device-width, initial-scale=1" />
76-
<link rel="icon" href="/favicon.png" />
77+
<link rel="icon" href={Favicon} />
7778
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.36.5/ace.min.js"></script>
7879
</svelte:head>
7980

src/Sidebar.svelte

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<script lang="ts">
22
import { getComponent, getStepperData, getRuntime, getLoopManager } from "./state.svelte";
33
4+
import Arrows from "/public/arrows.png";
5+
import Rectangle from "/public/rectangle.png";
6+
import Adjustment from "/public/adjustment.png";
7+
import Calendar from "/public/calendar.png";
8+
import Stop from "/public/stop.png";
9+
410
const component = getComponent();
511
const stepperData = getStepperData();
612
const runtime = getRuntime();
@@ -35,7 +41,7 @@
3541
{isMenuOpen ? 'translate-x-0' : '-translate-x-full'} flex flex-col">
3642
<div class="grow overflow-auto">
3743
<div class="bg-les-gray-700 flex w-full items-center gap-3 p-4">
38-
<img src="/arrows.png" alt="" class="rotate-180 transform" />
44+
<img src={Arrows} alt="" class="rotate-180 transform" />
3945
<p class="font-bold">LES</p>
4046
</div>
4147
<div class="mt-4 flex flex-col items-start justify-center gap-3">
@@ -46,7 +52,7 @@
4652
component.setComponent("Dashboard");
4753
isMenuOpen = false;
4854
}}>
49-
<img src="/rectangle.png" alt="" />
55+
<img src={Rectangle} alt="" />
5056
<p>Dashboard</p>
5157
</button>
5258
<button
@@ -56,7 +62,7 @@
5662
component.setComponent("Simulation");
5763
isMenuOpen = false;
5864
}}>
59-
<img src="/adjustment.png" alt="" />
65+
<img src={Adjustment} alt="" />
6066
<p>Simulation</p>
6167
</button>
6268
<button
@@ -66,7 +72,7 @@
6672
component.setComponent("Schedulable Loads");
6773
isMenuOpen = false;
6874
}}>
69-
<img src="/calendar.png" alt="" />
75+
<img src={Calendar} alt="" />
7076
<p>Schedulable Loads</p>
7177
</button>
7278
</div>
@@ -100,7 +106,7 @@
100106
id="stop-button"
101107
class="flex w-full items-center gap-3 bg-red-950 p-4 py-6 transition-colors duration-200 hover:bg-red-800 hover:brightness-110"
102108
onclick={stop}>
103-
<img src="/stop.png" alt="" />
109+
<img src={Stop} alt="" />
104110
<p>Stop Simulation</p>
105111
</button>
106112
</div>
@@ -110,7 +116,7 @@
110116
<div
111117
class="sticky hidden w-full items-center justify-between border-b border-gray-800 bg-gray-900 px-4 py-2 lg:flex">
112118
<div class="flex items-center gap-2">
113-
<img src="/arrows.png" alt="" class="h-6 w-6 rotate-180 transform" />
119+
<img src={Arrows} alt="" class="h-6 w-6 rotate-180 transform" />
114120
<span class="text-lg font-bold text-white">LES</span>
115121
</div>
116122
<nav class="flex items-center space-x-4">
@@ -119,23 +125,23 @@
119125
class:bg-les-highlight={component.currentComponent === "Dashboard"}
120126
class:text-white={component.currentComponent === "Dashboard"}
121127
onclick={() => component.setComponent("Dashboard")}>
122-
<img src="/rectangle.png" alt="" class="h-4 w-4" />
128+
<img src={Rectangle} alt="" class="h-4 w-4" />
123129
<span>Dashboard</span>
124130
</button>
125131
<button
126132
class="hover:bg-les-gray-700 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1.5 text-sm text-gray-300 transition-colors duration-200 hover:text-white"
127133
class:bg-les-highlight={component.currentComponent === "Simulation"}
128134
class:text-white={component.currentComponent === "Simulation"}
129135
onclick={() => component.setComponent("Simulation")}>
130-
<img src="/adjustment.png" alt="" class="h-4 w-4" />
136+
<img src={Adjustment} alt="" class="h-4 w-4" />
131137
<span>Simulation</span>
132138
</button>
133139
<button
134140
class="hover:bg-les-gray-700 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1.5 text-sm text-gray-300 transition-colors duration-200 hover:text-white"
135141
class:bg-les-highlight={component.currentComponent === "Schedulable Loads"}
136142
class:text-white={component.currentComponent === "Schedulable Loads"}
137143
onclick={() => component.setComponent("Schedulable Loads")}>
138-
<img src="/calendar.png" alt="" class="h-4 w-4" />
144+
<img src={Calendar} alt="" class="h-4 w-4" />
139145
<span>Schedulable Loads</span>
140146
</button>
141147
</nav>
@@ -162,7 +168,7 @@
162168
class="flex cursor-pointer items-center gap-1.5 rounded-md bg-red-950 px-3 py-1.5 text-sm
163169
text-white transition-colors duration-200 hover:bg-red-900"
164170
onclick={stop}>
165-
<img src="/stop.png" alt="" class="h-4 w-4" />
171+
<img src={Stop} alt="" class="h-4 w-4" />
166172
<span>Stop</span>
167173
</button>
168174
</div>

0 commit comments

Comments
 (0)