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

Style Hakyll website to better accommodate smaller screens. #1054

Merged
merged 2 commits into from
Nov 24, 2024

Conversation

chungyc
Copy link
Contributor

@chungyc chungyc commented Nov 23, 2024

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 the default.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.

@chungyc chungyc changed the title Style website Hakyll to better accommodate smaller screens. Style Hakyll website to better accommodate smaller screens. Nov 23, 2024
@LaurentRDC
Copy link
Collaborator

This looks great, thank you!

@LaurentRDC LaurentRDC merged commit 16d2971 into jaspervdj:master Nov 24, 2024
27 checks passed
@LaurentRDC
Copy link
Collaborator

@jaspervdj is the Hakyll website at jaspervdj.be/hakyll automatically updated?

@chungyc
Copy link
Contributor Author

chungyc commented Nov 24, 2024

For what it is worth, I'm happy as long as the changes eventually get deployed. And I'm not worried about the changes never getting deployed: a previous change I sent in for the website did get deployed eventually.

@chungyc chungyc deleted the css branch November 24, 2024 20:37
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

Successfully merging this pull request may close these issues.

2 participants