getzola / hyde

Port of https://github.com/poole/hyde to Zola
MIT License
76 stars 51 forks source link

Support iPhone X notch and rounded corners in landscape #19

Closed Cldfire closed 4 years ago

Cldfire commented 5 years ago

Hi! This is a great theme and I'm happily using it as the base for my little site, thank you for porting it :)

I noticed that it didn't support the notch and rounded corners on my iPhone X(R) properly, so I looked up how to go about fixing that and did so. I figured it would be nice to contribute this back as it is something that everyone could benefit from.

A couple of screenshots (ignore the change to the date format, that's not in this PR):

Before the changes in this PR, normal layout:

IMG_1339

After the changes in this PR, normal layout:

IMG_1338

After the changes in this PR, reverse layout:

IMG_1337

I know it's hard to visualize without being able to see the notch and corners, but keep in mind that all of those images have the same dimensions. Notice that after the changes, the sidebar extends all the way to the edge and the content text has more space.

Let me know if you have any questions or concerns!

Keats commented 5 years ago

On your second screenshot, it does look significantly close to the right border. Maybe increase the size of the sidebar by a bit to make it look more centered?

Cldfire commented 5 years ago

Oh, I think you're feeling that way because the Cldfire's part is a bit too long for the padding boundary. Here's a screenshot that shows where the padding actually is (blue box):

IMG_1432

IMG_1433

If the word actually fit it would be fine. Poor demo choice on my part!

Also, I realized I can easily get a mockup of what it looks like on an iPhone X using an iOS simulator. Here are some screenshots from that:

Screen Shot 2019-04-08 at 7 18 12 PM Screen Shot 2019-04-08 at 7 17 47 PM

(Now that I look at that second screenshot, it does feel to me as if there is too much padding on the left side of the body without the notch there. Do you agree? If so I will change that.)

And here is the look before this PR:

Screen Shot 2019-04-08 at 7 22 59 PM

EDIT: Using deploy preview, direct comparison to after:

Screen Shot 2019-04-08 at 7 34 33 PM
Keats commented 4 years ago

Sorry for the late merge!

Cldfire commented 4 years ago

No problem! Better late than never :)