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: (layouts/partials/footer.html) Alignment #230

Merged
merged 5 commits into from
May 18, 2023

Conversation

alphapapa
Copy link
Contributor

This removes the hard-coded padding-left property from these UL elements. It fixes the alignment in a narrow (e.g. smartphone) display, and in a wide (e.g. desktop) display, the difference is insignificant and no worse.

Fixes #192. Thanks to Pamphile Roy (@tupui) for reporting.

Screenshots

Before changes

before-narrow
before-wide

After changes

after-narrow
after-wide

This removes the hard-coded padding-left property from these UL
elements.  It fixes the alignment in a narrow (e.g. smartphone)
display, and in a wide (e.g. desktop) display, the difference is
insignificant and no worse.

Fixes scientific-python#192.  Thanks to Pamphile Roy (@tupui) for reporting.
@alphapapa alphapapa requested a review from jarrodmillman May 9, 2023 03:56
@alphapapa alphapapa self-assigned this May 9, 2023
@netlify
Copy link

netlify bot commented May 9, 2023

Deploy Preview for scientific-python-hugo-theme ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 560f07f
🔍 Latest deploy log https://app.netlify.com/sites/scientific-python-hugo-theme/deploys/6462dc9b758ab10008b858c8
😎 Deploy Preview https://deploy-preview-230--scientific-python-hugo-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@alphapapa alphapapa marked this pull request as draft May 9, 2023 04:00
@alphapapa alphapapa force-pushed the wip/192-alignment branch from d22bfb0 to 1a585a6 Compare May 9, 2023 04:16
@alphapapa
Copy link
Contributor Author

The second commit adjusts margins around the .hero-title and .hero-logo. I'm not sure that this is ideal yet, but it prevents squashing elements too close together or too close to the screen edge.

A noticeable difference is that the "Scientific Python" text is more often split onto separate lines, depending on screen size. At some sizes, this is inevitable, but at wider ones it could be avoided by widening the containing element. But some of this is a matter of style or preference.

@jarrodmillman @tupui What do you think? Thanks.

Screenshots

Before:

hero-title-before-wide
hero-title-before-narrow

After:

hero-title-after-wide
hero-title-after-narrow

@alphapapa alphapapa marked this pull request as ready for review May 9, 2023 04:21
@tupui
Copy link
Member

tupui commented May 9, 2023

Thanks @alphapapa 🚀

For the first commit, it's way better! There still seems to be a slight padding, can this be removed??

For the second commit. I think it looked better with the logo close to the title. Otherwise we have a lot of empty space in between. But in general I do agree that this could be re-designed.

@alphapapa
Copy link
Contributor Author

Hi Pamphile,

For the first commit, it's way better! There still seems to be a slight padding, can this be removed??

I'm not sure what padding you mean. Would you be more specific please?

For the second commit. I think it looked better with the logo close to the title. Otherwise we have a lot of empty space in between. But in general I do agree that this could be re-designed.

I agree that the spacing seems excessive. I'll try to improve that and then make another commit on this PR.

Thanks for your feedback.

For indentation in Emacs's css-mode.  This way Emacs doesn't want to
change the indentation from the file's current 2-spaces setting.
alphapapa added a commit to alphapapa/scientific-python-hugo-theme that referenced this pull request May 10, 2023
@alphapapa alphapapa force-pushed the wip/192-alignment branch from 9c5e65f to 713b5ca Compare May 10, 2023 03:18
@alphapapa
Copy link
Contributor Author

I've made some further improvements to the CSS. Here are screenshots showing phone, tablet, and desktop screens:

phone
tablet
desktop

I also improved the alignment of the "GET STARTED" button and the text above it.

This is much better, I think. The only minor problem I still see is that, in the phone-sized screenshot (the first one), the logo is very small. This could probably be further improved, and the best way to do so would probably be--on narrow screens, specifically--to either put the logo below the text rather than beside it, or decrease the text size to allow more room for the logo.

What do you all think? Thanks.

@stefanv
Copy link
Member

stefanv commented May 10, 2023

I agree with your assessment about the logo on mobile, and the solution proposed (top, perhaps?) sounds good.

This enlarges the logo on screens above 400px wide, and on screens
that wide or narrower, the logo is displayed below the text.
@alphapapa alphapapa force-pushed the wip/192-alignment branch from 9c3af1c to 560f07f Compare May 16, 2023 01:30
@alphapapa
Copy link
Contributor Author

@stefanv Thanks. I made some more adjustments and I think it looks pretty good now. Here are screenshots at relevant sizes:

scientific-python org_
scientific-python org_ (1)
scientific-python org_ (2)
scientific-python org_ (3)

@alphapapa
Copy link
Contributor Author

When approved, this should probably be squash-merged. Thanks.

@stefanv
Copy link
Member

stefanv commented May 16, 2023

LGTM; @jarrodmillman?

@alphapapa alphapapa mentioned this pull request May 16, 2023
@jarrodmillman jarrodmillman merged commit 3a845c4 into scientific-python:main May 18, 2023
@alphapapa alphapapa deleted the wip/192-alignment branch May 31, 2023 19:30
@jarrodmillman jarrodmillman added this to the 0.1 milestone Sep 29, 2023
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.

Alignment issues
4 participants