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
Improvement/60 light dark themes #103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement, it looks great!
I'm not sure if we plan on adding other themes in the future. If we do, we could make the code and the UI a bit more scalable without too much effort I believe.
*/ | ||
function set_theme(file) | ||
{ | ||
var oldlink = document.getElementsByTagName("link").item(THEME_INDEX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think getting the link element holding the theme with an id instead of with an index would be more reliable. This solution breaks if the lines are moved around or if we add another link tag before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a light & dark themes are sufficient, but it would be nice if the implementation allows to easily swap themes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a clean clone + execution I now see the issue you mention. When working on the project I modified files in /scoutsuite-report in order to skip the process of making a report each time, I must've poorly transfered over my changes to the /ScoutSuite. Will fix.
EDIT: Found the cause. |
This PR adds a secondary (dark) theme that can be toggled on by clicking on the slider after opening the settings' drop-down menu. The theme is applied instantly and reapplied if needed each time the .html report is opened.
The visual of both themes isn't definitive since @j4v brought to my attention that #59 should've been completed prior to #60. Therefore I'll make the required adjustments to #60 after completing #59, which includes new bootstrap 4 themes.
Here's a collage of the default theme (renamed to light) and dark theme :