# Ürün Görseli

Ürün detay sayfasında gelen ürünün büyük görseli ve ürüne ait diğer sekiz adet görselin kod yapısı

## Görünüm

![Ürün Görseli](/img/tema/856974743.png)

## Kod Yapısı

Bu kod **theme** / **html** / **templates** / **product** / **detail.twig** dosyasında çalışmaktadır.

### HTML

```twig title="index.html"
<div class="product-image">
    <div id="product-primary-image">
        {% if product.images | length > 0 %}
            <img id="primary-image" alt="{{ product.fullName }}" src="{{ product.primaryImage.originalUrl }}" data-zoom-image="{{ product.primaryImage.originalUrl }}" />
        {% else %}
            <img class="product-no-picture" alt="{{ product.fullName }}" src="{{ product.primaryImage.originalUrl | default(getNopicImageUrl()) }}" />
        {% endif %}
    </div>
</div>
{% if product.images | length > 0 %}
    <div id="product-thumb-image" class="row">
        {% for image in product.images %}
            {% if image.thumbUrl %}
                <div class="thumb-item col-auto">
                    <a href="#" data-image="{{ image.originalUrl }}" data-zoom-image="{{ image.originalUrl }}">
                        <img src="{{ image.thumbUrl }}" alt="{{ product.fullName }}">
                    </a>
                </div>
            {% endif %}
        {% endfor %}
    </div>
{% endif %}
```

### SCSS

```scss title="style.css"
.product-image {
	#product-primary-image {
        position: relative;
        padding-top: calc(#{$image-ratio} - 2px);
        border: 1px solid $color-border;
		margin-bottom: var(--spacer-4);
		@include imgcenter;
	}
}

#product-thumb-image {
    height: 0;
    overflow: hidden;
    &.slick-slider {
        height: auto;
        overflow: visible;
        @include max($sm) {
            padding-right: 2px;
        }
    }
	.thumb-item {
		> a {				
            position: relative;
            display: block;
            padding-top: calc(#{$image-ratio} - 2px);
            border: 1px solid $color-border;
            @include imgcenter;
            &.zoomGalleryActive {
                border-color: $color-primary;
            }
        }
	}
    .slick-dots {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        padding-top: var(--spacer-8);
        width: 100%;
        > li {
            margin: 0 3px;
            > button {
                width: 10px;
                height: 10px;
                border: none;
                position: relative;
                overflow: hidden;
                text-indent: -9999px;
                border-radius: 100%;
                background-color: $color-border;
                padding: 0;
                display: block;
                margin-bottom: 5px;
                transition: $transition;
            }
            &.slick-active {
                > button {
                    background-color: $color-primary;
                }
            }
        }
    }
	.slick-arrow {
		position: absolute;
        opacity: 1;
        top: 50%;
        z-index: 2;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        cursor: pointer;
        background: $color-white;
        &.slick-prev {
            left: 12px;
        }
        &.slick-next {
            right: 12px;
        }
        &.slick-disabled {
            opacity: 0.5;
        }
	}
}
```
