-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
149 lines (132 loc) · 2.89 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dhaka Stock Exchange & Chittagong Stock Exchange </title>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="assets/kakkuStyle.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
</head>
<body>
<span class="main-bg-text">DSE</span>
<span class="main-bg-text2">CSE</span>
<header>
<a href="https://github.com/khyrulAlam/DSE-CSE-Market-Update"><img src="assets/github-logo.svg"
alt="github"></a>
<h3>
Dhaka Stock Exchange Update
<br> & <br>
Chittogong Stock Exchange Update
</h3>
</header>
<div class="dse">
<div class="loading">Loading...</div>
</div>
<br>
<div class="cse">
<div class="loading">Loading...</div>
</div>
<div class="dse-table">
<h3>Dhaka Share Price Table</h3>
<table id="example" class="display" style="width:100%">
<thead>
<tr>
<th>ID</th>
<th>Company</th>
<th>LTP</th>
<th>HIGH</th>
<th>LOW</th>
<th>YCP</th>
<th>Close Price</th>
<th>Trade</th>
<th>Change</th>
<th>Volume(mm)</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="cse-table">
<h3>Chittogong Share Price Table</h3>
<table id="example2" class="display" style="width: 100%">
<thead>
<tr>
<th>ID</th>
<th>Company</th>
<th>LTP</th>
<th>Open</th>
<th>HIGH</th>
<th>LOW</th>
<th>YCP</th>
<th>Trade</th>
<th>Value</th>
<th>Volume</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<footer>
<p>The is open-sourced software licensed under the <a href="http://opensource.org/licenses/MIT"><img
src="https://opensource.org/files/osi_keyhole_300X300_90ppi_0.png" alt="MIT-Open-Source" width="15">
MIT License</a></p>
</footer>
<script src="kakku.min.js"></script>
<script>
kakkuGetDSE().then(res => {
TemplateDSE({
data: res,
domEl: '.dse',
})
})
kakkuGetCSE().then(res => {
TemplateCSE({
data: res,
domEl: '.cse',
bg: '#115852'
})
})
//using jQuery datatable
$(document).ready(function () {
var table = $('#example').DataTable();
kakkuGetDSEAll().then(res => {
res.map((r, i) => {
table.row.add([
r.no,
r.tradingCode,
r.ltp,
r.low,
r.high,
r.ycp,
r.closep,
r.trade,
r.change,
r.value,
r.volume
]).draw(false);
})
})
var table2 = $('#example2').DataTable();
kakkuGetCSEAll().then(res => {
res.map((r, i) => {
table2.row.add([
r.no,
r.tradingCode,
r.ltp,
r.open,
r.high,
r.low,
r.ycp,
r.trade,
r.value,
r.volume
]).draw(false);
})
})
})
</script>
</body>
</html>