-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtactic.html
More file actions
303 lines (277 loc) · 8.61 KB
/
Copy pathtactic.html
File metadata and controls
303 lines (277 loc) · 8.61 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Investment View</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background: aliceblue;
padding:20px;
}
.container {
display: flex;
justify-content: center;
gap: 50px;
width:850px;
}
.container table {
border-collapse: collapse;
width: 400px;
text-align: center;
}
.container th {
background-color: #f37021;
color: white;
padding: 10px;
}
.strategic th {
background-color: #ec8b23;
}
td,
th {
border: 1px solid #ddd;
padding: 8px;
}
.dot {
width: 12px;
height: 12px;
border-radius: 50%;
display: inline-block;
}
.dot2 {
width: 4px;
height: 4px;
border-radius: 50%;
display: inline-block;
background-color:grey;
}
.red {
background-color: red;
}
.yellow {
background-color: gold;
}
.green {
background-color: green;
}
.underweight {
color: red;
font-weight: bold;
}
.neutral {
color: orange;
font-weight: bold;
}
.overweight {
color: green;
font-weight: bold;
}
.info table {
width: 70%;
margin: auto;
border-collapse: collapse;
margin-top: 20px;
}
.info th {
background-color: #f4a261;
color: white;
}
.info {
display: flex;
justify-content: flex-start;
align-items: flex-start;
width: 850px;
}
/* Nút bấm */
.btn {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
background-color: #f4a261;
border: none;
border-radius: 5px;
color: white;
transition: all 0.3s ease;
}
/* Hiệu ứng cạnh nút bấm */
.btn:hover {
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
/* Bảng sẽ ẩn ban đầu */
#summaryTable {
display: none;
margin-top: 20px;
width: 80%;
border-collapse: collapse;
margin: auto;
animation: fadeIn 0.5s ease-out;
}
/* Hiệu ứng fadeIn */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
</head>
<body>
<h2>Investment View</h2>
<div class="container">
<table class="tactical">
<tr>
<th colspan="10">Tactical View (6 tháng – 1 năm)</th>
</tr>
<tr>
<td></td>
<td style="color: red;" colspan = "3">Underweight</td>
<td style="color: orange;">Neutral</td>
<td style="color: green;" colspan = "3">Overweight</td>
</tr>
<tr>
<td>Tiền gửi</td>
<td><span class="dot2"></span></td><td><span class="dot2"></span></td><td><span class="dot2"></span></td>
<td><span class="dot2"></span></td>
<td><span class="dot green"></span></td><td><span class="dot2"></span></td><td><span class="dot2"></span></td>
</tr>
<tr>
<td>Cổ phiếu</td>
<td></td><td></td><td></td>
<td></td>
<td></td><td><span class="dot green"></span></td><td></td>
</tr>
<tr>
<td>Trái phiếu DN</td>
<td></td><td></td><td></td>
<td><span class="dot yellow"></span></td>
<td></td><td></td><td></td>
</tr>
<tr>
<td>Ngoại tệ (USD)</td>
<td></td><td></td><td><span class="dot red"></span></td>
<td></td>
<td></td><td></td><td></td>
</tr>
<tr>
<td>Vàng</td>
<td></td><td></td><td></td>
<td></td>
<td><span class="dot green"></span></td><td></td><td></td>
</tr>
<tr>
<td>Bất động sản</td>
<td></td><td></td><td></td>
<td><span class="dot yellow"></span></td>
<td></td><td></td><td></td>
</tr>
<tr>
<td>Bitcoin</td>
<td></td><td></td><td></td>
<td><span class="dot yellow"></span></td>
<td></td><td></td><td></td>
</tr>
</table>
<table class="strategic">
<tr>
<th colspan="10">Strategic View (>1 năm – 3 năm)</th>
</tr>
<tr>
<td></td>
<td style="color: red;" colspan = "3">Underweight</td>
<td style="color: orange;">Neutral</td>
<td style="color: green;" colspan = "3">Overweight</td>
</tr>
<tr>
<td>Tiền gửi</td>
<td></td><td></td><td></td>
<td></td>
<td><span class="dot green"></span></td><td></td><td></td>
</tr>
<tr>
<td>Cổ phiếu</td>
<td></td><td></td><td></td>
<td></td>
<td></td><td></td><td><span class="dot green"></span></td>
</tr>
<tr>
<td>Trái phiếu DN</td>
<td></td><td></td><td></td>
<td></td>
<td><span class="dot green"></span></td><td></td><td></td>
</tr>
<tr>
<td>Ngoại tệ (USD)</td>
<td></td><td></td><td></td>
<td><span class="dot red"></span></td>
<td></td><td></td><td></td>
</tr>
<tr>
<td>Vàng</td>
<td></td><td></td><td></td>
<td></td>
<td></td><td><span class="dot green"></span></td><td></td>
</tr>
<tr>
<td>Bất động sản</td>
<td></td><td></td><td></td>
<td></td>
<td></td><td><span class="dot green"></span></td><td></td>
</tr>
<tr>
<td>Bitcoin</td>
<td></td><td></td><td></td>
<td></td>
<td><span class="dot green"></span></td><td></td><td></td>
</tr>
</table>
</div>
<div class="info">
<button class="btn" onclick="toggleTable()">Hướng dẫn</button>
<table id="summaryTable">
<tr>
<th>Thuật ngữ</th>
<th>Nghĩa chung</th>
<th>Hàm ý tài chính</th>
</tr>
<tr>
<td class="underweight">Underweight</td>
<td>Giảm tỷ trọng</td>
<td>Không hấp dẫn, nên giảm đầu tư</td>
</tr>
<tr>
<td class="neutral">Neutral</td>
<td>Giữ nguyên tỷ trọng</td>
<td>Trung lập, không mua thêm nhưng cũng không bán</td>
</tr>
<tr>
<td class="overweight">Overweight</td>
<td>Tăng tỷ trọng</td>
<td>Hấp dẫn, nên đầu tư nhiều hơn</td>
</tr>
</table>
</div>
<script>
// Lấy các phần tử DOM
const table = document.getElementById('summaryTable');
// Hàm toggle bảng (hiển thị hoặc ẩn)
function toggleTable() {
if (table.style.display === 'none' || table.style.display === '') {
table.style.display = 'block';
} else {
table.style.display = 'none';
}
}
// Lắng nghe sự kiện click bên ngoài để ẩn bảng
window.addEventListener('click', function(event) {
if (!event.target.closest('.btn') && !event.target.closest('#summaryTable')) {
table.style.display = 'none';
}
});
</script>
</body>
</html>