django-cms / djangocms-bootstrap4

django CMS Bootstrap 4 is a plugin bundle for django CMS providing several components from the popular Bootstrap 4 framework.
https://www.django-cms.org/
Other
82 stars 58 forks source link

original size image corousel #80

Closed mateoreyes closed 5 years ago

mateoreyes commented 5 years ago

I have a problem with the size of my carousel slide, it dont take the original size of the image.

How can I solve ?

captura carousel

FinalAngel commented 5 years ago

Hello @mateoreyes the image just needs to be larger than the container or you need to select the correct ratio / thumbnail size. Are you using special settings?

mateoreyes commented 5 years ago

I want to change the size of the container, for example 70 x 70, I pass part of my files

python3.6/site-packages/djangocms_bootstrap4/contrib/bootstrap4_carousel/templates/djangocms_bootstrap4/carousel/default/carousel.html

{% with 70 as width and 70 as height %}
    <div class="carousel-inner">
        {% for plugin in instance.child_plugin_instances %}
            {% render_plugin plugin %}
        {% endfor %}
    </div>
{% endwith %}

python3.6/site-packages/djangocms_bootstrap4/contrib/bootstrap4_carousel

CAROUSEL_DEFAULT_SIZE = [70, 70]

the size of my image is 70 x 70 too

idea

mateoreyes commented 5 years ago

I could change the size of the container, for a particular image size.

But I can not make the container automatically adapt to the size of the image

mateoreyes commented 5 years ago

I have another problem, the container is not responsive in this line I can not pass percentages

{% with 70 as width and 70 as height %}

FinalAngel commented 5 years ago

Percentages cannot be passed, if you want to implement responsive behaviours checkout the settings from djangocms-picture: DJANGOCMS_PICTURE_RESPONSIVE_IMAGES

If you are using a 70x70 pixel image you need to make sure that the container (carousel) is also 70px large. Otherwise the CSS of the bootstrap 4 carousel will scale it up.