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

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

Open
1 task done
restena-sw opened this issue Mar 16, 2024 · 6 comments
Open
1 task done

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

restena-sw opened this issue Mar 16, 2024 · 6 comments
Assignees

Comments

@restena-sw
Copy link
Contributor

Issue type

  • Defect - Unexpected behaviour (obvious or has been verified by a project member).

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
Copy link
Contributor

twoln commented Mar 18, 2024

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.

@twoln twoln closed this as completed Mar 18, 2024
@restena-sw
Copy link
Contributor Author

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

@restena-sw restena-sw reopened this Mar 18, 2024
@twoln
Copy link
Contributor

twoln commented Mar 18, 2024

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

@twoln
Copy link
Contributor

twoln commented Mar 18, 2024

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
Copy link
Contributor Author

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
Copy link
Contributor

twoln commented Mar 22, 2024

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.

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