-
Notifications
You must be signed in to change notification settings - Fork 7
/
dashboard.html
159 lines (151 loc) · 5.72 KB
/
dashboard.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
---
layout: default
title: "Dashboard"
permalink: "dashboard"
---
<div x-data="dashboard()">
<dl
class="grid grid-cols-1 mx-auto gap-x-2 bg-gray-900/5 sm:grid-cols-2 lg:grid-cols-5"
>
<div
class="flex flex-wrap items-baseline justify-between px-4 py-10 bg-white shadow-md gap-x-4 sm:px-6 xl:px-8"
>
<dt class="text-sm font-medium leading-6 text-gray-500">Price</dt>
<dd
x-money.en-US.USD.decimal="bitcoinPrice"
class="flex-none w-full text-lg font-medium tracking-tight text-gray-900"
></dd>
</div>
<div
class="flex flex-wrap items-baseline justify-between px-4 py-10 bg-white shadow-md gap-x-4 sm:px-6 xl:px-8"
>
<dt class="text-sm font-medium leading-6 text-gray-500 capitalize">
current difficulty
</dt>
<dd
x-text="currentDifficulty"
class="flex-none w-full text-lg font-medium tracking-tight text-gray-900"
></dd>
</div>
<div
class="flex flex-wrap items-baseline justify-between px-4 py-10 bg-white shadow-md gap-x-4 sm:px-6 xl:px-8"
>
<dt class="text-sm font-medium leading-6 text-gray-500">Mining Reward</dt>
<dd
x-text="miningReward"
class="flex-none w-full text-lg font-medium tracking-tight text-gray-900"
></dd>
</div>
<div
class="flex flex-wrap items-baseline justify-between px-4 py-10 bg-white shadow-md gap-x-4 sm:px-6 xl:px-8"
>
<dt class="text-sm font-medium leading-6 text-gray-500">Block Height</dt>
<dd
x-text="blockHeight"
class="flex-none w-full text-lg font-medium tracking-tight text-gray-900"
></dd>
</div>
<div
class="flex flex-wrap items-baseline justify-between px-4 py-10 bg-white shadow-md gap-x-4 sm:px-6 xl:px-8"
>
<dt class="text-sm font-medium leading-6 text-gray-500">
Estimated 2024 Halving Date:
</dt>
<dd
x-text="estimatedHalvingDate"
class="flex-none w-full text-lg font-medium tracking-tight text-gray-900"
></dd>
</div>
</dl>
<div class="grid grid-cols-1 py-2 bg-slate-50">
<div class="bg-white shadow-md">
<div class="p-4 pb-5 sm:flex sm:justify-between">
<h3 class="text-base font-semibold leading-6 text-gray-900">
Bitcoin Prices In US Dollar (USD)
</h3>
<div class="mt-3 sm:ml-4 sm:mt-0">
<div class="flex items-center space-x-6">
<span class="inline-flex rounded-md shadow-sm isolate">
<button
type="button"
class="relative inline-flex items-center px-3 py-2 text-sm font-medium text-gray-700 rounded-l-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeMovingAverage == '50' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveMovingAverage('50')"
>
50D MA
</button>
<button
type="button"
class="relative inline-flex items-center px-3 py-2 -ml-px text-sm font-medium text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeMovingAverage == '100' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveMovingAverage('100')"
>
100D MA
</button>
<button
type="button"
class="relative inline-flex items-center px-3 py-2 -ml-px text-sm font-medium text-gray-700 rounded-r-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeMovingAverage == '200' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveMovingAverage('200')"
>
200D MA
</button>
</span>
<span class="inline-flex rounded-md shadow-sm isolate">
<button
type="button"
class="relative inline-flex items-center px-3 py-2 text-sm font-medium text-gray-700 rounded-l-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeTimeFrame == '1D' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveTimeFrame('1D')"
>
1D
</button>
<button
type="button"
class="relative inline-flex items-center px-3 py-2 -ml-px text-sm font-medium text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeTimeFrame == '1W' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveTimeFrame('1W')"
>
1W
</button>
<button
type="button"
class="relative inline-flex items-center px-3 py-2 -ml-px text-sm font-medium text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeTimeFrame == '1M' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveTimeFrame('1M')"
>
1M
</button>
<button
type="button"
class="relative inline-flex items-center px-3 py-2 -ml-px text-sm font-medium text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeTimeFrame == '1Y' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveTimeFrame('1Y')"
>
1Y
</button>
<button
type="button"
class="relative inline-flex items-center px-3 py-2 -ml-px text-sm font-medium text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeTimeFrame == 'YTD' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveTimeFrame('YTD')"
>
YTD
</button>
<button
type="button"
class="relative inline-flex items-center px-3 py-2 -ml-px text-sm font-medium text-gray-700 rounded-r-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
x-bind:class="activeTimeFrame == 'ALL' ? 'bg-gray-300' : 'bg-white'"
x-on:click="setActiveTimeFrame('ALL')"
>
All
</button>
</span>
</div>
</div>
</div>
<div x-ref="chart" class="p-2"></div>
<div x-ref="chartLine" class="p-2"></div>
</div>
</div>
</div>