Posts
Posts01
A news/announcements pattern. Below the "sm" breakpoint, the layout changes and item arrangement is adjusted.
en.astro
---
import { ArrowRightIcon } from '@lism-css/icons/astro';
import DemoLayout from '@/layouts/DemoLayout.astro';
import { Container, Grid, Box, Flex, Icon, Text, Inline } from 'lism-css/astro';
import { Button } from '@lism-css/ui/astro/Button';
---
<DemoLayout title="Posts01">
<Container isWrapper="m" py="50" hasGutter>
<Grid gtc={['1fr', 'auto 1fr']} g="40">
<Box gr={['1', '1 / 2']} gc={['1', '1 / 2']}>
<h2 class="u--trim">News</h2>
</Box>
<Box gr={['2', '2']} gc={['1', '1 / 3']}>
<Grid gtc={['auto', 'auto 1fr']} bd-be>
<Grid as="a" isBoxLink href="#" gtc="subgrid" gc="1 / -1" bd-bs g={['20', '30']} py="30" set="hov">
<Grid gtc={['auto auto', 'auto 1fr']} g="30" jc="start" ai="center">
<Inline fz="s">2025.07.13</Inline>
<Text d="inline-flex" jc="center" fz="xs" hl="xs" c="base" bgc="text" p="10 20" bdrs="99">New Service</Text>
</Grid>
<Flex ai="center" td="none" g="30" hov="in:cLink">
<Text>Introducing "Goal-based Savings" — set a target amount and enjoy building your savings plan.</Text>
<Icon icon={ArrowRightIcon} weight="bold" fz="s" c="text" ms="auto" />
</Flex>
</Grid>
<Grid as="a" isBoxLink href="#" gtc="subgrid" gc="1 / -1" bd-bs g={['20', '30']} py="30" set="hov">
<Grid gtc={['auto auto', 'auto 1fr']} g="30" jc="start" ai="center">
<Inline fz="s">2025.07.13</Inline>
<Text d="inline-flex" jc="center" fz="xs" hl="xs" c="base" bgc="text" p="10 20" bdrs="99">Security</Text>
</Grid>
<Flex ai="center" td="none" g="30" hov="in:cLink">
<Text>Please beware of suspicious emails (phishing scams) impersonating our bank</Text>
<Icon icon={ArrowRightIcon} weight="bold" fz="s" c="text" ms="auto" />
</Flex>
</Grid>
<Grid as="a" isBoxLink href="#" gtc="subgrid" gc="1 / -1" bd-bs g={['20', '30']} py="30" set="hov">
<Grid gtc={['auto auto', 'auto 1fr']} g="30" jc="start" ai="center">
<Inline fz="s">2025.07.13</Inline>
<Text d="inline-flex" jc="center" fz="xs" hl="xs" c="base" bgc="text" p="10 20" bdrs="99">Important Notice</Text>
</Grid>
<Flex ai="center" td="none" g="30" hov="in:cLink">
<Text>Partial revision of online banking service terms and conditions</Text>
<Icon icon={ArrowRightIcon} weight="bold" fz="s" c="text" ms="auto" />
</Flex>
</Grid>
</Grid>
</Box>
<Flex gr={['3', '1 / 2']} gc={['1', '2 / 3']} ai="flex-end" jc="flex-end">
<Button href="#" variant="outline" w={['stretch', 'auto']} min-w="8rem" fz="s" p="15" bdrs="10">View All</Button>
</Flex>
</Grid>
</Container>
</DemoLayout>
<style>
@media (any-hover: hover) {
.-hov\:in\:cLink {
color: var(--_isHov, var(--link));
}
}
</style>