🚀 배포용: PDF 뷰어 개선 및 서적별 UI 데본씽크 스타일 적용

 주요 개선사항:
- PDF API 500 에러 수정 (한글 파일명 UTF-8 인코딩 처리)
- PDF 뷰어 기능 완전 구현 (PDF.js 통합, 네비게이션, 확대/축소)
- 서적별 문서 그룹화 UI 데본씽크 스타일로 개선
- PDF Manager 페이지 서적별 보기 기능 추가
- Alpine.js 로드 순서 최적화로 JavaScript 에러 해결

🎨 UI/UX 개선:
- 확장/축소 가능한 아코디언 스타일 서적 목록
- 간결하고 직관적인 데본씽크 스타일 인터페이스
- PDF 상태 표시 (HTML 연결, 서적 분류)
- 반응형 디자인 및 부드러운 애니메이션

🔧 기술적 개선:
- PDF.js 워커 설정 및 토큰 인증 처리
- 서적별 PDF 자동 그룹화 로직
- Alpine.js 컴포넌트 초기화 최적화
This commit is contained in:
hyungi
2025-09-05 07:13:49 +09:00
commit cfb9485d4f
170 changed files with 41113 additions and 0 deletions

View File

@@ -0,0 +1,270 @@
/* 메인 스타일 */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
padding-top: 4rem; /* 고정 헤더를 위한 패딩 */
}
/* 알림 애니메이션 */
.notification {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* 로딩 스피너 */
.loading-spinner {
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* 카드 호버 효과 */
.card-hover {
transition: all 0.2s ease-in-out;
}
.card-hover:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
/* 태그 스타일 */
.tag {
display: inline-block;
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
font-weight: 500;
border-radius: 9999px;
background-color: #dbeafe;
color: #1e40af;
}
/* 검색 입력 포커스 */
.search-input:focus {
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* 드롭다운 애니메이션 */
.dropdown-enter {
opacity: 0;
transform: scale(0.95);
}
.dropdown-enter-active {
opacity: 1;
transform: scale(1);
transition: opacity 150ms ease-out, transform 150ms ease-out;
}
/* 모달 배경 */
.modal-backdrop {
backdrop-filter: blur(4px);
}
/* 파일 드롭 영역 */
.file-drop-zone {
border: 2px dashed #d1d5db;
border-radius: 0.5rem;
padding: 2rem;
text-align: center;
transition: all 0.2s ease-in-out;
}
.file-drop-zone.dragover {
border-color: #3b82f6;
background-color: #eff6ff;
}
.file-drop-zone:hover {
border-color: #6b7280;
}
/* 반응형 그리드 */
@media (max-width: 768px) {
.grid-responsive {
grid-template-columns: 1fr;
}
}
@media (min-width: 769px) and (max-width: 1024px) {
.grid-responsive {
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1025px) {
.grid-responsive {
grid-template-columns: repeat(3, 1fr);
}
}
/* 스크롤바 스타일링 */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
/* 텍스트 줄임표 */
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 라인 클램프 유틸리티 */
.line-clamp-1 {
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.line-clamp-3 {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* 포커스 링 제거 */
.focus-visible:focus {
outline: 2px solid transparent;
outline-offset: 2px;
box-shadow: 0 0 0 2px #3b82f6;
}
/* 버튼 상태 */
.btn-primary {
background-color: #3b82f6;
color: white;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-weight: 500;
transition: background-color 0.2s ease-in-out;
}
.btn-primary:hover {
background-color: #2563eb;
}
.btn-primary:disabled {
background-color: #9ca3af;
cursor: not-allowed;
}
.btn-secondary {
background-color: #6b7280;
color: white;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-weight: 500;
transition: background-color 0.2s ease-in-out;
}
.btn-secondary:hover {
background-color: #4b5563;
}
/* 입력 필드 스타일 */
.input-field {
width: 100%;
padding: 0.5rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
font-size: 0.875rem;
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.input-field:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.input-field:invalid {
border-color: #ef4444;
}
/* 에러 메시지 */
.error-message {
color: #ef4444;
font-size: 0.875rem;
margin-top: 0.25rem;
}
/* 성공 메시지 */
.success-message {
color: #10b981;
font-size: 0.875rem;
margin-top: 0.25rem;
}
/* 로딩 오버레이 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}
/* 빈 상태 일러스트레이션 */
.empty-state {
text-align: center;
padding: 3rem 1rem;
}
.empty-state i {
font-size: 4rem;
color: #9ca3af;
margin-bottom: 1rem;
}
.empty-state h3 {
font-size: 1.25rem;
font-weight: 600;
color: #374151;
margin-bottom: 0.5rem;
}
.empty-state p {
color: #6b7280;
margin-bottom: 1.5rem;
}

View File

@@ -0,0 +1,455 @@
/* 뷰어 전용 스타일 */
/* 하이라이트 스타일 */
.highlight {
position: relative;
cursor: pointer;
border-radius: 2px;
padding: 1px 2px;
margin: -1px -2px;
transition: all 0.2s ease-in-out;
}
.highlight:hover {
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
z-index: 10;
}
.highlight.selected {
box-shadow: 0 0 0 2px #3B82F6;
z-index: 10;
}
/* 하이라이트 버튼 */
.highlight-button {
animation: fadeInUp 0.2s ease-out;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 검색 하이라이트 */
.search-highlight {
background-color: #FEF3C7 !important;
border: 1px solid #F59E0B;
border-radius: 2px;
padding: 1px 2px;
margin: -1px -2px;
}
/* 문서 내용 스타일 */
#document-content {
line-height: 1.7;
font-size: 16px;
color: #374151;
}
#document-content h1,
#document-content h2,
#document-content h3,
#document-content h4,
#document-content h5,
#document-content h6 {
color: #111827;
font-weight: 600;
margin-top: 2rem;
margin-bottom: 1rem;
}
#document-content h1 {
font-size: 2.25rem;
border-bottom: 2px solid #e5e7eb;
padding-bottom: 0.5rem;
}
#document-content h2 {
font-size: 1.875rem;
}
#document-content h3 {
font-size: 1.5rem;
}
#document-content p {
margin-bottom: 1rem;
}
#document-content ul,
#document-content ol {
margin-bottom: 1rem;
padding-left: 1.5rem;
}
#document-content li {
margin-bottom: 0.25rem;
}
#document-content blockquote {
border-left: 4px solid #e5e7eb;
padding-left: 1rem;
margin: 1rem 0;
font-style: italic;
color: #6b7280;
}
#document-content code {
background-color: #f3f4f6;
padding: 0.125rem 0.25rem;
border-radius: 0.25rem;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.875rem;
}
#document-content pre {
background-color: #f3f4f6;
padding: 1rem;
border-radius: 0.5rem;
overflow-x: auto;
margin: 1rem 0;
}
#document-content pre code {
background: none;
padding: 0;
}
#document-content table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
#document-content th,
#document-content td {
border: 1px solid #e5e7eb;
padding: 0.5rem;
text-align: left;
}
#document-content th {
background-color: #f9fafb;
font-weight: 600;
}
#document-content img {
max-width: 100%;
height: auto;
border-radius: 0.5rem;
margin: 1rem 0;
}
/* 사이드 패널 스타일 */
.side-panel {
background: white;
border-left: 1px solid #e5e7eb;
height: calc(100vh - 4rem);
overflow: hidden;
}
.panel-tab {
transition: all 0.2s ease-in-out;
}
.panel-tab.active {
background-color: #eff6ff;
color: #2563eb;
border-bottom: 2px solid #2563eb;
}
/* 메모 카드 스타일 */
.note-card {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
padding: 0.75rem;
margin-bottom: 0.5rem;
transition: all 0.2s ease-in-out;
cursor: pointer;
}
.note-card:hover {
background: #f1f5f9;
border-color: #cbd5e1;
transform: translateY(-1px);
}
.note-card.selected {
border-color: #3b82f6;
background: #eff6ff;
}
/* 책갈피 카드 스타일 */
.bookmark-card {
background: #f0fdf4;
border: 1px solid #dcfce7;
border-radius: 0.5rem;
padding: 0.75rem;
margin-bottom: 0.5rem;
transition: all 0.2s ease-in-out;
cursor: pointer;
}
.bookmark-card:hover {
background: #ecfdf5;
border-color: #bbf7d0;
transform: translateY(-1px);
}
/* 색상 선택기 */
.color-picker {
display: flex;
gap: 0.25rem;
padding: 0.25rem;
background: #f3f4f6;
border-radius: 0.5rem;
}
.color-option {
width: 2rem;
height: 2rem;
border-radius: 0.25rem;
border: 2px solid white;
cursor: pointer;
transition: all 0.2s ease-in-out;
}
.color-option:hover {
transform: scale(1.1);
}
.color-option.selected {
box-shadow: 0 0 0 2px #3b82f6;
}
/* 검색 입력 */
.search-input {
background: white;
border: 1px solid #d1d5db;
border-radius: 0.5rem;
padding: 0.5rem 0.75rem 0.5rem 2.5rem;
width: 100%;
transition: all 0.2s ease-in-out;
}
.search-input:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* 도구 모음 */
.toolbar {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
background: white;
border-bottom: 1px solid #e5e7eb;
}
.toolbar-button {
padding: 0.5rem 0.75rem;
border-radius: 0.375rem;
border: none;
background: #f3f4f6;
color: #374151;
cursor: pointer;
transition: all 0.2s ease-in-out;
font-size: 0.875rem;
font-weight: 500;
}
.toolbar-button:hover {
background: #e5e7eb;
}
.toolbar-button.active {
background: #3b82f6;
color: white;
}
.toolbar-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* 모달 스타일 */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
backdrop-filter: blur(4px);
}
.modal-content {
background: white;
border-radius: 0.75rem;
padding: 1.5rem;
max-width: 90vw;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
animation: modalSlideIn 0.2s ease-out;
}
@keyframes modalSlideIn {
from {
opacity: 0;
transform: scale(0.95) translateY(-10px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
/* 태그 입력 */
.tag-input {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
padding: 0.5rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
min-height: 2.5rem;
background: white;
}
.tag-item {
display: flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
background: #eff6ff;
color: #1e40af;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 500;
}
.tag-remove {
cursor: pointer;
color: #6b7280;
font-size: 0.75rem;
}
.tag-remove:hover {
color: #ef4444;
}
/* 스크롤 표시기 */
.scroll-indicator {
position: fixed;
top: 4rem;
right: 1rem;
width: 4px;
height: calc(100vh - 5rem);
background: rgba(0, 0, 0, 0.1);
border-radius: 2px;
z-index: 30;
}
.scroll-thumb {
width: 100%;
background: #3b82f6;
border-radius: 2px;
transition: background-color 0.2s ease-in-out;
}
.scroll-thumb:hover {
background: #2563eb;
}
/* 반응형 디자인 */
@media (max-width: 768px) {
.side-panel {
position: fixed;
top: 4rem;
right: 0;
width: 100%;
max-width: 24rem;
z-index: 40;
box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
}
#document-content {
font-size: 14px;
padding: 1rem;
}
.toolbar {
flex-wrap: wrap;
gap: 0.25rem;
}
.toolbar-button {
font-size: 0.75rem;
padding: 0.375rem 0.5rem;
}
.color-option {
width: 1.5rem;
height: 1.5rem;
}
}
/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
.highlight {
filter: brightness(0.8);
}
.search-highlight {
background-color: #451a03 !important;
border-color: #92400e;
color: #fbbf24;
}
#document-content {
color: #e5e7eb;
}
#document-content h1,
#document-content h2,
#document-content h3,
#document-content h4,
#document-content h5,
#document-content h6 {
color: #f9fafb;
}
}
/* 인쇄 스타일 */
@media print {
.toolbar,
.side-panel,
.highlight-button {
display: none !important;
}
.highlight {
background-color: #fef3c7 !important;
box-shadow: none !important;
}
#document-content {
font-size: 12pt;
line-height: 1.5;
}
}