-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
159 lines (151 loc) · 7.22 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
<!doctype html>
<html>
<head>
<title>Convert</title>
<link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="true">
</head>
<body>
<header>
<h1>Convert</h1>
</header>
<main>
<nav>
<ul id="listQuantity">
<a href="#" onclick="loadQuantity('panjang'); return false;">
<li id="item0" class="" value="panjang">Panjang</li>
</a>
<a href="#" onclick="loadQuantity('massa'); return false;">
<li id="item1" class="" value="massa">Massa</li>
</a>
<a href="#" onclick="loadQuantity('waktu'); return false;">
<li id="item2" class="" value="waktu">Waktu</li>
</a>
<a href="#" onclick="loadQuantity('temperatur'); return false;">
<li id="item3" class="" value="temperatur">Temperatur</li>
</a>
<a href="#" onclick="loadQuantity('sudut'); return false;">
<li id="item4" class="" value="sudut">Sudut</li>
</a>
<a href="#" onclick="loadQuantity('luas'); return false;">
<li id="item5" class="" value="luas">Luas</li>
</a>
<a href="#" onclick="loadQuantity('volume'); return false;">
<li id="item6" class="" value="volume">Volume</li>
</a>
<a href="#" onclick="loadQuantity('data'); return false;">
<li id="item7" class="" value="data">Data</li>
</a>
</ul>
</nav>
<div id="converterSpace">
<div>
<h2 id="quantityTitle"></h2>
</div>
<div>
<select id="optionQuantity" onchange="loadQuantity(this.value)">
<option value="panjang">Panjang</option>
<option value="massa">Massa</option>
<option value="waktu">Waktu</option>
<option value="temperatur">Temperatur</option>
<option value="sudut">Sudut</option>
<option value="luas">Luas</option>
<option value="volume">Volume</option>
<option value="data">Data</option>
</select>
</div>
<div id="converterTop" class="converter">
<div class="input">
<input id="inputTop" type="number" value="1" oninput="convert();">
</div>
<div class="option">
<select id="optionTop" onchange="convert();">
</select>
</div>
</div>
<div id="converterBottom" class="converter">
<div class="input">
<input id="inputBottom" type="number" value oninput="convertBack();">
</div>
<div class="option">
<select id="optionBottom" onchange="convert();">
</select>
</div>
</div>
<!--Konten LIFF v2-->
<div id="liffAppContent">
<!-- ACTION BUTTONS -->
<div class="buttonGroup">
<div class="buttonCollumn">
<button id="openWindowButton">Open External Window</button>
<button id="closeWindowButton">Close LIFF App</button>
</div>
</div>
<!-- LIFF DATA -->
<div id="liffData">
<h3 id="liffDataHeader" class="textLeft">Informasi:</h3>
<table>
<tr>
<th>isInClient : </th>
<td id="isInClient" class="textLeft"></td>
</tr>
<tr>
<th>isLoggedIn : </th>
<td id="isLoggedIn" class="textLeft"></td>
</tr>
</table>
</div>
<!-- LOGIN LOGOUT BUTTONS -->
<div class="buttonGroup">
<button id="liffLoginButton">Log in</button>
<button id="liffLogoutButton">Log out</button>
</div>
<div id="statusMessage">
<div id="isInClientMessage"></div>
<div id="apiReferenceMessage">
<p>Available LIFF methods vary depending on the browser you use to open the LIFF app.</p>
<p>Please refer to the <a href="https://developers.line.biz/en/reference/liff/#initialize-liff-app">API reference
page</a> for more information.</p>
</div>
</div>
</div>
<!-- LIFF ID ERROR -->
<div id="liffIdErrorMessage" class="hidden">
<p>You have not assigned any value for LIFF ID.</p>
<p>If you are running the app using Node.js, please set the LIFF ID as an environment variable in your Heroku account follwing the below steps: </p>
<code id="code-block">
<ol>
<li>Go to `Dashboard` in your Heroku account.</li>
<li>Click on the app you just created.</li>
<li>Click on `Settings` and toggle `Reveal Config Vars`.</li>
<li>Set `MY_LIFF_ID` as the key and the LIFF ID as the value.</li>
<li>Your app should be up and running. Enter the URL of your app in a web browser.</li>
</ol>
</code>
<p>If you are using any other platform, please add your LIFF ID in the <code>index.html</code> file.</p>
<p>For more information about how to add your LIFF ID, see <a href="https://developers.line.biz/en/reference/liff/#initialize-liff-app">Initializing the LIFF
app</a>.</p>
</div>
<!-- LIFF INIT ERROR -->
<div id="liffInitErrorMessage" class="hidden">
<p>Something went wrong with LIFF initialization.</p>
<p>LIFF initialization can fail if a user clicks "Cancel" on the "Grant permission" screen, or if an error occurs in the process of <code>liff.init()</code>.
</div>
<!-- NODE.JS LIFF ID ERROR -->
<div id="nodeLiffIdErrorMessage" class="hidden">
<p>Unable to receive the LIFF ID as an environment variable.</p>
</div>
</div>
</main>
<footer>
<p>Created for dicoding LINE LIFF Submission</p>
<p>Find me on <a href="https://www.facebook.com/dianyhzkl">Facebook</a>, <a href="https://www.instagram.com/dianyehezkiel/">Instagram</a>, and <a href="https://twitter.com/dianyehezkiel_">Twitter</a></p>
</footer>
</body>
<script src="script.js"></script>
<script src="https://static.line-scdn.net/liff/edge/2.1/sdk.js"></script>
<script src="liff-starter.js"></script>
</html>