[Adaptable] Apply filter to course images

[Adaptable] Apply filter to course images

by Richard Hahn -
Number of replies: 5

Hi everybody!

I wanted to style the course Images using CSS filters, which did not work, because they are set as css Background rather than [img]. Is there another way to accomplish a tint style to course Images, like putting a transparent color layer on top of those containers?

Thank you!

Richard

Average of ratings: -
In reply to Richard Hahn

Re: [Adaptable] Apply filter to course images

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Yes there is...but please tell us which Moodle version you are using?

In reply to Richard Hahn

Re: [Adaptable] Apply filter to course images

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

What course images? Can you follow the forum rules and indicate moodle and theme version and a screenshot about your question as well.

In reply to Fernando Acedo

Re: [Adaptable] Apply filter to course images

by Richard Hahn -

Sorry guys, first-time poster here 😔.

I am using moodle 3.6.2 and adaptable 1.8.0.

I was refering to the course images on the front page (.cimbox) and the ones in the Dashboard (.card-img .dashboard-card-img). What I would like to accomplish is giving them a tint in the main color.


Thank you!

In reply to Richard Hahn

Re: [Adaptable] Apply filter to course images

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

What you could do with is another layer over the course image. I dare say it could be added using a renderer. Then all you would need to do is add a background rgba() color using CSS which i tend to use in my page backgrounds on my Moodle Test site.

I did something similar in the Morecandy theme Banner where I had a setting that allowed a texturized image that added a distinct colored texture to the banner.

Hope this helps?

Mary

In reply to Richard Hahn

Re: [Adaptable] Apply filter to course images

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

You didn't post as screenshot as requested so not sure what you want to achieve.

If you want to apply a CSS filter then just add it to the class:

.cimbox {
  filter: blur(5px);
}

 

The same applies to any other image displayed in moodle.