pepperstreet VIP
Total posts: 3,837
10 Май 2013 20:06

Thanks again for this ultra fast implementation :)

Just curious about the initial reason to use galleria.io script: Responsiveness

Did you change something in regards of markup or CSS properties? Or does it need an additional container? I can´t get it to be responsive, like it is by default in the original demo.

Tried J!3 Protostar for now.

Any clue?

Последние изменения: 19 Дек 2014


Sergey
Total posts: 13,748
12 Май 2013 01:10

I just load classic theme. I think that it is not responsive. You need some other theme with is responsive.


Sackgesicht VIP
Total posts: 1,636
12 Май 2013 01:32

Sergey,

see the classic theme here in action.

It is responsive,


Sergey
Total posts: 13,748
12 Май 2013 03:57

I see. that is because I use fixed size for gallery DIV. I had fixed it.


klox7 VIP
Total posts: 914
27 Нояб 2014 13:25

I'm using galleria io and I noticed something. If I look at official demo here it's responsiveness is working fine. It's containers, images are adjusting fine.

galleria-io

But when I use galleria template for gallery field height stays the same and because of this there is black space at the top and bottom of image. Image alone is adjusting OK.

galleria-io-cobalt

Dose anybody else experienced this?


pepperstreet VIP
Total posts: 3,837
28 Нояб 2014 02:00

klox7 Dose anybody else experienced this?

Yes, same here. Confirmed.


Sergey
Total posts: 13,748
28 Нояб 2014 08:35

Check CSS and see what property holds the height.


klox7 VIP
Total posts: 914
28 Нояб 2014 10:25

I think this is style in full-galleria.io.php.

<style>
    #galleria<?php echo $key?> {
        width: 100%;
        height: <?php echo $this->params->get('params.full_height', 100) + 60;  ?>px;
        background: #000
    }
</style>

On developers demo site it's like this

width: auto; margin: 0 auto; height: auto;

but if I use this then nothing shows. It's like height is 0.


pepperstreet VIP
Total posts: 3,837
28 Нояб 2014 11:36

Just had a quick look and compared the original online demo with my own setup. "klox7" is on the right track... this style seems to get a fixed height. And this is not updated dynamically... like it does on the original demo.

I wonder where params.full_height comes from? Is it the "Full View Image" field parameter?

Bildschirmfoto 2014-11-28 um 21.00.41

Obviously, the script needs an initial height parameter in px. This is the reason for the inline CSS style. The docs state to place it in the head section... but that doesn't really matter here.

The original demo has an additional DIV inside the actual #gallery DIV. But removing it does not have any effect on the demo page. Also it seems impossible to get this extra DIV into the Cobalt output template... in my tests, it has been removed in the final output!? Strange. Can't solve it.

klox7 but if I use this then nothing shows. It's like height is 0.

Exactly what I have seen. Either manual changes are temporary and disappear on browser resize. Or the gallery collapses to ZERO height.


klox7 VIP
Total posts: 914
28 Нояб 2014 12:47

pepperstreet I wonder where params.full_height comes from? Is it a field parameter?

I think it is.


klox7 VIP
Total posts: 914
17 Дек 2014 09:23

I think I found solution. Here is link to documentation Click here to link... and check for height option.

In

components\com_cobalt\fields\gallery\tmpl\output\full-galleria.io.php

you have to change line 24 under <style>

height: <?php echo $this->params->get('params.full_height', 100) + 60; ?>px;

to

height: auto

and then add configuration options to (line 45)

Galleria.loadTheme('<?php echo JUri::root(TRUE); ?>/components/com_cobalt/fields/gallery/galleria/themes/classic/galleria.classic.min.js');
Galleria.run('#galleria<?php echo $key?>');

so it will be like this

Galleria.loadTheme('<?php echo JUri::root(TRUE); ?>/components/com_cobalt/fields/gallery/galleria/themes/classic/galleria.classic.min.js');
Galleria.configure({
    height: 0.5
});
Galleria.run('#galleria<?php echo $key?>');

Sergey
Total posts: 13,748
19 Дек 2014 05:13

This is good. I think it will be nicely integrated to Cobalt 9 where every field template may have its own parameters. So it will be parameter for galleria.io template.

Работает на Cobalt