包文件→ .shtukbase/packages/lenses/kit/examples/base/map.html
kit/examples/base/map.html
68 行, 3.1 KB.
文件按包中的原样显示:代码及其注释不做翻译。
- <!--
- ---
- type: Lens
- title: Garden map
- icon: "🗺️"
- description: "Why the garden, the beds, what grows on them and how the plot is arranged, on one canvas"
- template: canvas
- lensType: map
- render: live
- sources: [needs.md, "needs/*.md", beds.md, "beds/*.md", plants.md, "plants/*.md", plot.md, "plot/*.md"]
- generator: "node apps/standard/packages/lenses/kit/bin/shtukbase-lenses.js build --root apps/standard/packages/lenses/kit/examples/base"
- look: atlas
- surface: paper
- areaMax: 1600
- fit: width
- mode: short
- modes:
- - {id: names, label: "Names", card: {sub: false, size: xs, chips: []}}
- - {id: short, label: "Short", card: {sub: description, size: s}}
- - id: full
- label: "Detailed"
- card: {sub: statement, size: auto}
- columns: "474px max-content max-content"
- units: {needs: 4}
- layout:
- columns: "248px max-content max-content"
- areas:
- - "needs beds plot"
- - "needs growing plot"
- regions:
- - {id: needs, title: "Why", hint: "why we have a garden", icon: "🎯", color: red, units: 2,
- from: /needs, sort: order, card: {sub: description, full: true, art: art, size: s, chips: []}}
- - {id: beds, title: "Beds", hint: "the three beds of the garden", icon: "🟫", color: orange, units: 6, hug: true,
- from: /beds, sort: order, card: {sub: description, full: true, art: art, size: s, chips: []}}
- - id: growing
- title: "What grows"
- hint: "plants by beds"
- icon: "🌱"
- color: green
- layout: {columns: "248px 248px"}
- regions:
- - {id: greens, title: "Greens", icon: "🌿", color: green, units: 2,
- from: /plants, where: {bed: /beds/greens.md}, sort: order, card: {sub: description, full: true, art: art, size: s, chips: [mark]}}
- - {id: rootcrops, title: "Root crops", icon: "🥕", color: green, units: 2,
- from: /plants, where: {bed: /beds/roots.md}, sort: order, card: {sub: description, full: true, art: art, size: s, chips: [mark]}}
- - {id: plot, title: "Plot", hint: "left to right: what consists of what", icon: "🏡", color: blue, tree: parent,
- from: /plot, sort: order, card: {sub: description, full: true, art: art, size: s, chips: []}}
- edges:
- - {field: servedBy, from: needs, to: beds, label: covered by a bed, color: red}
- - {field: bed, from: [greens, rootcrops], to: beds, label: grows on a bed, color: green}
- ---
- A teaching map of the lens kit: the guide apps/standard/packages/lenses/kit/patterns/map.md goes through it step by step.
- On the left is why the garden, on top in the middle the beds, under them the frame "What grows" with two regions, on the right the tree
- of the plot by the field "Part of". The "Cards" switch in the side panel changes the view: names, short, detailed.
- -->
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Garden map</title>
- <link rel="stylesheet" href="lib/kit.css">
- <script src="lib/data.js"></script>
- <script src="lib/kit.js"></script>
- </head>
- <body><p class="lx-missing">The lens "Garden map". There is no data yet: build it with the command <code>shtukbase-lenses build</code> in the root of the base.</p></body>
- </html>