Spaces:
Runtime error
Runtime error
mdj1412
commited on
Commit
ยท
2a479da
1
Parent(s):
8d21d0b
complete
Browse files- app.py +57 -11
- static/css/cal.css +135 -0
- static/css/style.css +394 -153
- static/js/index.js +55 -36
- static/js/utils.js +1 -4
- templates/index.html +4 -4
app.py
CHANGED
@@ -129,16 +129,15 @@ def chart():
|
|
129 |
|
130 |
|
131 |
# Show Ticker's Title and News's Title
|
132 |
-
@app.route('/
|
133 |
-
def
|
134 |
-
print("app.py : /info Start ")
|
135 |
-
|
136 |
# Javascript ์์ ๋ฐ์ ๋ฉ์์ง
|
137 |
ticker = request.args.get('ticker')
|
138 |
date = request.args.get('date')
|
139 |
title = request.args.get('title')
|
140 |
andSymbolInTitle = request.args.get('andSymbolInTitle')
|
141 |
|
|
|
142 |
|
143 |
# Title ์์ '&'๋ก ํ์๋์ด ์๋๋ฐ ๋ฐ๋ก ๊ตฌ๋ณํด์ผ ๋๋ค.
|
144 |
# andSymbolInTitle ์์ ๊ฐ์ ธ์จ '&' ์์น index๋ฅผ title๊ณผ ํฉ์ณ์ค๋ค.
|
@@ -168,14 +167,61 @@ def ticker_title():
|
|
168 |
else:
|
169 |
url = url[0]
|
170 |
|
171 |
-
example_embed1 = ticker
|
172 |
-
example_embed2 = "Date: %s" % (date)
|
173 |
-
example_embed3 = "Title: %s" % (title)
|
174 |
-
example_embed4 = url
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
# return render_template('news.html', embed1=example_embed1, embed2=example_embed2, embed3=example_embed3, embed4=example_embed4)
|
180 |
|
181 |
|
|
|
129 |
|
130 |
|
131 |
# Show Ticker's Title and News's Title
|
132 |
+
@app.route('/info_and_newsNER', methods=['GET', 'POST'])
|
133 |
+
def news_info_ner():
|
|
|
|
|
134 |
# Javascript ์์ ๋ฐ์ ๋ฉ์์ง
|
135 |
ticker = request.args.get('ticker')
|
136 |
date = request.args.get('date')
|
137 |
title = request.args.get('title')
|
138 |
andSymbolInTitle = request.args.get('andSymbolInTitle')
|
139 |
|
140 |
+
print(ticker, date, title, andSymbolInTitle)
|
141 |
|
142 |
# Title ์์ '&'๋ก ํ์๋์ด ์๋๋ฐ ๋ฐ๋ก ๊ตฌ๋ณํด์ผ ๋๋ค.
|
143 |
# andSymbolInTitle ์์ ๊ฐ์ ธ์จ '&' ์์น index๋ฅผ title๊ณผ ํฉ์ณ์ค๋ค.
|
|
|
167 |
else:
|
168 |
url = url[0]
|
169 |
|
|
|
|
|
|
|
|
|
170 |
|
171 |
+
|
172 |
+
#######################################################
|
173 |
+
|
174 |
+
# ๋ด์ค ๋ฐ์ดํฐ ์์น ์ฐพ๊ธฐ ( in directory )
|
175 |
+
dir = os.path.join('./news', ticker, date, title+'.txt')
|
176 |
+
f = open(dir, 'r')
|
177 |
+
news_data = f.read()
|
178 |
+
|
179 |
+
|
180 |
+
# NER
|
181 |
+
nlp = spacy.load("en_core_web_sm")
|
182 |
+
doc = nlp(news_data) # News Data Analysis
|
183 |
+
|
184 |
+
|
185 |
+
# ํ์์๋ ์ฉ์ด๋ค ๋ฒ๋ฆฌ๊ธฐ
|
186 |
+
print("=====================================================================")
|
187 |
+
|
188 |
+
ents = {'text': [], 'start_char': [], 'end_char': [], 'label_': []}
|
189 |
+
for ent in doc.ents:
|
190 |
+
# print(ent.text, ent.start_char, ent.end_char, ent.label_)
|
191 |
+
|
192 |
+
# ๋ฒ๋ฆฌ๋ ์ฉ์ด๋ค
|
193 |
+
if ent.label_ == 'DATE':
|
194 |
+
continue
|
195 |
+
if ent.label_ == 'TIME':
|
196 |
+
continue
|
197 |
+
if ent.label_ == 'CARDINAL':
|
198 |
+
continue
|
199 |
+
if ent.label_ == 'MONEY':
|
200 |
+
continue
|
201 |
+
if ent.label_ == 'PERCENT':
|
202 |
+
continue
|
203 |
+
if ent.label_ == 'ORDINAL':
|
204 |
+
continue
|
205 |
+
if ent.label_ == 'PRODUCT':
|
206 |
+
continue
|
207 |
+
|
208 |
+
|
209 |
+
print(ent.text, ent.start_char, ent.end_char, ent.label_)
|
210 |
+
|
211 |
+
ents['text'].append(ent.text)
|
212 |
+
ents['start_char'].append(ent.start_char)
|
213 |
+
ents['end_char'].append(ent.end_char)
|
214 |
+
ents['label_'].append(ent.label_)
|
215 |
+
|
216 |
+
print("=====================================================================")
|
217 |
+
|
218 |
+
ents['news'] = news_data
|
219 |
+
|
220 |
+
# ents = {'text': [], 'start_char': [], 'end_char': [], 'label_': [], 'news': []}
|
221 |
+
|
222 |
+
print("ents : ", ents)
|
223 |
+
|
224 |
+
return jsonify(ticker=ticker, date=date, title=title, url=url, ents=ents)
|
225 |
# return render_template('news.html', embed1=example_embed1, embed2=example_embed2, embed3=example_embed3, embed4=example_embed4)
|
226 |
|
227 |
|
static/css/cal.css
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
[ CSS ๊ธฐ๋ณธ ๋ฌธ๋ฒ ]
|
3 |
+
AND ์ฐ์ฐ์ : ์ ํ์ ์ฌ์ด์ ๊ณต๋ฐฑ์ด ์ ๊ฑฐ๋๋ ๊ฒฝ์ฐ ์ฌ๋ฌ ์ ํ์๋ฅผ ๋์์ ๋ง์กฑํ๋ ํ๊ทธ์ ์คํ์ผ์ ์ ์ฉ
|
4 |
+
OR ์ฐ์ฐ์ : ๋ ์ ํ์ ์ค ํ๋๋ผ๋ ๋ง์กฑ์ ์ ์ฉ๋๋ ์กฐ๊ฑด (์ผํ๋ฅผ ํตํด ๋ ์ ํ์ ์ค ํ๋๋ผ๋ ๋ง์กฑ์ ์ ์ฉ)
|
5 |
+
|
6 |
+
|
7 |
+
".a .b .c" : aํด๋์ค ๋ด๋ถ์ bํด๋์ค ๋ด๋ถ์ cํด๋์ค ์์์๋ง ์คํ์ผ ์ ์ฉ
|
8 |
+
".a.b.c" : ํด๋์ค ์์ฑ ๋ด์ a, b, c ๋ชจ๋ ์ค์ ๋ ๋ชจ๋ ์์๋ค์ ์ ํ
|
9 |
+
".a, .b, .c" : ์ผ์นํ๋ ๋ชจ๋ ์์ค๋ค์ ์ ํ
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
.sec_cal {
|
14 |
+
width: 360px; /* ์์ฑ์ ์์ ๋๋น */
|
15 |
+
margin: 0 auto;
|
16 |
+
font-family: "NotoSansR";
|
17 |
+
}
|
18 |
+
|
19 |
+
/* ".a .b .c" : aํด๋์ค ๋ด๋ถ์ bํด๋์ค ๋ด๋ถ์ cํด๋์ค ์์์๋ง ์คํ์ผ ์ ์ฉ */
|
20 |
+
.sec_cal .cal_nav {
|
21 |
+
display: flex;
|
22 |
+
justify-content: center; /* ๊ฐ๋ก ์ถ์ ๊ธฐ์ค์ผ๋ก ์ข์ฐ์ ๋ํ ์ ๋ ฌ */
|
23 |
+
align-items: center; /* ์ธ๋ก ์ถ์ ๊ธฐ์ค์ผ๋ก ์ ๋ ฌ ์์๋์ ๋ํ ์ ๋ ฌ */
|
24 |
+
font-weight: 700; /* ํฐํธ(font)์ ๊ฐ์ค์น(weight)๋ ๊ตต๊ธฐ(boldness)๋ฅผ ๋ช
์ */
|
25 |
+
font-size: 48px; /* ํฐํธ(font)์ ํฌ๊ธฐ๋ฅผ ์ง์ */
|
26 |
+
line-height: 78px; /* Sets the height of a line box (์ค๊ฐ๊ฒฉ) */
|
27 |
+
}
|
28 |
+
|
29 |
+
.sec_cal .cal_nav .year-month {
|
30 |
+
width: 300px; /* ์์ฑ์ ์์ ๋๋น */
|
31 |
+
text-align: center;
|
32 |
+
line-height: 1;
|
33 |
+
}
|
34 |
+
|
35 |
+
.sec_cal .cal_nav .nav {
|
36 |
+
display: flex;
|
37 |
+
border: 1px solid #333333;
|
38 |
+
border-radius: 5px;
|
39 |
+
}
|
40 |
+
|
41 |
+
.sec_cal .cal_nav .go-prev,
|
42 |
+
.sec_cal .cal_nav .go-next {
|
43 |
+
display: block;
|
44 |
+
width: 50px; /* ์์ฑ์ ์์ ๋๋น */
|
45 |
+
height: 78px;
|
46 |
+
font-size: 0;
|
47 |
+
display: flex;
|
48 |
+
justify-content: center;
|
49 |
+
align-items: center;
|
50 |
+
}
|
51 |
+
|
52 |
+
.sec_cal .cal_nav .go-prev::before,
|
53 |
+
.sec_cal .cal_nav .go-next::before {
|
54 |
+
content: "";
|
55 |
+
display: block;
|
56 |
+
width: 20px; /* ์์ฑ์ ์์ ๋๋น */
|
57 |
+
height: 20px;
|
58 |
+
border: 3px solid #000;
|
59 |
+
border-width: 3px 3px 0 0;
|
60 |
+
transition: border 0.1s;
|
61 |
+
}
|
62 |
+
|
63 |
+
.sec_cal .cal_nav .go-prev:hover::before,
|
64 |
+
.sec_cal .cal_nav .go-next:hover::before {
|
65 |
+
border-color: #ed2a61;
|
66 |
+
}
|
67 |
+
|
68 |
+
.sec_cal .cal_nav .go-prev::before {
|
69 |
+
transform: rotate(-135deg);
|
70 |
+
}
|
71 |
+
|
72 |
+
.sec_cal .cal_nav .go-next::before {
|
73 |
+
transform: rotate(45deg);
|
74 |
+
}
|
75 |
+
|
76 |
+
.sec_cal .cal_wrap {
|
77 |
+
padding-top: 40px;
|
78 |
+
position: relative;
|
79 |
+
margin: 0 auto;
|
80 |
+
}
|
81 |
+
|
82 |
+
.sec_cal .cal_wrap .days {
|
83 |
+
display: flex;
|
84 |
+
margin-bottom: 20px; /* ์์ ํ๋จ์ margin ํ๋จ์ ์์ญ์ ์ค์ (์ฌ์ ๊ณต๊ฐ ์ค์ ) */
|
85 |
+
padding-bottom: 20px; /* ์์์ ๋ฐ๋ฅ์์ ํจ๋ฉ ์์ญ์ ๋์ด๋ฅผ ์ค์ */
|
86 |
+
border-bottom: 1px solid #ddd;
|
87 |
+
}
|
88 |
+
|
89 |
+
.sec_cal .cal_wrap::after {
|
90 |
+
top: 368px;
|
91 |
+
}
|
92 |
+
|
93 |
+
.sec_cal .cal_wrap .day {
|
94 |
+
display: flex;
|
95 |
+
align-items: center;
|
96 |
+
justify-content: center;
|
97 |
+
width: calc(100% / 7); /* ์์ฑ์ ์์ ๋๋น */
|
98 |
+
text-align: left;
|
99 |
+
color: #999;
|
100 |
+
font-size: 12px;
|
101 |
+
text-align: center;
|
102 |
+
border-radius: 5px;
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
/* <div class="day current today">1</div> */
|
107 |
+
.current.today {
|
108 |
+
/* background: rgb(3, 179, 65); */
|
109 |
+
background: rgb(242 242 242);
|
110 |
+
}
|
111 |
+
|
112 |
+
.sec_cal .cal_wrap .dates {
|
113 |
+
display: flex;
|
114 |
+
flex-flow: wrap;
|
115 |
+
height: 290px;
|
116 |
+
}
|
117 |
+
|
118 |
+
/* Pseduo-Classes ( ๊ทธ ์ค์์ Structural pseudo-classes ) */
|
119 |
+
.sec_cal .cal_wrap .day:nth-child(7n -1) {
|
120 |
+
color: #3c6ffa;
|
121 |
+
}
|
122 |
+
|
123 |
+
/* Pseduo-Classes ( ๊ทธ ์ค์์ Structural pseudo-classes ) */
|
124 |
+
.sec_cal .cal_wrap .day:nth-child(7n) {
|
125 |
+
color: #ed2a61;
|
126 |
+
}
|
127 |
+
|
128 |
+
.sec_cal .cal_wrap .day.disable {
|
129 |
+
color: #ddd;
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
|
static/css/style.css
CHANGED
@@ -10,123 +10,256 @@
|
|
10 |
*/
|
11 |
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
15 |
margin: 0 auto;
|
16 |
font-family: "NotoSansR";
|
17 |
}
|
18 |
|
19 |
-
/* ".a .b .c" : aํด๋์ค ๋ด๋ถ์ bํด๋์ค ๋ด๋ถ์ cํด๋์ค ์์์๋ง ์คํ์ผ ์ ์ฉ */
|
20 |
-
.sec_cal .cal_nav {
|
21 |
-
display: flex;
|
22 |
-
justify-content: center; /* ๊ฐ๋ก ์ถ์ ๊ธฐ์ค์ผ๋ก ์ข์ฐ์ ๋ํ ์ ๋ ฌ */
|
23 |
-
align-items: center; /* ์ธ๋ก ์ถ์ ๊ธฐ์ค์ผ๋ก ์ ๋ ฌ ์์๋์ ๋ํ ์ ๋ ฌ */
|
24 |
-
font-weight: 700; /* ํฐํธ(font)์ ๊ฐ์ค์น(weight)๋ ๊ตต๊ธฐ(boldness)๋ฅผ ๋ช
์ */
|
25 |
-
font-size: 48px; /* ํฐํธ(font)์ ํฌ๊ธฐ๋ฅผ ์ง์ */
|
26 |
-
line-height: 78px; /* Sets the height of a line box (์ค๊ฐ๊ฒฉ) */
|
27 |
-
}
|
28 |
|
29 |
-
.sec_cal .
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
}
|
34 |
|
35 |
-
|
|
|
|
|
36 |
display: flex;
|
37 |
-
|
38 |
-
|
|
|
39 |
}
|
40 |
|
41 |
-
|
42 |
-
.sec_cal .
|
43 |
-
|
44 |
-
|
45 |
-
height: 78px;
|
46 |
-
font-size: 0;
|
47 |
display: flex;
|
48 |
-
justify-content: center;
|
49 |
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
-
.sec_cal .cal_nav .go-prev::before,
|
53 |
-
.sec_cal .cal_nav .go-next::before {
|
54 |
-
content: "";
|
55 |
-
display: block;
|
56 |
-
width: 20px; /* ์์ฑ์ ์์ ๋๋น */
|
57 |
-
height: 20px;
|
58 |
-
border: 3px solid #000;
|
59 |
-
border-width: 3px 3px 0 0;
|
60 |
-
transition: border 0.1s;
|
61 |
-
}
|
62 |
|
63 |
-
.sec_cal .cal_nav .go-prev:hover::before,
|
64 |
-
.sec_cal .cal_nav .go-next:hover::before {
|
65 |
-
border-color: #ed2a61;
|
66 |
-
}
|
67 |
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
-
.
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
-
|
|
|
|
|
|
|
83 |
display: flex;
|
84 |
-
|
85 |
-
|
86 |
-
border-bottom: 1px solid #ddd;
|
87 |
}
|
88 |
|
89 |
-
|
90 |
-
|
|
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
justify-content: center;
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
text-align: center;
|
102 |
-
|
|
|
|
|
103 |
}
|
104 |
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
background: rgb(242 242 242);
|
110 |
}
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
height: 290px;
|
116 |
}
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
|
123 |
-
|
124 |
-
|
125 |
color: #ed2a61;
|
126 |
}
|
127 |
-
|
128 |
-
|
129 |
-
color: #ddd;
|
130 |
}
|
131 |
|
132 |
|
@@ -143,27 +276,9 @@
|
|
143 |
|
144 |
|
145 |
|
146 |
-
/* Model ๊ด๋ จ */
|
147 |
|
148 |
-
/* id : "#" */
|
149 |
-
#model {
|
150 |
-
text-align: center;
|
151 |
-
}
|
152 |
|
153 |
-
/* id : "#" */
|
154 |
-
#text-input {
|
155 |
-
width: calc(100% / 2); /* ์์ฑ์ ์์ ๋๋น */
|
156 |
-
height: 78px;
|
157 |
-
word-break: break-all;
|
158 |
-
}
|
159 |
|
160 |
-
.text-output {
|
161 |
-
width: calc(100% / 2); /* ์์ฑ์ ์์ ๋๋น */
|
162 |
-
min-height: 1.2rem;
|
163 |
-
margin: 1rem;
|
164 |
-
border: 0.5px solid grey;
|
165 |
-
padding: 0.5rem 1rem;
|
166 |
-
}
|
167 |
|
168 |
|
169 |
|
@@ -174,6 +289,10 @@
|
|
174 |
|
175 |
|
176 |
|
|
|
|
|
|
|
|
|
177 |
|
178 |
|
179 |
|
@@ -182,106 +301,228 @@
|
|
182 |
|
183 |
|
184 |
|
185 |
-
/* Stocks ๊ด๋ จ */
|
186 |
|
187 |
|
188 |
-
/* .sec_cal { */
|
189 |
-
.stocks_wrap {
|
190 |
-
width: 580px; /* ์์ฑ์ ์์ ๋๋น */
|
191 |
-
margin: 0 auto;
|
192 |
-
font-family: "NotoSansR";
|
193 |
-
}
|
194 |
|
195 |
|
196 |
-
/* .sec_cal .cal_wrap { */
|
197 |
-
.stocks_wrap {
|
198 |
-
padding-top: 40px;
|
199 |
-
position: relative;
|
200 |
-
margin: 0 auto;
|
201 |
-
}
|
202 |
|
203 |
|
204 |
-
/* .sec_cal .cal_wrap .days { */
|
205 |
-
.stocks_wrap .stocks_columns {
|
206 |
-
display: flex;
|
207 |
-
margin-bottom: 20px; /* ์์ ํ๋จ์ margin ํ๋จ์ ์์ญ์ ์ค์ */
|
208 |
-
padding-bottom: 20px; /* ์์์ ๋ฐ๋ฅ์์ ํจ๋ฉ ์์ญ์ ๋์ด๋ฅผ ์ค์ */
|
209 |
-
border-bottom: 1px solid #ddd;
|
210 |
-
}
|
211 |
|
212 |
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
justify-content: center;
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
text-align: center;
|
224 |
-
border-radius: 5px; /* rounds the corners of an element's outer border edge. */
|
225 |
-
}
|
226 |
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
}
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
|
|
|
|
237 |
}
|
238 |
|
|
|
|
|
|
|
239 |
|
240 |
-
.
|
241 |
-
|
242 |
-
margin-left: 30px;
|
243 |
}
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
}
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
}
|
252 |
|
253 |
-
|
254 |
-
color:
|
255 |
-
text-decoration: underline;
|
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 |
text-decoration: none;
|
287 |
}
|
|
|
10 |
*/
|
11 |
|
12 |
|
13 |
+
/* Stocks ๊ด๋ จ */
|
14 |
+
|
15 |
+
/* .sec_cal { */
|
16 |
+
#nasdaq-table-container .stocks_wrap {
|
17 |
+
width: 580px; /* ์์ฑ์ ์์ ๋๋น */
|
18 |
margin: 0 auto;
|
19 |
font-family: "NotoSansR";
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
/* .sec_cal .cal_wrap { */
|
24 |
+
#nasdaq-table-container .stocks_wrap {
|
25 |
+
padding-top: 40px;
|
26 |
+
position: relative;
|
27 |
+
margin: 0 auto;
|
28 |
}
|
29 |
|
30 |
+
|
31 |
+
/* .sec_cal .cal_wrap .days { */
|
32 |
+
#nasdaq-table-container .stocks_wrap .stocks_columns {
|
33 |
display: flex;
|
34 |
+
margin-bottom: 20px; /* ์์ ํ๋จ์ margin ํ๋จ์ ์์ญ์ ์ค์ */
|
35 |
+
padding-bottom: 20px; /* ์์์ ๋ฐ๋ฅ์์ ํจ๋ฉ ์์ญ์ ๋์ด๋ฅผ ์ค์ */
|
36 |
+
border-bottom: 1px solid #ddd;
|
37 |
}
|
38 |
|
39 |
+
|
40 |
+
/* .sec_cal .cal_wrap .day { */
|
41 |
+
#nasdaq-table-container .stocks_wrap .stocks_columns .column,
|
42 |
+
#nasdaq-table-container .stocks_wrap .stocks .stock {
|
|
|
|
|
43 |
display: flex;
|
|
|
44 |
align-items: center;
|
45 |
+
justify-content: center;
|
46 |
+
width: 50px;
|
47 |
+
text-align: left;
|
48 |
+
color: #999;
|
49 |
+
font-size: 12px;
|
50 |
+
text-align: center;
|
51 |
+
border-radius: 5px; /* rounds the corners of an element's outer border edge. */
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
|
|
|
|
|
|
|
|
55 |
|
56 |
+
|
57 |
+
#nasdaq-table-container .stocks_wrap .stocks_columns .column {
|
58 |
+
font-size: 17px;
|
59 |
+
/* width: 70px; */
|
60 |
+
}
|
61 |
+
#nasdaq-table-container .stocks_wrap .stocks .stock {
|
62 |
+
font-size: 13px;
|
63 |
+
/* width: 35px; */
|
64 |
}
|
65 |
|
66 |
+
|
67 |
+
#nasdaq-table-container .name {
|
68 |
+
margin-right: 30px;
|
69 |
+
margin-left: 30px;
|
70 |
+
}
|
71 |
+
#nasdaq-table-container .sector, .industry{
|
72 |
+
margin-right: 18px;
|
73 |
+
margin-left: 48px;
|
74 |
+
}
|
75 |
+
#nasdaq-table-container .dff, .open, .close {
|
76 |
+
margin-right: 5px;
|
77 |
+
margin-left: 5px;
|
78 |
}
|
79 |
|
80 |
+
#nasdaq-table-container .stocks_wrap .stocks .ticker {
|
81 |
+
color: #04b70d;
|
82 |
+
text-decoration: underline;
|
83 |
+
}
|
84 |
+
#nasdaq-table-container .stocks_wrap .stocks .up {
|
85 |
+
color: #ed2a61;
|
86 |
+
}
|
87 |
+
#nasdaq-table-container .stocks_wrap .stocks .down {
|
88 |
+
color: #3c6ffa;
|
89 |
}
|
90 |
|
91 |
+
|
92 |
+
|
93 |
+
/* .sec_cal .cal_wrap .dates { */
|
94 |
+
#nasdaq-table-container .stocks_wrap .stocks {
|
95 |
display: flex;
|
96 |
+
flex-flow: wrap;
|
97 |
+
height: 5000px; /* ๋์ด ๊ฐ๊ฒฉ */
|
|
|
98 |
}
|
99 |
|
100 |
+
/* h1 ํ๊ทธ ๋ถ๋ถ */
|
101 |
+
#nasdaq-table-container .gohome {
|
102 |
+
text-decoration: none;
|
103 |
}
|
104 |
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
/*
|
119 |
+
์ : nasdaq-table-container ๊ด๋ จ CSS
|
120 |
+
์๋ : chart-container ๊ด๋ จ CSS
|
121 |
+
*/
|
122 |
+
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
+
/* id : "#" */
|
139 |
+
#chart-container .myChart-container {
|
140 |
+
/* ์์ฑ์ ์์ ๋๋น๋ฅผ ์ง์ */
|
141 |
+
width: 60vw;
|
142 |
+
|
143 |
+
/* ์์ฑ์ ์์์ ๋์ด๋ฅผ ์ง์ */
|
144 |
+
height: 30vh;
|
145 |
+
|
146 |
+
/*
|
147 |
+
[ margin ํ๊ทธ ]
|
148 |
+
margin-top (์๋จ ์ฌ๋ฐฑ)
|
149 |
+
margin-right (์ค๋ฅธ์ชฝ ์ฌ๋ฐฑ)
|
150 |
+
margin-bottom (์๋ ์ฌ๋ฐฑ)
|
151 |
+
margin-left (์ผ์ชฝ ์ฌ๋ฐฑ)
|
152 |
+
|
153 |
+
์ง์ ๊ฐ์ px, cm, %๋ก ์ง์ ํ ์ ์๋ค.
|
154 |
+
์์๊ฐ๋ ์ง์ ๊ฐ๋ฅ(ex. -10px)
|
155 |
+
|
156 |
+
* 4๋ฉด ํ๊บผ๋ฒ์ margin ์ง์ ํ๊ธฐ
|
157 |
+
ex) margin: 5px 7px 3px 0px;
|
158 |
+
(์, ์ค๋ฅธ์ชฝ, ์๋, ์ผ์ชฝ)
|
159 |
+
* 4๋ฉด์ด ๋ชจ๋ ๊ฐ์ ๋ margin ์ง์ ํ๊ธฐ
|
160 |
+
ex) margin: 5px;
|
161 |
+
* ์, ์ค๋ฅธ์ชฝ&์ผ์ชฝ, ์๋ margin ์ง์ ํ๊ธฐ
|
162 |
+
ex) margin: 5px 10px 0px;
|
163 |
+
* ์&์๋, ์ค๋ฅธ์ชฝ&์ผ์ชฝ margin ์ง์ ํ๊ธฐ
|
164 |
+
ex) margin: 5px 10px;
|
165 |
+
* margin ์๋ ์ง์ ํ๊ธฐ
|
166 |
+
ex) margin: auto 0;
|
167 |
+
(์์๋ ๊ฐ์ด ์๋, ์ข์ฐ๊ฐ 0px)
|
168 |
+
ex) margin-left: auto;
|
169 |
+
|
170 |
+
*/
|
171 |
+
margin: 40px auto;
|
172 |
+
padding-bottom: 13%;
|
173 |
+
}
|
174 |
+
|
175 |
+
#chart-container .table {
|
176 |
+
/*
|
177 |
+
[ align-items ํ๊ทธ ]
|
178 |
+
flex-box ์์์ ์์ง ๋ฐฉํฅ ์ ๋ ฌ ๋ฐฉ์์ ์ค์
|
179 |
+
ex. flex-start, flex-end, center
|
180 |
+
*/
|
181 |
align-items: center;
|
182 |
+
|
183 |
+
/*
|
184 |
+
[ justify-content ํ๊ทธ ]
|
185 |
+
flex-box ์์์ ์ํ ๋ฐฉํฅ ์ ๋ ฌ ๋ฐฉ์์ ์ค์
|
186 |
+
ex. flex-start, flex-end, center
|
187 |
+
*/
|
188 |
justify-content: center;
|
189 |
+
|
190 |
+
|
191 |
+
/*
|
192 |
+
[ margin ํ๊ทธ ]
|
193 |
+
margin-top (์๋จ ์ฌ๋ฐฑ)
|
194 |
+
margin-right (์ค๋ฅธ์ชฝ ์ฌ๋ฐฑ)
|
195 |
+
margin-bottom (์๋ ์ฌ๋ฐฑ)
|
196 |
+
margin-left (์ผ์ชฝ ์ฌ๋ฐฑ)
|
197 |
+
|
198 |
+
์ง์ ๊ฐ์ px, cm, %๋ก ์ง์ ํ ์ ์๋ค.
|
199 |
+
์์๊ฐ๋ ์ง์ ๊ฐ๋ฅ(ex. -10px)
|
200 |
+
|
201 |
+
* 4๋ฉด ํ๊บผ๋ฒ์ margin ์ง์ ํ๊ธฐ
|
202 |
+
ex) margin: 5px 7px 3px 0px;
|
203 |
+
(์, ์ค๋ฅธ์ชฝ, ์๋, ์ผ์ชฝ)
|
204 |
+
* 4๋ฉด์ด ๋ชจ๋ ๊ฐ์ ๋ margin ์ง์ ํ๊ธฐ
|
205 |
+
ex) margin: 5px;
|
206 |
+
* ์, ์ค๋ฅธ์ชฝ&์ผ์ชฝ, ์๋ margin ์ง์ ํ๊ธฐ
|
207 |
+
ex) margin: 5px 10px 0px;
|
208 |
+
* ์&์๋, ์ค๋ฅธ์ชฝ&์ผ์ชฝ margin ์ง์ ํ๊ธฐ
|
209 |
+
ex) margin: 5px 10px;
|
210 |
+
* margin ์๋ ์ง์ ํ๊ธฐ
|
211 |
+
ex) margin: auto 0;
|
212 |
+
(์์๋ ๊ฐ์ด ์๋, ์ข์ฐ๊ฐ 0px)
|
213 |
+
ex) margin-left: auto;
|
214 |
+
|
215 |
+
*/
|
216 |
+
margin: 20px auto;
|
217 |
+
|
218 |
+
|
219 |
+
/*
|
220 |
+
[ text-align ํ๊ทธ ]
|
221 |
+
ํ
์คํธ์ ์ ๋ ฌ ๋ฐฉํฅ์ ์ค์
|
222 |
+
|
223 |
+
left: ์ผ์ชฝ ์ ๋ ฌ
|
224 |
+
right: ์ค๋ฅธ์ชฝ ์ ๋ ฌ
|
225 |
+
center: ์ค์ ์ ๋ ฌ
|
226 |
+
justify: ์์ชฝ ์ ๋ ฌ (์๋ ์ค๋ฐ๊ฟ์ ์ค๋ฅธ์ชฝ ๊ฒฝ๊ณ์ ๋ถ๋ถ ์ ๋ฆฌ)
|
227 |
+
*/
|
228 |
text-align: center;
|
229 |
+
|
230 |
+
|
231 |
+
padding-top: 50px;
|
232 |
}
|
233 |
|
234 |
|
235 |
+
#chart-container .table .title-width {
|
236 |
+
width: 10px;
|
237 |
+
text-align: center;
|
|
|
238 |
}
|
239 |
|
240 |
+
|
241 |
+
#chart-container .table .table-title {
|
242 |
+
font-size: 50px;
|
|
|
243 |
}
|
244 |
|
245 |
+
|
246 |
+
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
|
251 |
+
|
252 |
+
/* h1, h2 ํ๊ทธ ๋ถ๋ถ */
|
253 |
+
#chart-container .gohome, .goticker {
|
254 |
+
text-decoration: none;
|
255 |
}
|
256 |
|
257 |
+
|
258 |
+
#chart-container .table .news-table .news.diff.up {
|
259 |
color: #ed2a61;
|
260 |
}
|
261 |
+
#chart-container .table .news-table .news.diff.down {
|
262 |
+
color: #3c6ffa;
|
|
|
263 |
}
|
264 |
|
265 |
|
|
|
276 |
|
277 |
|
278 |
|
|
|
279 |
|
|
|
|
|
|
|
|
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
|
283 |
|
284 |
|
|
|
289 |
|
290 |
|
291 |
|
292 |
+
/*
|
293 |
+
์ : chart-container ๊ด๋ จ CSS
|
294 |
+
์๋ : news-container ๊ด๋ จ CSS
|
295 |
+
*/
|
296 |
|
297 |
|
298 |
|
|
|
301 |
|
302 |
|
303 |
|
|
|
304 |
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
|
311 |
|
312 |
+
|
313 |
+
|
314 |
+
|
315 |
+
|
316 |
+
|
317 |
+
|
318 |
+
|
319 |
+
|
320 |
+
|
321 |
+
|
322 |
+
/* ner ๊ด๋ จ */
|
323 |
+
|
324 |
+
#news-container .ner-box {
|
325 |
+
width: calc(92%); /* ์์ฑ์ ์์ ๋๋น๋ฅผ ์ง์ */
|
326 |
+
height: 500px; /* ์์ฑ์ ์์์ ๋์ด๋ฅผ ์ง์ */
|
327 |
+
|
328 |
+
|
329 |
+
/*
|
330 |
+
[ align-items ํ๊ทธ ]
|
331 |
+
flex-box ์์์ ์์ง ๋ฐฉํฅ ์ ๋ ฌ ๋ฐฉ์์ ์ค์
|
332 |
+
ex. flex-start, flex-end, center
|
333 |
+
*/
|
334 |
align-items: center;
|
335 |
+
|
336 |
+
/*
|
337 |
+
[ justify-content ํ๊ทธ ]
|
338 |
+
flex-box ์์์ ์ํ ๋ฐฉํฅ ์ ๋ ฌ ๋ฐฉ์์ ์ค์
|
339 |
+
ex. flex-start, flex-end, center
|
340 |
+
*/
|
341 |
justify-content: center;
|
342 |
+
|
343 |
+
/*
|
344 |
+
[ text-align ํ๊ทธ ]
|
345 |
+
ํ
์คํธ์ ์ ๋ ฌ ๋ฐฉํฅ์ ์ค์
|
346 |
+
|
347 |
+
left: ์ผ์ชฝ ์ ๋ ฌ
|
348 |
+
right: ์ค๋ฅธ์ชฝ ์ ๋ ฌ
|
349 |
+
center: ์ค์ ์ ๋ ฌ
|
350 |
+
justify: ์์ชฝ ์ ๋ ฌ (์๋ ์ค๋ฐ๊ฟ์ ์ค๋ฅธ์ชฝ ๊ฒฝ๊ณ์ ๋ถ๋ถ ์ ๋ฆฌ)
|
351 |
+
*/
|
352 |
text-align: center;
|
|
|
|
|
353 |
|
354 |
|
355 |
+
/*
|
356 |
+
[ margin ํ๊ทธ ]
|
357 |
+
margin-top (์๋จ ์ฌ๋ฐฑ)
|
358 |
+
margin-right (์ค๋ฅธ์ชฝ ์ฌ๋ฐฑ)
|
359 |
+
margin-bottom (์๋ ์ฌ๋ฐฑ)
|
360 |
+
margin-left (์ผ์ชฝ ์ฌ๋ฐฑ)
|
361 |
+
|
362 |
+
์ง์ ๊ฐ์ px, cm, %๋ก ์ง์ ํ ์ ์๋ค.
|
363 |
+
์์๊ฐ๋ ์ง์ ๊ฐ๋ฅ(ex. -10px)
|
364 |
+
|
365 |
+
* 4๋ฉด ํ๊บผ๋ฒ์ margin ์ง์ ํ๊ธฐ
|
366 |
+
ex) margin: 5px 7px 3px 0px;
|
367 |
+
(์, ์ค๋ฅธ์ชฝ, ์๋, ์ผ์ชฝ)
|
368 |
+
* 4๋ฉด์ด ๋ชจ๋ ๊ฐ์ ๋ margin ์ง์ ํ๊ธฐ
|
369 |
+
ex) margin: 5px;
|
370 |
+
* ์, ์ค๋ฅธ์ชฝ&์ผ์ชฝ, ์๋ margin ์ง์ ํ๊ธฐ
|
371 |
+
ex) margin: 5px 10px 0px;
|
372 |
+
* ์&์๋, ์ค๋ฅธ์ชฝ&์ผ์ชฝ margin ์ง์ ํ๊ธฐ
|
373 |
+
ex) margin: 5px 10px;
|
374 |
+
* margin ์๋ ์ง์ ํ๊ธฐ
|
375 |
+
ex) margin: auto 0;
|
376 |
+
(์์๋ ๊ฐ์ด ์๋, ์ข์ฐ๊ฐ 0px)
|
377 |
+
ex) margin-left: auto;
|
378 |
+
|
379 |
+
*/
|
380 |
+
margin: 1rem;
|
381 |
|
382 |
|
383 |
+
min-height: 1.2rem;
|
384 |
+
border: 0.5px solid grey;
|
385 |
+
padding: 0.5rem 1rem;
|
386 |
}
|
387 |
+
|
388 |
+
|
389 |
+
|
390 |
+
/* NER label_ */
|
391 |
+
#news-container .entities .entity_person {
|
392 |
+
background-color: #aa9cfc;
|
393 |
}
|
394 |
|
395 |
+
#news-container .entities .entity_org {
|
396 |
+
background-color: #7aecec;
|
397 |
+
}
|
398 |
|
399 |
+
#news-container .entities .entity_fac {
|
400 |
+
background-color: #9cc9cc;
|
|
|
401 |
}
|
402 |
+
|
403 |
+
#news-container .entities .entity_gpe {
|
404 |
+
background-color: #feca74;
|
405 |
}
|
406 |
+
|
407 |
+
#news-container .entities .entity_product {
|
408 |
+
background-color: #bfeeb7;
|
409 |
}
|
410 |
|
411 |
+
#news-container .entities .none {
|
412 |
+
background-color: transparent;
|
|
|
413 |
}
|
414 |
+
|
415 |
+
/* ๋ง์ฐ์ค ์ฌ๋ ธ์ ๋, ๋ณด์ด๊ฒ ํ๋ ๊ฒ */
|
416 |
+
#news-container .entities .show-label {
|
417 |
+
display: none;
|
418 |
}
|
419 |
+
|
420 |
+
#news-container .entities .entity_person:hover .show-label,
|
421 |
+
#news-container .entities .entity_org:hover .show-label,
|
422 |
+
#news-container .entities .entity_fac:hover .show-label,
|
423 |
+
#news-container .entities .entity_gpe:hover .show-label,
|
424 |
+
#news-container .entities .entity_product:hover .show-label {
|
425 |
+
display: block;
|
426 |
}
|
427 |
|
428 |
|
429 |
|
430 |
+
|
431 |
+
|
432 |
+
/* Model ๊ด๋ จ */
|
433 |
+
|
434 |
+
/* id : "#" */
|
435 |
+
#news-container #model {
|
436 |
+
/*
|
437 |
+
[ text-align ํ๊ทธ ]
|
438 |
+
ํ
์คํธ์ ์ ๋ ฌ ๋ฐฉํฅ์ ์ค์
|
439 |
+
|
440 |
+
left: ์ผ์ชฝ ์ ๋ ฌ
|
441 |
+
right: ์ค๋ฅธ์ชฝ ์ ๋ ฌ
|
442 |
+
center: ์ค์ ์ ๋ ฌ
|
443 |
+
justify: ์์ชฝ ์ ๋ ฌ (์๋ ์ค๋ฐ๊ฟ์ ์ค๋ฅธ์ชฝ ๊ฒฝ๊ณ์ ๋ถ๋ถ ์ ๋ฆฌ)
|
444 |
+
*/
|
445 |
+
text-align: center;
|
446 |
+
}
|
447 |
+
|
448 |
+
/* id : "#" */
|
449 |
+
#news-container #text-input {
|
450 |
+
width: calc(100% / 2); /* ์์ฑ์ ์์ ๋๋น */
|
451 |
+
height: 78px; /* ์์ฑ์ ์์์ ๋์ด๋ฅผ ์ง์ */
|
452 |
+
word-break: break-all;
|
453 |
}
|
454 |
|
455 |
|
456 |
+
#news-container .text-output {
|
457 |
+
width: calc(100% * (2/3)); /* ์์ฑ์ ์์ ๋๋น */
|
458 |
+
min-height: 10rem;
|
459 |
|
460 |
|
461 |
|
462 |
+
/*
|
463 |
+
[ margin ํ๊ทธ ]
|
464 |
+
margin-top (์๋จ ์ฌ๋ฐฑ)
|
465 |
+
margin-right (์ค๋ฅธ์ชฝ ์ฌ๋ฐฑ)
|
466 |
+
margin-bottom (์๋ ์ฌ๋ฐฑ)
|
467 |
+
margin-left (์ผ์ชฝ ์ฌ๋ฐฑ)
|
468 |
|
469 |
+
์ง์ ๊ฐ์ px, cm, %๋ก ์ง์ ํ ์ ์๋ค.
|
470 |
+
์์๊ฐ๋ ์ง์ ๊ฐ๋ฅ(ex. -10px)
|
471 |
|
472 |
+
* 4๋ฉด ํ๊บผ๋ฒ์ margin ์ง์ ํ๊ธฐ
|
473 |
+
ex) margin: 5px 7px 3px 0px;
|
474 |
+
(์, ์ค๋ฅธ์ชฝ, ์๋, ์ผ์ชฝ)
|
475 |
+
* 4๋ฉด์ด ๋ชจ๋ ๊ฐ์ ๋ margin ์ง์ ํ๊ธฐ
|
476 |
+
ex) margin: 5px;
|
477 |
+
* ์, ์ค๋ฅธ์ชฝ&์ผ์ชฝ, ์๋ margin ์ง์ ํ๊ธฐ
|
478 |
+
ex) margin: 5px 10px 0px;
|
479 |
+
* ์&์๋, ์ค๋ฅธ์ชฝ&์ผ์ชฝ margin ์ง์ ํ๊ธฐ
|
480 |
+
ex) margin: 5px 10px;
|
481 |
+
* margin ์๋ ์ง์ ํ๊ธฐ
|
482 |
+
ex) margin: auto 0;
|
483 |
+
(์์๋ ๊ฐ์ด ์๋, ์ข์ฐ๊ฐ 0px)
|
484 |
+
ex) margin-left: auto;
|
485 |
|
486 |
+
*/
|
487 |
+
margin: 20px auto;
|
488 |
|
489 |
+
/*
|
490 |
+
[ border ํ๊ทธ ]
|
491 |
+
ํด๋น ํ๊ทธ์ ํ
๋๋ฆฌ๋ฅผ ์ค์
|
492 |
+
width - style - color
|
493 |
+
border-width - border-style - border-color
|
494 |
|
495 |
+
border-width : ํ
๋๋ฆฌ์ ๋๊ป๋ก, ์ฃผ๋ก px ๋จ์๋ฅผ ์ฌ์ฉ
|
496 |
+
border-style : ํ
๋๋ฆฌ์ ์คํ์ผ๋ก ์ค์ , ์ ์ , ์ด์ค์ ๋ฑ์ ์ต์
์ด ์กด์ฌ
|
497 |
+
border-color : ํ
๋๋ฆฌ์ ์์์ผ๋ก, ๊ฐ์ color ์์ฑ์ ํฌ๋งท์ ์ฌ์ฉ
|
498 |
+
*/
|
499 |
+
border: 0.5px solid grey;
|
500 |
|
501 |
+
/*
|
502 |
+
[ padding ํ๊ทธ ]
|
503 |
+
์ง์ ๊ฐ์ px, cm, %๋ก ์ง์ ํ ์ ์๋ค.
|
504 |
+
margin์ ์์๊ฐ์ด ์ง์ ๊ฐ๋ฅํ์ง๋ง padding์ ์์๊ฐ ์ง์ ์ด ์๋๋ค.
|
505 |
+
|
506 |
+
padding ํ๊ทธ์ ๋น์ทํ ํ๊ทธ
|
507 |
+
: padding-top, padding-right, padding-bottom, padding-left
|
508 |
+
|
509 |
+
* 4๋ฉด ํ๊บผ๋ฒ์ padding ์ง์ ํ๊ธฐ
|
510 |
+
ex) padding: 5px, 7px, 3px, 0px;
|
511 |
+
(์, ์ค๋ฅธ์ชฝ, ์๋, ์ผ์ชฝ)
|
512 |
+
* 4๋ฉด ๋ชจ๋ ๊ฐ์ ๋ padding ์ง์ ํ๊ธฐ
|
513 |
+
ex) padding: 5px;
|
514 |
+
* ์, ์ค๋ฅธ์ชฝ&์ผ์ชฝ, ์๋ padding ์ง์ ํ๊ธฐ
|
515 |
+
ex) padding: 5px 10px 0px;
|
516 |
+
* ์&์๋, ์ค๋ฅธ์ชฝ&์ผ์ชฝ padding ์ง์ ํ๊ธฐ
|
517 |
+
ex) padding: 5px, 10px;
|
518 |
+
|
519 |
+
*/
|
520 |
+
padding: 0.5rem 1rem;
|
521 |
+
}
|
522 |
|
523 |
+
|
524 |
+
|
525 |
+
/* h1, h2 ํ๊ทธ ๋ถ๋ถ */
|
526 |
+
#news-container .gohome, .goticker {
|
527 |
text-decoration: none;
|
528 |
}
|
static/js/index.js
CHANGED
@@ -137,9 +137,6 @@ function chartInit(ticker) {
|
|
137 |
|
138 |
// Javascript -> Flask (Python) -> Javascript
|
139 |
let [chart_data, news_articles] = sendAjax_sync_about_chartData_and_newsArticles("/chart", {"ticker": ticker}, "json", handle_two_return);
|
140 |
-
// console.log(chart_data, news_articles);
|
141 |
-
// console.log(chart_data);
|
142 |
-
// console.log(Object.keys(chart_data.Close));
|
143 |
|
144 |
|
145 |
// x์ถ๊ณผ data ์ค์
|
@@ -178,8 +175,8 @@ function chartInit(ticker) {
|
|
178 |
// Javascript๋ฅผ ์ด์ฉํด HTML์ ๋์ ์ผ๋ก ํ๊ทธ ์ถ๊ฐ
|
179 |
|
180 |
// a ํ๊ทธ onclick ์ ์ฉ
|
181 |
-
execution_function =
|
182 |
-
const goTicker = document.querySelector('.goticker');
|
183 |
goTicker.setAttribute('href', execution_function);
|
184 |
|
185 |
//////////////////////////////////////////////////////////////////
|
@@ -235,15 +232,23 @@ function chartInit(ticker) {
|
|
235 |
}
|
236 |
// console.log(key_list);
|
237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
// List ์์ value๋ฅผ ๋ฝ์ ๋, (Python) => for item in list:
|
239 |
Object.keys(sorted_news).forEach(key => {
|
240 |
-
var
|
|
|
241 |
|
242 |
-
if (
|
243 |
else { var diff = '.'; }
|
244 |
|
245 |
if (diff == '.') {
|
246 |
-
var diff_html = '<th class="news diff">
|
247 |
}
|
248 |
else if (diff > 0) {
|
249 |
var diff_html = '<th class="news diff up">+' + diff + ' %</th>';
|
@@ -251,12 +256,11 @@ function chartInit(ticker) {
|
|
251 |
else {
|
252 |
var diff_html = '<th class="news diff down">' + diff + ' %</th>';
|
253 |
}
|
254 |
-
var html =
|
255 |
|
256 |
for (var i = 0; i < sorted_news[key].length; i++) {
|
257 |
var title = sorted_news[key][i].substring(0, sorted_news[key][i].length-4);
|
258 |
var sendTitle = title; // Javascript -> Python ๋ณด๋ด๊ธฐ ์ํ title
|
259 |
-
console.log("title : ", title);
|
260 |
|
261 |
|
262 |
// title์์ & ํ์๊ฐ ์์ ์ ์์.
|
@@ -274,26 +278,43 @@ function chartInit(ticker) {
|
|
274 |
// console.log(sendTitle);
|
275 |
andSymbolInTitle.push(idx + andSymbolInTitle.length);
|
276 |
}
|
277 |
-
// console.log("title : ", title);
|
278 |
-
// console.log("sendTitle : ", sendTitle);
|
279 |
-
// console.log("andSymbolInTitle : ", andSymbolInTitle);
|
280 |
|
281 |
-
|
|
|
282 |
// console.log(link);
|
283 |
-
|
284 |
-
|
|
|
285 |
// console.log("execution_function : ", execution_function);
|
286 |
-
html = html + '<a href=' +
|
|
|
287 |
}
|
288 |
html = html + '</td>';
|
289 |
-
|
290 |
news_table.innerHTML = news_table.innerHTML + html;
|
291 |
});
|
292 |
}
|
293 |
|
294 |
|
295 |
|
|
|
|
|
|
|
|
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
|
298 |
|
299 |
|
@@ -311,23 +332,16 @@ function chartInit(ticker) {
|
|
311 |
*
|
312 |
*
|
313 |
*/
|
314 |
-
function newsInit(
|
315 |
-
console.log("newsInit start");
|
316 |
// HTML ์์
|
317 |
$("#nasdaq-table-container").hide();
|
318 |
$("#chart-container").hide();
|
319 |
$("#news-container").show();
|
320 |
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
title1 = title1.substring(0, i) + ' ' + title1.substring(i, title1.length);
|
325 |
-
}
|
326 |
-
|
327 |
-
console.log(ticker1);
|
328 |
-
console.log(date1);
|
329 |
-
console.log(title1);
|
330 |
-
console.log(andSymbolInTitle1);
|
331 |
|
332 |
|
333 |
|
@@ -335,29 +349,34 @@ function newsInit(ticker1, date1, title1, andSymbolInTitle1) {
|
|
335 |
|
336 |
// Javascript๋ฅผ ์ด์ฉํด HTML์ ๋์ ์ผ๋ก ํ๊ทธ ์ถ๊ฐ
|
337 |
|
|
|
|
|
|
|
|
|
338 |
|
339 |
|
340 |
// a ํ๊ทธ onclick ์ ์ฉ
|
341 |
-
execution_function =
|
342 |
-
const goTicker = document.querySelector('.goticker');
|
|
|
343 |
goTicker.setAttribute('href', execution_function);
|
344 |
|
345 |
|
346 |
// a ํ๊ทธ์ URL ์ ์ฉ
|
347 |
-
const addURL = document.querySelector('.
|
348 |
addURL.setAttribute('href', url);
|
349 |
|
350 |
|
351 |
// ๋ชจ๋ธ์์ ์ง๋ฌธ ์์ Ticker์ ์๋ง๊ฒ ์์ฑํ๊ธฐ
|
352 |
-
const
|
353 |
example = "Why did " + ticker + "'s stock go down?";
|
354 |
-
|
355 |
|
356 |
|
357 |
//////////////////////////////////////////////////////////////////////
|
358 |
// NER ๊ด๋ จ
|
359 |
|
360 |
-
ents = sendAjax_sync('/ner', {'ticker': ticker, 'date': date, 'title': title}, dataType="json", handle=handle_one_return);
|
361 |
// ents = {'text': [], 'start_char': [], 'end_char': [], 'label_': [], 'news': []}
|
362 |
console.log(ents);
|
363 |
|
|
|
137 |
|
138 |
// Javascript -> Flask (Python) -> Javascript
|
139 |
let [chart_data, news_articles] = sendAjax_sync_about_chartData_and_newsArticles("/chart", {"ticker": ticker}, "json", handle_two_return);
|
|
|
|
|
|
|
140 |
|
141 |
|
142 |
// x์ถ๊ณผ data ์ค์
|
|
|
175 |
// Javascript๋ฅผ ์ด์ฉํด HTML์ ๋์ ์ผ๋ก ํ๊ทธ ์ถ๊ฐ
|
176 |
|
177 |
// a ํ๊ทธ onclick ์ ์ฉ
|
178 |
+
var execution_function = `javascript:chartInit('${ticker}')`;
|
179 |
+
const goTicker = document.querySelector('#chart-container .goticker');
|
180 |
goTicker.setAttribute('href', execution_function);
|
181 |
|
182 |
//////////////////////////////////////////////////////////////////
|
|
|
232 |
}
|
233 |
// console.log(key_list);
|
234 |
|
235 |
+
|
236 |
+
|
237 |
+
|
238 |
+
|
239 |
+
|
240 |
+
var link_list_idx = 0;
|
241 |
+
|
242 |
// List ์์ value๋ฅผ ๋ฝ์ ๋, (Python) => for item in list:
|
243 |
Object.keys(sorted_news).forEach(key => {
|
244 |
+
var date_idx_in_key_list = key_list.indexOf(String(key));
|
245 |
+
// console.log(key, key_list, date_idx_in_key_list);
|
246 |
|
247 |
+
if (date_idx_in_key_list != -1) { var diff = ((open_list[date_idx_in_key_list]-close_list[date_idx_in_key_list-1])/(open_list[date_idx_in_key_list]) * 100.0).toFixed(2); }
|
248 |
else { var diff = '.'; }
|
249 |
|
250 |
if (diff == '.') {
|
251 |
+
var diff_html = '<th class="news diff">0.0 %</th>';
|
252 |
}
|
253 |
else if (diff > 0) {
|
254 |
var diff_html = '<th class="news diff up">+' + diff + ' %</th>';
|
|
|
256 |
else {
|
257 |
var diff_html = '<th class="news diff down">' + diff + ' %</th>';
|
258 |
}
|
259 |
+
var html = `<tr align="center" bgcolor="white"><th>+</th><th>${key}</th>${diff_html}<td style="text-align: left;">`;
|
260 |
|
261 |
for (var i = 0; i < sorted_news[key].length; i++) {
|
262 |
var title = sorted_news[key][i].substring(0, sorted_news[key][i].length-4);
|
263 |
var sendTitle = title; // Javascript -> Python ๋ณด๋ด๊ธฐ ์ํ title
|
|
|
264 |
|
265 |
|
266 |
// title์์ & ํ์๊ฐ ์์ ์ ์์.
|
|
|
278 |
// console.log(sendTitle);
|
279 |
andSymbolInTitle.push(idx + andSymbolInTitle.length);
|
280 |
}
|
|
|
|
|
|
|
281 |
|
282 |
+
|
283 |
+
var link = String(`/info_and_newsNER?ticker=${ticker}&date=${key}&title=${sendTitle}&andSymbolInTitle=${andSymbolInTitle}`);
|
284 |
// console.log(link);
|
285 |
+
linkList.push(link);
|
286 |
+
|
287 |
+
var execution_function = String(`javascript:getData(linkList[${link_list_idx}]);`);
|
288 |
// console.log("execution_function : ", execution_function);
|
289 |
+
html = html + '<a href="' + execution_function + '">' + title + '</a><br>';
|
290 |
+
link_list_idx = link_list_idx + 1;
|
291 |
}
|
292 |
html = html + '</td>';
|
|
|
293 |
news_table.innerHTML = news_table.innerHTML + html;
|
294 |
});
|
295 |
}
|
296 |
|
297 |
|
298 |
|
299 |
+
linkList = [];
|
300 |
+
async function getData(link) {
|
301 |
+
try {
|
302 |
+
console.log("link : ", link);
|
303 |
|
304 |
+
await $.getJSON(link, function(data)
|
305 |
+
{
|
306 |
+
console.log("ticker : ", data.ticker);
|
307 |
+
console.log("date : ", data.date);
|
308 |
+
console.log("title : ", data.title);
|
309 |
+
console.log("url : ", data.url);
|
310 |
+
console.log("ents : ", data.ents);
|
311 |
+
|
312 |
+
newsInit(data.ticker, data.date, data.title, data.url, data.ents);
|
313 |
+
});
|
314 |
+
} catch (error) {
|
315 |
+
console.log("Error : ", error);
|
316 |
+
}
|
317 |
+
}
|
318 |
|
319 |
|
320 |
|
|
|
332 |
*
|
333 |
*
|
334 |
*/
|
335 |
+
function newsInit(ticker, date, title, url, ents) {
|
336 |
+
console.log("newsInit start !!!");
|
337 |
// HTML ์์
|
338 |
$("#nasdaq-table-container").hide();
|
339 |
$("#chart-container").hide();
|
340 |
$("#news-container").show();
|
341 |
|
342 |
+
console.log(ticker);
|
343 |
+
console.log(date);
|
344 |
+
console.log(title);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
|
346 |
|
347 |
|
|
|
349 |
|
350 |
// Javascript๋ฅผ ์ด์ฉํด HTML์ ๋์ ์ผ๋ก ํ๊ทธ ์ถ๊ฐ
|
351 |
|
352 |
+
document.querySelector('#news-container .goticker .tickerName').textContent = "Ticker : " + ticker;
|
353 |
+
document.querySelector('#news-container .titleDate').textContent = "Date : " + date;
|
354 |
+
document.querySelector('#news-container .titleName').textContent = "Article : " + title;
|
355 |
+
document.querySelector('#news-container .newsURL .input-News-URL').textContent = "URL : " + url;
|
356 |
|
357 |
|
358 |
// a ํ๊ทธ onclick ์ ์ฉ
|
359 |
+
var execution_function = `javascript:chartInit('${ticker}')`;
|
360 |
+
const goTicker = document.querySelector('#news-container .goticker');
|
361 |
+
console.log(goTicker);
|
362 |
goTicker.setAttribute('href', execution_function);
|
363 |
|
364 |
|
365 |
// a ํ๊ทธ์ URL ์ ์ฉ
|
366 |
+
const addURL = document.querySelector('.newsURL .input-News-URL');
|
367 |
addURL.setAttribute('href', url);
|
368 |
|
369 |
|
370 |
// ๋ชจ๋ธ์์ ์ง๋ฌธ ์์ Ticker์ ์๋ง๊ฒ ์์ฑํ๊ธฐ
|
371 |
+
const model_input_example = document.querySelector('#model .text-form #text-input');
|
372 |
example = "Why did " + ticker + "'s stock go down?";
|
373 |
+
model_input_example.setAttribute('value', example);
|
374 |
|
375 |
|
376 |
//////////////////////////////////////////////////////////////////////
|
377 |
// NER ๊ด๋ จ
|
378 |
|
379 |
+
// ents = sendAjax_sync('/ner', {'ticker': ticker, 'date': date, 'title': title}, dataType="json", handle=handle_one_return);
|
380 |
// ents = {'text': [], 'start_char': [], 'end_char': [], 'label_': [], 'news': []}
|
381 |
console.log(ents);
|
382 |
|
static/js/utils.js
CHANGED
@@ -42,11 +42,8 @@ function sendAjax(url, data, handle) {
|
|
42 |
*/
|
43 |
function sendAjax_sync(url, data, dataType, handle) {
|
44 |
/*
|
45 |
-
jQuery.ajax(url, [, settings])
|
46 |
-
|
47 |
jQuery.getJSON => Asynchronous (๋น๋๊ธฐ์)
|
48 |
-
|
49 |
-
Synchronous => ๋๊ธฐ์ : ์ฝ๋ ์์๋๋ก ์งํ
|
50 |
*/
|
51 |
var search_var;
|
52 |
$.ajax(url=url, settings={data: data, dataType: dataType, async: false,
|
|
|
42 |
*/
|
43 |
function sendAjax_sync(url, data, dataType, handle) {
|
44 |
/*
|
45 |
+
jQuery.ajax(url, [, settings]) => Synchronous ( ๋๊ธฐ์ : ์ฝ๋ ์์๋๋ก ์งํ )
|
|
|
46 |
jQuery.getJSON => Asynchronous (๋น๋๊ธฐ์)
|
|
|
|
|
47 |
*/
|
48 |
var search_var;
|
49 |
$.ajax(url=url, settings={data: data, dataType: dataType, async: false,
|
templates/index.html
CHANGED
@@ -138,10 +138,10 @@
|
|
138 |
<!-- block = show, none = hide -->
|
139 |
<div id="news-container" style="display: block">
|
140 |
<h1><a class="gohome" style="text-decoration: none;" href="/">Stock News Summaries AI</a></h1>
|
141 |
-
<a class="goticker" style="text-decoration: none;"><h2 class="tickerName"
|
142 |
-
<h3 class="titleDate"
|
143 |
-
<h3 class="titleName"
|
144 |
-
<h3 class="
|
145 |
|
146 |
<!-- named entity recognition (NER) -->
|
147 |
<figure style="margin-bottom: 6rem">
|
|
|
138 |
<!-- block = show, none = hide -->
|
139 |
<div id="news-container" style="display: block">
|
140 |
<h1><a class="gohome" style="text-decoration: none;" href="/">Stock News Summaries AI</a></h1>
|
141 |
+
<a class="goticker" style="text-decoration: none;"><h2 class="tickerName"></h2></a>
|
142 |
+
<h3 class="titleDate"></h2>
|
143 |
+
<h3 class="titleName"></h2>
|
144 |
+
<h3 class="newsURL"><a class="input-News-URL" target=โ_blankโ></a></h2>
|
145 |
|
146 |
<!-- named entity recognition (NER) -->
|
147 |
<figure style="margin-bottom: 6rem">
|