mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 13:21:29 +04:00
38 lines
1006 B
Plaintext
38 lines
1006 B
Plaintext
---
|
|
// Liquid: {% for map in maps %} — card maps span a full-width column with no
|
|
// card-body; non-card maps get a card-body with a title.
|
|
import DefaultLayout from '@shared/layouts/DefaultLayout.astro';
|
|
import Map from '@ui/Map.astro';
|
|
import Card from '@ui/Card.astro';
|
|
import CardBody from '@ui/CardBody.astro';
|
|
import maps from '@data/maps.json';
|
|
|
|
type MapData = { title?: string; card?: boolean };
|
|
const mapEntries = Object.entries(maps as Record<string, MapData>);
|
|
---
|
|
|
|
<DefaultLayout title="Maps" pageHeader="Maps" pageMenu="plugins.maps" pageLibs={['mapbox']}>
|
|
<div class="row row-cards">
|
|
{
|
|
mapEntries.map(([mapId, data]) =>
|
|
data.card ? (
|
|
<div class="col-lg-12">
|
|
<Card>
|
|
<Map mapId={mapId} ratio="21x9" />
|
|
</Card>
|
|
</div>
|
|
) : (
|
|
<div class="col-lg-6">
|
|
<Card>
|
|
<CardBody>
|
|
<div class="card-title">{data.title}</div>
|
|
<Map mapId={mapId} />
|
|
</CardBody>
|
|
</Card>
|
|
</div>
|
|
),
|
|
)
|
|
}
|
|
</div>
|
|
</DefaultLayout>
|