-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
312 lines (278 loc) · 10.1 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
---
---
<!DOCTYPE html>
<html lang="ja">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MLPME3YRE1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MLPME3YRE1');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title | default: site.name }}</title>
<meta name="description" content="{{ page.description | default: site.description }}">
<!-- Twitter Cards -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ site.url }}/favicon.png">
<meta name="twitter:site" content="{{ page.title | default: site.name }}">
<meta name="twitter:title" content="{{ page.title | default: site.name }}">
<meta name="twitter:description" content="{{ page.description | default: site.description }}">
<!-- OpenGraph -->
<meta property="fb:admins" content="715330868" />
<meta property="fb:app_id" content="680598798739780" />
<meta property="og:title" content="{{ page.title | default: site.name }}">
<meta property="og:site_name" content="{{ page.title | default: site.name }}">
<meta property="og:description" content="{{ page.description | default: site.description }}">
<meta property="og:url" content="{{ site.url }}">
<meta property="og:type" content="website">
<meta property="og:locale" content="ja_JP">
<meta property="og:image" content="{{ site.url }}/favicon.png">
<meta property="og:image:type" content="image/png">
<meta name="author" content="{{ site.author }}">
<meta name="copyright" content="{{ site.author }}">
<meta name="thumbnail" content="{{ site.url }}/favicon.png">
<meta name="robots" content="index, follow">
<meta name="keywords" content="IPA,WARP,情報処理推進機構,国会図書館,リンク切れ,アーカイブ">
<link rel="apple-touch-icon" s izes="180x180" href="{{ site.url }}/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.url }}/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.url }}/favicon-16x16.png">
<link rel="manifest" href="{{ site.url }}/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<style>
body {
font-family: 'Noto Sans JP', sans-serif;
margin-bottom: 100px;
}
#container{
margin-top: 1.0em;
margin-bottom: 1.0em;
margin-left: auto;
margin-right: auto;
padding-left: 0.5em;
padding-right: 0.5em;
max-width: 840px;
}
p {
color: #242424;
font-family: 'Noto Sans JP', sans-serif;
font-size: 98%;
}
a {
text-decoration: none;
}
a:hover{
text-decoration: underline;
}
.bookmarklet-btn {
display: inline-block;
padding: 10px 20px;
background-color: #007bff;
color: #fff;
font-size: 16px;
font-weight: bold;
text-decoration: none;
border-radius: 4px;
border: 2px solid #007bff;
cursor: pointer;
transition: all 0.3s ease;
}
.bookmarklet-btn:hover {
background-color: #0056b3;
border-color: #0056b3;
}
h2 { margin-top: 50px; }
h3 { margin-top: 50px; }
li { margin-bottom: 10px; margin-left: -10px; }
video {
width: 100%;
max-width: 600px;
}
@media(max-width: 600px) {
br.ignore-on-sp {
display: none;
}
}
@media(min-width: 601px) {
br.ignore-on-pc {
display: none;
}
}
.social-buttons {
display: flex;
justify-content: space-between;
align-items: center;
width: 210px;
}
.fb_iframe_widget > span {
vertical-align: baseline !important;
}
.fb-like > span {
vertical-align: baseline !important;
margin-top: 9px;
}
</style>
</head>
<body>
<div id="container">
<h1 id='top'>
IPA to WARP<br class='ignore-on-pc'>
ブックマークレット
</h1>
<p>以下のボタンを右クリックして「ブックマークに追加」するか、もしくは<br class='ignore-on-sp'>ドラッグ&ドロップでブックマークのタブに持っていくとお使いいただけます。</p>
<a class="bookmarklet-btn" href="javascript:(function(){var currentUrl=location.href;var newUrl=currentUrl.replace(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n]+)/, 'https://warp.ndl.go.jp/info:ndljp/pid/12446699/www.ipa.go.jp');window.location.href=newUrl;})();">IPA to WARP</a>
<h2 id='howto'>使い方</h2>
<ol>
<li>以下の動画に沿ってブックマーク登録をする</li>
<li>リンク切れのページに行く<br><small>例: <a href='https://www.ipa.go.jp/jinzai/mitou/outline.html'>www.ipa.go.jp/jinzai/mitou/outline.html</a></small></li>
<li>先ほど登録したブックマークをクリックする</li>
</ol>
<p>
<small>ソースコードを見る →
<a href='https://github.com/yasulab/ipa2warp'>GitHub</a></small><br>
<small>作った理由を見る →
<a href='https://twitter.com/yasulab/status/1642675864927350784'>Twitter</a> /
<a href='https://facebook.com/yasulab/posts/pfbid02cv6EYd1hvQ9ZqQL2ExHoVbn9uWNAQutULeQu8Gr5C17vURGhsuiLra8m1sogFcdJl'>Facebook</a></small><br>
</p>
<div class="social-buttons">
<div class="twitter-share-button">
<a href="https://twitter.com/share?ref_src=twsrc%5Etfw&hashtags=ipa2warp"
class="twitter-share-button" data-show-count="false">Tweet</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
<!--
<div class="facebook-like-button">
<div class="fb-like"
data-href="{{ site.url }}"
data-layout="button_count"
data-action="like"
data-size="small"
data-share="false"></div>
</div>
-->
<div class="facebook-share-button">
<div id="fb-root"></div>
<script async defer crossorigin="anonymous"
src="https://connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v16.0" nonce="AqHN37Iu"></script>
<div class="fb-share-button"
data-href="{{ site.url }}"
data-layout="button_count"
data-size="small"></div>
</div>
</div>
<h3 id='demo'>デモ動画</h3>
<a href="https://gyazo.com/066a2fa7cc103f082d687711adbbaa0a"><video alt="Video from Gyazo" width="100%" autoplay muted loop playsinline controls><source src="https://i.gyazo.com/066a2fa7cc103f082d687711adbbaa0a.mp4" type="video/mp4" /></video></a>
<h2 id='mobile' style='margin-top: 150px;'>スマホで使う</h2>
<div class="container">
<button id="copyButton" class="bookmarklet-btn">コードをコピーする</button>
<div id="popup" class="popup" style="display:none;">コピーしました!</div>
</div>
<ol>
<li>上のボタンをタップする</li>
<li>画面の右下にある … をタップし、ブックマークに追加する</li>
<li>画面の右下に表示される「編集」をタップし、「URL」の欄にコピーしたコードを貼り付ける</li>
<li>リンク切れのページに行く<br><small>例: <a href='https://www.ipa.go.jp/jinzai/mitou/outline.html'>www.ipa.go.jp/jinzai/mitou/outline.html</a></small></li>
<li>画面の右下にある … をタップし、先ほど登録したブックマークをタップする</li>
</ol>
<h3 id='mobile-demo'>デモ動画</h3>
<div class='youtube'>
<iframe width="600" height="1000" src="https://www.youtube.com/embed/6HsyVRTvB2E" title="IPA to WARP デモ (iOS + Chrome)" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<style>
.container {
display: inline-flex;
align-items: center;
}
.popup {
display: none;
font-size: 50%;
margin-left: 15px;
padding: 5px 10px;
background-color: #4CAF50;
color: white;
font-size: 14px;
border-radius: 4px;
opacity: 1;
transition: opacity 0.3s;
}
.youtube {
aspect-ratio: 9 / 16;
}
@media(max-width: 600px) {
.youtube {
width: 100%;
}
.youtube iframe {
width: 100%;
height: 100%;
}
}
@media(min-width: 601px) {
.youtube {
width: 70%;
}
.youtube iframe {
width: 70%;
height: 70%;
}
}
</style>
<script>
document.getElementById("copyButton").addEventListener("click", function() {
var bookmarkletCode = "javascript:(function()%7Bvar currentUrl=location.href;var newUrl=currentUrl.replace(/%5E(?:https?:%5C/%5C/)?(?:%5B%5E@%5Cn%5D+@)?(?:www%5C.)?(%5B%5E:%5C/%5Cn%5D+)/, %27https://warp.ndl.go.jp/info:ndljp/pid/12446699/www.ipa.go.jp%27);window.location.href=newUrl;%7D)();"
var textArea = document.createElement("textarea");
textArea.value = bookmarkletCode;
document.body.appendChild(textArea);
textArea.select();
document.execCommand("copy");
document.body.removeChild(textArea);
showPopup();
});
function showPopup() {
var popup = document.getElementById("popup");
popup.style.display = "block";
setTimeout(function() {
popup.style.display = "none";
}, 3000);
}
</script>
<footer>
<p><small>
Created by
<a href='https://twitter.com/yasulab'>@yasulab</a>.
Powered by
<a href='https://www.ruby-lang.org/ja'>Ruby</a> + <a href='https://pages.github.com/'>GitHub Pages</a>.
</small></p>
</footer>
<style>
footer {
font-size: 90%;
color: #777;
opacity: 0.7;
margin: 0 auto;
margin-top: 100px;
margin-bottom: 100px;
margin-left: -1px;
width: 100%;
text-align: center;
}
@media(max-width: 600px) {
footer {
text-align: center;
margin-top: 0px;
}
}
@media(min-width: 601px) {
footer {
text-align: left;
margin-top: -200px;
}
}
</style>
</div>
</body>
</html>