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

🐛 fix(home-banner): allow missing image & correct spacing #123

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

welpo
Copy link
Owner

@welpo welpo commented Aug 29, 2023

Summary

This PR introduces a series of enhancements and fixes related to the home banner. Specifically, it addresses issues with image path formatting, responsive design, and CSS optimisation.


Changes

  1. Optional image for home banner

  2. Spacing and alignment fixes

    • Corrected the right padding in the entire header on mobile views.
    • Center aligned the image on mobile for a more polished look.
    • See the gif below.
  3. Improved image path handling

    • Removed the necessity for $BASE_URL in specifying home banner images.
    • This $BASE_URL replacement will be deprecated in future updates.
  4. CSS cleanup and optimisation

    • Replaced pixel values with rem for better scalability.
    • Employed SCSS nesting for more maintainable and readable code.

GIF

Before this PR, the entire banner had right padding. After this PR, the text takes up the proper width and the image is centered:

beforeafter


Additional Notes

Please note that the $BASE_URL placeholder for image paths will be deprecated and removed in future updates. Update your configurations accordingly.

Old example. Still works, but will throw an error in the future:

header = {title = "Hello! I'm tabi~", img = "$BASE_URL/img/main.webp" }

Proper format:

header = {title = "Hello! I'm tabi~", img = "img/main.webp" }

Also allows using normal paths for the banner image, without "$BASE_URL".
@welpo welpo added bug Something isn't working enhancement New feature or request labels Aug 29, 2023
@welpo welpo merged commit 9c3e5d3 into main Aug 29, 2023
@welpo welpo deleted the fix/missing-img-home-banner branch August 29, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant