Toggle navigation
Toggle navigation
This project
Loading...
Sign in
양윤지
/
Open_Source_Project
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
양윤지
2019-11-28 23:03:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e8fc4306748b0f300f6e654d0e632703e18f1337
e8fc4306
1 parent
e95be54d
Fix Css and index.js file
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
38 deletions
RUTROLL/public/css/style.css
RUTROLL/router/Test.js
RUTROLL/views/index.ejs
RUTROLL/public/css/style.css
View file @
e8fc430
...
...
@@ -57,3 +57,16 @@ body{
.fontsizeup
{
font-size
:
15px
;
}
table
.basic
{
margin
:
0
;
padding
:
0
;
line-height
:
21px
;
border-collapse
:
collapse
;
}
table
.basic
td
{
margin
:
0
;
padding
:
3px
;
width
:
200px
;
text-align
:
center
;
border-right
:
1px
solid
black
;
border-bottom
:
1px
solid
black
;
}
...
...
RUTROLL/router/Test.js
View file @
e8fc430
...
...
@@ -10,7 +10,7 @@ var id; //소환사ID
var
accountId
;
//계정Id
var
name
;
//소환사 이름
var
summonerLevel
;
//소환사
var
l
otation_champ
=
new
Array
();
var
r
otation_champ
=
new
Array
();
app
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
render
(
'main'
,
{
title
:
'R U TROLL?'
});
...
...
@@ -46,9 +46,9 @@ var lotation_champ = new Array();
var
champ_point
=
new
Array
();
var
champ_id
=
new
Array
();
var
champ_name
=
new
Array
();
var
l
otation_name
=
new
Array
();
var
r
otation_name
=
new
Array
();
var
champ_pic
=
new
Array
();
var
l
otation_pic
=
new
Array
();
var
r
otation_pic
=
new
Array
();
var
champions_length
=
Object
.
keys
(
info_champ_json
).
length
;
//console.log("\n\ninfo_champ_json\n\n", info_champ_json);
...
...
@@ -67,15 +67,15 @@ var lotation_champ = new Array();
champ_id
[
i
]
=
info_champ_json
[
i
][
"championId"
];
}
var
l
otationUrl
=
"https://kr.api.riotgames.com/lol/platform/v3/champion-rotations?api_key="
+
apikey
;
request
(
l
otationUrl
,
function
(
error
,
response
,
body
){
var
info_
l
otation
=
JSON
.
parse
(
body
);
var
keys
=
Object
.
keys
(
info_
l
otation
);
for
(
var
k
=
0
;
k
<
info_
l
otation
[
keys
[
0
]].
length
;
k
++
)
var
r
otationUrl
=
"https://kr.api.riotgames.com/lol/platform/v3/champion-rotations?api_key="
+
apikey
;
request
(
r
otationUrl
,
function
(
error
,
response
,
body
){
var
info_
r
otation
=
JSON
.
parse
(
body
);
var
keys
=
Object
.
keys
(
info_
r
otation
);
for
(
var
k
=
0
;
k
<
info_
r
otation
[
keys
[
0
]].
length
;
k
++
)
{
lotation_champ
[
k
]
=
info_l
otation
[
keys
[
0
]][
k
]
console
.
log
(
"
lotation_champ:"
+
l
otation_champ
[
k
]);
console
.
log
(
"로테길이:"
+
l
otation_champ
.
length
);
rotation_champ
[
k
]
=
info_r
otation
[
keys
[
0
]][
k
]
console
.
log
(
"
rotation_champ:"
+
r
otation_champ
[
k
]);
console
.
log
(
"로테길이:"
+
r
otation_champ
.
length
);
}
...
...
@@ -100,9 +100,9 @@ var lotation_champ = new Array();
for
(
var
i
=
0
;
i
<
champ_id
.
length
;
i
++
){
for
(
js
in
champion
){
for
(
j
in
champion
[
js
]){
if
(
champion
[
js
][
"key"
]
==
l
otation_champ
[
i
]){
l
otation_name
[
i
]
=
champion
[
js
][
"id"
];
lotation_pic
[
i
]
=
"http://ddragon.leagueoflegends.com/cdn/9.23.1/img/champion/"
+
l
otation_name
[
i
]
+
".png"
;
if
(
champion
[
js
][
"key"
]
==
r
otation_champ
[
i
]){
r
otation_name
[
i
]
=
champion
[
js
][
"id"
];
rotation_pic
[
i
]
=
"http://ddragon.leagueoflegends.com/cdn/9.23.1/img/champion/"
+
r
otation_name
[
i
]
+
".png"
;
}
}
...
...
@@ -202,7 +202,7 @@ var lotation_champ = new Array();
c_name
:
champ_name
,
c_point
:
champ_point
,
c_pic
:
champ_pic
,
c_
lotation
:
l
otation_pic
,
c_
rotation
:
r
otation_pic
,
c_summoner
:
summoner
,
c_wins
:
wins
,
c_losses
:
losses
,
...
...
RUTROLL/views/index.ejs
View file @
e8fc430
...
...
@@ -21,34 +21,40 @@
</script>
</head>
<body>
<div
class=
"imgOpacity"
>
<div
class=
"center"
>
<img
src=
"FindMelogo.png"
width =
300,
height =
300/
>
</div>
<div
class=
"center"
>
<input
type=
"text"
class=
"input_text"
placeholder=
"소환사 이름"
>
<div
class=
"imgOpacity"
>
<div
class=
"center"
>
<img
src=
"/FindMelogo.png"
width =
150,
height =
150/
>
</div>
<div
class=
"center2"
>
<input
type=
"text"
class=
"input_text"
placeholder=
"소환사 이름"
>
<span
class=
"input-group-btn"
>
<button
id=
"searchButton"
class=
"btn btn-primary"
type=
"button"
onclick=
"search(name)"
>
click!
</button>
</span>
</div>
<button
id=
"searchButton"
class=
"btn btn-primary"
type=
"button"
onclick=
"search(name)"
>
click!
</button>
</span>
</div>
</div>
<br></br>
<font
size=
10em
>
<strong>
<
%= c_summoner + "\n"%>
</strong>
</font>
<div
class=
"center"
>
<img
src=
<%=c_imgtier%
>
width=120, height=120>
<span
class=
"center"
>
<
%= "Tier : " + c_tier + " " + c_rank + " / " + c_leaguePoint + "점"%>
</span>
<br
class=
"center"
>
<
%= "Win : " + c_wins + " / Lose : " + c_losses%>
</br>
</div>
<div
class=
"center"
>
<
%= "승률 : " + ((c_wins/(c_wins+c_losses))*100).toFixed(2) + "%" %>
</div>
<table
class=
"basic"
>
<tbody>
<tr><td>
<
%= "Tier : " + c_tier + " " + c_rank + " / " + c_leaguePoint + "점"%>
</td></tr>
<tr><td>
<
%= "Win : " + c_wins + " / Lose : " + c_losses%>
</td></tr>
<tr><td>
<
%= "승률 : " + ((c_wins/(c_wins+c_losses))*100).toFixed(2) + "%" %>
</td></tr>
<tr><td>
<
%= "캐리력 : " + (c_wins/c_losses*2).toFixed(2) %>
</td></tr>
</tbody>
</table>
<br></br>
<div
class=
"center"
>
<strong>
...
...
@@ -60,10 +66,13 @@
<strong>
<
%= "로테이션 챔피언: " %>
</strong>
<
% for (var i=0; i
<c
_
l
otation
.
length-1
;
i
++){
%
>
<img
src=
<%=c_
l
otation[i]%
>
width=50, height=50>
<
% for (var i=0; i
<c
_
r
otation
.
length-1
;
i
++){
%
>
<img
src=
<%=c_
r
otation[i]%
>
width=50, height=50>
<
% } %>
</div>
<br></br>
<
% for (var i=0; i
<c
_id
.
length-1
;
i
++){
%
>
<div
class=
"champImage"
>
<div
class=
"center"
>
...
...
Please
register
or
login
to post a comment