İçeriğe geç
Header

Favori

Temada header alanında kullanılan favoriler sayfasının linkine yönlendiren görünümü ve kod bloğu

Görünüm

Favori ikon yerleşimi

Favori ikon yerleşimi

Kod Yapısı

HTML

index.html
{% if theme.settings.header_favourite %} <div class="header-favorite"> <a href="{{ path('member_favourite_list') }}"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none"> <path d="M10 5.74805L9.28325 5.01133C7.5989 3.28007 4.51415 3.87769 3.40036 6.05284C2.87653 7.07583 2.75875 8.55246 3.71429 10.4376C4.63457 12.2531 6.54767 14.4265 10 16.7946C13.4523 14.4265 15.3654 12.2531 16.2857 10.4376C17.2413 8.55246 17.1235 7.07583 16.5996 6.05284C15.4859 3.87769 12.4011 3.28007 10.7168 5.01133L10 5.74805ZM10 18C-5.33313 7.86841 5.27876 -0.0408677 9.82432 4.14308C9.88395 4.19797 9.94253 4.25493 10 4.314C10.0575 4.25494 10.116 4.19797 10.1757 4.14309C14.7212 -0.0408779 25.3331 7.8684 10 18Z" fill="#4B4B4B"/> </svg> <span>{{ theme.settings.header_favourite }}</span> </a> </div> {% endif %}

SCSS

style.css
.header-favorite { > a { display: flex; align-items: center; flex-wrap: wrap; height: 36px; color: $color-sub-text; font-size: var(--font-size-14); transition: $transition; svg { path { transition: $transition; } } span { padding-left: var(--spacer-3); } @include min($lg) { &:hover { color: $color-primary; svg { path { fill: $color-primary; } } } } } }

JSON

JSONindex.js
"header_favourite": { "type": "text", "default_value": "", "label": "Favorilerim Metni" },
Son güncelleme: