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

FR: Show if date link is in the future, today, or past #205

Open
axelson opened this issue Oct 22, 2023 · 2 comments
Open

FR: Show if date link is in the future, today, or past #205

axelson opened this issue Oct 22, 2023 · 2 comments

Comments

@axelson
Copy link

axelson commented Oct 22, 2023

I have a feature request, I often use daily notes in my vault and I'd like to change their styling based on if that date is in the past or future.

For example I'd like to be able to do something like if today is 2023-10-22, then a link to 2023-10-23 would show up as red and 2023-10-21 would show up as blue.

As far as I can tell there isn't a way to do this currently. One option would be to add a way to run a javascript function for each link to determine the css class to add, although that would make caching very difficult and might be a big source of bugs.

Does this sound like something that is in scope for the plugin?

@HEmile
Copy link
Collaborator

HEmile commented Oct 26, 2023

Hmm, yeah this is not static. I guess this should be possible by defining a CSS attribute for the current date, but date comparisons in CSS also sound like a bit of a hassle. I don't think I would work on this in the short term, but feel free to PR.

@axelson
Copy link
Author

axelson commented Oct 27, 2023

Hmm, yeah it doesn't seem feasible to accomplish this with CSS alone. But if I think of something I'll work on a PR for it 👍

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