File tree Expand file tree Collapse file tree 3 files changed +28
-19
lines changed Expand file tree Collapse file tree 3 files changed +28
-19
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
- cookbook: ' Cookbook<sup class="beta">beta</sup>' ,
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 }) %>
8
+ <% if (type !== ' search' ) { % >
9
+ < h2>
10
+ < % titles = {
11
+ api: ' API' ,
12
+ examples: ' Examples' ,
13
+ guide: ' Guide' ,
14
+ cookbook: ' Cookbook<sup class="beta">beta</sup>' ,
15
+ ' style-guide' : ' Style Guide<sup class="beta">beta</sup>'
16
+ } % >
17
+ < %- titles[type] % >
18
+ < % if ([' cookbook' , ' style-guide' ].indexOf (type) === - 1 ) { % >
19
+ < select class = " version-select" >
20
+ < option value= " SELF" selected> 2 .x < / option>
21
+ < option value= " v1" > 1.0 < / option>
22
+ < option value= " 012" > 0.12 < / option>
23
+ < option value= " 011" > 0.11 < / option>
24
+ < / select>
25
+ < % } % >
26
+ < / h2>
27
+ < %- partial (' partials/toc' , { type: type }) % >
28
+ < % } %>
27
29
</div >
28
30
</div >
29
31
</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