Question

CSS: Can I trigger an image by day of the week?

  • 26 August 2022
  • 4 replies
  • 54 views

Userlevel 7
Badge +5

Would love to add a “Happy Friday!” image to my homepage automatically on Fridays.


4 replies

Userlevel 7
Badge +5

 

Userlevel 7
Badge +3

Not aware of a way to do conditional CSS based on date/time information, that is more of a scripting item. I would look to an embed of a tool, could even make it in one of your content development tools, that can detect date/time and show one image/text over another and just have a standard banner vs. a Friday one. Remember time zone issues if global company.

Userlevel 7
Badge +5

Not aware of a way to do conditional CSS based on date/time information, that is more of a scripting item. I would look to an embed of a tool, could even make it in one of your content development tools, that can detect date/time and show one image/text over another and just have a standard banner vs. a Friday one. Remember time zone issues if global company.

@Bfarkas - Are you thinking like a little HTML page with some JS hosted on S3 and iFrame it in as another widget?

That does seem the easiest route.

I know I would do some more of that kind of stuff if I had company access to something like that.

Userlevel 7
Badge +3

Not aware of a way to do conditional CSS based on date/time information, that is more of a scripting item. I would look to an embed of a tool, could even make it in one of your content development tools, that can detect date/time and show one image/text over another and just have a standard banner vs. a Friday one. Remember time zone issues if global company.

@Bfarkas - Are you thinking like a little HTML page with some JS hosted on S3 and iFrame it in as another widget?

That does seem the easiest route.

I know I would do some more of that kind of stuff if I had company access to something like that.

Yup, it would be nice if we could load even like a course package somewhere for direct access in the Docebo S3 bucket. 

Reply