Custom CSS for date slider bar

AI-generated summary

The discussion revolves around creating custom CSS for a date slider bar to indicate the presence of a wiki at the top of a topic. Mark_Schmucker initially requested assistance with this task, suggesting the use of a background image in the “widget-link start-date” class to remind users to visit the wiki.

Steven proposed two possible solutions: creating a tag named “wiki” and using the body class .tag-wiki to style the date slider bar, or using a category to assume the presence of a wiki. Mark_Schmucker agreed that either approach could work, but requires a paid solution due to his limited capabilities.

Steven offered to help with the customization using CSS, which would be compatible with future Discourse upgrades. Johani suggested that adding a wiki class higher up in the HTML hierarchy would be beneficial for themes and components, and plans to implement this change.

What would you like done?

In many cases, we have an information wiki as the first post of a topic. In those cases, replace the contents of the “widget-link start-date” class with a background image, as a reminder to visit the wiki. Clicking on the image should take you to the top of the topic, just as clicking on the start date does currently.

I’m open to suggestions how the css would know whether there’s a wiki at the top.

When do you need it done?

Next couple weeks would be great.

What is your budget, in $ USD that you can offer for this task?

Open to offers.

I checked where the wiki class is set when a first post is in wiki mode, but it’s not high enough in the hierarchy to work well.

I think the best way to do this is to create a tag named wiki (or anything else) and use the body class .tag-wiki before each css customization

Then you can work with the class

.tag-wiki .timeline-date-wrapper {
     background: ****;
}

.tag-wiki .timeline-date-wrapper {

}
2 Likes

Another option is to assume if the topic is in certain categories, that it has a wiki. This will be a good-enough assumption.

Either way it’s beyond my capabilities, so still looking for a paid solution.

A category will work too. A tag or category add a class in the body tag, which is enough to customize every section of the posts.

I can help you with that. I can manage that via css and should pass any future discourse upgrade

Let me know if you’re interested at mondiscourse@gmail.com

1 Like

I think it would be quite beneficial to themes / components if that class were added higher up in the html hierarchy. I’ll fix that in a day or two :+1:

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.