GEANT / CAT

CAT - the Configuration Assistant Tool for Enterprise Wi-Fi networks such as eduroam
Other
95 stars 53 forks source link

modern skin: download button uses hard-coded colours #296

Open restena-sw opened 8 months ago

restena-sw commented 8 months ago

Issue type

Defect/Feature description

While it is possible to configure thematic colours for the product (config/Master.php and skins/modern/resources/css/cat-user.css), those colours are not considered for rendering the big download button. That one uses hardcoded eduroam-themed colours.

How to reproduce issue

1) Install product 2) change thematic colours at the pertinent places 3) observe the eduroam-blue download button

Detail of issue

This appears to happen in cat-user.css

button.large_button
twoln commented 8 months ago

The eduroam download button is controlled by the guess_os class setting. Hovever the background of the optional OpenRoaming button was indeed hard coded in the JS source. Changed this to be identical to the eduroam button - this both are controlled by the guess_os setting.

restena-sw commented 8 months ago

Hm, I didn't even realise /these/ buttons yet. I am talking about the big (blue) button on the front page...

twoln commented 8 months ago

I see no problem with this one - just change the background-color for large_button

twoln commented 8 months ago

Since we now have the css as php we could easily use php constants but this might narrow the possibilities for changes and so I did not make this large change at the moment.

restena-sw commented 8 months ago

It's not even that complicated. The user CSS at https://github.com/GEANT/CAT/blob/master/web/skins/modern/resources/css/cat-user.css#L21 defines color1..3 constants. Those could be referred to, which already makes the hard-coding go away.

twoln commented 8 months ago

I put in those constants myself and then stopped using them after realizing that some browsers had problems with them. Not sure wha the situation is now, you using php would be absolutely safe, the question is dow we think this is the correct approach.