devkennyy / rungeon

๐Ÿƒโ€โ™‚๏ธOpen source, puzzle based adventure game in your browser
https://rungeon.live/
GNU General Public License v3.0
18 stars 21 forks source link

Styles not applied to rungeon.html when using npm #134

Closed Shabbyconnor closed 2 years ago

Shabbyconnor commented 2 years ago

When testing code using a localhost server (npm start) no styling is applied and an error is thrown.

Screen Shot 2022-07-24 at 11 39 06 PM Screen Shot 2022-07-24 at 11 35 06 PM
Shabbyconnor commented 2 years ago

This could very well be on my end. Just wanted to see if anyone else had this issue.

devkennyy commented 2 years ago
rungeon.use(express.static(__dirname + '/public'));

Since the configuration is /public, file references must begin with a /. I can already make note of some links missing the /. Would you like to try a fix?

Shabbyconnor commented 2 years ago

Changing the file references doesn't seem to work. ๐Ÿ˜•

devkennyy commented 2 years ago

Hmm, this is odd. I do get this error as well. Themes are getting a rework so I guess we'll just have to wait.

gruelingpine185 commented 2 years ago

@Shabbyconnor This issue is caused because as devkennyy said, we are redesigning the theme system and public/rungeon.html (shown below) still has a link to a CSS file that existed with the old theme system. Looking at the rest of the file, it's a combination of new and old system code (theme and stage) from a few branches. @devkennyy Should I merge the WIP code from the themes and stage-remake branches into main? I don't really know how to fix the issue...

https://github.com/devkennyy/rungeon/blob/a629f430c546c6777a13884e0ff1ffc4c48dbb6a/public/rungeon.html#L6-L13

To clarify the difference between the two:

Old Theme System

New Theme System

gruelingpine185 commented 2 years ago

@devkennyy @Shabbyconnor I have a solution now. It's on the stage-remake branch. The only issue I have now is that I can't get index.html to accept the incoming theme from localStorage. If index.html is hardcoded to theme-default, that is the only theme that gets rendered on that page. Without the theme being hard-coded to index.html, this happends:

Screen Shot 2022-07-25 at 1 26 26 PM
devkennyy commented 2 years ago

You can merge it into main if you like, it won't affect rungeon.live. The only thing stopping me from deploying is the themes not working.