From 28f0a5e0bc9caa69d5f11d7dc69d4c78ae1ce6f1 Mon Sep 17 00:00:00 2001
From: JangHyeonJun <83224463+hyeon17@users.noreply.github.com>
Date: Mon, 6 Mar 2023 14:17:37 +0900
Subject: [PATCH 01/84] Update README.md
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 4c78c74..91545fc 100644
--- a/README.md
+++ b/README.md
@@ -2,18 +2,18 @@
[](https://app.netlify.com/sites/magical-babka-4591f3/deploys)
-**TwoCircle(투써클 안경점)** : https://magical-babka-4591f3.netlify.app/
+**[TwoCircle(투써클 안경점)](https://magical-babka-4591f3.netlify.app/)**
[상품은 내일 추가 예정..]
## 작업기간
23.01.30(월) ~ 미정
## 테스트 아이디
-### 테스트
-ID : test@naver.com
+### 사용자
+ID : test@naver.com
PW : abcd1234
### 관리자
-ID : admin@naver.com
+ID : admin@naver.com
PW : abcd1234
## 사이트 설명 (추가 예정...)
From 3c42177ad86c7ef2dfedd90edb1ecfd658ac19b0 Mon Sep 17 00:00:00 2001
From: Nevacat
Date: Tue, 7 Mar 2023 13:26:52 +0900
Subject: [PATCH 02/84] =?UTF-8?q?feat:=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20?=
=?UTF-8?q?=EB=B1=83=EC=A7=80=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
loop삭제
---
pages/header.js | 37 ++++++++++++++++++++++++-------------
scss/base/event.scss | 2 +-
2 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/pages/header.js b/pages/header.js
index c76cc94..c2bba96 100644
--- a/pages/header.js
+++ b/pages/header.js
@@ -80,24 +80,34 @@ export function headerRender() {
TEAM5
23.01.30
~ ING
@@ -222,11 +232,12 @@ export function headerRender() {
})
// 이벤트 베너
const eventBanner = new Swiper('.event-swiper', {
- width: "100",
- loop:true,
+ slidesPerView: 1,
+ width: 100,
autoplay:true,
scrollbar: {
- el: ".swiper-scrollbar"
+ el: ".swiper-scrollbar",
+ draggable: true
},
});
// 스크롤 이벤트
diff --git a/scss/base/event.scss b/scss/base/event.scss
index 7f0ed7b..b00c1f7 100644
--- a/scss/base/event.scss
+++ b/scss/base/event.scss
@@ -7,7 +7,6 @@
z-index: 2;
.swiper-container{
position: relative;
- width: 100%;
height: 200px;
overflow: hidden;
border: 1px solid #d6dae5;
@@ -55,6 +54,7 @@
bottom: 0 !important;
.swiper-scrollbar-drag{
background-color: #FF597B !important;
+ --swiper-scrollbar-size: 20%;
}
}
}
From 755def42c2440c83888a315b576b404ccfeacc75 Mon Sep 17 00:00:00 2001
From: Nevacat
Date: Tue, 7 Mar 2023 13:28:57 +0900
Subject: [PATCH 03/84] =?UTF-8?q?Docs:=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20con?=
=?UTF-8?q?sole.log=20=EC=82=AD=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/header.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/pages/header.js b/pages/header.js
index c2bba96..1cf13f1 100644
--- a/pages/header.js
+++ b/pages/header.js
@@ -243,7 +243,6 @@ export function headerRender() {
// 스크롤 이벤트
const eventSection = document.querySelector(".event")
window.addEventListener('scroll',_.throttle(()=>{
- console.log(window.scrollY)
if(window.scrollY<330){
gsap.to(eventSection,.4,{
opacity:0,
From 09985995a6d0c1161fb5bbd374b050932dfe58a6 Mon Sep 17 00:00:00 2001
From: PHJ
Date: Thu, 9 Mar 2023 01:30:47 +0900
Subject: [PATCH 04/84] =?UTF-8?q?fix:=20=EA=B5=AC=EB=A7=A4=EB=82=B4?=
=?UTF-8?q?=EC=97=AD=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=8E=98=EC=9D=B4?=
=?UTF-8?q?=EC=A7=80=EB=84=A4=EC=9D=B4=EC=85=98=20=EB=AC=B8=EC=A0=9C=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
scss/user/purchase_history.scss | 28 ++++++-
source/js/purchase_history.js | 127 ++++++++++++++++++++++++++------
2 files changed, 132 insertions(+), 23 deletions(-)
diff --git a/scss/user/purchase_history.scss b/scss/user/purchase_history.scss
index 3522c56..8ad8bbe 100644
--- a/scss/user/purchase_history.scss
+++ b/scss/user/purchase_history.scss
@@ -242,7 +242,7 @@
}
.no_list_container {
- display: flex;
+ display: none;
justify-content: center;
align-items: center;
width: inherit;
@@ -276,6 +276,11 @@
}
}
+ .list_item_orderNumber {
+ width: 9.5rem;
+ //text-align: center;
+ }
+
.list_item_btn {
display: flex;
@@ -347,11 +352,32 @@
color: #4e4e4e;
}
+ .arrow-link {
+ height: 4rem;
+ width: 4rem;
+ margin: 1rem 1rem 0 0;
+ cursor: pointer;
+ font-size: 1.6rem;
+ text-align: center;
+ color: #4e4e4e;
+ }
+
.active-link {
background-color: #FF597B;
border-color: #FF597B;
color: #FFFFFF;
}
+
+ .arrow-link-unactive {
+ height: 4rem;
+ width: 4rem;
+ margin: 1rem 1rem 0 0;
+ cursor: text;
+ font-size: 1.6rem;
+ text-align: center;
+ color: #c7c5c5;
+ pointer-events: none;
+ }
}
}
}
diff --git a/source/js/purchase_history.js b/source/js/purchase_history.js
index 265fab3..b2b857b 100644
--- a/source/js/purchase_history.js
+++ b/source/js/purchase_history.js
@@ -41,10 +41,15 @@ export async function purchaseHandler() {
};
let currentPage = 1;
let itemsPerPage = 5;
+ let itemLength = 0;
status1FilterEl.style.cssText = 'background-color: #FF597B; border-color: #FF597B; color: #FFFFFF;';
renderItemList();
+ //targetPageLink = document.querySelectorAll('.list_item_pagination a[data-page="1"]');
+ //console.log('링크 '+Array.for(targetPageLink));
+ //var targetPageLinkHref = targetPageLink.href;
+ //targetPageLinkHref.classList.add('active-link');
//구매 상태 필터 이벤트
@@ -234,7 +239,14 @@ export async function purchaseHandler() {
deal_canceled = item.isCanceled;
deal_done = item.done;
- titleEl.textContent = item.product.title;
+ let result = item.product.title;
+
+ if (item.product.title.includes('/')) {
+ const index = item.product.title.indexOf('/');
+ result = item.product.title.substring(0, index);
+ }
+
+ titleEl.textContent = result;
priceEl.textContent = item.product.price + ' 원';
timeEl.textContent = getdate(item.timePaid);
const productInfoEl = document.createElement('div');
@@ -322,9 +334,10 @@ export async function purchaseHandler() {
const listItems = listItemContainerEl.querySelectorAll('ul li');
console.log(listItems);
-
- updatePagination(listItems.length, itemsPerPage, currentPage);
+ itemLength = listItems.length;
+ updatePagination(itemLength, itemsPerPage, currentPage);
displayPage(currentPage, itemsPerPage);
+ console.log(currentPage);
}
//페이지네이션
@@ -332,24 +345,76 @@ export async function purchaseHandler() {
const numPages = Math.ceil(numItems / itemsPerPage);
paginationContainer.innerHTML = '';
- for (let i = 1; i <= numPages; i++) {
- const link = document.createElement('a');
- link.href = '#';
- link.classList.add('page-link');
- link.dataset.page = i;
- link.textContent = i;
-
- if (i === currentPage) {
- link.classList.add('active-link');
- }
+ const groupSize = 5;
+ const groupIndex = Math.floor((currentPage - 1) / groupSize);
+ const startPage = groupIndex * groupSize + 1;
+ const endPage = Math.min(startPage + groupSize - 1, numPages);
+
+ // 처음으로
+ const firstLink = createPaginationLink(currentPage - groupSize, '<<');
+ paginationContainer.appendChild(firstLink);
+
+ // 이전
+ const prevLink = createPaginationLink(currentPage - groupSize, '<');
+ paginationContainer.appendChild(prevLink);
+ if (currentPage === 1) {
+ firstLink.disabled = true;
+ prevLink.disabled = true;
+ firstLink.classList.add('arrow-link-unactive');
+ prevLink.classList.add('arrow-link-unactive');
+ }
+ else {
+ firstLink.disabled = false;
+ prevLink.disabled = false;
+ firstLink.classList.remove('arrow-link-unactive');
+ prevLink.classList.remove('arrow-link-unactive');
+ }
+
+ for (let i = startPage; i <= endPage; i++) {
+ const link = createPaginationLink(i, i);
paginationContainer.appendChild(link);
+ }
+
+ // 다음
+ const nextLink = createPaginationLink(endPage, '>');
+ paginationContainer.appendChild(nextLink);
+
+
+ //마지막
+ const lastLink = createPaginationLink(numPages, '>>');
+ paginationContainer.appendChild(lastLink);
+ if (currentPage === numPages) {
+ nextLink.disabled = true;
+ lastLink.disabled = true;
+ nextLink.classList.add('arrow-link-unactive');
+ lastLink.classList.add('arrow-link-unactive');
+ }
+ else {
+ nextLink.disabled = false;
+ lastLink.disabled = false;
+ nextLink.classList.remove('arrow-link-unactive');
+ lastLink.classList.remove('arrow-link-unactive');
+ }
+
+ }
- // const activeLink = paginationContainer.querySelector('.active');
- // if (activeLink) {
- // activeLink.classList.add('active-link');
- // }
+ function createPaginationLink(pageNumber, label) {
+ const link = document.createElement('a');
+ link.href = '#';
+ if (typeof label === 'number') {
+ link.classList.add('page-link');
+ if (label === currentPage) {
+ link.classList.add('active-link');
+ console.log("링크이동 "+currentPage);
+ }
+ }
+ else {
+ link.classList.add('arrow-link');
}
+ link.dataset.page = pageNumber;
+ link.textContent = label;
+ return link;
}
function displayPage(pageNum, itemsPerPage) {
@@ -369,14 +434,32 @@ export async function purchaseHandler() {
paginationContainer.addEventListener('click', (event) => {
event.preventDefault();
const link = event.target;
+ console.log(link);
if (link.classList.contains('page-link')) {
const pageNum = parseInt(link.dataset.page, 10);
+ currentPage = pageNum;
+ updatePagination(itemLength, itemsPerPage, currentPage);
displayPage(pageNum, itemsPerPage);
-
- paginationContainer.querySelectorAll('.page-link').forEach((link) => {
- link.classList.remove('active-link');
- });
- link.classList.add('active-link');
+ }
+ if (link.textContent === '<<') {
+ currentPage = 1;
+ updatePagination(itemLength, itemsPerPage, currentPage);
+ displayPage(currentPage, itemsPerPage);
+ }
+ if (link.textContent === '<') {
+ currentPage -= 1;
+ updatePagination(itemLength, itemsPerPage, currentPage);
+ displayPage(currentPage, itemsPerPage);
+ }
+ if (link.textContent === '>') {
+ currentPage += 1;
+ updatePagination(itemLength, itemsPerPage, currentPage);
+ displayPage(currentPage, itemsPerPage);
+ }
+ if (link.textContent === '>>') {
+ currentPage = Math.ceil(itemLength / itemsPerPage, currentPage);
+ updatePagination(itemLength, itemsPerPage, currentPage);
+ displayPage(currentPage, itemsPerPage);
}
});
From 7682b57becd85e6a6a6202651c195420cb7aeec5 Mon Sep 17 00:00:00 2001
From: jiyoon29
Date: Fri, 10 Mar 2023 02:10:26 +0900
Subject: [PATCH 05/84] =?UTF-8?q?feat:=20swiper=20=EB=B2=84=EC=A0=84=20?=
=?UTF-8?q?=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 83 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 49 insertions(+), 34 deletions(-)
diff --git a/index.html b/index.html
index 1612f92..a737862 100644
--- a/index.html
+++ b/index.html
@@ -1,38 +1,53 @@
+
+
+
+
+
+
+ 투써클(TWO CIRCLE)
-
-
-
-
-
-
- 투써클(TWO CIRCLE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+