-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
62 lines (56 loc) · 1.6 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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>目次</title>
<style>
ul {
list-style: none;
}
li {
display: flex;
align-items: center;
}
li a {
margin-left: 10px;
}
</style>
</head>
<body>
<div id="root"></div>
<script crossorigin src="https://unpkg.com/[email protected]/babel.min.js"></script>
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script type="text/babel">
(function() {
const num = 10;
const GITHUB__URL = 'https://github.com/shujinishino/kenshu-frontend-js/blob/master'
const App = () => {
return (
<ul>
{
[...Array(num)].fill('').map((x, i) => {
const modiNum = String(i + 1).padStart(2, '0')
return (
<li>
<p>{modiNum}</p>
<a href={`${GITHUB__URL}/practice/${modiNum}/README.md`}>README</a>
<a href={`./practice/${modiNum}/example/index.html`}>example</a>
<a href={`./practice/${modiNum}/try/index.html`}>try</a>
</li>
)
})
}
</ul>
)
}
const init = () => {
const target = document.querySelector('#root');
ReactDOM.render(<App />, target);
}
init();
})()
</script>
</body>
</html>