path_tmpl.js 474 B

123456789101112131415
  1. app.templates.path = function (doc, type, entry) {
  2. const arrow = '<svg class="_path-arrow"><use xlink:href="#icon-dir"/></svg>';
  3. let html = `<a href="${doc.fullPath()}" class="_path-item _icon-${
  4. doc.icon
  5. }">${doc.fullName}</a>`;
  6. if (type) {
  7. html += `${arrow}<a href="${type.fullPath()}" class="_path-item">${
  8. type.name
  9. }</a>`;
  10. }
  11. if (entry) {
  12. html += `${arrow}<span class="_path-item">${$.escape(entry.name)}</span>`;
  13. }
  14. return html;
  15. };