{#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}
swapItem(index, index - 1)} class='input-group-text d-flex align-items-center px-5 pointer'>
swapItem(index, index + 1)} class='input-group-text d-flex align-items-center px-5 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