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

Custom build of built in web pages do not function correctly #30

Open
micgresham opened this issue Mar 10, 2024 · 3 comments
Open

Custom build of built in web pages do not function correctly #30

micgresham opened this issue Mar 10, 2024 · 3 comments

Comments

@micgresham
Copy link

I followed the instructions to create a custom version of the edit pages using the instructions:

If you want customize /setup webpage (headers, logo etc etc):

edit the source files as your needs (setup.htm, app.js, style.css)
open a terminal in build_setup folder and run npm i to install all nodejs modules needed
run node minify.js
overwrite the content of setup_htm.h inside /src folder with the new generated file

But none of the JS elements work afterwards.

Suggestions?

@cotestatnt
Copy link
Owner

The script only works on the /setup page because it works specifically on the files on that page.
If you want to use it with the /edit page you need to modify it appropriately.

My advice, however, is:

  • use online tools to minimize CSS and Javascript (optional, it is only for reducing the size of file)
  • create the gzip file of the minimized /edit page (for example using 7-Zip)
  • finally with this little program, create the C array to copy&paste into the library (the page is not updated, Bin2C is no longer a command line tool)

image

@micgresham
Copy link
Author

I spoke in error. It is the/setup page I tried to customize. The changes worked, but none of the buttons (js) worked when it moved the setup.h as instructed.

@cotestatnt
Copy link
Owner

Check the browser dev-tools console (press key F12).
You probably made some small mistake which interrupts the functioning of the js script.

When I want make changes to the /setup page, I copy the 3 files (setup.htm, app.js, style.css) into the microcontroller's flash memory and I modify directly using builtin /edit web page.

When everything works as I want, I minimize the sources and then create the setup.min.htm file.
If this also works without problems, I proceed to create the .h file to insert into the library.

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