Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

BUG: Left sidebar overlapping #53

Closed
VincentTam opened this issue Aug 14, 2019 · 4 comments · Fixed by #57
Closed

BUG: Left sidebar overlapping #53

VincentTam opened this issue Aug 14, 2019 · 4 comments · Fixed by #57

Comments

@VincentTam
Copy link
Collaborator

Bug Report

Describe the bug

See the animated screenshot below and the title above.

To Reproduce

Increase the size of the site icon.

Expected behavior

Recent posts section won't overlap with intro section no matter how large the icon is.

Screenshots

screenshot gif

Environment

Additional context

@pacollins
Copy link
Owner

pacollins commented Aug 14, 2019

This issue occurs when the width isn't set on the image in the config.

The quick solution would be to add a fallback width to the template here:

{{ with .Site.Params.intro.pic }}<a href="{{ "/" | relLangURL}}"><img src="{{ .src | relURL }}" class="{{ .shape }}" width="{{ .width }}" alt="{{ .alt }}" /></a>{{ end }}

<img src="{{ .src | relURL }}" class="{{ .shape }}" width="{{ if isset .width }}{{ .width }}{{ else }}100px{{ end }}" alt="{{ .alt }}" />

100px could be substituted with whatever we deem the most appropriate as a max width.

Thoughts? I am fine with putting this PR together.

@pacollins
Copy link
Owner

pacollins commented Aug 14, 2019

The other solution is to remove this line in the CSS. Honestly, can't remember what all it was doing.

grid-template-rows: 22em auto auto 1fr;

@VincentTam
Copy link
Collaborator Author

Thanks for reply. Lemme get back to this in an hour after finding the translations.

@VincentTam
Copy link
Collaborator Author

The other solution is to remove this line in the CSS. Honestly, can't remember what all it was doing.

grid-template-rows: 22em auto auto 1fr;

Thanks for pointing me to this useful CSS property. That's almost the solution. This right thing to do is to have a quick look at what this property actually does, say, at https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows. By playing with the samples, you'll get a quick idea. Now, get our hands dirty with a web developer tool.

grid
GIF screen capture using byzanz-record

The #wrapper with selected. Then we play with the first number in the above CSS property by pressing ⬆️ / ⬇️ . At this stage, the solution should be crystal clear. Adding a PR for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants