mirror of https://gitee.com/bigwinds/arangodb
65 lines
2.1 KiB
HTML
65 lines
2.1 KiB
HTML
{% macro articles(_articles) %}
|
||
{% for item in _articles %}
|
||
<li class="chapter {% if item._path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path %}data-path="{{ item.path|mdLink }}"{% endif %}>
|
||
{% if item.path %}
|
||
<a href="{{ basePath }}/{{ item.path|mdLink }}">
|
||
<i class="fa fa-check"></i> <b>{{ item.level }}.</b> {{ item.title }}
|
||
</a>
|
||
{% else %}
|
||
<span><b>{{ item.level }}.</b> {{ item.title }}</span>
|
||
{% endif %}
|
||
{% if item.articles.length > 0 %}
|
||
<ul class="articles">
|
||
{{ articles(item.articles) }}
|
||
</ul>
|
||
{% endif %}
|
||
</li>
|
||
{% endfor %}
|
||
{% endmacro %}
|
||
|
||
<div class="book-summary">
|
||
<div class="book-search">
|
||
<input type="text" placeholder="Search" class="form-control" />
|
||
</div>
|
||
<ul class="summary">
|
||
{% set _divider = false %}
|
||
{% if options.links.issues !== false && (options.links.issues || githubId) %}
|
||
{% set _divider = true %}
|
||
<li>
|
||
<a href="{{ options.links.issues|default(githubHost+githubId+"/issues") }}" target="blank"class="issues-link">Have any questions?</a>
|
||
</li>
|
||
{% endif %}
|
||
{% if _divider %}
|
||
<li class="divider"></li>
|
||
{% endif %}
|
||
|
||
<li data-level="0" data-path="index.html">
|
||
<a href="{{ basePath }}/"><i class="fa fa-check"></i> Introduction</a>
|
||
</li>
|
||
{{ articles(summary.chapters) }}
|
||
</ul>
|
||
</div>
|
||
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
|
||
<script type="text/javascript">
|
||
jQuery(".summary>li").each(function(){
|
||
var flag = true;
|
||
var x = window.location.href;
|
||
x = x.split("/");
|
||
x = x[x.length - 2] + '/' + x[x.length - 1];
|
||
jQuery('a',this).each(function(){
|
||
var str = jQuery(this).attr('href');
|
||
if(str.search(x) != -1){
|
||
console.log(x);
|
||
console.log(str);
|
||
flag = false;
|
||
}
|
||
});
|
||
if(flag){
|
||
jQuery('ul',this).hide();
|
||
}
|
||
});
|
||
jQuery(".summary>li").on("click",function(){
|
||
jQuery(".summary>li").show();
|
||
jQuery("ul",this).slideDown();
|
||
});
|
||
</script> |