이승윤

style: Category Detail 뷰 스타일 추가

1 <% include ../includes/header.ejs %> 1 <% include ../includes/header.ejs %>
2 <div class="panel panel-default"> 2 <div class="panel panel-default">
3 <div class="panel-heading"> 3 <div class="panel-heading">
4 -  <%=product.title%> 4 +  <h2 style="padding-left: 30px;"><%=product.title%></h2>
5 - </div> 5 + <div style="padding-bottom: 10px;">  
6 - <div style="padding-bottom: 10px"> 6 + 작성일 :
7 - <br>  작성일 :
8 <%=product.getDate.year%> - 7 <%=product.getDate.year%> -
9 <%=product.getDate.month%> - 8 <%=product.getDate.month%> -
10 <%=product.getDate.day%> 9 <%=product.getDate.day%>
11 </div> 10 </div>
11 + <div style="padding-left: 30px">
12 + 설명 : <%=product.description%>
13 + </div>
14 + <hr/>
15 + </div>
16 +
12 <div> 17 <div>
13 <% var count=0; %> 18 <% var count=0; %>
14 -   ※ 보유중인 영상<br><br> 19 + <% if (items.length != 0) { %>
20 + <ul class="list-group" style="padding-left: 30px; padding-bottom: 30px;">
21 + <li class="list-group-item list-group-item-info" aria-current="true">보유중인 영상</li>
15 <% for (var i in items[0]) { %> 22 <% for (var i in items[0]) { %>
16 - <div> 23 + <li class="list-group-item"><%=items[0][i].title%> <a href="/categori/products/detail/delete/<%=items[0][i].id%>" style="position: absolute; right: 1%;" class="btn btn-danger btn-sm" onclick="return confirm('삭제하시겠습니까?')">삭제</a></li>
17 -   <%=items[0][i]%> 24 + <%count++;};%>
18 - </div> 25 + </ul>
19 - <%count++;};%> 26 + <%};%>
20 </div> 27 </div>
21 - <div> 28 + <button style="margin-left: 30px; margin-bottom: 10px;" class="btn btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample"
22 - <br>  설명 : <%=product.description%><br><br> 29 + aria-expanded="false" aria-controls="collapseExample">
23 - </div> 30 + 영상 추가하기
24 - <form method="get" action=""> 31 + </button>
25 - <div class="input-group"> 32 + <div class="collapse show" id="collapseExample" style="padding-left: 30px;">
26 - <input type="text" class="form-control" placeholder="검색 키워드를 입력하세요!" name="keyword" autocomplete='off'> 33 + <div class="card card-body">
27 - <span class="input-group-btn"> 34 + <form method="get" action="">
28 - <button class="btn btn-secondary" type="submit">찾기</button> 35 + <div class="input-group" style="padding-left: 10px;">
29 - </span> 36 + <input type="text" class="form-control" placeholder="검색 키워드를 입력하세요!" name="keyword" autocomplete='off'>
30 - </div> 37 + <span class="input-group-btn">
31 - </form> 38 + <button class="btn btn-secondary" type="submit">찾기</button>
32 - <form method="post" action=""> 39 + </span>
33 - <% for (var i in videos) { %>
34 - <div style="float:left;
35 - padding: 15px;
36 - ">
37 - <input type="checkbox" name="videoNum" style="
38 - position: absolute;
39 - margin-top: 5px;
40 - margin-left: 5px;
41 - z-index: 4;
42 - zoom:3.0;
43 - " value="<%=videos[i].id + '///' + videos[i].title +'///'+ videos[i].categori +'///'+ videos[i].video_id +'///'+ videos[i].urls%>"/>
44 - <div id="<%=videos[i].id%>" vid="<%=videos[i].video_id%>">
45 - </div>
46 </div> 40 </div>
47 - <%};%> 41 + </form>
48 - <button class="btn btn-primary" style="margin-top: 10px; margin-left: 15px;" >영상담기</button> 42 + <form method="post" action="">
49 - </form> 43 + <% for (var i in videos) { %>
44 + <div style="float:left;
45 + padding: 15px;
46 + ">
47 + <input type="checkbox" name="videoNum" style="
48 + position: absolute;
49 + margin-top: 5px;
50 + margin-left: 5px;
51 + z-index: 4;
52 + zoom:3.0;
53 + "
54 + value="<%=videos[i].id + '///' + videos[i].title +'///'+ videos[i].categori +'///'+ videos[i].video_id +'///'+ videos[i].urls%>" />
55 + <div id="<%=videos[i].id%>" vid="<%=videos[i].video_id%>">
56 + </div>
57 + </div>
58 + <%};%>
59 + <button class="btn btn-primary" style="margin-top: 10px; margin-left: 10px;">영상담기</button>
60 + </form>
61 + </div>
62 + </div>
50 <div class="panel-body"> 63 <div class="panel-body">
51 <div> 64 <div>
52 <hr /> 65 <hr />
53 </div> 66 </div>
54 </div> 67 </div>
55 </div> 68 </div>
56 - 69 +
57 - <a href="/categori/products" class="btn btn-default">목록으로</a> 70 + <div style="padding-bottom: 30px;">
58 - <a href="/categori/products/edit/<%=product._id%>" class="btn btn-primary">수정</a> 71 + <a href="/categori/products" class="btn btn-dark">목록으로</a>
72 + <a href="/categori/products/edit/<%=product._id%>" class="btn btn-primary">수정</a>
73 + </div>
59 <% include ../includes/footer.ejs %> 74 <% include ../includes/footer.ejs %>
75 +
60 <script> 76 <script>
61 (function(){ 77 (function(){
78 + // 영상 메모 구현 파트(아직 미구현)
62 $(document).ready(function() { 79 $(document).ready(function() {
63 $('#commentForm').submit(function(){ 80 $('#commentForm').submit(function(){
64 var $contentVal = $(this).children('textarea[name=content]').val(); 81 var $contentVal = $(this).children('textarea[name=content]').val();
...@@ -88,6 +105,7 @@ ...@@ -88,6 +105,7 @@
88 }); 105 });
89 })(); 106 })();
90 </script> 107 </script>
108 +
91 <script> 109 <script>
92 $(document).on('click' , '.comment_delete' , function(){ 110 $(document).on('click' , '.comment_delete' , function(){
93 if(confirm('삭제하시겠습니까?')){ //확인창 예 눌렀을 시만 진행 111 if(confirm('삭제하시겠습니까?')){ //확인창 예 눌렀을 시만 진행
...@@ -107,18 +125,7 @@ $(document).on('click' , '.comment_delete' , function(){ ...@@ -107,18 +125,7 @@ $(document).on('click' , '.comment_delete' , function(){
107 } 125 }
108 }); 126 });
109 </script> 127 </script>
110 -<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script> 128 +
111 -<script type="text/javascript"
112 - src="https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/4.1.1/imagesloaded.pkgd.min.js"></script>
113 -<script type="text/javascript">
114 - var $masonry_container = $('#masonry_container');
115 - $masonry_container.imagesLoaded(function () {
116 - $masonry_container.masonry({
117 - itemSelector: '.masonry-grid',
118 - columnWidth: 270
119 - });
120 - });
121 -</script>
122 <script> 129 <script>
123 var tag = document.createElement('script'); 130 var tag = document.createElement('script');
124 131
...@@ -137,8 +144,8 @@ $(document).on('click' , '.comment_delete' , function(){ ...@@ -137,8 +144,8 @@ $(document).on('click' , '.comment_delete' , function(){
137 function onYouTubeIframeAPIReady() { 144 function onYouTubeIframeAPIReady() {
138 for (var i = 0; i < videoIds.length; i++) { 145 for (var i = 0; i < videoIds.length; i++) {
139 player = new YT.Player(players[i], { 146 player = new YT.Player(players[i], {
140 - height: '300', 147 + height: '360',
141 - width: '500', 148 + width: '640',
142 videoId: videoIds[i], 149 videoId: videoIds[i],
143 events: { 150 events: {
144 // 'onReady': onPlayerReady, 151 // 'onReady': onPlayerReady,
......