김진우

조회순, 별점순 고르기

...@@ -8,6 +8,7 @@ var mysql = require('mysql'); ...@@ -8,6 +8,7 @@ var mysql = require('mysql');
8 var cheerio = require('cheerio'); 8 var cheerio = require('cheerio');
9 var request = require('request'); 9 var request = require('request');
10 var index = require('./routes/index'); 10 var index = require('./routes/index');
11 +var index2 = require('./routes/index2');
11 var login = require('./routes/login'); 12 var login = require('./routes/login');
12 var users = require('./routes/users'); 13 var users = require('./routes/users');
13 var mytoons = require('./routes/mytoons'); 14 var mytoons = require('./routes/mytoons');
...@@ -58,6 +59,8 @@ app.use(session({ ...@@ -58,6 +59,8 @@ app.use(session({
58 app.use(passport.initialize()); 59 app.use(passport.initialize());
59 app.use(passport.session()); 60 app.use(passport.session());
60 app.use('/', index); 61 app.use('/', index);
62 +app.use('/ViewScore', index);
63 +app.use('/StarScore',index2);
61 app.use('/login', login); 64 app.use('/login', login);
62 app.use('/users', users); 65 app.use('/users', users);
63 app.use('/mytoons', mytoons); 66 app.use('/mytoons', mytoons);
......
...@@ -305,7 +305,7 @@ function getAllToons() { ...@@ -305,7 +305,7 @@ function getAllToons() {
305 }); 305 });
306 306
307 //네이버 웹툰 307 //네이버 웹툰
308 - var allWeeklyToonsUrl = "http://comic.naver.com/webtoon/weekday.nhn?order=StarScore"; 308 + var allWeeklyToonsUrl = "https://comic.naver.com/webtoon/weekday.nhn";
309 request(allWeeklyToonsUrl,function (err, res, html) { 309 request(allWeeklyToonsUrl,function (err, res, html) {
310 if(!err){ 310 if(!err){
311 var $ = cheerio.load(html); 311 var $ = cheerio.load(html);
......
This diff is collapsed. Click to expand it.
...@@ -17,20 +17,6 @@ ...@@ -17,20 +17,6 @@
17 <link href="https://fonts.googleapis.com/css?family=Dancing+Script:400,700" rel="stylesheet"> 17 <link href="https://fonts.googleapis.com/css?family=Dancing+Script:400,700" rel="stylesheet">
18 <link href="https://fonts.googleapis.com/css?family=Gugi&amp;subset=korean" rel="stylesheet"> 18 <link href="https://fonts.googleapis.com/css?family=Gugi&amp;subset=korean" rel="stylesheet">
19 <script src="http://developers.kakao.com/sdk/js/kakao.min.js"> 19 <script src="http://developers.kakao.com/sdk/js/kakao.min.js">
20 - function daum_click()
21 - {
22 - if(Daum_webtoons.display == "none")
23 - Daum_webtoons.display == "block";
24 - if(Daum_webtoons.display = "block")
25 - Daum_webtoons.display == "none";
26 - }
27 - function naver_click()
28 - {
29 - if(Naver_webtoons.display == "none")
30 - Naver_webtoons.display == "block";
31 - if(Naver_webtoons.display = "block")
32 - Naver_webtoons.display == "none";
33 - }
34 </script> 20 </script>
35 </head> 21 </head>
36 <body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top"> 22 <body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
...@@ -84,7 +70,7 @@ ...@@ -84,7 +70,7 @@
84 <!--수정해주세욤!--> 70 <!--수정해주세욤!-->
85 <p>마더 프로젝트 니툰내툰(YTMT)를 개선하는 프로젝트입니다. 네이버 웹툰 뿐만 아니라 다음 웹툰도 담을 수 있으며, 타인이 담은 웹툰도 확인할 수 있습니다.</p> 71 <p>마더 프로젝트 니툰내툰(YTMT)를 개선하는 프로젝트입니다. 네이버 웹툰 뿐만 아니라 다음 웹툰도 담을 수 있으며, 타인이 담은 웹툰도 확인할 수 있습니다.</p>
86 <h3>Programmers</h3> 72 <h3>Programmers</h3>
87 - <p>2018102184 김진우</p> 73 + <p>2017110276 이혜리 | 2018102184 김진우 | 2018102228 정대욱</p>
88 </div> 74 </div>
89 </div> 75 </div>
90 </div> 76 </div>
...@@ -154,8 +140,8 @@ ...@@ -154,8 +140,8 @@
154 </div> 140 </div>
155 <!--<br>--> 141 <!--<br>-->
156 142
157 - <font size = 30> 143 + <font size = 10>
158 - 네이버 웹툰 144 + &nbsp;&nbsp;네이버 웹툰
159 </font> 145 </font>
160 <a onclick="Naver_webtoons.style.display=(Naver_webtoons.style.display=='none') ?'block':'none';" href="javascript:void(0)"> 146 <a onclick="Naver_webtoons.style.display=(Naver_webtoons.style.display=='none') ?'block':'none';" href="javascript:void(0)">
161 <img src ='/images/navericon.png' width="83" height="90"/> 147 <img src ='/images/navericon.png' width="83" height="90"/>
...@@ -187,14 +173,13 @@ ...@@ -187,14 +173,13 @@
187 </table> 173 </table>
188 </div> 174 </div>
189 175
190 - 176 + <br>
191 - <a onclick="Naver_webtoons.style.display=(Naver_webtoons.style.display=='none') "> 177 + <a href="/ViewScore">
192 - <button>별점순</button>
193 - </a>
194 -
195 - <a onclick="Naver_webtoons.style.display=(Naver_webtoons.style.display=='none') ">
196 <button>조회순</button> 178 <button>조회순</button>
197 </a> 179 </a>
180 + <a href="/StarScore">
181 + <button>별점순</button>
182 + </a>
198 183
199 184
200 <table> 185 <table>
...@@ -205,7 +190,6 @@ ...@@ -205,7 +190,6 @@
205 if(current!=list[webtoon].week && list[webtoon].site == 'naver'){ 190 if(current!=list[webtoon].week && list[webtoon].site == 'naver'){
206 if(current!=""){ 191 if(current!=""){
207 %> 192 %>
208 - </tr>
209 <% } %> 193 <% } %>
210 <tr> 194 <tr>
211 <th><%= list[webtoon].week %></th> 195 <th><%= list[webtoon].week %></th>
...@@ -218,7 +202,9 @@ ...@@ -218,7 +202,9 @@
218 <a href="<%= list[webtoon].webtoon_link %>"> 202 <a href="<%= list[webtoon].webtoon_link %>">
219 <img alt="img" width="83" height="90" src="<%= list[webtoon].thum_link %>"/> 203 <img alt="img" width="83" height="90" src="<%= list[webtoon].thum_link %>"/>
220 </a> 204 </a>
205 + <a style="color: black">
221 <%= list[webtoon].name %> 206 <%= list[webtoon].name %>
207 + </a>
222 </td> 208 </td>
223 <% 209 <%
224 } 210 }
...@@ -233,8 +219,8 @@ ...@@ -233,8 +219,8 @@
233 } 219 }
234 } 220 }
235 %> 221 %>
236 -
237 </tr> 222 </tr>
223 +
238 </table> 224 </table>
239 </br> 225 </br>
240 226
......
1 +<!DOCTYPE html>
2 +<html>
3 + <head>
4 + <title><%= title %></title>
5 + <link rel='stylesheet' href='/stylesheets/style.css' />
6 + <<!-- Bootstrap -->
7 + <link rel="stylesheet" type="text/css" href="/stylesheets/bootstrap.css">
8 + <link rel="stylesheet" type="text/css" href="/stylesheets/font-awesome.css">
9 +
10 + <!-- Stylesheet
11 + ================================================== -->
12 + <link rel="stylesheet" type="text/css" href="/stylesheets/style.css">
13 + <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/nivo-lightbox.css">
14 + <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/default.css">
15 + <link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700" rel="stylesheet">
16 + <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
17 + <link href="https://fonts.googleapis.com/css?family=Dancing+Script:400,700" rel="stylesheet">
18 + <link href="https://fonts.googleapis.com/css?family=Gugi&amp;subset=korean" rel="stylesheet">
19 + <script src="http://developers.kakao.com/sdk/js/kakao.min.js">
20 + </script>
21 + </head>
22 + <body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
23 + <!-- Navigation
24 + ==========================================-->
25 + <nav id="menu" class="navbar navbar-default navbar-fixed-top">
26 + <div class="container">
27 + <!-- Brand and toggle get grouped for better mobile display -->
28 + <div class="navbar-header">
29 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
30 + <a class="navbar-brand page-scroll" href="#page-top" style="font-family:Gugi">니툰내툰</a> </div>
31 + <!-- Collect the nav links, forms, and other content for toggling -->
32 + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
33 + <ul class="nav navbar-nav navbar-right">
34 + <li><a href="#about" class="page-scroll">about</a></li>
35 + <li><a href="#portfolio" class="page-scroll">Webtoos</a></li>
36 + <li><a href="/login" class="page-scroll">Login</a></li>
37 + </ul>
38 + </div>
39 + <!-- /.navbar-collapse -->
40 + </div>
41 + </nav>
42 + <!-- Header -->
43 + <header id="header">
44 + <div class="intro">
45 + <div class="overlay">
46 + <div class="container">
47 + <div class="row">
48 + <div class="intro-text">
49 +
50 + <h1 style="font-family:Gugi">니툰내툰</h1>
51 + <p>NAVER / DAUM / WEBTOONS</p>
52 + <a href="#about" class="btn btn-custom btn-lg page-scroll">All the Webtoons</a> </div>
53 + </div>
54 + </div>
55 + </div>
56 + </div>
57 + </header>
58 +
59 + <!-- About Section -->
60 + <div id="about">
61 + <div class="container">
62 + <div class="row">
63 + <div class="col-xs-12 col-md-6 ">
64 + <div class="about-img"><img src="images/toon.png" class="img-responsive" alt=""></div>
65 + </div>
66 + <div class="col-xs-12 col-md-6">
67 + <div class="about-text">
68 + <h2>Our Term-Project</h2>
69 + <hr>
70 + <!--수정해주세욤!-->
71 + <p>마더 프로젝트 니툰내툰(YTMT)를 개선하는 프로젝트입니다. 네이버 웹툰 뿐만 아니라 다음 웹툰도 담을 수 있으며, 타인이 담은 웹툰도 확인할 수 있습니다.</p>
72 + <h3>Programmers</h3>
73 + <p>2017110276 이혜리 | 2018102184 김진우 | 2018102228 정대욱</p>
74 + </div>
75 + </div>
76 + </div>
77 + </div>
78 + </div>
79 + <!-- Portfolio Section -->
80 + <div id="portfolio">
81 + <div class="section-title text-center center">
82 + <div class="overlay">
83 + <h2>Gallery</h2>
84 + <hr>
85 + <p>니툰내툰에서 제공하는 웹툰 리스트입니다</p>
86 + </div>
87 + </div>
88 + <div class="container">
89 + <div class="row">
90 + <div class="categories">
91 + <ul class="cat">
92 +
93 + <font size = 30>
94 + 다음 웹툰
95 + </font>
96 +
97 + <a onclick="Daum_webtoons.style.display=(Daum_webtoons.style.display=='none')?'block':'none';" href="javascript:void(0)">
98 + <img src ='/images/daumicon.png' width="83" height="90" onclick="daum_click" />
99 + </a>
100 + <div style="display:none" id="Daum_webtoons">
101 + <table>
102 + <%
103 + var current = "";
104 + for(webtoon in list){
105 +
106 + if(current!=list[webtoon].week && list[webtoon].site == 'daum'){
107 + if(current!=""){
108 + %>
109 + </tr>
110 + <% } %>
111 + <tr>
112 + <th><%= list[webtoon].week %></th>
113 + <% } %>
114 + <%
115 + if(list[webtoon].site == 'daum')
116 + {
117 + %>
118 + <td>
119 + <a href="<%= list[webtoon].webtoon_link %>">
120 + <img alt="img" width="83" height="90" src="<%= list[webtoon].thum_link %>"/>
121 + </a>
122 + <%= list[webtoon].name %>
123 + </td>
124 + <%
125 + }
126 + %>
127 +
128 + <%
129 + if(current!=list[webtoon].week) {
130 + current = list[webtoon].week;
131 + %>
132 +
133 + <%
134 + }
135 + }
136 + %>
137 + </tr>
138 + </table>
139 + <!--</br>-->
140 + </div>
141 + <!--<br>-->
142 +
143 + <font size = 10>
144 + &nbsp;&nbsp;네이버 웹툰
145 + </font>
146 + <a onclick="Naver_webtoons.style.display=(Naver_webtoons.style.display=='none') ?'block':'none';" href="javascript:void(0)">
147 + <img src ='/images/navericon.png' width="83" height="90"/>
148 + </a>
149 +
150 + <div id="Naver_webtoons" style = "display:none">
151 + </br>
152 + <div class="Pupular" style= "border: 1px solid; padding: 12px; width:650px; height:330px; margin:auto;">
153 + <table>
154 + <p>20대 실시간 인기순위</p>
155 + <tr>
156 + <th align = "center"> 여자</th>
157 + </tr>
158 + <tr>
159 + <% let i = 1;
160 + for(toon in pplWList) {
161 + %>
162 +
163 + <th><%= i%></th>
164 + <th>
165 + <a href="<%= pplWList[toon].webtoon_link %>">
166 + <img alt="img" width="43" height="50" src="<%= pplWList[toon].thumb_link %>" />
167 + </a>
168 + <%= pplWList[toon].title %>
169 + </th>
170 + </tr>
171 + <% i += 1; %>
172 + <% } %>
173 + </table>
174 + </div>
175 +
176 + <br>
177 + <a href="/ViewScore">
178 + <button>조회순</button>
179 + </a>
180 + <a href="/StarScore">
181 + <button>별점순</button>
182 + </a>
183 +
184 +
185 + <table>
186 + <%
187 + var current = "";
188 + for(webtoon in list){
189 +
190 + if(current!=list[webtoon].week && list[webtoon].site == 'naver'){
191 + if(current!=""){
192 + %>
193 + <% } %>
194 + <tr>
195 + <th><%= list[webtoon].week %></th>
196 + <% } %>
197 + <%
198 + if(list[webtoon].site == 'naver')
199 + {
200 + %>
201 + <td>
202 + <a href="<%= list[webtoon].webtoon_link %>">
203 + <img alt="img" width="83" height="90" src="<%= list[webtoon].thum_link %>"/>
204 + </a>
205 + <a style="color: black">
206 + <%= list[webtoon].name %>
207 + </a>
208 + </td>
209 + <%
210 + }
211 + %>
212 +
213 + <%
214 + if(current!=list[webtoon].week) {
215 + current = list[webtoon].week;
216 + %>
217 +
218 + <%
219 + }
220 + }
221 + %>
222 + </tr>
223 +
224 + </table>
225 + </br>
226 +
227 + </div>
228 + </body>
229 +
230 +</html>