forked from liqian19891011/webapidoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
116 lines (108 loc) · 2.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
layout: default
---
<style type="text/css">
.affix-top{
position:fixed;
top:80px;
left: 75%;
}
.affix{
position:fixed;
top:-100px;
left: 75%;
}
.post-title{
margin-bottom: 30px;
border-bottom: 1px;
border-bottom-color: #e8e8e8;
border-bottom-style: solid;
}
.post-content{
margin-bottom: 60px;
}
.nav>li>a {
position: relative;
display: block;
padding: 0px 5px;
}
ul.nav{
margin-left: 5px;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
// Nav bar
$("#nav-sidebar>ul>li>div").hide();
$(window).scroll(function(){
$("#nav-sidebar>ul>li>div").hide();
$("#nav-sidebar>ul>li.active>div").show();
});
$("#nav-sidebar>ul>li").click(function(){
$("#nav-sidebar>ul>li").removeClass('active');
$(this).addClass('active');
$("#nav-sidebar>ul>li>div").hide();
$(this).children('div').show();
});
// Window width change
$( window ).resize(function() {
if ($(window).width() < 975) {
$('#nav-sidebar').hide();
}
else{
$('#nav-sidebar').show();
}
});
});
</script>
<div class="home">
<div class="row">
<div id="nav-sidebar" class="col-md-3" data-spy="affix" data-offset-top="20000">
<ul class="nav nav-pills nav-stacked">
{% assign sortedCategories = site.categories | sort %}
{% for category in sortedCategories %}
<li class="panel panel-default">
<a class="panel-heading">
<small>{{ category[0] | upcase }}</small>
</a>
<div class="panel-body">
<ul class="nav nav-pills nav-stacked">
{% for posts in category %}
{% for post in posts reversed %}
{% if post.title != null%}
<li class="nav-item">
<a href="#{{ post.id | remove_first:'/'}}"><small>{{ post.title }}</small></a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="col-md-9">
{% assign sortedCategories = site.categories | sort %}
{% for category in sortedCategories %}
<h1 class="post-title" id="{{ category[0] | replace:' ','-' | replace:'.','' }}">{{ category[0] | join: "/" | upcase }}</h1>
<ul class="post-list">
{% for posts in category %}
{% for post in posts reversed %}
{% if post.title != null%}
<li>
<h2 class="post-title" id="{{ post.id | remove_first:'/'}}">{{ post.title }}</h2>
<article class="post-content">
{{ post.content }}
</article>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
{% endfor %}
</div>
<div class="col-md-3">
</div>
</div>
</div>