-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (83 loc) · 2.48 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
<!DOCTYPE html>
<html lang="ja">
<head>
<title>Kindle Unlimited Search</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- https://favicon.io/favicon-generator/ -->
<!-- Text: U, Background: Rounded, Font Family: Noto Sans, Font Size: 110, Font Color: #DDD, Background Color: #555 -->
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="manifest" href="favicons/site.webmanifest">
<style type="text/css">
html, body, article, main {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.container {
display: flex;
flex-direction: column;
justify-content: center;
}
.header {
margin: 10px auto;
font-weight: 200;
white-space: nowrap;
}
.form {
display: flex;
justify-content: space-between;
max-width: 720px;
min-width: 300px;
width: 75%;
height: 64px;
margin: 0 auto;
border: 1px solid #DDD;
border-radius: 20px;
overflow: hidden;
}
.words {
flex-basis: auto;
flex-shrink: 1;
width: 100%;
padding: 20px 0 20px 20px;
font-weight: 500;
border: none;
outline: none;
}
.submit {
width: 96px;
height: 64px;
padding: 0;
cursor: pointer;
color: #DDD;
font-weight: 600;
background-color: #222;
border: none;
}
</style>
</head>
<body>
<article>
<main class="container">
<h1 class="header">Kindle Unlimited Search</h1>
<form id="form" class="form" onsubmit="return search()">
<input type="search" id="words" class="words" autofocus>
<input type="submit" class="submit" value="search">
</form>
</main>
</article>
<script>
function search() {
const words = document.getElementById("words").value
const encoded = encodeURIComponent(words)
const url = `https://www.amazon.co.jp/s/ref=sr_nr_p_n_feature_nineteen_0?rh=n%3A2250738051%2Ck%3A${encoded}%2Cp_n_feature_nineteen_browse-bin%3A3169286051`
window.open(url)
return false
}
</script>
</body>
</html>