-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discussion] Cleaner code #45
Comments
Yes, there is a lot of stuff to clean indeed.
This is an out-of-band swap. When pages are loaded, everything within the div
What do you mean? I cannot see why the header should not appear on those pages?
Not sure why you want to avoid the footer either, but it is really has simple as moving the div within the one for the menu (and probably changing the styling a bit)
I am not sure what you mean there. When moving to a new page or fetching new content, the front-end makes a query; that is all there is to it. |
I mean, it doesn't appear on the app, also I always try to click "Main menu" again to leave the menu lol
I want to remove it since it appears only on the menu on the main app, also to give it a bit of a cleaner look
It's not, since moving it will give it padding, since the padding was added to all the content, not to the single elements, working on fixing it
Sorry if I didn't explain myself well, but stuff that's in files like <% if (locals.v_magical_power) { %> <%= v_magical_power %> <% } else {%> 0 <% } %> and <% function sceneAfter(id) {
const regex = /(B(?<book>[0-9]*)-)?Ch(?<chapter>[0-9]*)[a-c]-.*$/
if (result=regex.exec(id)) {
return (result.groups["book"] == "3") && (parseInt(result.groups["chapter"]) >= 4)
}
} %>
<% if (sceneAfter(locals.v_current_scene)) { %> just feel wrong to see in the middle of html, I feel like there should be a cleaner way to do it. |
Sure, but this is a web app, we do not have to copy the original 1 to 1. Having the header always visible allows you to switch directly from the menu to the stats for instance, which I think is better for navigation. The footer does not do much though.
This is how templating works though? It can definitely be made cleaner but this is regular stuff. |
If that can be made cleaner that'd be perfect |
Most logic needs to change, I'm changing some stuff with the .css but I can't understand how stuff like the header works.
main.css
is not usedutils.js
we havenavigateTo(url)
not usedThe worst thing is that there's no clear distinction from back-end and front-end, I kinda feel like we should clean the code before continuing, maybe put some rules.
For example, at the end of most of the .ejs there is this:
Why is it at the end if it's a header? And what does it do, exactly? Why is there "style" on the .ejs?
I'd put many .css, stuff like
header.css
,footer.css
,text.css
, etc. Instead of having them all insidemain.css
Something cleaner would be:
So that if we want to change stuff it's easier, like switch from that to:
(Honestly idk if we the stuff inside
<%= %>
is possible or completely wrong, let me know)The text was updated successfully, but these errors were encountered: