<!DOCTYPE html>
<html>
{% capture metaDesc %}{{ page.mirrorid }} 使用帮助{% endcapture %}
	{% include head.html cattitle="镜像站使用帮助" metaDesc=metaDesc %}
<body>
	{% include nav.html %}

{% if page.redirect_help_id %}
{% assign redirect_to_page = site.categories["help"] | where_exp:"p", "p.mirrorid == page.redirect_help_id" %}
<script>
	var redirect_to = window.location.protocol + "//" + window.location.host + "{{redirect_to_page[0].url}}";
	window.location = redirect_to;
</script>
{% endif %}

<script>
	window.mirrorId = "{{page.mirrorid}}";
</script>

{% assign help_pages = site.categories["help"] | sort: 'mirrorid' %}
<div id="help-page">
	<div class="container">
	  <div class="row">
		  <div class="col-sm-2 hidden-xs">
				<ul class="nav nav-pills nav-stacked" id="help-nav">
					{% for h in help_pages %}
					<li{% if h.mirrorid == page.mirrorid or h.redirect_help_id == page.mirrorid %} class="active"{%endif%} id="toc-{{h.mirrorid}}"><a href="{{h.url}}">{{h.mirrorid}}</a></li>
					{% endfor %}
				</ul>
			</div><!-- sidenave -->
			<div class="col-sm-10">
				<div class="visible-xs">
					<form class="form-inline">
						<div class="form-group">
							<label>选择帮助条目: </label>
							<select class="form-control" id="help-select">
								{% for h in help_pages %}
								<option data-help-url="{{h.url}}"{% if h.mirrorid == page.mirrorid%} selected{%endif%} id="toc-{{h.mirrorid}}">{{h.mirrorid}}</option>
								{% endfor %}
							</select>
						</div>
					</form>
				</div>
				<div id="help-content">
					{{ content }}
				</div>
			</div><!-- help content -->
	  </div>
	</div><!--/container -->
</div><!--/mirrors -->

	{% include footer.html %}
</body>

<script src="/static/js/help.js?{{ site.data['hash'] }}"></script>

</html>
<!--
vim: ts=2 sts=2 sw=2 noexpandtab
-->
