{#if mouseYCoordinate}
{#each allowedHomeSections as section}
{section}
{/each}
{/if} {#each homeSections as item, index}
{ mouseYCoordinate = clientY draggingItem = item draggingItemIndex = index distanceTopGrabbedVsPointer = target.offsetTop - clientY }} on:drag={e => { mouseYCoordinate = e.clientY }} on:dragover={() => { hoveredItemIndex = index }} on:dragend={() => { mouseYCoordinate = null draggingItem = null hoveredItemIndex = null }}> {#if !SUPPORTS.isAndroid}
{:else}
moveItem(index, 'up')} class='input-group-text d-flex justify-content-center px-5 font-size-20 pointer'>
moveItem(index, 'down')} class='input-group-text d-flex justify-content-center px-5 font-size-20 pointer'>
{/if}
{#each allowedHomeSections as section}
{section}
{/each}
{ homeSections.splice(index, 1); homeSections = homeSections }} class='btn btn-danger btn-square input-group-append px-5 d-flex align-items-center'>
{/each}
{ homeSections[homeSections.length] = 'Trending Now' }} class='btn btn-primary'>Add Section