diff --git a/credentials/fema-ics-100/build.js b/credentials/fema-ics-100/build.js new file mode 100644 index 0000000..857dd20 --- /dev/null +++ b/credentials/fema-ics-100/build.js @@ -0,0 +1,18 @@ +import fs from 'fs'; +import path from 'path'; + +const svgPath = path.join(import.meta.dirname, 'image.svg'); +const jsonPath = path.join(import.meta.dirname, 'credential.json'); + +const svgContent = fs.readFileSync(svgPath, 'utf8'); +// put SVG on a single line and remove excess whitespace +const minifiedSvg = svgContent + .replace(/\r?\n|\r/g, ' ') + .replace(/\s{2,}/g, ' ') + .replace(/>\s+<') + .trim(); + +// add the SVG as the `template` value of the first `renderMethod` property +const json = JSON.parse(fs.readFileSync(jsonPath, 'utf8')); +json.renderMethod[0].template = minifiedSvg; +fs.writeFileSync(jsonPath, JSON.stringify(json, null, 2)); diff --git a/credentials/fema-ics-100/credential.json b/credentials/fema-ics-100/credential.json index 2048d5e..9e8a851 100644 --- a/credentials/fema-ics-100/credential.json +++ b/credentials/fema-ics-100/credential.json @@ -28,7 +28,7 @@ "narrative": "Awarded upon completion of the [Introduction to the Incident Command System (ICS-100.c)](https://training.fema.gov/is/courseoverview.aspx?code=IS-100.c&lang=en) online course.\n\nICS 100, Introduction to the Incident Command System, introduces the Incident Command System (ICS) and provides the foundation for higher level ICS training. This course describes the history, features and principles, and organizational structure of the Incident Command System. It also explains the relationship between ICS and the National Incident Management System (NIMS).\n\nThis course takes approximately 2 hours to complete, self-paced, online." }, "image": { - "id":"https://examples.vcplayground.org/credentials/fema-ics-100/image.png", + "id": "https://examples.vcplayground.org/credentials/fema-ics-100/image.png", "type": "Image" }, "alignment": [ @@ -45,11 +45,11 @@ }, "renderMethod": [ { - "name": "Badge", - "mediaQuery": "@media (min-width: 1px)", + "name": "FEMA Certification", + "mediaQuery": "@media (orientation: portrait)", "type": "SvgRenderingTemplate2024", "mediaType": "image/svg+xml", - "template": "FEMA IS-100.CICS FoundationCERTIFIEDRecognizes knowledge of the Incident Command System (ICS).Holders can explain the principles and basic structureof ICS and functional staff roles within the system.0.2 CEUs • 2 Hours • Self-Paced OnlineNIMS Training ProgramFEMA Emergency Management InstituteValid: 2024-01-01 to 2026-02-01" + "template": " FEMA IS-100.C ICS Foundation CERTIFIED
{{credentialSubject.achievement.description}}
0.2 CEUs | 2 Hours | Self-Paced Online NIMS Training Program FEMA Emergency Management Institute Valid: {{#formatDate}}{{validFrom}}{{/formatDate}} to {{#formatDate}}{{validUntil}}{{/formatDate}}
" } ] } diff --git a/credentials/fema-ics-100/image.png b/credentials/fema-ics-100/image.png index 7450c1a..86dc615 100644 Binary files a/credentials/fema-ics-100/image.png and b/credentials/fema-ics-100/image.png differ diff --git a/credentials/fema-ics-100/image.svg b/credentials/fema-ics-100/image.svg index 2b2817b..038d391 100644 --- a/credentials/fema-ics-100/image.svg +++ b/credentials/fema-ics-100/image.svg @@ -1,36 +1,28 @@ - - - - - - - - - - - - - Recognizes knowledge of the Incident Command System (ICS). - Holders can explain the principles and basic structure - of ICS and functional staff roles within the system. - + +
+ {{credentialSubject.achievement.description}} +
+
- - 0.2 CEUs • 2 Hours • Self-Paced Online + 0.2 CEUs | 2 Hours | Self-Paced Online - - - - Valid: 2024-01-01 to 2026-02-01 + Valid: {{#formatDate}}{{validFrom}}{{/formatDate}} to {{#formatDate}}{{validUntil}}{{/formatDate}}
diff --git a/credentials/fema-ics-100/queries.json b/credentials/fema-ics-100/queries.json index 7c9fc75..96ba94c 100644 --- a/credentials/fema-ics-100/queries.json +++ b/credentials/fema-ics-100/queries.json @@ -10,7 +10,14 @@ "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json", "https://w3id.org/vc/render-method/v2rc1" ], - "type": ["OpenBadgeCredential"] + "type": ["VerifiableCredential", "OpenBadgeCredential"], + "credentialSubject": { + "type": ["AchievementSubject"], + "achievement": { + "id": "urn:uuid:ac254bd5-8fad-4bb1-9d29-dfe049647037", + "type": ["Achievement"] + } + } }, "acceptedCryptosuites": [ "eddsa-rdfc-2022",