-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
71 lines (67 loc) · 1.44 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
<html>
<head>
<meta charset="UTF-8">
<title>国税庁サイト内ページ簡易検索</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./data.js"></script>
<script>
function init() {
var search = new Vue({
el: '#app',
data: {
keyword: ''
},
computed: {
links: function() {
return master.filter(
page => page.title.includes(this.keyword)
, this);
}
}
});
}
</script>
<style type="text/css">
ol {
list-style: none;
}
input {
height: 32px;
width: 480px;
font-size: 20px;
}
.page {
margin-top: 32px;
}
.title {
font-size: 24px;
margin-bottom: 0px;
}
.link {
font-size: 16px;
margin-top: 4px;
}
[v-cloak] {
display: none;
}
</style>
</head>
<body onload="init()">
<h1>国税庁サイト内ページ簡易検索</h1>
<p>by <a href="https://twitter.com/chooyan-i18n">@chooyan-i18n</a></p>
<p>調べたい項目を入力してください。</p>
<div id="app">
<div>
<input v-model="keyword">
</div>
<div class="page" v-cloak>
<ol>
<li v-for="link in links">
<p class="title">{{ link.title }}</p>
<p class="link"><a v-bind:href="link.url">{{ link.url }}</a></p>
</li>
</ol>
</div>
</div>
</body>
</html>