path_tmpl.js 748 B

123456789101112131415
  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. const arrow = "<svg class=\"_path-arrow\"><use xlink:href=\"#icon-dir\"/></svg>";
  9. app.templates.path = function(doc, type, entry) {
  10. let html = `<a href="${doc.fullPath()}" class="_path-item _icon-${doc.icon}">${doc.fullName}</a>`;
  11. if (type) { html += `${arrow}<a href="${type.fullPath()}" class="_path-item">${type.name}</a>`; }
  12. if (entry) { html += `${arrow}<span class="_path-item">${$.escape(entry.name)}</span>`; }
  13. return html;
  14. };