Giter VIP home page Giter VIP logo

Comments (4)

nai888 avatar nai888 commented on August 22, 2024 1

All right, apologies if I wasn't clear. I'll try to illustrate a little better.

Normally, the sections are something like:

  1. About Us
  2. Examples (.odd)
  3. Contact Us

Sometimes, I need to temporarily add another section at the top, but I want to maintain which sections get tagged with the .odd class, because I want to keep the styling the same for the rest of the page. So for example, I'd want:

  1. Upcoming Events (.odd)
  2. About Us
  3. Examples (.odd)
  4. Contact Us

But instead, I will currently get:

  1. Upcoming Events
  2. About Us (.odd)
  3. Examples
  4. Contact Us (.odd)

So I'm looking for a way to gain control over which section gets marked .odd.

Does that help clarify?

Thanks!

from hugo-scroll.

zjedi avatar zjedi commented on August 22, 2024

Can you just add announcment section and remove it when no longer needed? I don't fully understand what you're after. When does the temporary section get removed?

from hugo-scroll.

zjedi avatar zjedi commented on August 22, 2024

I see, thanks for explanation. The easiest way I can think of would be a global toggle to inverse the section colors. So that when you add the extra section, you'd invert coloring in configuration. Would that work for you?

We have some refactors (CSS mostly) on the horizon (in 1 - 2 months) and changes in the core code are currenty out of my capacity.

from hugo-scroll.

nai888 avatar nai888 commented on August 22, 2024

I had a chance to dig in a little more and I figured out how to add the odd and even classes within the hugo template and remove it from the JS, which allowed me to invert them using a parameter in the config file. Take a look at #113 and let me know what you think!

from hugo-scroll.

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.