Jump to content

UnMenu Favicon


christuf

Recommended Posts

Hi - UnMenu is such a beautiful piece of software, I feel it deserves and equally snazzy favicon to replace the somewhat mundane white piece of paper there at the moment.

 

Does anyone with some photoshop skills have some time to make a little icon, and if so, would Joe L. be open to putting it into the code? :)

Link to comment

So - I thought I'd put together a few little favicons.  I woke up this am having had a bit of a brainwave in my sleep (dreaming of UnRaid apparently!).  The UnMenu page refreshes on a very frequent basis, so why not change the UnMenu favicon to reflect the status of the array.  I have the page open all the time in Firefox, and pinned to the left side of the tabs.

 

By changing the favicon based on the status, I can see at a glance in my browser the status of the array.  I've made 5 favicons, based on the same underlying design:

- green.ico - when at least one disk in the array is spun-up

- greenyellow.ico - when the array is spun-down

- red.ico - when UnRaid needs your attention (not sure if this ever happens)

- redcross.ico - when UnRaid has detected a disk failure

- blue.ico - just a generic icon in case the above don't work/ aren't of interest

 

I don't know the legal lingo, but I freely release these into the public domain without license, so feel free to do with these as you please.

favicons.zip

Link to comment

So - I thought I'd put together a few little favicons.  I woke up this am having had a bit of a brainwave in my sleep (dreaming of UnRaid apparently!).  The UnMenu page refreshes on a very frequent basis, so why not change the UnMenu favicon to reflect the status of the array.  I have the page open all the time in Firefox, and pinned to the left side of the tabs.

 

By changing the favicon based on the status, I can see at a glance in my browser the status of the array.  I've made 5 favicons, based on the same underlying design:

- green.ico - when at least one disk in the array is spun-up

- greenyellow.ico - when the array is spun-down

- red.ico - when UnRaid needs your attention (not sure if this ever happens)

- redcross.ico - when UnRaid has detected a disk failure

- blue.ico - just a generic icon in case the above don't work/ aren't of interest

 

I don't know the legal lingo, but I freely release these into the public domain without license, so feel free to do with these as you please.

You do realize that unMENU is not a "real" web-server?  I have absolutely no idea if it can be made to serve a favicon.  (and I won't have the chance to even think about trying to make it until next month I'm so busy) 

 

I do like your idea though, assuming the browser does not cache the first favicon it gets, it might work.  As I said, unMENU cannot serve images, but bjp999 and I are using a few tricks to make you think it does. ;)

 

Joe L.

Link to comment

You do realize that unMENU is not a "real" web-server?   I have absolutely no idea if it can be made to serve a favicon.  (and I won't have the chance to even think about trying to make it until next month I'm so busy)  

 

I do like your idea though, assuming the browser does not cache the first favicon it gets, it might work.   As I said, unMENU cannot serve images, but bjp999 and I are using a few tricks to make you think it does. ;)

 

Joe L.

 

I realized that it wasn't a normal webserver when I tried to retro-fit an icon into the system myself... couldn't find an HTML document anywhere!  Anyway, all that needs to be done is to write the following line as you're generating the <head> content of the webpage:

<link rel="shortcut icon" href="/path/to/favicon.ico" />

I appreciate that this may be more challenging to actually do in unMENU than I am making out... I guess the "/path/to/favicon.ico" has to be handled in a clever way.

 

I agree that the caching issue could cause a problem - and may cause a browser specific problem.  Perhaps in a months or so when you get a chance to try it, you can see.  If not, then that idea can be scrapped!

 

Thank you for the great work!

Link to comment

You can try setting No-Cache in the meta tags, and possibly having Javascript checking a DOM element to see if the Array's status (I don't have unRAID setup yet, so I'm not sure what it really looks like or how it acts) and update the <link> tag with the .ico file reflecting its status.

Link to comment

You can try setting No-Cache in the meta tags, and possibly having Javascript checking a DOM element to see if the Array's status (I don't have unRAID setup yet, so I'm not sure what it really looks like or how it acts) and update the <link> tag with the .ico file reflecting its status.

 

Good to know - thank you for the info.  Joe L. is a guru... if it is possible to do, I know he'll figure it out!

Link to comment

I realized that it wasn't a normal webserver when I tried to retro-fit an icon into the system myself... couldn't find an HTML document anywhere!

True... but it tries really hard to pretend it is a web-server...  ;)  and it is not too shabby for a few "awk" scripts.

 Anyway, all that needs to be done is to write the following line as you're generating the <head> content of the webpage:

<link rel="shortcut icon" href="/path/to/favicon.ico" />

I appreciate that this may be more challenging to actually do in unMENU than I am making out... I guess the "/path/to/favicon.ico" has to be handled in a clever way.

Exactly, we can serve objects from /var/log/images (using either emhttp to do the dirty work, or the tiny shell script image server I wrote.  I don't think I allowed .ico images in the shell version though, so it will need changing.  /var/log/images is a symbolic link to /boot/unmenu/images so you can put your favicon.ico file there, at /boot/unmenu/images/favicon.ico

 

Then, just add a line to the "head" on the pages to reference href="/var/log/favicon.ico"

The "html" code is in unmenu.awk

function GetPageHEAD

starting at line 791.

I agree that the caching issue could cause a problem - and may cause a browser specific problem.  Perhaps in a months or so when you get a chance to try it, you can see.  If not, then that idea can be scrapped!

 

Thank you for the great work!

You are welcome.  It is amazing how far unMENU has come over the years... all because of great suggestions and contributions from forum members.

 

Joe L.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...