-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
38 lines (33 loc) · 1.2 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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title>Lost in Tokyo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Overpass+Mono:400,700" rel="stylesheet">
<link rel="stylesheet" href="css/tachyons.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body class="bg-black">
<!-- this is the element where react will mount onto -->
<div id="root"></div>
<!-- load react and react-dom for working with web -->
<script src="js/react.js"></script>
<script src="js/react-dom.js"></script>
<!-- we need a tool called babel to transform the jsx code for us -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.7.7/babel.min.js"></script>
<!-- load our data -->
<script src="data/menu.js"></script>
<script src="data/attractions.js"></script>
<script>
// here we tell babel to grab our code and convert it to regular javascript
fetch("js/app.js").then(function (response) {
response.text().then(function (js) {
eval(Babel.transform(js, {
presets: ['es2015', 'react']
}).code);
});
});
</script>
</body>
</html>