Git Product home page Git Product logo

Comments (1)

mattyza avatar mattyza commented on June 3, 2024

Iā€™m happy with this, @danjjohnson. Could you submit a pull request (normal branching workflow applies, with a release branch, of course)?

The only adjustment Iā€™d make, at the outset, would be to use has-posts and no-posts as the CSS classes (inclusion of hyphens). :)

Matt Cohen
Chief Product Officer at WooThemes

http://woothemes.com/
http://matty.co.za/

On Friday 03 January 2014 at 6:25 PM, Dan Johnson wrote:

I had a user wanting to hide the year headings for years containing no posts. Could we add a css class to each year heading to indicate whether or not there are any posts for that year?
I did a test version as follows, but I'm sure there's probably a more efficient way:
/* Print year headings until we reach the post year */ while ( $working_year > $post_year ) { if ( $working_year - $post_year == 1 ) { $headingclass = " hasposts"; } else { $headingclass = " noposts"; } $working_year--; echo '

' . $working_year . '

'; }

ā€”
Reply to this email directly or view it on GitHub (#4).

from archives.

Related Issues (3)

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.