|
|
|
@ -3,7 +3,7 @@ templates = app.templates
|
|
|
|
|
templates.sidebarDoc = (doc, options = {}) ->
|
|
|
|
|
link = """<a href="#{doc.fullPath()}" class="_list-item _icon-#{doc.icon} """
|
|
|
|
|
link += if options.disabled then '_list-disabled' else '_list-dir'
|
|
|
|
|
link += """" data-slug="#{doc.slug}" title="#{doc.fullName}">"""
|
|
|
|
|
link += """" data-slug="#{doc.slug}" title="#{doc.fullName}" tabindex="-1">"""
|
|
|
|
|
if options.disabled
|
|
|
|
|
link += """<span class="_list-enable" data-enable="#{doc.slug}">Enable</span>"""
|
|
|
|
|
else
|
|
|
|
@ -14,10 +14,10 @@ templates.sidebarDoc = (doc, options = {}) ->
|
|
|
|
|
link + "</span></a>"
|
|
|
|
|
|
|
|
|
|
templates.sidebarType = (type) ->
|
|
|
|
|
"""<a href="#{type.fullPath()}" class="_list-item _list-dir" data-slug="#{type.slug}"><span class="_list-arrow"></span><span class="_list-count">#{type.count}</span><span class="_list-text">#{type.name}</span></a>"""
|
|
|
|
|
"""<a href="#{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">#{type.name}</span></a>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarEntry = (entry) ->
|
|
|
|
|
"""<a href="#{entry.fullPath()}" class="_list-item _list-hover">#{$.escape entry.name}</a>"""
|
|
|
|
|
"""<a href="#{entry.fullPath()}" class="_list-item _list-hover" tabindex="-1">#{$.escape entry.name}</a>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarResult = (entry) ->
|
|
|
|
|
addons = if entry.isIndex() and app.disabledDocs.contains(entry.doc)
|
|
|
|
@ -25,17 +25,17 @@ templates.sidebarResult = (entry) ->
|
|
|
|
|
else
|
|
|
|
|
"""<span class="_list-reveal" data-reset-list title="Reveal in list"></span>"""
|
|
|
|
|
addons += """<span class="_list-count">#{entry.doc.short_version}</span>""" if entry.doc.version and not entry.isIndex()
|
|
|
|
|
"""<a href="#{entry.fullPath()}" class="_list-item _list-hover _list-result _icon-#{entry.doc.icon}">#{addons}<span class="_list-text">#{$.escape entry.name}</span></a>"""
|
|
|
|
|
"""<a href="#{entry.fullPath()}" class="_list-item _list-hover _list-result _icon-#{entry.doc.icon}" tabindex="-1">#{addons}<span class="_list-text">#{$.escape entry.name}</span></a>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarNoResults = ->
|
|
|
|
|
html = """ <div class="_list-note">No results.</div> """
|
|
|
|
|
html += """
|
|
|
|
|
<div class="_list-note">Note: documentations must be <a class="_list-note-link" data-pick-docs>enabled</a> to appear in the search.</div>
|
|
|
|
|
<div class="_list-note">Note: documentations must be <a href="#" class="_list-note-link" data-pick-docs>enabled</a> to appear in the search.</div>
|
|
|
|
|
""" unless app.isSingleDoc() or app.disabledDocs.isEmpty()
|
|
|
|
|
html
|
|
|
|
|
|
|
|
|
|
templates.sidebarPageLink = (count) ->
|
|
|
|
|
"""<span class="_list-item _list-pagelink">Show more\u2026 (#{count})</span>"""
|
|
|
|
|
"""<span role="link" class="_list-item _list-pagelink">Show more\u2026 (#{count})</span>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarLabel = (doc, options = {}) ->
|
|
|
|
|
label = """<label class="_list-item"""
|
|
|
|
@ -47,7 +47,7 @@ templates.sidebarLabel = (doc, options = {}) ->
|
|
|
|
|
templates.sidebarVersionedDoc = (doc, versions, options = {}) ->
|
|
|
|
|
html = """<div class="_list-item _list-dir _list-rdir _icon-#{doc.icon}"""
|
|
|
|
|
html += " open" if options.open
|
|
|
|
|
html + """"><span class="_list-arrow"></span>#{doc.name}</div><div class="_list _list-sub">#{versions}</div>"""
|
|
|
|
|
html + """" tabindex="0"><span class="_list-arrow"></span>#{doc.name}</div><div class="_list _list-sub">#{versions}</div>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarDisabled = (options) ->
|
|
|
|
|
"""<h6 class="_list-title"><span class="_list-arrow"></span>Disabled (#{options.count})</h6>"""
|
|
|
|
@ -56,7 +56,7 @@ templates.sidebarDisabledList = (html) ->
|
|
|
|
|
"""<div class="_disabled-list">#{html}</div>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarDisabledVersionedDoc = (doc, versions) ->
|
|
|
|
|
"""<a class="_list-item _list-dir _icon-#{doc.icon} _list-disabled" data-slug="#{doc.slug_without_version}"><span class="_list-arrow"></span>#{doc.name}</a><div class="_list _list-sub">#{versions}</div>"""
|
|
|
|
|
"""<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>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarPickerNote = """
|
|
|
|
|
<div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div>
|
|
|
|
@ -67,9 +67,9 @@ sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarSettings = ->
|
|
|
|
|
sidebarFooter """
|
|
|
|
|
<button type="button" class="_sidebar-footer-link _sidebar-footer-edit" data-pick-docs>Select documentation</button>
|
|
|
|
|
<button type="button" class="_sidebar-footer-link _sidebar-footer-light" title="Toggle light" data-light>Toggle light</button>
|
|
|
|
|
<button type="button" class="_sidebar-footer-link _sidebar-footer-layout" title="Toggle layout" data-layout>Toggle layout</button>
|
|
|
|
|
<a href="#" class="_sidebar-footer-link _sidebar-footer-edit" data-pick-docs>Select documentation</a>
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
templates.sidebarSave = ->
|
|
|
|
|