Diğer Modallar
Arama Modal
Turkish content
This section is currently available in Turkish only. Component code and Twig variable names are language-independent.
Sitenizde bir ikon'a veya bir buton'a tıklandığında popup'ta arama alanının gösterilmesini sağlayan komponent
Görünüm

Kod Yapısı
Html, Scss ve Json kodlarını kopyalayıp siteniz üzerinde ilgili alana eklediğinizde çalışmasını sağlayabilirsiniz. Kodların kullanımı ile ilgili bilgileri okuyarak nasıl eklemeniz gerektiğini öğrenebilirsiniz.
Test sitemizde Arama Modal komponenti kullanılmıştır. Örneği demo sitede görüntüleyin.
HTML
index.html<div class="search"> <a href="javascript:void(0);" class="openbox" data-target="search-content" data-mode="custom" data-overlay="inside"> <svg width="36" height="36" viewBox="0 0 36 36" fill="none"> <path d="M26.5855 24.0867L22.4875 19.9888C23.3974 18.4692 23.7204 16.6695 23.3957 14.9283C23.0709 13.1872 22.1209 11.6249 20.7244 10.5355C19.3278 9.44616 17.5813 8.90492 15.8135 9.01372C14.0457 9.12251 12.3786 9.87384 11.1262 11.1262C9.87384 12.3786 9.12251 14.0457 9.01372 15.8135C8.90492 17.5813 9.44616 19.3278 10.5355 20.7244C11.6249 22.1209 13.1872 23.0709 14.9283 23.3957C16.6695 23.7204 18.4692 23.3974 19.9888 22.4875L24.0867 26.5855C24.2179 26.7169 24.3737 26.8211 24.5452 26.8923C24.7167 26.9634 24.9006 27 25.0862 27C25.2719 27 25.4558 26.9634 25.6273 26.8923C25.7988 26.8211 25.9546 26.7169 26.0857 26.5855L26.5855 26.0857C26.7169 25.9546 26.8211 25.7988 26.8923 25.6273C26.9634 25.4558 27 25.2719 27 25.0862C27 24.9006 26.9634 24.7167 26.8923 24.5452C26.8211 24.3737 26.7169 24.2179 26.5855 24.0867V24.0867ZM10.1317 16.2587C10.1317 15.0463 10.4912 13.8611 11.1648 12.853C11.8384 11.845 12.7957 11.0593 13.9158 10.5953C15.0359 10.1314 16.2685 10.01 17.4575 10.2465C18.6466 10.483 19.7389 11.0668 20.5962 11.9241C21.4535 12.7814 22.0373 13.8737 22.2738 15.0628C22.5103 16.2519 22.3889 17.4844 21.925 18.6045C21.461 19.7246 20.6753 20.6819 19.6673 21.3555C18.6592 22.0291 17.474 22.3886 16.2617 22.3886C14.6365 22.3867 13.0784 21.7403 11.9292 20.5911C10.78 19.4419 10.1336 17.8838 10.1317 16.2587V16.2587ZM25.7909 25.2881L25.2911 25.7879C25.2645 25.8145 25.2329 25.8357 25.1981 25.8501C25.1632 25.8645 25.1259 25.872 25.0882 25.872C25.0506 25.872 25.0132 25.8645 24.9784 25.8501C24.9436 25.8357 24.912 25.8145 24.8853 25.7879L20.9153 21.8179C21.2431 21.5431 21.5461 21.2401 21.8209 20.9123L25.7899 24.8813C25.8165 24.908 25.8377 24.9396 25.8521 24.9744C25.8665 25.0092 25.874 25.0466 25.874 25.0842C25.874 25.1219 25.8665 25.1592 25.8521 25.1941C25.8377 25.2289 25.8165 25.2605 25.7899 25.2871L25.7909 25.2881Z" fill="#110F21"/> </svg> </a> <div class="search-content openbox-content"> <form action="{{ path('search') }}" data-selector="search-form"> <input type="text" name="q" placeholder="{{ theme.settings.search_placeholder }}" onfocus="this.placeholder = ''" onblur="this.placeholder = '{{ theme.settings.search_placeholder }}'" aria-label="Search" {% if theme.settings.use_search_auto_complete %}class="auto-complete"{% endif %}> <button> <svg width="40" height="40" viewBox="0 0 40 40" fill="none"> <path d="M39.0789 33.5261L29.9723 24.4195C31.9943 21.0428 32.7121 17.0433 31.9904 13.1741C31.2687 9.30495 29.1575 5.8331 26.0541 3.41229C22.9508 0.991471 19.0695 -0.211287 15.141 0.0304826C11.2126 0.272252 7.50804 1.94187 4.72495 4.72495C1.94187 7.50804 0.272252 11.2126 0.0304826 15.141C-0.211287 19.0695 0.991471 22.9508 3.41229 26.0541C5.8331 29.1575 9.30495 31.2687 13.1741 31.9904C17.0432 32.7121 21.0428 31.9943 24.4195 29.9723L33.5261 39.0789C33.8176 39.3709 34.1638 39.6025 34.5449 39.7606C34.9261 39.9186 35.3346 40 35.7472 40C36.1598 40 36.5683 39.9186 36.9495 39.7606C37.3306 39.6025 37.6768 39.3709 37.9683 39.0789L39.0789 37.9683C39.3709 37.6768 39.6025 37.3306 39.7606 36.9495C39.9186 36.5683 40 36.1598 40 35.7472C40 35.3346 39.9186 34.9261 39.7606 34.5449C39.6025 34.1638 39.3709 33.8176 39.0789 33.5261ZM2.51492 16.1303C2.51492 13.4361 3.31385 10.8025 4.81066 8.56232C6.30747 6.32218 8.43495 4.5762 10.9241 3.54518C13.4132 2.51416 16.1521 2.24439 18.7945 2.77001C21.437 3.29562 23.8642 4.59299 25.7693 6.49808C27.6743 8.40316 28.9717 10.8304 29.4973 13.4728C30.0229 16.1152 29.7532 18.8542 28.7222 21.3433C27.6911 23.8324 25.9452 25.9599 23.705 27.4567C21.4649 28.9535 18.8312 29.7524 16.137 29.7524C12.5255 29.7483 9.06303 28.3118 6.50928 25.7581C3.95554 23.2043 2.51904 19.7419 2.51492 16.1303ZM37.3131 36.1959L36.2025 37.3064C36.1433 37.3657 36.073 37.4126 35.9957 37.4447C35.9183 37.4768 35.8354 37.4933 35.7516 37.4933C35.6679 37.4933 35.585 37.4768 35.5076 37.4447C35.4302 37.4126 35.36 37.3657 35.3008 37.3064L26.4785 28.4842C27.2068 27.8735 27.8802 27.2001 28.4908 26.4718L37.3109 35.2919C37.3701 35.3511 37.4171 35.4214 37.4491 35.4987C37.4812 35.5761 37.4977 35.659 37.4977 35.7428C37.4977 35.8265 37.4812 35.9094 37.4491 35.9868C37.4171 36.0642 37.3701 36.1344 37.3109 36.1936L37.3131 36.1959Z" fill="white"/> </svg> </button> </form> </div> </div>
SCSS
style.css/* Search Modal */ .search { margin-left: var(--spacer-4); > a { @include center; width: 36px; height: 36px; } .search-content-overlay { opacity: 0.85; } } body { .search-content { position: fixed; top: 150px; left: 50%; transform: translateX(-50%); z-index: 101; display: none; width: 980px; height: 96px; @include max($lg) { width: 820px; } @include max($md) { width: 580px; } @include max($sm) { width: 396px; height: 72px; } @include max($xxs) { width: 360px; } @include max($xxxs) { width: 300px; } form { position: relative; input { width: 100%; height: 96px; color: $color-white; font-size: var(--font-size-36); font-weight: 700; padding: 8px 40px 8px 0; border: none; border-bottom: 4px solid $color-white; background-color: transparent; &::placeholder { color: $color-white; opacity: 1; } @include max($sm) { height: 72px; font-size: var(--font-size-24); border-width: 2px; } } button { position: absolute; top: 0; right: 0; @include center; width: 40px; height: 100%; padding: 0; border: none; background-color: transparent; @include max($sm) { svg { zoom: 0.7; } } } } } &.search-content-active { .search-content { display: block; } } }
JSON
index.js"search_placeholder": { "type": "text", "default_value": "Ürün arama…", "label": "Arama Metni" },
Last modified on