1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-07 20:02:23 +04:00

Migrate preview and docs packages from Eleventy to Astro (#2694)

Co-authored-by: Bartek <xbartoszdobija@gmail.com>
This commit is contained in:
Paweł Kuna
2026-07-28 00:09:02 +02:00
committed by GitHub
parent 9820d110f6
commit d8956a06d6
1150 changed files with 52147 additions and 32804 deletions
+36
View File
@@ -0,0 +1,36 @@
---
// Port of preview/pages/maps.html (layout: default).
// 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 '@shared/components/ui/Map.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">
<div class="card">
<Map mapId={mapId} ratio="21x9" />
</div>
</div>
) : (
<div class="col-lg-6">
<div class="card">
<div class="card-body">
<div class="card-title">{data.title}</div>
<Map mapId={mapId} />
</div>
</div>
</div>
),
)
}
</div>
</DefaultLayout>