Toggle navigation
Toggle navigation
This project
Loading...
Sign in
teamPARK
/
holiday-counter-recommend-activity
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박종현
2022-05-30 18:08:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
743ce872c263a10ece2dbfcccda872aa70b97419
743ce872
1 parent
583173a6
Fix D-0 comment
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
18 deletions
nodejs/public/css/main.css
nodejs/server.js
nodejs/views/data.ejs
nodejs/public/css/main.css
View file @
743ce87
...
...
@@ -9,6 +9,7 @@
.dday
{
padding
:
50px
0
;
}
.wrapper
{
margin
:
0
auto
;
padding
:
30px
;
...
...
nodejs/server.js
View file @
743ce87
...
...
@@ -40,8 +40,8 @@ function getTodayDate() {
var
month
=
(
"0"
+
(
today
.
getMonth
()
+
1
)).
slice
(
-
2
);
var
day
=
(
"0"
+
today
.
getDate
()).
slice
(
-
2
);
var
dateString
=
year
+
"-"
+
month
+
"-"
+
day
;
// return "2022-11-27
"; // 테스트용 날짜를 입력하세요. 테스트가 끝나면 주석처리 하세요. ex) 2022-09-12, 2022-09-15, 2022-10-04
return
dateString
;
return
"2022-06-06
"
;
// 테스트용 날짜를 입력하세요. 테스트가 끝나면 주석처리 하세요. ex) 2022-09-12, 2022-09-15, 2022-10-04
//
return dateString;
}
// To get modified date from locdate
...
...
@@ -92,7 +92,7 @@ function getData() {
var
xmlToJson
=
convert
.
xml2json
(
result
,
{
compact
:
true
,
spaces
:
4
});
fs
.
writeFileSync
(
"holi.xml"
,
result
);
// Create/Modify holi.xml
fs
.
writeFileSync
(
"holi.json"
,
xmlToJson
);
// Create/Modify holi.json
var
parser
=
new
xml2js
.
Parser
();
var
parser
=
new
xml2js
.
Parser
();
parser
.
parseString
(
result
,
function
(
err
,
res
)
{
text
=
JSON
.
stringify
(
res
);
// Get dataName method
...
...
nodejs/views/data.ejs
View file @
743ce87
...
...
@@ -32,7 +32,7 @@
<!--comment part-->
<div
id=
"comment"
>
<
% if (data[2]
<
< 7
)
{
%
>
<
% if (data[2]
<
< 7
)
{
%
>
<h2>
벌써
<
%= data[0] %>이(가)
<font
color=
"pink"
>
일주일
</font>
도 남지 않았습니다!
</h2>
<
% } else if (data[2]
<
< 10
)
{
%
>
...
...
@@ -40,9 +40,12 @@
<
% } else if (data[2]
<
< 31
)
{
%
>
<h2>
<
%= data[0] %>이(가)
<font
color=
"pink"
>
한 달
</font>
도 남지 않았습니다!
</h2>
<
% } else if (data[2] == 0) { %>
<h2>
오늘은 즐거운 공휴일!
</h2>
<
% } else { %>
<h2>
오늘부터 한 달 안에
는
공휴일이 없습니다..
</h2>
<h2>
오늘부터 한 달 안에 공휴일이 없습니다..
</h2>
<
% } %>
</div>
...
...
@@ -162,21 +165,10 @@
<div
class=
"frame"
>
<button
class=
"custom-btn btn-12"
onclick =
"location.href='http://buncheon.k7788.com/index.html?Midx=366&ct_pg=781'"
><span>
click!
</span><span>
분천역 산타마을
</span></button>
</div>
<
% } else { %>
<h2>
Just Take some rest!
</h2>
<
% } %>
<h2>
Just Take some rest!
</h2>
<
% } %>
</div>
</body>
</center>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment