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: Change size of front page image to fit lower screen resolutions #73

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

marcusstigelid
Copy link
Contributor

@marcusstigelid marcusstigelid commented Jun 12, 2023

  • Adds new files site-header.html and index.html, which are duplicated from the theme in order to change some CSS classes
  • Updates the image file with a different size and crop
  • Moves and adds upon the "Welcome" text on the front page to above the title to make the posts more visible

- Adds a new file site-header.html, which is duplicated from the theme in order to change a CSS class
- Updates the image file with a different size and crop
- Removes the "Welcome" text on the front page to make the posts more visible
<header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
<div class="{{ .Site.Params.cover_dimming_class | default "bg-black-60" }}">
{{ partial "site-navigation.html" .}}
<div class="tc-l pv4 pv5-l ph3 ph4-ns">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is the line that has been changed from the default theme, specifically the "pv5-l" class which by default is "pv6-l"

@marcusstigelid
Copy link
Contributor Author

This is the effect of the changes as seen on my Macbook:

Current design:
blog_current

New design
blog_new

…ins and paddings

Also sets text-align of the welcome and title text to be centered to make it look better in mobile resolutions.
@marcusstigelid
Copy link
Contributor Author

This is how it looks now after the latest change:
Screenshot 2023-06-13 at 13 00 35

@@ -0,0 +1,55 @@
{{ define "main" }}
<article class="cf ph3 ph5-l pv3 pv2-l f4 tc-l center measure-wide lh-copy {{ $.Param "text_color" | default "mid-gray" }}">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has been copied from the theme and the only thing that has been changed is the "pv2-l" class which previously was "pv4-l"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for keeping the article element there is in case we want to have something in that spot in the future, in which case someone only needs to modify the classes again to make the content fit.

Copy link
Member

@gadapunkfun gadapunkfun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍🏼

@marcusstigelid marcusstigelid merged commit ff3f09a into main Jun 13, 2023
1 check passed
@marcusstigelid marcusstigelid deleted the change-size-of-frontpage-image branch June 13, 2023 11:26
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.

None yet

2 participants