ashokkrish / spatialEpisim

spatialEpisim: Spatial Tracking of Infectious Disease Epidemics using Mathematical Models
GNU General Public License v3.0
8 stars 5 forks source link

MRU colour palette-styled Bootstrap theme #33

Closed bryce-carson closed 1 month ago

bryce-carson commented 1 month ago

See the 2020-07 MRU Brand Guideline, or a newer one if available, and follow the Bootstrap 5 theme guide to create a sufficiently "correct" Bootstrap theme.

bryce-carson commented 1 month ago

An experimental solution to this issue can be experimented with in a spin-off branch of unstable, @kle6951 and @Toby-exe. Whichever of you would love to play around with CSS until it drives you nuts may unassign the other.

bryce-carson commented 1 month ago

Here's some instructions to help you get started.

  1. Fetch the references from origin with git fetch.
  2. Checkout the unstable branch git checkout unstable.
  3. Create a new branch and switch to it: git switch -c unstable-bootstrap-css
  4. Read the Bootstrap 5 theme guide and start hacking on the CSS once you understand how to work with Shiny and Bootstrap themes.
bryce-carson commented 1 month ago

https://rstudio.github.io/bslib/

kle6951 commented 1 month ago

@bryce-carson I have added the bootstrap theme using the bslib package as you suggested. Please take a look and let me know your thoughts. Should we have two themes (dark vs light mode) and have a materialSwitch() for the users to select which mode they want? Let me know what you think.

bryce-carson commented 1 month ago

@bryce-carson I have added the bootstrap theme using the bslib package as you suggested. Please take a look and let me know your thoughts. Should we have two themes (dark vs light mode) and have a materialSwitch() for the users to select which mode they want? Let me know what you think.

Thanks, I'll check it out.

For now, no; I don't think so. Other work has higher priority than a secondary theme, but with the work you've done herein it should be much easier to create such a secondary theme in the future should it be wanted.

Good job!

bryce-carson commented 1 month ago

Please take a look and let me know your thoughts.

Please remove the commented code: the old CSS file in the head(link()) should be totally removed, and the file deleted from the repository, rather than retained like this.

Please also move the definition of lightTheme into ui.R rather than a separate file. Recall, also, that Shiny automatically sources all R files ditectly contained in the R/ folder, so the source statement wasn't required anyways.

@kle6951 , so please remove the head(link()) expression entirely, appropriately delete line 285, and delete the CSS file from the www/ folder.

Thanks!

kle6951 commented 1 month ago

"Please remove the commented code: the old CSS file in the head(link()) should be totally removed, and the file deleted from the repository, rather than retained like this." Oh yeah, I was planning to comment this out and leave it like that temporarily so I can show what change I just made. For now, I will definitely remove it. "Please also move the definition of lightTheme into ui.R rather than a separate file. Recall, also, that Shiny automatically sources all R files ditectly contained in the R/ folder, so the source statement wasn't required anyways." I understand it but somehow it doesn't source the file automatically on my laptop. Therefore, to work with the application, I just include the source() temporarily for my convenience. I will remove it and push it.

bryce-carson commented 1 month ago

I understand it but somehow it doesn't source the file automatically on my laptop. Therefore, to work with the application, I just include the source() temporarily for my convenience. I will remove it and push it.

Hmm... odd. Okay!

kle6951 commented 1 month ago

@bryce-carson I have updated the code following your suggestion. Please let me know anything that you would like me to change or modify. Otherwise, please close the issue.