-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (64 loc) · 2.55 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Poppins" rel="stylesheet">
<title>Currency Converter</title>
<style>
* {
border-radius: 0 !important;
}
body {
background-color:#E7F7F9;
font-family: 'Poppins', sans-serif;
}
</style>
</head>
<body>
<div id="app">
<div class="container my-5">
<div class="row">
<div class="col-md-6">
<label>From</label>
<select v-model="from" name="" id="" class="form-control">
<option :value="currency.id" v-for="currency in formattedCurrencies">
{{currency.currencyName}}
</option>
</select>
</div>
<div class="col-md-6">
<label>To</label>
<select v-model="to" name="" id="" class="form-control">
<option :value="currency.id" v-for="currency in formattedCurrencies">
{{currency.currencyName}}
</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-6 offset-md-3">
<div class="input-form-control my-5">
<input v-model="amount" type="text" placeholder="Amount" class="form-control my-5">
<div class="text-center">
<button :disabled="disabled" @click="convertCurrency" class="btn btn-lg btn-primary">
{{loading?'Converting...':'Convert'}}
</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 offset-md-3">
<h1 class="text-center display-2 mt-5">{{calculateResult}}</h1>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="app.js"></script>
</body>
</html>