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

Customize theme colours #141

Open
TheGroundZero opened this issue Jul 23, 2020 · 2 comments
Open

Customize theme colours #141

TheGroundZero opened this issue Jul 23, 2020 · 2 comments

Comments

@TheGroundZero
Copy link

Hi all

I was wondering what the most efficient / Hugo-like way of changing the theme's colours were.
Preferably something that will survive future git pulls.

I know the colours are defined at <hugo_base>/themes/hermit/assets/scss/_predefined.scss.

  • Are there config params I can set?
  • Do I copy this file to <hugo_base>/ assets/scss/_predefined.scss?
  • Do I copy the whole scssdirectory?

Modifying the file within the theme's directory doesn't look like a future proof method.

Kr
TGZ

@TheGroundZero TheGroundZero changed the title Change theme colours Customize theme colours Jul 23, 2020
@LegionSports
Copy link

I'm also wondering about this.

I've added a background image to the home page, however, the color is extremely washed out. I've set $light-grey to transparent and still cannot see my background image well.

Any ideas?

@TheGroundZero
Copy link
Author

@LegionSports

I'm also wondering about this.

I've added a background image to the home page, however, the color is extremely washed out. I've set $light-grey to transparent and still cannot see my background image well.

Any ideas?

I don't think that's related to my question.

The bg-img is loaded as the background image of a div which is positioned behind the content.
It also has an opacity of 3%, which makes it almost transparent. A 100% opacity would make the image completely visible, making text (almost) unreadable.

See /layouts/posts/single.html

{{ define "main" }}
	{{- if (or .Params.images .Params.featuredImg) }}
	<div class="bg-img"></div>
	{{- end }}

and /assets/scss/style.scss

.bg-img {
  width: 100vw;
  height: 100vh;
  opacity: .03;
  z-index: -1;
  position: fixed;
  top: 0;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transition: opacity .5s;
}

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

No branches or pull requests

2 participants