--- // Port of preview/pages/avatars.html (layout: default) // Note: the `description` front matter key is inert in the dev build (no // in the reference output), so it is not ported. import DefaultLayout from '@shared/layouts/DefaultLayout.astro'; import Avatar from '@shared/components/ui/Avatar.astro'; import AvatarUpload from '@shared/components/ui/AvatarUpload.astro'; import people from '@data/people.json'; import { site } from '@shared/lib/site'; const iconIcons = ['user', 'settings', 'car', 'balloon', 'users', 'users-group', 'apps', 'ghost']; // Liquid: {% for color in site.colors %} — the iterated keys match site.themeColors // (blue..cyan), confirmed against the reference output. const colors = site.themeColors; // equivalent of the first_letters filter const firstLetters = (s: string) => s.split(' ').map((w) => w.charAt(0)).join(''); const people8 = people.slice(0, 8); const people5 = people.slice(0, 5); const sizes = ['xxs', 'xs', 'sm', 'md', 'lg', 'xl']; const listSizes = ['xxs', 'xs', 'sm', 'md', 'lg']; const uploadSizes = ['xxs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl']; const statusColors = ['red', 'green', 'blue', 'yellow', 'secondary']; const brands = ['netflix', 'amazon', 'messenger', 'figma', 'twitch']; --- Default avatar Avatar with icon {iconIcons.map((icon) => )} Avatar with icon {colors.map((color) => )} Simple avatar {people8.map((person) => )} Avatar placeholder {people8.map((person) => )} Avatar shapes Avatar sizes {sizes.map((size) => )} {sizes.map((size) => )} Avatar lists { listSizes.map((size) => ( <> {people5.map((person) => ( ))} {people5.map((person) => ( ))} > )) } Avatar placeholder {uploadSizes.map((size) => )} Avatar statuses {statusColors.map((color, i) => )} Avatar brands {brands.map((brand, i) => )}