Store and publish annotations on the web, as described in the Web Annotation Discovery proposal.

web-annotation-discovery-se.../views/partials/ annotation.hbs
48 lines
1.1 KiB

  1. {{#if verbose}}
  2. <div class='annotationBody'>
  3. {{{bodyHtml}}}
  4. </div>
  5. {{else}}
  6. <a href='{{annotation.id}}' class='plainlink'>
  7. <div class='annotationBody'>
  8. {{{bodyHtml}}}
  9. </div>
  10. </a>
  11. {{/if}}
  12. <p style='margin-bottom: 0;'>{{#if verbose}}This is an annotation {{/if}}on:
  13. {{#if targetUrl}}<a href='{{targetUrl}}'>{{targetUrl}}</a>{{/if}}
  14. </p>
  15. {{#if targetUrls}}
  16. <ul class='targets'>
  17. {{#each targetUrls}}
  18. <li><a href='{{this}}'>{{this}}</a></li>
  19. {{/each}}
  20. </ul>
  21. {{/if}}
  22. {{#if targetQuotes}}
  23. {{#if verbose}}<p>On the text:</p>{{/if}}
  24. {{#each targetQuotes}}
  25. <blockquote class='textquote'><mark>{{this}}</mark></blockquote>
  26. {{/each}}
  27. {{/if}}
  28. {{#if verbose}}
  29. <p class='small'>Created on {{{created}}}</p>
  30. {{#if modified}}
  31. <p class='small'>Last modified {{{modified}}}</p>
  32. {{/if}}
  33. <details style='margin-top: 4em;'>
  34. <summary class='small'>View this annotation as JSON</summary>
  35. <pre>{{json}}</pre>
  36. </details>
  37. <script
  38. type='application/ld+json; profile="http://www.w3.org/ns/anno.jsonld"'
  39. >
  40. {{{json}}}
  41. </script>
  42. {{/if}}