diff --git a/BrazilianPlantCard/8f3ddb4d-5afe-44b7-a726-c1a6e311a27e.json b/BrazilianPlantCard/8f3ddb4d-5afe-44b7-a726-c1a6e311a27e.json new file mode 100644 index 0000000..78b121b --- /dev/null +++ b/BrazilianPlantCard/8f3ddb4d-5afe-44b7-a726-c1a6e311a27e.json @@ -0,0 +1,27 @@ +{ + "data": { + "type": "card", + "attributes": { + "commonName": null, + "scientificName": null, + "description": null, + "habitat": null, + "conservationStatus": null, + "uses": null, + "images": [], + "growthConditions": null, + "cardInfo": { + "title": null, + "description": null, + "thumbnailURL": null, + "notes": null + } + }, + "meta": { + "adoptsFrom": { + "module": "../brazilianPlants", + "name": "BrazilianPlantCard" + } + } + } +} \ No newline at end of file diff --git a/CardListing/a6f78262-f031-4bb1-b8be-453a4e1648a4.json b/CardListing/a6f78262-f031-4bb1-b8be-453a4e1648a4.json new file mode 100644 index 0000000..21b538c --- /dev/null +++ b/CardListing/a6f78262-f031-4bb1-b8be-453a4e1648a4.json @@ -0,0 +1,69 @@ +{ + "data": { + "meta": { + "adoptsFrom": { + "name": "CardListing", + "module": "https://realms-staging.stack.cards/catalog/catalog-app/listing/listing" + } + }, + "type": "card", + "attributes": { + "name": "Brazilian Plant Card", + "images": [], + "summary": "The BrazilianPlantCard defines a structured schema for representing information about Brazilian plants, including common and scientific names, descriptive details, habitat, conservation status, uses, images, and growth conditions. It serves as a standardized data model for cataloging plant characteristics and related information in a card-based format.", + "cardInfo": { + "name": null, + "notes": null, + "summary": null, + "cardThumbnailURL": null + } + }, + "relationships": { + "specs.0": { + "links": { + "self": "../Spec/48dbd34f-c7fb-49a9-b02f-07c0904941ce" + } + }, + "skills": { + "links": { + "self": null + } + }, + "tags.0": { + "links": { + "self": "https://realms-staging.stack.cards/catalog/Tag/f21d95da-0728-46a8-8622-6c157716c26c" + } + }, + "license": { + "links": { + "self": "https://realms-staging.stack.cards/catalog/License/4c5a023b-a72c-4f90-930b-da60a1de5b2d" + } + }, + "publisher": { + "links": { + "self": null + } + }, + "examples.0": { + "links": { + "self": "../BrazilianPlantCard/8f3ddb4d-5afe-44b7-a726-c1a6e311a27e" + } + }, + "categories.0": { + "links": { + "self": "https://realms-staging.stack.cards/catalog/Category/science-discovery" + } + }, + "cardInfo.theme": { + "links": { + "self": null + } + }, + "cardInfo.cardThumbnail": { + "links": { + "self": null + } + } + } + } +} \ No newline at end of file diff --git a/Spec/48dbd34f-c7fb-49a9-b02f-07c0904941ce.json b/Spec/48dbd34f-c7fb-49a9-b02f-07c0904941ce.json new file mode 100644 index 0000000..1b5ade3 --- /dev/null +++ b/Spec/48dbd34f-c7fb-49a9-b02f-07c0904941ce.json @@ -0,0 +1,45 @@ +{ + "data": { + "meta": { + "adoptsFrom": { + "name": "Spec", + "module": "https://cardstack.com/base/spec" + } + }, + "type": "card", + "attributes": { + "ref": { + "name": "BrazilianPlantCard", + "module": "../brazilianPlants" + }, + "readMe": "# BrazilianPlantCard\n\n## Summary\nThe `BrazilianPlantCard` is a card definition that represents information about a Brazilian plant. It contains fields for the common name, scientific name, description, habitat, conservation status, uses, images, and growth conditions of the plant.\n\n## Import\n```gts\nimport { BrazilianPlantCard } from 'https://realms-staging.stack.cards/experiments/brazilianPlants';\n```\n\n## Usage as a Field\nYou can use the `BrazilianPlantCard` as a field within a consuming card or field definition:\n\n```gts\n@field brazilianPlant = linksTo(BrazilianPlantCard);\n```\n\n## Template Usage\nTo use the `BrazilianPlantCard` within a template, you can delegate to its fields:\n\n```hbs\n
\n

<@fields.commonName />

\n

<@fields.scientificName />

\n <@fields.description />\n
\n

Habitat

\n

<@fields.habitat />

\n
\n
\n

Conservation Status

\n

<@fields.conservationStatus />

\n
\n
\n

Uses

\n <@fields.uses />\n
\n
\n

Growth Conditions

\n <@fields.growthConditions />\n
\n
\n

Images

\n <@fields.images @format=\"embedded\" />\n
\n
\n```", + "cardInfo": { + "name": null, + "notes": null, + "summary": null, + "cardThumbnailURL": null + }, + "specType": "card", + "cardTitle": "BrazilianPlantCard", + "cardDescription": null, + "containedExamples": [] + }, + "relationships": { + "cardInfo.theme": { + "links": { + "self": null + } + }, + "linkedExamples": { + "links": { + "self": null + } + }, + "cardInfo.cardThumbnail": { + "links": { + "self": null + } + } + } + } +} \ No newline at end of file diff --git a/brazilianPlants.gts b/brazilianPlants.gts new file mode 100644 index 0000000..c0b73de --- /dev/null +++ b/brazilianPlants.gts @@ -0,0 +1,39 @@ +import { CardDef, FieldDef, field, contains, containsMany } from 'https://cardstack.com/base/card-api'; +import StringField from 'https://cardstack.com/base/string'; +import MarkdownField from 'https://cardstack.com/base/markdown'; + +class ImageLinksField extends FieldDef { + @field imageUrl = contains(StringField); +} + +export class BrazilianPlantCard extends CardDef { + static displayName = 'BrazilianPlantCard'; + + @field commonName = contains(StringField); + @field scientificName = contains(StringField); + @field description = contains(MarkdownField); + @field habitat = contains(StringField); + @field conservationStatus = contains(StringField); + @field uses = contains(MarkdownField); + @field images = containsMany(ImageLinksField); + @field growthConditions = contains(MarkdownField); +} + + + /* + static isolated = class Isolated extends Component { + + } + + static embedded = class Embedded extends Component { + + } + + static atom = class Atom extends Component { + + } + + static edit = class Edit extends Component { + + } + */