File tree Expand file tree Collapse file tree 3 files changed +27
-18
lines changed Expand file tree Collapse file tree 3 files changed +27
-18
lines changed Original file line number Diff line number Diff line change 1
1
---
2
+ title : Search Vue.js
3
+ type : search
2
4
search : true
3
5
---
Original file line number Diff line number Diff line change 5
5
</ul >
6
6
<div class =" list" >
7
7
<% - partial (' partials/sponsors_sidebar' ) %>
8
- <h2 >
9
- <% titles = {
10
- api: ' API' ,
11
- examples: ' Examples' ,
12
- guide: ' Guide' ,
13
- ' style-guide' : ' Style Guide<sup class="beta">beta</sup>'
14
- } %>
15
- <% - titles[type] %>
16
- <% if ([' cookbook' , ' style-guide' ].indexOf (type) === - 1 ) { % >
17
- < select class = " version-select" >
18
- < option value= " SELF" selected> 2 .x < / option>
19
- < option value= " v1" > 1.0 < / option>
20
- < option value= " 012" > 0.12 < / option>
21
- < option value= " 011" > 0.11 < / option>
22
- < / select>
23
- < % } %>
24
- </h2 >
25
- <% - partial (' partials/toc' , { type: type }) %>
8
+ <% if (type !== ' search' ) { % >
9
+ < h2>
10
+ < % titles = {
11
+ api: ' API' ,
12
+ examples: ' Examples' ,
13
+ guide: ' Guide' ,
14
+ ' style-guide' : ' Style Guide<sup class="beta">beta</sup>'
15
+ } % >
16
+ < %- titles[type] % >
17
+ < % if ([' cookbook' , ' style-guide' ].indexOf (type) === - 1 ) { % >
18
+ < select class = " version-select" >
19
+ < option value= " SELF" selected> 2 .x < / option>
20
+ < option value= " v1" > 1.0 < / option>
21
+ < option value= " 012" > 0.12 < / option>
22
+ < option value= " 011" > 0.11 < / option>
23
+ < / select>
24
+ < % } % >
25
+ < / h2>
26
+ < %- partial (' partials/toc' , { type: type }) % >
27
+ < % } %>
26
28
</div >
27
29
</div >
28
30
</div >
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ var searchPage = new Vue({
91
91
watch: {
92
92
search () {
93
93
this .updateSearch ()
94
+ window .history .pushState (
95
+ {},
96
+ ' Vue.js Search' ,
97
+ window .location .origin + window .location .pathname + ' ?q=' + encodeURIComponent (this .search )
98
+ )
94
99
}
95
100
},
96
101
created () {
You can’t perform that action at this time.
0 commit comments