Style Hakyll website to better accommodate smaller screens. #1054
+47
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the HTML and stylesheet for the Hakyll website to better accommodate small screens, i.e., phones and such. I feel like it's time it got the same treatment that the starter site did.
It leaves styling for bigger screens alone for the most part, except for using a
max-width
so that the width can be smaller on narrower displays, i.e., phone screens or narrow web browser windows.It sets
viewport
in the HTML so that the styling will be based on the real dimensions of the screen, not the fake dimensions used by phones to display websites specifically tailored to a certain size on desktops.On narrow screens, it overrides properties so that the presentation is better for a narrow width.
In particular, the navigation sidebar becomes a flatter set of links at the beginning of the page instead of being the vertical set of links it is on wider screens. This let's one reach the main content quicker by not having to skip through more of the navigation links. The font size is slightly smaller and translucent to make it easier to distinguish from the main content.
There is actually no
img
in the sidebar in thedefault.html
template, but there is styling for it in the stylesheet. Not wanting to touch the existing style unless I had to, I set it to not display an image in the sidebar to save space on small screens, in case one is added in the future.Attached is a screenshot with what the website would look like on my phone.