Tara Theme: Change size of slider.

jecepede's picture

Tara Theme: Change size of slider.

By jecepede on Tue, 08/11/2020 - 15:47

Aloha !

For a website I am creating I choose Drupal and the Tara-Free theme.
So far it is doing more or less what I want it to do. I do however have a question :

How do I make the slider a fixed height ? For example 250px ?
I tried diggin' in the CSS but I can't seem to overrule it with the additional CSS/styling options.

Cheeeeeeeeers,

Jecepede

admin's picture

Submitted by admin on Tue, 08/11/2020 - 15:58

Height of slider in Tara theme is not fixed. It depends on height of screen.

Height of slider = Full screen height - Header Height

To modify height of slider, you need to edit this file:
/tara/templates/layout/page--front.html.twig

Find this code:

$('#slider').css({ height: $(window).height() - headerheight });

Change this to:

$('#slider').css('height', '250px');

Save file and clear Drupal cache.

Regards:
Ravi

jecepede's picture

Submitted by jecepede on Wed, 08/12/2020 - 16:36

Aloha !

Oh wow, thank you for the lightning fast reply Ravi.

I did as you suggested and found the code and changed it. My slider is now a fixed 300px heigh.
There is however one thing that bugs me a bit. What if the Slider gets updated ?
Will I need to do this trick again ?

Is there no way to do this via "Apperance" -> "Tara Settings" -> "Additional CSS / Styling" ?

Cheeeeeeeeeeeeers,

Jecepede