Toggle navigation
Toggle navigation
This project
Loading...
Sign in
고원빈
/
weather
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
GyuhoLee
2019-12-11 22:54:16 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4422a2d94fdbdf9d3da7d247757fbfd67ae256e7
4422a2d9
1 parent
f7863cc0
[Update] Nodejs, Jquery connect
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
10 deletions
image/circle.png
index.html
js/app.js
result.html
style.css
test.js
image/circle.png
0 → 100644
View file @
4422a2d
5.14 KB
index.html
View file @
4422a2d
...
...
@@ -7,7 +7,7 @@
<link
rel=
"stylesheet"
href=
"/style.css"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity=
"sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin=
"anonymous"
>
<link
href=
"https://fonts.googleapis.com/css?family=
Jua&display=swap"
rel=
"stylesheet"
>
<link
href=
"https://fonts.googleapis.com/css?family=
Noto+Sans+KR&display=swap"
rel=
"stylesheet"
>
</head>
<body>
...
...
@@ -21,17 +21,16 @@
</div>
<div
class =
"sub"
>
<input
type=
"text"
id=
"location_input"
value=
"영통1동"
autofocus=
"true"
>
<button
id=
"location_button"
>
입력
</button>
<button
id=
"location_button"
onclick=
"button_click()"
>
입력
</button>
</div>
<script
src=
"https://code.jquery.com/jquery-3.3.1.min.js"
integrity=
"sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity=
"sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin=
"anonymous"
></script>
<script
src=
"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity=
"sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin=
"anonymous"
></script>
<script
src=
"https://code.jquery.com/jquery-3.3.1.min.js"
integrity=
"sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
crossorigin=
"anonymous"
></script>
<script
src =
"/js/app.js"
></script>
</body>
</html>
\ No newline at end of file
...
...
js/app.js
0 → 100644
View file @
4422a2d
const
locationData
=
function
button_click
(){
var
dTemp
=
$
(
'#location_input'
).
val
();
location
.
href
=
"/result.html"
;
return
dTemp
;
}
exports
.
locationData
=
locationData
;
\ No newline at end of file
result.html
0 → 100644
View file @
4422a2d
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
OSSW
</title>
<link
rel=
"stylesheet"
href=
"/style.css"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity=
"sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin=
"anonymous"
>
<link
href=
"https://fonts.googleapis.com/css?family=Noto+Sans+KR&display=swap"
rel=
"stylesheet"
>
</head>
<body>
<nav
class=
"navbar navbar-light bg-light"
style=
"border-bottom: 1px solid lightgray;"
>
<a
class=
"navbar-brand"
href=
"#"
style=
"margin-left: 15px;"
>
<img
src=
"/image/logo.png"
style=
"height:250px;"
/>
</a>
</nav>
<div
class =
"main"
>
<span
class=
"result_icon"
>
<div>
최저
</div>
<div
class=
"low temper"
>
3ºC
</div>
</span>
<span
class =
"result_icon"
>
<div>
평균
</div>
<div
class=
"middle temper"
>
5ºC
</div>
</span>
<span
class =
"result_icon"
>
<div>
최고
</div>
<div
class=
"high temper"
>
7ºC
</div>
</span>
</div>
<div
class =
"sub"
>
</div>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity=
"sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin=
"anonymous"
></script>
<script
src=
"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity=
"sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin=
"anonymous"
></script>
<script
src=
"https://code.jquery.com/jquery-3.3.1.min.js"
integrity=
"sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
crossorigin=
"anonymous"
></script>
<script
src =
"/js/app.js"
></script>
</body>
</html>
\ No newline at end of file
style.css
View file @
4422a2d
body
{
font-family
:
'Noto Sans KR'
,
sans-serif
;
}
.main
,
.sub
{
margin-top
:
200px
;
text-align
:
center
;
background
:
color
=
gray
;
}
.icon
{
...
...
@@ -16,4 +19,21 @@
#location_button
{
font-size
:
50px
;
}
\ No newline at end of file
}
.result_icon
{
font-family
:
'Noto Sans KR'
,
sans-serif
;
margin-left
:
30px
;
margin-right
:
30px
;
display
:
inline-block
;
width
:
225px
;
height
:
225px
;
background-image
:
url("/image/circle.png")
;
padding-top
:
50px
;
font-size
:
35px
;
}
.temper
{
font-size
:
55px
;
}
...
...
test.js
View file @
4422a2d
...
...
@@ -16,6 +16,9 @@ var app = http.createServer(function(request,response){
});
app
.
listen
(
8080
);
const
{
PythonShell
}
=
require
(
'python-shell'
);
var
options
=
{
...
...
@@ -26,12 +29,14 @@ var options = {
args
:
[
"영통1동"
]
};
const
appdata
=
require
(
'./js/app.js'
);
var
arr
;
var
test
=
new
PythonShell
(
'recommend_clothes.py'
,
options
);
var
data
=
'영통1동'
;
var
data
=
appdata
.
locationData
()
;
test
.
send
(
data
);
test
.
on
(
'message'
,
function
(
message
){
arr
=
message
.
split
(
'\n'
);
console
.
log
(
arr
);
})
})
\ No newline at end of file
...
...
Please
register
or
login
to post a comment