Akhidjon

merging

1 +dd
...\ No newline at end of file ...\ No newline at end of file
1 +니툰내툰 URL : http://52.79.239.80:3000
2 +
3 +2013100924 이현종
4 +2018102151 Abdullaev Akhidjon
5 +
6 +1. 네이버, 구글 로그인을 추가하였습니다.
7 +
8 +2. 레진 코믹스 웹툰을 추가하였습니다.
9 +
10 +3. 코드의 생산성을 증가시켰습니다.
11 +(코드의 중복과 필요없는 부분을 삭제함, 주석을 달음)
...@@ -47,7 +47,6 @@ var mytoons = require('./routes/mytoons'); ...@@ -47,7 +47,6 @@ var mytoons = require('./routes/mytoons');
47 var yourtoons =require('./routes/yourtoons'); 47 var yourtoons =require('./routes/yourtoons');
48 var setting = require('./routes/setting'); 48 var setting = require('./routes/setting');
49 49
50 -
51 // 최초 로그인 성공시 (Strategy 성공시) 단 한번만 호출 50 // 최초 로그인 성공시 (Strategy 성공시) 단 한번만 호출
52 passport.serializeUser(function(user, done) { 51 passport.serializeUser(function(user, done) {
53 console.log('serialized'); 52 console.log('serialized');
......
...@@ -9,27 +9,27 @@ var NaverStrategy = require('passport-naver').Strategy; ...@@ -9,27 +9,27 @@ var NaverStrategy = require('passport-naver').Strategy;
9 var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy; 9 var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
10 var router = express.Router(); 10 var router = express.Router();
11 11
12 -// 설명 12 +// kakao login API
13 var kakaoKey = { 13 var kakaoKey = {
14 clientID : '5634a5f8ca5c9a5eb378d6b6e6e869a0', 14 clientID : '5634a5f8ca5c9a5eb378d6b6e6e869a0',
15 callbackURL : '/auth/login/kakao/callback' 15 callbackURL : '/auth/login/kakao/callback'
16 }; 16 };
17 17
18 -// 18 +// naver login API
19 var naverKey = { 19 var naverKey = {
20 clientID : 'OHmCrpQuVFnIEB4GkmF_', 20 clientID : 'OHmCrpQuVFnIEB4GkmF_',
21 callbackURL : '/auth/login/naver/callback', 21 callbackURL : '/auth/login/naver/callback',
22 clientSecret : 'BBgcRdnj0M' 22 clientSecret : 'BBgcRdnj0M'
23 }; 23 };
24 24
25 -// 25 +// google login API
26 var googleKey = { 26 var googleKey = {
27 clientID : '924802195853-ir977i2ohnddaaninlqlbeg6sov629hq.apps.googleusercontent.com', 27 clientID : '924802195853-ir977i2ohnddaaninlqlbeg6sov629hq.apps.googleusercontent.com',
28 callbackURL : '/auth/login/google/callback', 28 callbackURL : '/auth/login/google/callback',
29 clientSecret : 'NaWeoJouUzYq4VfBesTkdUfA' 29 clientSecret : 'NaWeoJouUzYq4VfBesTkdUfA'
30 }; 30 };
31 31
32 -// 32 +// kakao passport
33 passport.use(new KakaoStrategy(kakaoKey, 33 passport.use(new KakaoStrategy(kakaoKey,
34 function(accessToken, refreshToken,params, profile, done) { 34 function(accessToken, refreshToken,params, profile, done) {
35 console.log(profile); 35 console.log(profile);
...@@ -41,7 +41,7 @@ passport.use(new KakaoStrategy(kakaoKey, ...@@ -41,7 +41,7 @@ passport.use(new KakaoStrategy(kakaoKey,
41 } 41 }
42 )); 42 ));
43 43
44 -// 44 +// naver passport
45 passport.use(new NaverStrategy(naverKey, 45 passport.use(new NaverStrategy(naverKey,
46 function (accessToken, refreshToken, profile, done) { 46 function (accessToken, refreshToken, profile, done) {
47 console.log(profile); 47 console.log(profile);
...@@ -53,7 +53,7 @@ passport.use(new NaverStrategy(naverKey, ...@@ -53,7 +53,7 @@ passport.use(new NaverStrategy(naverKey,
53 } 53 }
54 )); 54 ));
55 55
56 -// 56 +// google passport
57 passport.use(new GoogleStrategy(googleKey, 57 passport.use(new GoogleStrategy(googleKey,
58 function (accessToken, refreshToken, profile, done) { 58 function (accessToken, refreshToken, profile, done) {
59 console.log(profile); 59 console.log(profile);
...@@ -73,10 +73,9 @@ router.get('/auth/login/kakao/callback', passport.authenticate('kakao', { ...@@ -73,10 +73,9 @@ router.get('/auth/login/kakao/callback', passport.authenticate('kakao', {
73 }) 73 })
74 ); 74 );
75 75
76 -// naver 로그인 76 +// naver 로그인, 로그인 콜백
77 router.get('/auth/login/naver', passport.authenticate('naver')); 77 router.get('/auth/login/naver', passport.authenticate('naver'));
78 -router.get('/auth/login/naver/callback', 78 +router.get('/auth/login/naver/callback', passport.authenticate('naver', {
79 - passport.authenticate('naver', {
80 successRedirect: '/mytoons', 79 successRedirect: '/mytoons',
81 failureRedirect: '/' 80 failureRedirect: '/'
82 }) 81 })
...@@ -90,7 +89,7 @@ router.get('/auth/login/google/callback', passport.authenticate('google', { ...@@ -90,7 +89,7 @@ router.get('/auth/login/google/callback', passport.authenticate('google', {
90 }) 89 })
91 ); 90 );
92 91
93 -// 설명 92 +// 로그인 처리
94 function loginByThirdparty(info, done) { 93 function loginByThirdparty(info, done) {
95 var stmt_duplicated = "select *from `user` where id = id"; 94 var stmt_duplicated = "select *from `user` where id = id";
96 //'select *from `user` where `id` = ? 95 //'select *from `user` where `id` = ?
...@@ -125,7 +124,7 @@ function loginByThirdparty(info, done) { ...@@ -125,7 +124,7 @@ function loginByThirdparty(info, done) {
125 }); 124 });
126 } 125 }
127 126
128 -router.get('/login', function(req,res){ 127 +router.get('/login', function(req,res) {
129 res.render('login_page') 128 res.render('login_page')
130 }) 129 })
131 130
...@@ -175,20 +174,27 @@ function gettop(){ ...@@ -175,20 +174,27 @@ function gettop(){
175 }; 174 };
176 175
177 176
178 -function getDaumToons(_day){ 177 +var daumCount = 0;
179 - // X요일 다음 웹툰 178 +
179 +//_day요일의 다음웹툰 불러오기
180 +function getDaumToons(_day) {
181 +
180 var day = _day; 182 var day = _day;
181 var day_name = day; 183 var day_name = day;
182 var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${day}?timeStamp=1515819276574`; 184 var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${day}?timeStamp=1515819276574`;
183 var site = 'daum'; 185 var site = 'daum';
184 186
185 - client.fetch(daum, {}, function (err, $, res, body) { 187 + client.fetch(daum, {}, function (err, $, res, body){
186 188
187 var data = JSON.parse(body); 189 var data = JSON.parse(body);
188 var list = data["data"]; 190 var list = data["data"];
189 191
192 + if(err) {
193 + console.log("다음웹툰 DB 에러 : " + err);
194 + } else {
190 list.forEach(function (item, idx) { 195 list.forEach(function (item, idx) {
191 196
197 +<<<<<<< HEAD
192 var webtoon_link = 'http://webtoon.daum.net/webtoon/view/' + item.nickname.toString(); 198 var webtoon_link = 'http://webtoon.daum.net/webtoon/view/' + item.nickname.toString();
193 var webtoon = { 199 var webtoon = {
194 toon_index : item.id, 200 toon_index : item.id,
...@@ -202,14 +208,35 @@ function getDaumToons(_day){ ...@@ -202,14 +208,35 @@ function getDaumToons(_day){
202 }; 208 };
203 209
204 allWebtoonList.push(webtoon); 210 allWebtoonList.push(webtoon);
211 +=======
212 + var webtoon_link = 'http://webtoon.daum.net/webtoon/view/' + item.nickname.toString();
213 + var webtoon = {
214 + toon_index : item.id,
215 + name : item.title,
216 + thum_link : item.pcThumbnailImage.url,
217 + webtoon_link : webtoon_link,
218 + week : day_name,
219 + site : site,
220 + latest : 0
221 + };
222 + daumCount++;
223 + allWebtoonList.push(webtoon);
224 +>>>>>>> 0b039040370950fe61e1c6ae5d5cf6650db9652f
205 }); 225 });
226 + }
206 }); 227 });
207 } 228 }
208 229
209 -// 230 +// 네이버 전체 웹툰 불러오기
210 -function getNaverToons(){ 231 +function getNaverToons() {
232 +
211 var allWeeklyToonsUrl = "http://comic.naver.com/webtoon/weekday.nhn"; 233 var allWeeklyToonsUrl = "http://comic.naver.com/webtoon/weekday.nhn";
234 + // 네이버 웹툰 개수
235 + var naverCount = 0;
236 + var webtoonCount = 0;
237 +
212 request(allWeeklyToonsUrl,function (err, res, html) { 238 request(allWeeklyToonsUrl,function (err, res, html) {
239 +<<<<<<< HEAD
213 if(!err){ 240 if(!err){
214 var $ = cheerio.load(html); 241 var $ = cheerio.load(html);
215 var p = Promise.resolve(); 242 var p = Promise.resolve();
...@@ -247,11 +274,54 @@ function getNaverToons(){ ...@@ -247,11 +274,54 @@ function getNaverToons(){
247 } 274 }
248 }); 275 });
249 }) 276 })
277 +=======
278 + if(!err){
279 + var $ = cheerio.load(html);
280 + var p = Promise.resolve();
281 + var eachs = $(".thumb").each(function (i) {
282 +
283 + var week = $(this).parent().parent().prev().attr('class');
284 + var webtoon_link = "http://comic.naver.com" + $(this).children().first().attr('href');
285 + var thumb_link = $(this).children().first().children().first().attr('src');
286 + var name = $(this).next().text();
287 + var titleid = webtoon_link.split('?')[1].split('&')[0].split('=')[1];
288 + var site = 'naver';
289 + var webtoon= {
290 + toon_index: titleid,
291 + name : name,
292 + thum_link : thumb_link,
293 + webtoon_link : webtoon_link,
294 + week : week,
295 + site : site,
296 + latest : 0
297 + };
298 + naverCount++;
299 + allWebtoonList.push(webtoon);
300 + });
301 +
302 + p.then(function() {
303 + i = 0;
304 + allWebtoonList.forEach(function (webtoon) {
305 + var sql= "INSERT INTO `toon` (toon_index, name, thum_link, webtoon_link, week, site, latest) VALUES(?) ON DUPLICATE KEY UPDATE latest=latest";
306 + var values=[webtoon.toon_index, webtoon.name, webtoon.thum_link, webtoon.webtoon_link,webtoon.week, webtoon.site, webtoon.latest];
307 +
308 + connection.query(sql,[values],function(err,result){
309 + if(err) {
310 + console.log("웹툰 DB 에러 : " + err);
311 + } else {
312 + webtoonCount++;
313 + console.log(`웹툰 ${webtoonCount}개 DB처리 완료!`);
314 + }
315 +>>>>>>> 0b039040370950fe61e1c6ae5d5cf6650db9652f
316 + });
317 + })
250 }); 318 });
251 } 319 }
320 + console.log(`다음웹툰 ${daumCount}개, 네이버웹툰 ${naverCount}개`)
252 }); 321 });
253 } 322 }
254 323
324 +<<<<<<< HEAD
255 325
256 326
257 327
...@@ -261,6 +331,9 @@ function getTomicsToons(){ ...@@ -261,6 +331,9 @@ function getTomicsToons(){
261 } 331 }
262 332
263 // 설명 333 // 설명
334 +=======
335 +// 모든 웹툰을 담고있는 배열
336 +>>>>>>> 0b039040370950fe61e1c6ae5d5cf6650db9652f
264 allWebtoons = new Array(); 337 allWebtoons = new Array();
265 338
266 // 설명 339 // 설명
......
...@@ -2,16 +2,16 @@ var express = require('express'); ...@@ -2,16 +2,16 @@ var express = require('express');
2 var async = require('async'); 2 var async = require('async');
3 var router = express.Router(); 3 var router = express.Router();
4 4
5 -function getMyToons(id,cb){ 5 +function getMyToons(id,cb) {
6 //id 값을 가진 user가 저장한 웹툰들 가져오기 6 //id 값을 가진 user가 저장한 웹툰들 가져오기
7 var sqlquery = "SELECT t.toon_index, t.name, t.thum_link, t.webtoon_link, t.week, t.site FROM user u, user_toon_relation ur, toon t WHERE u.id = '"+id+"' && u.id=ur.user_id && t.toon_index=ur.toon_index;"; 7 var sqlquery = "SELECT t.toon_index, t.name, t.thum_link, t.webtoon_link, t.week, t.site FROM user u, user_toon_relation ur, toon t WHERE u.id = '"+id+"' && u.id=ur.user_id && t.toon_index=ur.toon_index;";
8 var mylist = new Array(); 8 var mylist = new Array();
9 - connection.query(sqlquery,id,function(err,rows,result){ 9 + connection.query(sqlquery,id,function(err,rows,result) {
10 - if(!err){ 10 + if(!err) {
11 mylist=rows; 11 mylist=rows;
12 cb(mylist); 12 cb(mylist);
13 console.log(mylist); 13 console.log(mylist);
14 - }else{ 14 + } else {
15 console.log("내 웹툰 리스트 가져오는데 실패했습니다!"); 15 console.log("내 웹툰 리스트 가져오는데 실패했습니다!");
16 //throw err; 16 //throw err;
17 } 17 }
...@@ -20,17 +20,15 @@ function getMyToons(id,cb){ ...@@ -20,17 +20,15 @@ function getMyToons(id,cb){
20 20
21 /* GET home page. */ 21 /* GET home page. */
22 router.get('/', function(req, res, next) { 22 router.get('/', function(req, res, next) {
23 - if(!req.isAuthenticated()){ 23 + if(!req.isAuthenticated()) {
24 res.redirect('/'); 24 res.redirect('/');
25 - }else{ 25 + } else {
26 - async.series( 26 + async.series([
27 - [
28 function(callback){ 27 function(callback){
29 getMyToons(req.user.user_id, function (mytoon_list) { 28 getMyToons(req.user.user_id, function (mytoon_list) {
30 callback(null,mytoon_list); 29 callback(null,mytoon_list);
31 }); 30 });
32 - } 31 + }],
33 - ],
34 function(err, results){ 32 function(err, results){
35 res.render('mytoons', { 33 res.render('mytoons', {
36 mytoons: results[0] 34 mytoons: results[0]
......
...@@ -3,19 +3,18 @@ var router = express.Router(); ...@@ -3,19 +3,18 @@ var router = express.Router();
3 3
4 function addMyToons(id,index,cb){ 4 function addMyToons(id,index,cb){
5 connection.query("INSERT INTO user_toon_relation SET ?;", {user_id : id,toon_index : index},function (err) { 5 connection.query("INSERT INTO user_toon_relation SET ?;", {user_id : id,toon_index : index},function (err) {
6 -
7 if(err) { 6 if(err) {
8 throw err; 7 throw err;
9 console.log("내 웹툰 추가 중 에러!") 8 console.log("내 웹툰 추가 중 에러!")
10 - } else{ 9 + } else {
11 - // alert("추가되었습니다.") 10 + alert("추가되었습니다.")
12 cb(); 11 cb();
13 } 12 }
14 }); 13 });
15 } 14 }
16 15
17 //내툰 수정하기 16 //내툰 수정하기
18 -router.post('/toggle_toon',function(req,res,next){ 17 +router.post('/toggle_toon',function(req,res,next) {
19 var index = req.body.toon_index; 18 var index = req.body.toon_index;
20 var id = req.user.user_id; 19 var id = req.user.user_id;
21 connection.query("SELECT COUNT(*) FROM user_toon_relation WHERE user_id='"+id+"' && toon_index='"+index+"'", [id,index], function (err, rows,result) { 20 connection.query("SELECT COUNT(*) FROM user_toon_relation WHERE user_id='"+id+"' && toon_index='"+index+"'", [id,index], function (err, rows,result) {
...@@ -23,18 +22,18 @@ router.post('/toggle_toon',function(req,res,next){ ...@@ -23,18 +22,18 @@ router.post('/toggle_toon',function(req,res,next){
23 console.log("내 웹툰 등록 중 에러!"); 22 console.log("내 웹툰 등록 중 에러!");
24 } else { 23 } else {
25 var count = rows[0]["COUNT(*)"]; 24 var count = rows[0]["COUNT(*)"];
26 - if(count>0) {//이미 등록되어 있는 것이라면, 25 + if(count > 0) { //이미 등록되어 있는 것이라면,
27 connection.query("DELETE FROM user_toon_relation WHERE user_id='"+id+"' && toon_index='"+index+"';", [id, index],function (err, rows, result) { 26 connection.query("DELETE FROM user_toon_relation WHERE user_id='"+id+"' && toon_index='"+index+"';", [id, index],function (err, rows, result) {
28 if(err) { 27 if(err) {
29 console.log("내 웹툰 제거중 에러!"); 28 console.log("내 웹툰 제거중 에러!");
30 throw err; 29 throw err;
31 } else { 30 } else {
32 - //alert("제거되었습니다.") 31 + alert("제거되었습니다.")
33 res.redirect('/setting'); 32 res.redirect('/setting');
34 } 33 }
35 }); 34 });
36 } else { 35 } else {
37 - addMyToons(id,index,function(){ 36 + addMyToons(id,index,function() {
38 res.redirect('/setting'); 37 res.redirect('/setting');
39 }); 38 });
40 } 39 }
...@@ -47,11 +46,11 @@ function getMyToons(id,cb){ ...@@ -47,11 +46,11 @@ function getMyToons(id,cb){
47 //mysql5.7 syntax에 맞게 수정 => 로그인한 유저의 46 //mysql5.7 syntax에 맞게 수정 => 로그인한 유저의
48 var sqlquery = "SELECT t.toon_index, t.name, t.thum_link, t.webtoon_link, t.week, t.site FROM user u, user_toon_relation ur, toon t WHERE u.id = '"+id+"' && u.id=ur.user_id && t.toon_index=ur.toon_index;"; 47 var sqlquery = "SELECT t.toon_index, t.name, t.thum_link, t.webtoon_link, t.week, t.site FROM user u, user_toon_relation ur, toon t WHERE u.id = '"+id+"' && u.id=ur.user_id && t.toon_index=ur.toon_index;";
49 var mylist = new Array(); 48 var mylist = new Array();
50 - connection.query(sqlquery,id,function(err,rows,result){ 49 + connection.query(sqlquery,id,function(err,rows,result) {
51 - if(!err){ 50 + if(!err) {
52 - mylist=rows; 51 + mylist = rows;
53 cb(mylist); 52 cb(mylist);
54 - }else{ 53 + } else {
55 router.get('/') 54 router.get('/')
56 console.log("내 웹툰 리스트 가져오는데 실패했습니다!"); 55 console.log("내 웹툰 리스트 가져오는데 실패했습니다!");
57 //throw err; 56 //throw err;
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
7 <link rel="stylesheet" type="text/css" href="/stylesheets/bootstrap.css"> 7 <link rel="stylesheet" type="text/css" href="/stylesheets/bootstrap.css">
8 <link rel="stylesheet" type="text/css" href="/stylesheets/font-awesome.css"> 8 <link rel="stylesheet" type="text/css" href="/stylesheets/font-awesome.css">
9 9
10 - <!-- Stylesheet 10 + <!-- Stylesheet ================================================== -->
11 - ================================================== -->
12 <link rel="stylesheet" type="text/css" href="/stylesheets/style.css"> 11 <link rel="stylesheet" type="text/css" href="/stylesheets/style.css">
13 <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/nivo-lightbox.css"> 12 <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"> 13 <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/default.css">
...@@ -17,15 +16,13 @@ ...@@ -17,15 +16,13 @@
17 <link href="https://fonts.googleapis.com/css?family=Dancing+Script:400,700" rel="stylesheet"> 16 <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"> 17 <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"> 18 <script src="http://developers.kakao.com/sdk/js/kakao.min.js">
20 - function daum_click() 19 + function daum_click(){
21 - {
22 if(Daum_webtoons.display == "none") 20 if(Daum_webtoons.display == "none")
23 Daum_webtoons.display == "block"; 21 Daum_webtoons.display == "block";
24 if(Daum_webtoons.display = "block") 22 if(Daum_webtoons.display = "block")
25 Daum_webtoons.display == "none"; 23 Daum_webtoons.display == "none";
26 } 24 }
27 - function naver_click() 25 + function naver_click(){
28 - {
29 if(Naver_webtoons.display == "none") 26 if(Naver_webtoons.display == "none")
30 Naver_webtoons.display == "block"; 27 Naver_webtoons.display == "block";
31 if(Naver_webtoons.display = "block") 28 if(Naver_webtoons.display = "block")
...@@ -40,8 +37,10 @@ ...@@ -40,8 +37,10 @@
40 <div class="container"> 37 <div class="container">
41 <!-- Brand and toggle get grouped for better mobile display --> 38 <!-- Brand and toggle get grouped for better mobile display -->
42 <div class="navbar-header"> 39 <div class="navbar-header">
43 - <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> 40 + <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>
44 - <a class="navbar-brand page-scroll" href="#page-top" style="font-family:Gugi">니툰내툰</a> </div> 41 + </button>
42 + <a class="navbar-brand page-scroll" href="#page-top" style="font-family:Gugi">니툰내툰</a>
43 + </div>
45 <!-- Collect the nav links, forms, and other content for toggling --> 44 <!-- Collect the nav links, forms, and other content for toggling -->
46 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> 45 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
47 <ul class="nav navbar-nav navbar-right"> 46 <ul class="nav navbar-nav navbar-right">
...@@ -60,10 +59,10 @@ ...@@ -60,10 +59,10 @@
60 <div class="container"> 59 <div class="container">
61 <div class="row"> 60 <div class="row">
62 <div class="intro-text"> 61 <div class="intro-text">
63 -
64 <h1 style="font-family:Gugi">니툰내툰</h1> 62 <h1 style="font-family:Gugi">니툰내툰</h1>
65 - <p> NAVER / DAUM / WEBTOONS </p> 63 + <p> NAVER / DAUM </p>
66 - <a href="#about" class="btn btn-custom btn-lg page-scroll">All the Webtoons</a> </div> 64 + <a href="#about" class="btn btn-custom btn-lg page-scroll">All the Webtoons</a>
65 + </div>
67 </div> 66 </div>
68 </div> 67 </div>
69 </div> 68 </div>
...@@ -75,30 +74,134 @@ ...@@ -75,30 +74,134 @@
75 <div class="container"> 74 <div class="container">
76 <div class="row"> 75 <div class="row">
77 <div class="col-xs-12 col-md-6 "> 76 <div class="col-xs-12 col-md-6 ">
78 - <div class="about-img"><img src="images/toon.png" class="img-responsive" alt=""></div> 77 + <div class="about-img"><img src="images/toon.png" class="img-responsive" alt="">
78 + </div>
79 </div> 79 </div>
80 +
80 <div class="col-xs-12 col-md-6"> 81 <div class="col-xs-12 col-md-6">
81 <div class="about-text"> 82 <div class="about-text">
82 <h2>Our Term-Project</h2> 83 <h2>Our Term-Project</h2>
83 - <hr> 84 + <hr><p>마더프로젝트 니툰내툰을 개선하는 프로젝트입니다. 네이버웹툰, 다음웹툰, 레진웹툰을 담을 수 있으며 다른 사용자가 담은 웹툰도 확인할 수 있습니다.</p>
84 - <!--수정해주세욤!--> 85 + <h3>Developers</h3>
85 - <p>마더 프로젝트 니툰내툰(YTMT)를 개선하는 프로젝트입니다. 네이버 웹툰 뿐만 아니라 다음 웹툰도 담을 수 있으며, 타인이 담은 웹툰도 확인할 수 있습니다.</p>
86 - <h3>Programmers</h3>
87 <p>2013100924 이현종, 2018102151 Abdullaev Akhidjon</p> 86 <p>2013100924 이현종, 2018102151 Abdullaev Akhidjon</p>
88 </div> 87 </div>
89 </div> 88 </div>
90 </div> 89 </div>
91 </div> 90 </div>
92 </div> 91 </div>
92 +
93 <!-- Portfolio Section --> 93 <!-- Portfolio Section -->
94 <div id="portfolio"> 94 <div id="portfolio">
95 <div class="section-title text-center center"> 95 <div class="section-title text-center center">
96 <div class="overlay"> 96 <div class="overlay">
97 <h2>Gallery</h2> 97 <h2>Gallery</h2>
98 - <hr> 98 + <hr><p>니툰내툰에서 제공하는 웹툰 리스트입니다</p>
99 - <p>니툰내툰에서 제공하는 웹툰 리스트입니다</p>
100 </div> 99 </div>
101 </div> 100 </div>
101 +
102 + <div class="container">
103 + <div class="row">
104 + <div class="categories">
105 + <ul class="cat">
106 + <font size = 30>
107 + 다음 웹툰
108 + </font>
109 + <a onclick="Daum_webtoons.style.display=(Daum_webtoons.style.display=='none')?'block':'none';" href="javascript:void(0)">
110 + <img src ='/images/daumicon.png' width="90" height="90" onclick="daum_click" />
111 + </a>
112 +
113 + <div id="Daum_webtoons" style="display:none">
114 + <table>
115 + <%
116 + var current = "";
117 + for(webtoon in list){
118 +
119 + if(current!=list[webtoon].week && list[webtoon].site == 'daum'){
120 + if(current!=""){
121 + %>
122 + </tr>
123 + <% } %>
124 + <tr>
125 + <th><%= list[webtoon].week %></th>
126 + <% } %>
127 + <%
128 + if(list[webtoon].site == 'daum')
129 + {
130 + %>
131 + <td>
132 + <a href="<%= list[webtoon].webtoon_link %>">
133 + <img alt="img" width="83" height="90" src="<%= list[webtoon].thum_link %>"/>
134 + </a>
135 + <%= list[webtoon].name %>
136 + </td>
137 + <%
138 + }
139 + %>
140 +
141 + <%
142 + if(current!=list[webtoon].week) {
143 + current = list[webtoon].week;
144 + %>
145 +
146 + <%
147 + }
148 + }
149 + %>
150 + </tr>
151 + </table>
152 + </div>
153 +
154 + <font size = 30>
155 + 네이버 웹툰
156 + </font>
157 + <a onclick="Naver_webtoons.style.display=(Naver_webtoons.style.display=='none')?'block':'none';" href="javascript:void(0)">
158 + <img src ='/images/navericon.png' width="90" height="90"/>
159 + </a>
160 +
161 + <div id="Naver_webtoons" style = "display:none">
162 + <table>
163 + <%
164 + var current = "";
165 + for(webtoon in list){
166 +
167 + if(current!=list[webtoon].week && list[webtoon].site == 'naver'){
168 + if(current!=""){
169 + %>
170 + </tr>
171 + <% } %>
172 + <tr>
173 + <th><%= list[webtoon].week %></th>
174 + <% } %>
175 + <%
176 + if(list[webtoon].site == 'naver')
177 + {
178 + %>
179 + <td>
180 + <a href="<%= list[webtoon].webtoon_link %>">
181 + <img alt="img" width="83" height="90" src="<%= list[webtoon].thum_link %>"/>
182 + </a>
183 + <%= list[webtoon].name %>
184 + </td>
185 + <%
186 + }
187 + %>
188 +
189 + <%
190 + if(current!=list[webtoon].week) {
191 + current = list[webtoon].week;
192 + %>
193 +
194 + <%
195 + }
196 + }
197 + %>
198 + </tr>
199 + </table>
200 + </div>
201 + </div>
202 + </div>
203 + </div>
204 +<<<<<<< HEAD
102 <div class="container"> 205 <div class="container">
103 <div class="row"> 206 <div class="row">
104 <div class="categories"> 207 <div class="categories">
...@@ -207,6 +310,8 @@ ...@@ -207,6 +310,8 @@
207 </br> 310 </br>
208 311
209 </div> 312 </div>
313 +=======
314 + </div>
315 +>>>>>>> 0b039040370950fe61e1c6ae5d5cf6650db9652f
210 </body> 316 </body>
211 -
212 </html> 317 </html>
......
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 -<head> 3 + <head>
4 <title>내툰</title> 4 <title>내툰</title>
5 <link rel='stylesheet' href='/stylesheets/style2.css' /> 5 <link rel='stylesheet' href='/stylesheets/style2.css' />
6 +<<<<<<< HEAD
6 <!-- Bootstrap --> 7 <!-- Bootstrap -->
8 +=======
9 +
10 + <<!-- Bootstrap -->
11 +>>>>>>> 0b039040370950fe61e1c6ae5d5cf6650db9652f
7 <link rel="stylesheet" type="text/css" href="/stylesheets/bootstrap.css"> 12 <link rel="stylesheet" type="text/css" href="/stylesheets/bootstrap.css">
8 <link rel="stylesheet" type="text/css" href="/stylesheets/font-awesome.css"> 13 <link rel="stylesheet" type="text/css" href="/stylesheets/font-awesome.css">
9 14
10 - <!-- Stylesheet 15 + <!-- Stylesheet================================================== -->
11 - ================================================== -->
12 <link rel="stylesheet" type="text/css" href="/stylesheets/style.css"> 16 <link rel="stylesheet" type="text/css" href="/stylesheets/style.css">
13 <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/nivo-lightbox.css"> 17 <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"> 18 <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/default.css">
...@@ -16,63 +20,28 @@ ...@@ -16,63 +20,28 @@
16 <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet"> 20 <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"> 21 <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"> 22 <link href="https://fonts.googleapis.com/css?family=Gugi&amp;subset=korean" rel="stylesheet">
19 - <!--===============================================================================================-->
20 23
21 - <!--===============================================================================================-->
22 <link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css"> 24 <link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
23 - <!--===============================================================================================-->
24 <link rel="stylesheet" type="text/css" href="vendor/animate/animate.css"> 25 <link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
25 - <!--===============================================================================================-->
26 <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css"> 26 <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
27 - <!--===============================================================================================-->
28 <link rel="stylesheet" type="text/css" href="vendor/perfect-scrollbar/perfect-scrollbar.css"> 27 <link rel="stylesheet" type="text/css" href="vendor/perfect-scrollbar/perfect-scrollbar.css">
29 - <!--===============================================================================================-->
30 <link rel="stylesheet" type="text/css" href="stylesheets/util.css"> 28 <link rel="stylesheet" type="text/css" href="stylesheets/util.css">
31 <link rel="stylesheet" type="text/css" href="stylesheets/main.css"> 29 <link rel="stylesheet" type="text/css" href="stylesheets/main.css">
32 - <!--===============================================================================================--> 30 + </head>
33 - <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
34 - <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
35 - <!--[if lt IE 9]>
36 - <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
37 - <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
38 - <![endif]-->
39 - <!--
40 - <style>
41 - .toon_name,.toon_thumbnail{
42 - width:10%;
43 - }
44 -
45 - td{
46 - vertical-align: middle;
47 - border-bottom: 1px solid #bcbcbc;
48 - border-left: 1px solid #bcbcbc;
49 - border-right: 1px solid #bcbcbc;
50 - margin:0;
51 - Text-align:center;
52 - }
53 - table{
54 - border-collapse:collapse;
55 - border: 2px solid #474747;
56 - }
57 - th{
58 - border-bottom:2px solid #474747;
59 - }
60 - </style>
61 --->
62 -</head>
63 -
64 31
32 + <body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
65 33
66 -<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top"> 34 + <!-- Navigation==========================================-->
67 -<!-- Navigation
68 - ==========================================-->
69 <div class="nabvar"> 35 <div class="nabvar">
70 <nav id="menu" class="navbar navbar-default navbar-fixed-top"> 36 <nav id="menu" class="navbar navbar-default navbar-fixed-top">
71 <div class="container"> 37 <div class="container">
38 +
72 <!-- Brand and toggle get grouped for better mobile display --> 39 <!-- Brand and toggle get grouped for better mobile display -->
73 <div class="navbar-header"> 40 <div class="navbar-header">
74 <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> 41 <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>
75 - <a class="navbar-brand page-scroll" href="#page-top" style="font-family:Gugi">내툰</a> </div> 42 + <a class="navbar-brand page-scroll" href="#page-top" style="font-family:Gugi">내툰</a>
43 + </div>
44 +
76 <!-- Collect the nav links, forms, and other content for toggling --> 45 <!-- Collect the nav links, forms, and other content for toggling -->
77 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> 46 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
78 <ul class="nav navbar-nav navbar-right"> 47 <ul class="nav navbar-nav navbar-right">
...@@ -86,14 +55,15 @@ ...@@ -86,14 +55,15 @@
86 </div> 55 </div>
87 </nav> 56 </nav>
88 </div> 57 </div>
89 -<div id="mylist"> 58 +
59 + <div id="mylist">
90 <div class="section-title text-center center"> 60 <div class="section-title text-center center">
91 <div class="overlay"> 61 <div class="overlay">
92 <h2>내툰</h2> 62 <h2>내툰</h2>
93 - <hr> 63 + <hr><p>웹툰 담기를 통해 담은 웹툰들의 리스트입니다</p>
94 - <p>웹툰 담기를 통해 담은 웹툰들의 리스트입니다</p>
95 </div> 64 </div>
96 </div> 65 </div>
66 +
97 <div class="container"> 67 <div class="container">
98 <div class="row"> 68 <div class="row">
99 <div class="categories"> 69 <div class="categories">
...@@ -115,15 +85,13 @@ ...@@ -115,15 +85,13 @@
115 </thead> 85 </thead>
116 </table> 86 </table>
117 </div> 87 </div>
88 +
118 <div class ="table100-body js-pscroll"> 89 <div class ="table100-body js-pscroll">
119 <table> 90 <table>
120 - <%if (mytoons.length==0){ 91 + <%if(mytoons.length==0){ %>
121 - %>
122 <th>내툰리스트에 웹툰이 없습니다! 수정하기 버튼을 눌러서 추가하세요!</th> 92 <th>내툰리스트에 웹툰이 없습니다! 수정하기 버튼을 눌러서 추가하세요!</th>
123 <%}%> 93 <%}%>
124 - <% for(i=0;i 94 + <% for(i=0;i<mytoons.length; i++){%>
125 - <mytoons.length; i++){
126 - %>
127 <tr> 95 <tr>
128 <td class="cell100 column1"><image src="<%= mytoons[i].thum_link%>" /></td> 96 <td class="cell100 column1"><image src="<%= mytoons[i].thum_link%>" /></td>
129 <td class="cell100 column2"><%= mytoons[i].name %></td> 97 <td class="cell100 column2"><%= mytoons[i].name %></td>
...@@ -188,19 +156,17 @@ ...@@ -188,19 +156,17 @@
188 { %>업데이트됨 156 { %>업데이트됨
189 <%} %> 157 <%} %>
190 </td> 158 </td>
191 -
192 </tr> 159 </tr>
193 <% } %> 160 <% } %>
194 </table> 161 </table>
195 - 162 + </div></br>
196 </div> 163 </div>
197 -
198 -</br>
199 </div> 164 </div>
200 </div> 165 </div>
201 </div> 166 </div>
202 -</div> 167 + </div>
203 - 168 + </div>
204 -</body> 169 + </div>
205 - 170 + </div>
171 + </body>
206 </html> 172 </html>
......