Coder Social home page Coder Social logo

Website about esp-radio HOT 27 OPEN

edzelf avatar edzelf commented on September 27, 2024
Website

from esp-radio.

Comments (27)

Sander0542 avatar Sander0542 commented on September 27, 2024

I couldn't found any errors. here is the zip with all the files in the data folder
data.zip

from esp-radio.

g-zajac avatar g-zajac commented on September 27, 2024

Hello
Looks much better indeed. Any chance to get an offline version and ESP fs friendly please?
Best wishes
Grzegorz

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

Hello,

Could you tell me what you mean with an offline version?
I don't know what a ESP fs friendly is.

Regards,
Sander

from esp-radio.

g-zajac avatar g-zajac commented on September 27, 2024

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

Yes, i use some internet css for the style. I will include the css in the data map

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

I'll add a new download link in a few minutes

from esp-radio.

g-zajac avatar g-zajac commented on September 27, 2024

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

I'm done, it should work now
data.zip

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

I like the looks! But 1.5 MB is quite a lot of space...

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

Yes, that is because the css is in the data map, if you take remove the css map and change te url its a lot smaller

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

I have two version now:

Internet CSS --> data.zip 20 kb
Included CSS -->data.zip 1,5 mb

I would use the Internet CSS, becuase then you have more space left in your ESP8266.

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

I like the "Included" version for safety and independency. I will try to make a smaller version with the same looks. My aim is 95 percent of the looks for 1 percent of the size...

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

Yes, the best thing you should do is to remove all the parts from the css which are not used.

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

New interface now in data-directory (14 KB).

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

Nice work,

The page doesn't work good on a phone like the one I made.
There are a few things I would change to make it even nicer:

  • White background of the textboxes
  • No URL in the "ESP Radio" title in the topbar
  • 3 Links on every page, not 2

If you want, I can change it and send it for the next update

from esp-radio.

Sander0542 avatar Sander0542 commented on September 27, 2024

I'm done, data.zip (17,1 kB)

from esp-radio.

thermo2016 avatar thermo2016 commented on September 27, 2024

I think the white background & links etc can be fixed by editing the ESP-radio.ino file.
Go to function String getContentType ( String filename )
and add this line:

else if ( filename.endsWith ( ".css" ) ) return "text/css" ;

Without this, the esp internal web sever returns ccs code as text/plain whereas it needs to be text/ccs.
I hope this helps.

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

I added Sanders website to the data directory.
I added the ContentType "text/css" to the sketch.

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

The webinterface is now in PROGMEM. More reliable than in SPIFFS.

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

I found out that the ESP8266 will not handle multiple connections to the async webserver. Most browsers will open multiple connections to get index.html, radio.css and favicon.ico simultaneously. In Mozilla I changed the "network.http.max-persistent-connections-per-server"to 1 (was 6).

from esp-radio.

Pavulon87 avatar Pavulon87 commented on September 27, 2024

Edzelf, maybe replace <link rel="stylesheet" type="text/css" href="radio.css"> with
<script type="text/javascript"> var stylesheet = document.createElement('link'); stylesheet.href = 'radio.css'; stylesheet.rel = 'stylesheet'; stylesheet.type = 'text/css'; document.getElementsByTagName('head')[0].appendChild(stylesheet); </script>
and add <noscript><link rel="stylesheet" href="radio.css"></noscript> after </html>
It should work.

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

I will try that. Can you explain the difference?

from esp-radio.

Pavulon87 avatar Pavulon87 commented on September 27, 2024

radio.css should start loading after page is loaded, so multiple connections will not be needed.
Tested in google chrome and firefox

from esp-radio.

Pavulon87 avatar Pavulon87 commented on September 27, 2024

I'm also trying additional headers.
changed(every file):
request->send_P( 200, ct, index_html );
to:
AsyncWebServerResponse *response = request->beginResponse_P( 200, ct, index_html ) ;
and added:
response->addHeader("Server","Esp-radio Web Server");
response->addHeader("Cache-Control","max-age=3600");
response->addHeader("Last-Modified","Sat, 07 Jan 2017 21:00:00 GMT");
request->send(response);

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

Pavulon87: I updated the project according to you suggestions.

from esp-radio.

GabeHC avatar GabeHC commented on September 27, 2024

What tool should I use to convert those resource files into C array?
I had custom icon need to put into PROGMEM. Don't know how to do it.

from esp-radio.

Edzelf avatar Edzelf commented on September 27, 2024

I used "od" on a Linux machine, but Googling on "dump file in ascii" or "hexdump" will give you all the answers.

from esp-radio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.