-
Notifications
You must be signed in to change notification settings - Fork 16
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
Formatting template files #4
Comments
If you used yew.rs, you could move all the template html to rust, as well as get rid of the rocket back-end entirely. |
Sounds like it wouldnt work without js in that case, which i want to avoid. I also dont want to translate templates to another language, tried that before and its a ton of work for very little benefit. Right now i can simply copy-paste most of the html and use it directly. |
Yew uses an Yew also has SSR(renderToString()) and isomorphic app support tho, so if the site doesn't need javascript, its still usable. I'm considering using it for future web apps even tho its slower than inferno and solidjs, just because working in rust is so much nicer. |
The HTML in template files is currently rather messy, It would be good if it could be formatted nicely with an automated formatter, similar to cargo fmt. So far i found two possible tools, but neither of them really works for our usecase:
tidy -mi -w 100 --drop-empty-elements no templates/viewtopic.html.hbs
: only works on complete html files, so when called on partials, it adds head and tries to close all divs, so those changes have to be reverted manually. Even then, the html ends up broken in some unknown way, and the site only returns error 500.The text was updated successfully, but these errors were encountered: