-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
155 lines (138 loc) · 3.67 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="shortcut icon" href="images/favicon.ico" />
<title>Visual Studio Code - 快捷键参考</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-size: 12px;
}
html,body{
height: 100%;
width: 100%;
}
[v-cloak] {
display: none;
}
.keyboard-shortcuts {
padding: 30px 25px;
column-count: 3;
column-gap: 50px;
}
.keyboard-shortcuts .shortcuts-header {
position: relative;
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTIxIDBsLTExIDEyLTcuMzMzLTUuNjY2LTIuNjY3IDEuNjgydjEzLjk4NGwyLjY2NyAxLjY2NiA3LjMzMy01LjY2NiAxMSAxMSA3LTN2LTIyLjMzM2wtNy0zLjY2N3ptLTE4IDE5di05bDQgNS00IDR6bTExLTRsNy02djEybC03LTZ6Ii8+PC9zdmc+);
background-size: 42px;
background-repeat: no-repeat;
padding-left: 60px;
}
.keyboard-shortcuts .shortcuts-header > .title {
font-size: 28px;
}
.keyboard-shortcuts .shortcuts-header > .subtitle {
font-size: 15px;
text-indent: 5px;
}
.keyboard-shortcuts .shortcuts-list {
margin-top: 15px;
list-style: none;
}
.keyboard-shortcuts .shortcuts-title {
font-size: 18px;
font-weight: bold;
border-bottom: 2px solid #808080;
margin-bottom: 5px;
}
.keyboard-shortcuts .shortcuts-item {
line-height: 1.8;
overflow: hidden;
}
.keyboard-shortcuts .shortcuts-item:nth-child(even) {
background-color: #f2f2f2;
}
.keyboard-shortcuts .shortcuts-name {
display: block;
float: left;
width: 36%;
min-width: 130px;
word-wrap: break-word;
word-break: break-word;
font-weight: bold;
}
.description {
margin-top: 40px;
}
.platforms {
text-align: right;
position: absolute;
top: 3.4em;
right: 0;
}
</style>
</head>
<body>
<div id="app" v-cloak class="keyboard-shortcuts">
<header class="shortcuts-header">
<h1 class="title">Visual Studio Code</h1>
<p class="subtitle">{{docs.subtitle}}</p>
<div class="platforms">
<select v-model="active">
<option>mac</option>
<option>win</option>
</select>
</div>
</header>
<ul v-for="type of docs.types" class="shortcuts-list">
<li class="shortcuts-title">{{type.title}}</li>
<li v-for="short of type.list" class="shortcuts-item">
<span class="shortcuts-name">{{short.key}}</span>
<span class="shortcuts-desc">{{short.caption}}</span>
</li>
</ul>
<div class="description">
<p title="Other operating systems’ keyboard shortcuts and additional unassigned shortcuts available at aka.ms/vscodekeybindings">
其他操作系统的键盘快捷键和其他未分配的快捷方式可在
<a href="http://aka.ms/vscodekeybindings">aka.ms/vscodekeybindings</a>
获得。
</p>
</div>
</div>
<script src="//lib.baomitu.com/jquery/2.2.4/jquery.min.js"></script>
<script src="//lib.baomitu.com/vue/2.3.4/vue.min.js"></script>
<script>
var app = new Vue({
el: '#app',
data: {
active: 'mac',
platforms: {
mac: {},
win: {},
linux: {},
},
},
computed: {
docs() {
return this.platforms[this.active];
},
},
mounted() {
getData('mac', 'cn', function (res) {
app.platforms.mac = res;
});
getData('win', 'cn', function (res) {
app.platforms.win = res;
});
}
});
function getData(platform, lang, cb) {
$.get('platforms/' + platform + '_' + lang + '.json', cb, 'json');
}
</script>
</body>
</html>