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

Make it js framework independent #11

Open
the-man-with-a-golden-mind opened this issue Mar 8, 2024 · 1 comment
Open

Make it js framework independent #11

the-man-with-a-golden-mind opened this issue Mar 8, 2024 · 1 comment

Comments

@the-man-with-a-golden-mind
Copy link

I've figure out that for each project, I am making a small changes in the core.sh
I am changing the htmx_page() so I could have all of the js and css definitions in config.sh
`
function htmx_page() {
[[ ${HTTP_HEADERS["hx-request"]} == "true" ]] || [[ "$INTERNAL_REQUEST" == "true" ]] || cat <<-EOF
<!doctype html>

${STYLES[*]} ${SCRIPTS[*]} $(_inject_hmr) EOF `

and also I am adding

`
function page() {
[[ "$INTERNAL_REQUEST" == "true" ]] || cat <<-EOF
<!doctype html>

${STYLES[*]} ${SCRIPTS[*]} EOF

cat

cat <<-EOF

EOF } `

for more htmx independence. IMHO it looks clearer.

What do you think about change the generator and add the htmx as the possibility not something mandatory? :)

@cgsdev0
Copy link
Owner

cgsdev0 commented Mar 8, 2024

not sure i follow the exact suggestion, but i do like the idea of a more generalized page function (and making the htmx_page function an opt-in thing)

dont have time to do this myself right now, but if you want to put up a PR happy to take a look

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

No branches or pull requests

2 participants