Code Monkey home page Code Monkey logo

Comments (4)

wjh18 avatar wjh18 commented on July 19, 2024 2

Hi @kvnkho, this should be fixed in #19. It now defaults to non-grayscale and I added a grayscale_avatar parameter in params.toml so it can be re-enabled if desired.

from hugo-liftoff.

wjh18 avatar wjh18 commented on July 19, 2024 1

That's one of the beauties of Hugo. Anything in your parent project with the same named file will override the theme's version of that file.

Another method I didn't think of at first would be to create an assets/custom.css file (and make sure the custom_css param in params.toml is set to that filename). Then use the CSS filter() function to modify the color of the .hero-avatar class. You can use a hex to filter converter to get approximate colors. This won't alter the original image itself for social tags or anything but will change its style in the browser at least.

from hugo-liftoff.

wjh18 avatar wjh18 commented on July 19, 2024

Yeah, that was kind of an opinionated choice on my part before I open sourced the theme.

The way to override it temporarily would be to copy the entire layouts/index.html file to your own project's layouts/ directory (create one if it doesn't exist) with the {{ $image = $image | images.Filter (images.Grayscale) }} line removed.

I know this isn't an ideal long-term solution so I'll add a disable grayscale frontmatter parameter for the index file specifically, or a global config. Let me know if that helps!

from hugo-liftoff.

kvnkho avatar kvnkho commented on July 19, 2024

Ah that really helps. New to Hugo so I didn't know I could override from the layouts directory in my project. That is the perfect workaround for now.

No rush on this, and yes I think it would help, because I am thinking of maybe tweaking the default colors with CSS down the line also.

Thanks for the response!

from hugo-liftoff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.