npm i @w3c-socialcg-aptf/apcomponents

Components

<spec-card> : a card that displays information about a conformant JSON-LD specification (by fetching it from a url attribute), comparing it to the current AP standard.

<as-note> : a card that displays a Note object (or fetches it from a url attribute), with its authoring actor. It supports folding/unfolding based on content length, image display, but not video/audio nor content warnings yet.

Usage

<script src="https://cdn.jsdelivr.net/npm/@w3c-socialcg-aptf/apcomponents/dist/apcomponents/apcomponents.js"></script>
          
<as-note id="note"/>

<script>
const note = document.getElementById('note')
note.object = { …object }
// alternatively, use the url to your object 
// (make sure it is on the same domain, or use the 'useCorsProxy' attribute)
note.url = "url to your note object"
</script>