|
1 | 1 | templates = app.templates |
2 | 2 |
|
| 3 | +arrow = """<svg class="_list-arrow"><use xlink:href="#dir"/></svg>""" |
| 4 | + |
3 | 5 | templates.sidebarDoc = (doc, options = {}) -> |
4 | 6 | link = """<a href="#{doc.fullPath()}" class="_list-item _icon-#{doc.icon} """ |
5 | 7 | link += if options.disabled then '_list-disabled' else '_list-dir' |
6 | 8 | link += """" data-slug="#{doc.slug}" title="#{doc.fullName}" tabindex="-1">""" |
7 | 9 | if options.disabled |
8 | 10 | link += """<span class="_list-enable" data-enable="#{doc.slug}">Enable</span>""" |
9 | 11 | else |
10 | | - link += """<span class="_list-arrow"></span>""" |
| 12 | + link += arrow |
11 | 13 | link += """<span class="_list-count">#{doc.release}</span>""" if doc.release |
12 | 14 | link += """<span class="_list-text">#{doc.name}""" |
13 | 15 | link += " #{doc.version}" if options.fullName or options.disabled and doc.version |
14 | 16 | link + "</span></a>" |
15 | 17 |
|
16 | 18 | templates.sidebarType = (type) -> |
17 | | - """<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-s1">#{type.fullPath()}" class="_list-item _list-dir" data-slug="#{type.slug}" tabindex="-1"><span class="_list-arrow"></span><span class="_list-count">#{type.count}</span><span class="_list-text">#{$.escape type.name}</span></a>""" |
| 19 | + """<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-s1">#{type.fullPath()}" class="_list-item _list-dir" data-slug="#{type.slug}" tabindex="-1">#{arrow}<span class="_list-count">#{type.count}</span><span class="_list-text">#{$.escape type.name}</span></a>""" |
18 | 20 |
|
19 | 21 | templates.sidebarEntry = (entry) -> |
20 | 22 | """<a href="#{entry.fullPath()}" class="_list-item _list-hover" tabindex="-1">#{$.escape entry.name}</a>""" |
@@ -47,16 +49,16 @@ templates.sidebarLabel = (doc, options = {}) -> |
47 | 49 | templates.sidebarVersionedDoc = (doc, versions, options = {}) -> |
48 | 50 | html = """<div class="_list-item _list-dir _list-rdir _icon-#{doc.icon}""" |
49 | 51 | html += " open" if options.open |
50 | | - html + """" tabindex="0"><span class="_list-arrow"></span>#{doc.name}</div><div class="_list _list-sub">#{versions}</div>""" |
| 52 | + html + """" tabindex="0">#{arrow}#{doc.name}</div><div class="_list _list-sub">#{versions}</div>""" |
51 | 53 |
|
52 | 54 | templates.sidebarDisabled = (options) -> |
53 | | - """<h6 class="_list-title"><span class="_list-arrow"></span>Disabled (#{options.count})</h6>""" |
| 55 | + """<h6 class="_list-title">#{arrow}Disabled (#{options.count})</h6>""" |
54 | 56 |
|
55 | 57 | templates.sidebarDisabledList = (html) -> |
56 | 58 | """<div class="_disabled-list">#{html}</div>""" |
57 | 59 |
|
58 | 60 | templates.sidebarDisabledVersionedDoc = (doc, versions) -> |
59 | | - """<a class="_list-item _list-dir _icon-#{doc.icon} _list-disabled" data-slug="#{doc.slug_without_version}" tabindex="-1"><span class="_list-arrow"></span>#{doc.name}</a><div class="_list _list-sub">#{versions}</div>""" |
| 61 | + """<a class="_list-item _list-dir _icon-#{doc.icon} _list-disabled" data-slug="#{doc.slug_without_version}" tabindex="-1">#{arrow}#{doc.name}</a><div class="_list _list-sub">#{versions}</div>""" |
60 | 62 |
|
61 | 63 | templates.docPickerNote = """ |
62 | 64 | <div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div> |
|
0 commit comments