mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
docs(generation): navigation tweaks for automatic documentation
This commit is contained in:
@ -5,10 +5,10 @@
|
|||||||
<@ else @>
|
<@ else @>
|
||||||
{% elsif page.versionHref == "<$ ver.href $>" %}
|
{% elsif page.versionHref == "<$ ver.href $>" %}
|
||||||
<@ endif @>
|
<@ endif @>
|
||||||
{% include v2/api_menu_<$ ver.name $>.html %}
|
{% include v2_fluid/api_menu_flat_<$ ver.name $>.html %}
|
||||||
<@ endif @>
|
<@ endif @>
|
||||||
<@ endfor @>
|
<@ endfor @>
|
||||||
<# make the last case always be to show latest version #>
|
<# make the last case always be to show latest version #>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include v2/api_menu_<$ version.latest.name $>.html %}
|
{% include v2_fluid/api_menu_flat_<$ version.latest.name $>.html %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<@ for doc in docs @><@ if doc.URL @>
|
<@ for doc in docs @><@ if doc.URL @>
|
||||||
<li class="{% if page.id == '{{<$ doc.name $> | slugify: 'pretty'}}' %}active{% endif %}">
|
<li class="{% if page.id == '{{<$ doc.name $> | slugify}}' %}active{% endif %}">
|
||||||
<a href="<$ doc.URL $>"><$ doc.name $></a>
|
<a href="/<$ doc.URL $>"><$ doc.name $></a>
|
||||||
</li><@ endif @><@ endfor @>
|
</li><@ endif @><@ endfor @>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<select name="version" id="version-toggle">
|
<select name="version"
|
||||||
|
id="version-toggle"
|
||||||
|
onchange="window.location.href=this.options[this.selectedIndex].value">
|
||||||
<@ for ver in version.list @>
|
<@ for ver in version.list @>
|
||||||
<option
|
<option
|
||||||
value="<$ ver.href $>/{% if page.path != ''%}{{page.path}}{% else %}api/{% endif %}"
|
value="<$ ver.href $>/{% if page.path != ''%}{{page.path}}{% else %}api/{% endif %}"
|
||||||
|
2
scripts/docs/templates/common.template.html
vendored
2
scripts/docs/templates/common.template.html
vendored
@ -4,7 +4,7 @@ version: "<$ version.current.name $>"
|
|||||||
versionHref: "<$ version.current.href $>"
|
versionHref: "<$ version.current.href $>"
|
||||||
path: "<$ doc.path $>"
|
path: "<$ doc.path $>"
|
||||||
category: api
|
category: api
|
||||||
id: "{{<$ doc.name $> | slugify: 'pretty'}}"
|
id: "{{<$ doc.name $> | slugify}}"
|
||||||
title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>"
|
title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>"
|
||||||
header_sub_title: "<$ doc.docType | capital $> in module <$ doc.module $>"
|
header_sub_title: "<$ doc.docType | capital $> in module <$ doc.module $>"
|
||||||
doc: "<$ doc.name $>"
|
doc: "<$ doc.name $>"
|
||||||
|
Reference in New Issue
Block a user