path_tmpl.js 779 B

1234567891011121314151617181920212223
  1. // TODO: This file was created by bulk-decaffeinate.
  2. // Sanity-check the conversion and remove this comment.
  3. /*
  4. * decaffeinate suggestions:
  5. * DS102: Remove unnecessary code created because of implicit returns
  6. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
  7. */
  8. app.templates.path = function (doc, type, entry) {
  9. const arrow = '<svg class="_path-arrow"><use xlink:href="#icon-dir"/></svg>';
  10. let html = `<a href="${doc.fullPath()}" class="_path-item _icon-${
  11. doc.icon
  12. }">${doc.fullName}</a>`;
  13. if (type) {
  14. html += `${arrow}<a href="${type.fullPath()}" class="_path-item">${
  15. type.name
  16. }</a>`;
  17. }
  18. if (entry) {
  19. html += `${arrow}<span class="_path-item">${$.escape(entry.name)}</span>`;
  20. }
  21. return html;
  22. };