Skip to content

Commit 59e9bcd

Browse files
committed
修改命令总数显示方式
1 parent c634c92 commit 59e9bcd

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

build/compile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ CreateDatajs('./.deploy/js/dt.js',function(dt_path,arr){
8888
// 首页生成
8989
ReadTmpToHTML('/template/index.ejs','/.deploy/index.html',null,{
9090
'p':'/index.html',
91-
'n':'首页',
92-
'd':'最专业的Linux命令大全,内容包含Linux命令手册、详解、学习,值得收藏的Linux命令速查手册。'
91+
'n':'Linux命令搜索',
92+
'd':'最专业的Linux命令大全,内容包含Linux命令手册、详解、学习,值得收藏的Linux命令速查手册。',
93+
'command_length':arr.length
9394
});
9495
ReadTmpToHTML('/template/list.ejs','/.deploy/list.html',null,{
9596
p:'/list.html',

template/js/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
this.commands = linux_commands || [];
55
this.elm_query = $$('query');
66
this.elm_btn = $$('search_btn');
7-
this.elm_info = $$('commands_info');
87
this.elm_result = $$('result');
98
this.elm_search_result = $$('search_list_result');
109

@@ -19,8 +18,6 @@
1918
this.query_size = 5; //搜索框结果显示5条
2019
this.page_size = 50; //每页显示20条
2120

22-
this.elm_info.innerHTML = this.commands.length;
23-
2421
this.init()
2522
this.goToIndex()
2623
}

template/search.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
</div>
1818
<div class="footer">
1919
收藏本站请使用Ctrl+D或者Command+d<br>
20-
共搜集到 <span id="commands_info"></span> 个Linux命令 <a href="https://github.com/jaywcjlove/linux-command/wiki/%E6%B7%BB%E5%8A%A0%E5%91%BD%E4%BB%A4">添加命令</a>
20+
共搜集到 <span id="commands_info"><%=describe.command_length?describe.command_length:''%></span> 个Linux命令 <a href="https://github.com/jaywcjlove/linux-command/wiki/%E6%B7%BB%E5%8A%A0%E5%91%BD%E4%BB%A4">添加命令</a>
2121
</div>
2222
</div>

template/styl/mixins/markdown.styl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ div.markdown-body
1414
border-left 1px solid #dfdfdf
1515
margin -1px 0 0 0
1616
}
17+
a{
18+
text-decoration none
19+
background #2196F3
20+
color #fff
21+
border-radius 3px
22+
padding 2px 5px
23+
&:hover{
24+
color #333
25+
background #e6e6e6
26+
}
27+
}
1728
}
1829
padding 30px 35px 30px 35px
1930
word-wrap break-word

0 commit comments

Comments
 (0)