use svelte shorthand wherever possible (#242)
This commit is contained in:
parent
c4182c9ddc
commit
8229d1c9e6
|
@ -1,6 +1,6 @@
|
||||||
<a rel="nofollow noopener"
|
<a rel="nofollow noopener"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href={{href}}
|
:href
|
||||||
aria-label={{ariaLabel || ''}}
|
aria-label={{ariaLabel || ''}}
|
||||||
class="{{className || ''}} {{showIcon ? 'external-link-with-icon' : ''}} {{normalIconColor ? 'normal-icon-color' : ''}}">
|
class="{{className || ''}} {{showIcon ? 'external-link-with-icon' : ''}} {{normalIconColor ? 'normal-icon-color' : ''}}">
|
||||||
<slot></slot>{{#if showIcon}}
|
<slot></slot>{{#if showIcon}}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
aria-hidden={{ariaHidden}}
|
aria-hidden={{ariaHidden}}
|
||||||
alt={{alt || ''}}
|
alt={{alt || ''}}
|
||||||
title={{alt || ''}}
|
title={{alt || ''}}
|
||||||
src={{src}}
|
:src
|
||||||
on:imgLoad
|
on:imgLoad
|
||||||
on:imgLoadError />
|
on:imgLoadError />
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
/>
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<img
|
<img
|
||||||
src={{src}}
|
:src
|
||||||
width={{width}}
|
:width
|
||||||
height={{height}}
|
:height
|
||||||
alt={{description || ''}}
|
alt={{description || ''}}
|
||||||
title={{description || ''}}
|
title={{description || ''}}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="pseudo-virtual-list" on:initialized ref:node>
|
<div class="pseudo-virtual-list" on:initialized ref:node>
|
||||||
{{#each wrappedItems as wrappedItem, i @item}}
|
{{#each wrappedItems as wrappedItem, i @item}}
|
||||||
<PseudoVirtualListLazyItem
|
<PseudoVirtualListLazyItem
|
||||||
component={{component}}
|
:component
|
||||||
index={{i}}
|
index={{i}}
|
||||||
length={{wrappedItems.length}}
|
length={{wrappedItems.length}}
|
||||||
makeProps={{makeProps}}
|
:makeProps
|
||||||
key={{wrappedItem.item}}
|
key={{wrappedItem.item}}
|
||||||
intersectionObserver={{intersectionObserver}}
|
:intersectionObserver
|
||||||
isIntersecting={{isIntersecting(wrappedItem.item, $intersectionStates)}}
|
isIntersecting={{isIntersecting(wrappedItem.item, $intersectionStates)}}
|
||||||
isCached={{isCached(wrappedItem.item, $intersectionStates)}}
|
isCached={{isCached(wrappedItem.item, $intersectionStates)}}
|
||||||
height={{getHeight(wrappedItem.item, $intersectionStates)}}
|
height={{getHeight(wrappedItem.item, $intersectionStates)}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<li class="search-result">
|
<li class="search-result">
|
||||||
<a href={{href}} class="search-result-anchor">
|
<a :href class="search-result-anchor">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<SearchResult href="/statuses/{{status.id}}">
|
<SearchResult href="/statuses/{{status.id}}">
|
||||||
<Status :index :length
|
<Status :index :length
|
||||||
timelineType="search" timelineValue="search"
|
timelineType="search" timelineValue="search"
|
||||||
status={{status}} />
|
:status />
|
||||||
</SearchResult>
|
</SearchResult>
|
||||||
<style>
|
<style>
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{{#each $visibleItems as visibleItem @key}}
|
{{#each $visibleItems as visibleItem @key}}
|
||||||
<VirtualListLazyItem :component
|
<VirtualListLazyItem :component
|
||||||
offset={{visibleItem.offset}}
|
offset={{visibleItem.offset}}
|
||||||
makeProps={{makeProps}}
|
:makeProps
|
||||||
key={{visibleItem.key}}
|
key={{visibleItem.key}}
|
||||||
index={{visibleItem.index}}
|
index={{visibleItem.index}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue