homepage slider conditional render (#283)
This commit is contained in:
parent
b0706b1560
commit
15691a973d
|
@ -129,6 +129,7 @@ export const HomeView = (props: Props) => {
|
||||||
nodate={true}
|
nodate={true}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<Show when={topMonthArticles()}>
|
||||||
<Slider title={t('Top month articles')}>
|
<Slider title={t('Top month articles')}>
|
||||||
<For each={topMonthArticles()}>
|
<For each={topMonthArticles()}>
|
||||||
{(a: Shout) => (
|
{(a: Shout) => (
|
||||||
|
@ -144,6 +145,7 @@ export const HomeView = (props: Props) => {
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
</Slider>
|
</Slider>
|
||||||
|
</Show>
|
||||||
|
|
||||||
<Row2 articles={sortedArticles().slice(10, 12)} nodate={true} />
|
<Row2 articles={sortedArticles().slice(10, 12)} nodate={true} />
|
||||||
|
|
||||||
|
@ -159,6 +161,7 @@ export const HomeView = (props: Props) => {
|
||||||
|
|
||||||
{randomLayout()}
|
{randomLayout()}
|
||||||
|
|
||||||
|
<Show when={topArticles()}>
|
||||||
<Slider title={t('Favorite')}>
|
<Slider title={t('Favorite')}>
|
||||||
<For each={topArticles()}>
|
<For each={topArticles()}>
|
||||||
{(a: Shout) => (
|
{(a: Shout) => (
|
||||||
|
@ -174,6 +177,7 @@ export const HomeView = (props: Props) => {
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
</Slider>
|
</Slider>
|
||||||
|
</Show>
|
||||||
|
|
||||||
<Beside
|
<Beside
|
||||||
beside={sortedArticles()[20]}
|
beside={sortedArticles()[20]}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user