web file modifications (CSS/JS)
I have searched around and didn't find an answer, my apologies if I missed it.
I have played around with live editing the CSS (F12 on Chrome) to make the interface a little more mobile friendly. However when I make those changes to the files in /root/Beagle_SDR_GPS/web/openwebrx the application does not use them (loads them from a cache or a binary?). I even tried making the whole project to no avail.
What am I missing?
Thanks,
Nick W1NJC
I have played around with live editing the CSS (F12 on Chrome) to make the interface a little more mobile friendly. However when I make those changes to the files in /root/Beagle_SDR_GPS/web/openwebrx the application does not use them (loads them from a cache or a binary?). I even tried making the whole project to no avail.
What am I missing?
Thanks,
Nick W1NJC
Comments
When a "make install" is run all the support files, including CSS/JS, are packaged into the Kiwi binary so they are served directly out of main memory for maximum speed. That's the business at the end of the make about running the mkdata.pl script and creating the files edata_{embed,always}.cpp Also, you can use the "md" (make debug) command and look for the output definitions for FILES_EMBED and FILES_ALWAYS. The files listed under FILES_ALWAYS are packaged up even in development mode because they are very unlikely to change (e.g. fonts etc.) You have to look through the sub-Makefiles of the project to find all the contributors to FILES_{EMBED,ALWAYS}. And for the internal extensions these definitions are auto-generated.
There is experimental code to apply the usual js/css minify/merge/gzip to the files. But this work is unfinished.
The built-in web server attempts to generate and respond to the HTTP caching protocol so the browser will correctly cache the files. But this doesn't seem to work in all cases (e.g. it had to be disabled for mobile devices for reasons I still don't understand). Like so many things this desperately needs to be fixed..
@media only screen
and (max-device-width: 600px)
{
#id-readme {
display: none;
}
#id-control {
transform: scale(.8);
transform-origin: bottom right;
right:0 !important
}
div#id-top-bar * {
font-size: 0.9em;
}
#id-band-container {
display: none;
}
}
In order to implement this you have to manually edit your ~/Beagle_SDR_GPS/web/openwebrx/openwebrx.css file, and then per the instructions above:
then either:
OR
./ku #runs application in background mode
Wrap that stuff in a <style> ... </style> and chuck it in the box at the bottom of the webpage tab of the admin page that says "Additional HTML/Javascript for HTML element (e.g. Google analytics)". Then you don't have to edit any files and the changes will persist across software updates. And it's easier to experiment with. No need to restart the Kiwi or anything. Just edit the stuff in the box and reload the user connection to see the result. Edits in the box are saved to the Kiwi configuration as you type each time you press the return key (arguably a bug).
i.e.