Closed HeCodes2Much closed 2 years ago
Hey, wdym by public files ?
like if i want css/style.css or js/chart.js
im working on a custom theme but adding extra files to the themeing doesnt seem to work
<script src="vendor/chart.js/Chart.min.js"></script>
something like this doent work
That's weird. It should work haha
it might do it i had them in the right spot but i'm not too sure where they would go as im trying in the theme location but that doesnt work
ok so i found where they have to go and its not the best sport for them i have to go into DiscordBot/node_modules/discord-easy-dashboard
and make a public folder there with the file... maybe it needs a public: path/to/public
Mmh i think you can just use the correct path for your files using ../ for example
am i doing this right theme: require("../dashboard/themes/therepo.club"),
to use my custom theme
theme: "../../../dashboard/themes/therepo.club",
this also loads the theme but the theme doesnt load the public folder unless its inside DiscordBot/node_modules/discord-easy-dashboard
I meant to say something like this:
<script src="../../vendor/chart.js/Chart.min.js"></script>
that still comes back as 404 page not found :)
i have gone from ../
to ../../../../../../../../../../
and still nothing unless there inside of /node_modules/discord-easy-dashboard
Mmh weird Well, please leave this issue open and I will try to fix the problem. Otherwise you can submit a pull request!
@SimonLeclere https://github.com/SimonLeclere/discord-easy-dashboard/pull/21 there you go mate i fixed the issue :)
demo
const dashboard = new Dashboard(client, {
theme: "../../../dashboard/themes/therepo.club",
public: "../../../dashboard/themes/therepo.club/public",
description: "A super cool bot with an online dashboard!",
baseUrl: "http://localhost",
port: 3000,
}
Super cool ! I'll check that later (it's 11pm in France haha). Thanks a lot for your contribution
Oh and if you think the final result of your theme is cool and you decide to make it open-source, feel free to open an issue here so I can add it in the readme!
hey is there no way to add public files to this dashboard? if so where do they go?