Skip to content
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

[WIP] improvement: use jaspr to render html page #76

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

schultek
Copy link

@passsy What do you think?

Just the proof of concept for now, can be improved.

@passsy
Copy link
Owner

passsy commented Nov 22, 2024

Awesome! I was a bit worried that rendering would take too long. I measured 35ms. That's a tax I'm willing to pay!

I already feel more confident writing logic in Jaspr vs plain HTML/CSS. I'm happy to take it over from here ✌️

@schultek
Copy link
Author

schultek commented Nov 22, 2024

Very cool.

I'm setting up the client logic right now, give me another day then you can take over 😊

@schultek
Copy link
Author

Now its fully migrated, Jaspr renders both server-side (the html generation) and client side (the interactivity).

To keep the setup simple, I added a tooling script that compiles the client-side code to js and places it in the script.js.dart file. So whenever the client-side code is modified, run dart run tool/compile_js.dart.

For now I just mirrored the exact design and functionality of the existing website, but I'm happy to help with improving this as a follow up if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants