import type { Shout } from '../../graphql/schema/core.gen' import { createSignal, createEffect, For, Show } from 'solid-js' import { ArticleCard } from './ArticleCard' const columnSizes = ['col-md-12', 'col-md-8', 'col-md-16'] export const Row2 = (props: { articles: Shout[] isEqual?: boolean nodate?: boolean noAuthorLink?: boolean noauthor?: boolean }) => { const [columnIndex, setColumnIndex] = createSignal(0) // Update column index on component mount createEffect(() => setColumnIndex(Math.floor(Math.random() * columnSizes.length))) return ( 0}>
{(article, _idx) => { const className = columnSizes[props.isEqual ? 0 : columnIndex() % columnSizes.length] const big = className === 'col-md-12' ? 'M' : 'L' const desktopCoverSize = className === 'col-md-8' ? 'S' : big return (
) }}
) }