Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions CardListing/e6420987-6c85-48b5-93f0-6051d66c643e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"data": {
"meta": {
"adoptsFrom": {
"name": "CardListing",
"module": "https://realms-staging.stack.cards/catalog/catalog-app/listing/listing"
}
},
"type": "card",
"attributes": {
"name": "Golf Scorecard",
"images": [],
"summary": "The GolfScorecard component provides a structured digital record of a golf round, including details such as tournament, course, player, and date information. It encapsulates the scoring details for 18 holes, tracking strokes, par, yardage, and special scores like hole-in-one or eagle. The component calculates aggregate scores for the front nine, back nine, total strokes, and score relative to par. It offers embedded or isolated views with detailed score breakdowns, including per-hole scores and overall summaries, and includes signature fields for validation. Its primary purpose is to facilitate comprehensive recording and display of golf round scores in a clear, visual format suitable for both digital and print use.",
"cardInfo": {
"name": null,
"notes": null,
"summary": null,
"cardThumbnailURL": null
}
},
"relationships": {
"specs.0": {
"links": {
"self": "../Spec/8ea2e332-6a6c-4ae9-9d99-02a133a9ab5b"
}
},
"skills": {
"links": {
"self": null
}
},
"tags.0": {
"links": {
"self": "https://realms-staging.stack.cards/catalog/Tag/51de249c-516a-4c4d-bd88-76e88274c483"
}
},
"license": {
"links": {
"self": "https://realms-staging.stack.cards/catalog/License/4c5a023b-a72c-4f90-930b-da60a1de5b2d"
}
},
"publisher": {
"links": {
"self": null
}
},
"examples.0": {
"links": {
"self": "../golf-scorecard-0ed3ac0e-4b0d-452b-b17d-4cb63cecb223/GolfScorecard/ee5723a6-256c-4a03-b57e-b542a89553b9"
}
},
"categories.0": {
"links": {
"self": "https://realms-staging.stack.cards/catalog/Category/sports-fitness"
}
},
"cardInfo.theme": {
"links": {
"self": null
}
},
"cardInfo.cardThumbnail": {
"links": {
"self": null
}
}
}
}
}
45 changes: 45 additions & 0 deletions Spec/8ea2e332-6a6c-4ae9-9d99-02a133a9ab5b.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"data": {
"meta": {
"adoptsFrom": {
"name": "Spec",
"module": "https://cardstack.com/base/spec"
}
},
"type": "card",
"attributes": {
"ref": {
"name": "GolfScorecard",
"module": "../golf-scorecard-0ed3ac0e-4b0d-452b-b17d-4cb63cecb223/golf-scorecard"
},
"readMe": "# Golf Scorecard\n\n## Summary\nThe `GolfScorecard` card definition represents a golf scorecard, including information about the tournament, course, player, and hole-by-hole scores. It provides computed fields for various totals and scoring metrics.\n\n## Import\n```javascript\nimport { GolfScorecard, HoleField } from 'https://realms-staging.stack.cards/chuan16/catalog-listing-test-1/golf-scorecard-0ed3ac0e-4b0d-452b-b17d-4cb63cecb223/golf-scorecard';\n```\n\n## Usage as a Field\nYou can use the `GolfScorecard` card definition as a field within a consuming card or field:\n\n```javascript\nimport { CardDef, FieldDef, field, contains, containsMany } from 'https://cardstack.com/base/card-api';\n\nexport class MyCard extends CardDef {\n @field golfScorecard = contains(GolfScorecard);\n}\n```\n\n## Template Usage\nInside the template of a consuming card or field, you can access the `GolfScorecard` instance and its fields:\n\n```html\n<div>\n <h2>{{@model.golfScorecard.tournamentName}}</h2>\n <p>Player: {{@model.golfScorecard.playerName}}</p>\n <p>Total Score: {{@model.golfScorecard.totalScore}}</p>\n <p>Score to Par: {{@model.golfScorecard.scoreToPar}}</p>\n</div>\n```\n\nYou can also use the `Embedded` and `Edit` components provided by the `GolfScorecard` definition to render the scorecard in different views:\n\n```html\n<@model.golfScorecard.Embedded />\n<@model.golfScorecard.Edit />\n```",
"cardInfo": {
"name": null,
"notes": null,
"summary": null,
"cardThumbnailURL": null
},
"specType": "card",
"cardTitle": "Golf Scorecard",
"cardDescription": null,
"containedExamples": []
},
"relationships": {
"cardInfo.theme": {
"links": {
"self": null
}
},
"linkedExamples": {
"links": {
"self": null
}
},
"cardInfo.cardThumbnail": {
"links": {
"self": null
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"data": {
"type": "card",
"attributes": {
"tournamentName": "US Open Championship",
"courseName": "Pinehurst No. 2",
"playerName": "Rory McIlroy",
"roundDate": "2025-07-14",
"roundNumber": 1,
"holes": [
{
"holeNumber": 1,
"par": 4,
"yards": 445,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 2,
"par": 4,
"yards": 411,
"strokes": 3,
"putts": 1
},
{
"holeNumber": 3,
"par": 3,
"yards": 198,
"strokes": 3,
"putts": 2
},
{
"holeNumber": 4,
"par": 4,
"yards": 381,
"strokes": 4,
"putts": 1
},
{
"holeNumber": 5,
"par": 5,
"yards": 567,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 6,
"par": 4,
"yards": 450,
"strokes": 5,
"putts": 2
},
{
"holeNumber": 7,
"par": 3,
"yards": 176,
"strokes": 2,
"putts": 1
},
{
"holeNumber": 8,
"par": 4,
"yards": 422,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 9,
"par": 4,
"yards": 436,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 10,
"par": 4,
"yards": 447,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 11,
"par": 5,
"yards": 551,
"strokes": 5,
"putts": 2
},
{
"holeNumber": 12,
"par": 3,
"yards": 164,
"strokes": 3,
"putts": 1
},
{
"holeNumber": 13,
"par": 4,
"yards": 408,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 14,
"par": 4,
"yards": 458,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 15,
"par": 3,
"yards": 227,
"strokes": 2,
"putts": 1
},
{
"holeNumber": 16,
"par": 4,
"yards": 479,
"strokes": 4,
"putts": 2
},
{
"holeNumber": 17,
"par": 4,
"yards": 429,
"strokes": 3,
"putts": 1
},
{
"holeNumber": 18,
"par": 5,
"yards": 543,
"strokes": 5,
"putts": 2
}
],
"signedByPlayer": false,
"signedByMarker": false,
"cardTitle": "Rory McIlroy - 2025 US Open Round 1",
"cardDescription": "First round scorecard for Rory McIlroy at the 2025 US Open Championship",
"cardThumbnailURL": null
},
"meta": {
"adoptsFrom": {
"module": "../golf-scorecard",
"name": "GolfScorecard"
}
}
}
}
Loading
Loading