Phylogeny [R] styling suggestions
App name
Styling suggestions
These are only some styling suggestions to get the app to look closer to the mock-up. Did not notice any problems with the functionality of the app. Amazing work!
Fix margins between and around containers
To have equal margins between containers in the web/mobile layout, you can add marginTop = "1rem" into the styling for "left-bottom-graphs" here and "right-bottom-graphs" here as you did for "left-top-graphs" and "right-top-graphs".
You can reduce exact numbers for marginTop and marginBottom if you think the margins are too big, but not necessary.
To add some space at the bottom of the layout, you can add the following snippet style = list(marginBottom = "5rem") for the htmlDiv containing "left-top-graphs", "right-top-graphs", "left-bottom-graphs" and "right-bottom-graphs".
Edit banner layout
To align the banner elements with the white containers below it, you can make the width and margins of the banner match the div below it. This can be achieved by changing width: 100% to width: 80% and margin-bottom: 2% to margin: 2rem auto in the stylesheet here.
Perhaps switch the logo and title around here as shown, so that when the window is resized, the logo appears at the top, which I believe is more standard?
htmlImg(src = "assets/dash-logo-white.png"),
htmlH2("Phylogeny trees and global spread of 6 viruses")
Plus, since the htmlH2() id is not referenced anywhere in the app code or css, id = "title" can also be removed.
To align the placement of the title, change margin: 0 3rem to margin: 2rem 0 here. Perhaps make the title appear smaller like the mock-up, by decreasing font size from font-size: 4rem to font-size: 3rem here and reflecting these changes here or removing this snippet entirely as title font size is kept the same regardless.
To align the placement of the logo, change margin: 0 3rem to margin: 0 -1rem 0 48px here and change margin-bottom: 2rem to margin: 0 48px 0 -1rem here. This will make a scrollbar appear in the banner, which can be removed by changing overflow: auto to overflow: hidden here.
To allow changes dependent on screen size to occur in a snap and to reflect the above changes, change max-width: 950px to max-width: 1100px here. Note that a lot changes to the banner layout work hand-in-hand.
Edit button styling
To remove the underline for a link, you can add textDecoration = "none" into the styling here.
To make the button have a white border and appear smaller like the mock-up, you can change width = "20rem" to width = "15rem" and add border = "1px white solid" into the styling here. Plus, given changes made to banner margins, margin = "3rem 0 0 3rem" can be removed from the button styling.
Edit first container
Consider adding a divider between the two parts in the container with id = "controls-card" like the mock-up, perhaps by adding a right border to the div holding the dropdown menu.
Standardize container layout and titles
To standardize fonts, add font = list(family = "Roboto", size = "13") in the layout of each chart and font = list(size = "18") for the title of each chart. To standardize margins, add margin = list(t = 70, r = 0, b = 0, l = 0) in the layout of each chart and toggle with the values.
Perhaps increase the padding for containers here to padding: 1rem or whatever seems appropriate after making all the above changes.
Remove unused/commented out code
Noticed some commented out styling here. Could delete while you're at it.