NASIL YAPIYORUZ:
1- ) Şablon "node_list_category " aşağıdaki kod değişikliklerini yapıyoruz.
a-) BUL :
Code:
<div class="block block--category block--category{$node.node_id}">
DEĞİŞTİR:
Code:
<div class="block block--category block--category{$node.node_id} collapsible-nodes">
b-) BUL :
Code:
<h2 class="block-header">
ALTINA ILAVE ET:
Code:
<div class="block-header--left">
c-) BUL :
Code:
<xf:if is="{$node.description}"><span class="block-desc">{$node.description|raw}</span></xf:if>
SONUNA EKLE:
Code:
</div>
d-) BUL :
Code:
</h2>
ÜSTÜNE EKLE:
Code:
<span id="collapse-{$node.node_id}" class="collapseTrigger collapseTrigger--block is-active" data-xf-click="toggle" data-xf-init="toggle-storage" data-target=".block--category{$node.node_id} .block-body" data-storage-key="_node-{$node.node_id}"></span>
e-) BUL :
Code:
<div class="block-body">
DEĞİŞTİR:
Code:
<div class="block-body block-body--collapsible is-active">
2- ) Şablon "extra.less " aşağıdaki kodu ilave ediyoruz.
CSS:
/* Node Collapse */
.block--category
{
.collapseTrigger
{
opacity: 0.5;
transition: opacity 0.3s;
margin-right: 10px;
&.is-active:before
{
content: "\f205";
transform: scale(-1, 1);
margin-right: -8px;
}
&:before
{
content: "\f205";
font-size: 80%;
}
}
.block-container:hover .collapseTrigger
{
opacity: 1;
}
}
.collapsible-nodes
{
.block-header
{
display: flex;
}
.block-header--left
{
margin-right: auto;
max-width: 100%;
}
}