- 📱 PWA 지원: 홈화면 추가 가능한 Progressive Web App - 🎨 M-Project 색상 스키마: 하늘색, 주황색, 회색, 흰색 일관된 디자인 - 📊 대시보드: 데스크톱 캘린더 뷰 + 모바일 일일 뷰 반응형 디자인 - 📥 분류 센터: Gmail 스타일 받은편지함으로 스마트 분류 시스템 - 🤖 AI 분류 제안: 키워드 기반 자동 분류 제안 및 일괄 처리 - 📷 업로드 모달: 데스크톱(파일 선택) + 모바일(카메라/갤러리) 최적화 - 🏷️ 3가지 분류: Todo(시작일), 캘린더(마감일), 체크리스트(무기한) - 📋 체크리스트: 진행률 표시 및 완료 토글 기능 - 🔄 시놀로지 연동 준비: 메일플러스 연동을 위한 구조 설계 - 📱 반응형 UI: 모든 페이지 모바일 최적화 완료
311 lines
13 KiB
HTML
311 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Todo - 시작 날짜가 있는 일들</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
<style>
|
|
:root {
|
|
--primary: #3b82f6; /* 하늘색 */
|
|
--primary-dark: #2563eb; /* 진한 하늘색 */
|
|
--success: #10b981; /* 초록색 */
|
|
--warning: #f59e0b; /* 주황색 */
|
|
--danger: #ef4444; /* 빨간색 */
|
|
--gray-50: #f9fafb; /* 연한 회색 */
|
|
--gray-100: #f3f4f6; /* 회색 */
|
|
--gray-200: #e5e7eb; /* 중간 회색 */
|
|
--gray-300: #d1d5db; /* 진한 회색 */
|
|
}
|
|
|
|
body {
|
|
background-color: var(--gray-50);
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--primary);
|
|
color: white;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: var(--primary-dark);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
|
|
}
|
|
|
|
.todo-item {
|
|
background: white;
|
|
border-radius: 0.75rem;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.todo-item:hover {
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="min-h-screen">
|
|
<!-- 헤더 -->
|
|
<header class="bg-white shadow-sm border-b">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="flex justify-between items-center h-16">
|
|
<div class="flex items-center">
|
|
<button onclick="goBack()" class="mr-4 text-gray-500 hover:text-gray-700">
|
|
<i class="fas fa-arrow-left text-xl"></i>
|
|
</button>
|
|
<i class="fas fa-calendar-day text-2xl text-blue-500 mr-3"></i>
|
|
<h1 class="text-xl font-semibold text-gray-800">Todo</h1>
|
|
<span class="ml-3 text-sm text-gray-500">시작 날짜가 있는 일들</span>
|
|
</div>
|
|
|
|
<div class="flex items-center space-x-4">
|
|
<button onclick="goToDashboard()" class="text-blue-600 hover:text-blue-800 font-medium">
|
|
<i class="fas fa-chart-line mr-1"></i>대시보드
|
|
</button>
|
|
<span class="text-sm text-gray-600" id="currentUser"></span>
|
|
<button onclick="logout()" class="text-gray-500 hover:text-gray-700">
|
|
<i class="fas fa-sign-out-alt"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- 메인 컨텐츠 -->
|
|
<main class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
<!-- 페이지 설명 -->
|
|
<div class="bg-blue-50 rounded-xl p-6 mb-8">
|
|
<div class="flex items-center mb-4">
|
|
<i class="fas fa-calendar-day text-2xl text-blue-600 mr-3"></i>
|
|
<h2 class="text-xl font-semibold text-blue-900">Todo 관리</h2>
|
|
</div>
|
|
<p class="text-blue-800 mb-4">
|
|
시작 날짜가 정해진 일들을 관리합니다. 언제 시작할지 계획을 세우고 실행해보세요.
|
|
</p>
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
|
|
<div class="bg-white rounded-lg p-3">
|
|
<div class="font-medium text-blue-900 mb-1">📅 시작 예정</div>
|
|
<div class="text-blue-700">아직 시작하지 않은 일들</div>
|
|
</div>
|
|
<div class="bg-white rounded-lg p-3">
|
|
<div class="font-medium text-blue-900 mb-1">🔥 진행 중</div>
|
|
<div class="text-blue-700">현재 작업 중인 일들</div>
|
|
</div>
|
|
<div class="bg-white rounded-lg p-3">
|
|
<div class="font-medium text-blue-900 mb-1">✅ 완료</div>
|
|
<div class="text-blue-700">완료된 일들</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 필터 및 정렬 -->
|
|
<div class="bg-white rounded-xl shadow-sm p-6 mb-6">
|
|
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
|
|
<div class="flex space-x-1 bg-gray-100 rounded-lg p-1">
|
|
<button onclick="filterTodos('all')" class="filter-tab active px-4 py-2 rounded text-sm font-medium">전체</button>
|
|
<button onclick="filterTodos('scheduled')" class="filter-tab px-4 py-2 rounded text-sm font-medium">시작 예정</button>
|
|
<button onclick="filterTodos('active')" class="filter-tab px-4 py-2 rounded text-sm font-medium">진행 중</button>
|
|
<button onclick="filterTodos('completed')" class="filter-tab px-4 py-2 rounded text-sm font-medium">완료</button>
|
|
</div>
|
|
|
|
<div class="flex items-center space-x-3">
|
|
<label class="text-sm text-gray-600">정렬:</label>
|
|
<select id="sortBy" class="border border-gray-300 rounded-lg px-3 py-1 text-sm">
|
|
<option value="start_date">시작일 순</option>
|
|
<option value="created_at">등록일 순</option>
|
|
<option value="priority">우선순위 순</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Todo 목록 -->
|
|
<div class="bg-white rounded-xl shadow-sm">
|
|
<div class="p-6 border-b">
|
|
<h3 class="text-lg font-semibold text-gray-800">
|
|
<i class="fas fa-list text-blue-500 mr-2"></i>Todo 목록
|
|
</h3>
|
|
</div>
|
|
|
|
<div id="todoList" class="divide-y divide-gray-100">
|
|
<!-- Todo 항목들이 여기에 동적으로 추가됩니다 -->
|
|
</div>
|
|
|
|
<div id="emptyState" class="p-12 text-center text-gray-500">
|
|
<i class="fas fa-calendar-day text-4xl mb-4 opacity-50"></i>
|
|
<p>아직 시작 날짜가 설정된 일이 없습니다.</p>
|
|
<p class="text-sm">메인 페이지에서 항목을 등록하고 시작 날짜를 설정해보세요!</p>
|
|
<button onclick="goBack()" class="mt-4 btn-primary px-6 py-2 rounded-lg">
|
|
<i class="fas fa-arrow-left mr-2"></i>메인으로 돌아가기
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- JavaScript -->
|
|
<script src="static/js/auth.js"></script>
|
|
<script>
|
|
// 페이지 초기화
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
checkAuthStatus();
|
|
loadTodoItems();
|
|
});
|
|
|
|
// 뒤로 가기
|
|
function goBack() {
|
|
window.location.href = 'index.html';
|
|
}
|
|
|
|
// Todo 항목 로드
|
|
function loadTodoItems() {
|
|
// 임시 데이터 (실제로는 API에서 가져옴)
|
|
const todoItems = [
|
|
{
|
|
id: 1,
|
|
content: '프로젝트 기획서 작성',
|
|
photo: null,
|
|
start_date: '2024-01-20',
|
|
status: 'scheduled',
|
|
created_at: '2024-01-15'
|
|
},
|
|
{
|
|
id: 2,
|
|
content: '팀 미팅 준비',
|
|
photo: null,
|
|
start_date: '2024-01-18',
|
|
status: 'active',
|
|
created_at: '2024-01-16'
|
|
}
|
|
];
|
|
|
|
renderTodoItems(todoItems);
|
|
}
|
|
|
|
// Todo 항목 렌더링
|
|
function renderTodoItems(items) {
|
|
const todoList = document.getElementById('todoList');
|
|
const emptyState = document.getElementById('emptyState');
|
|
|
|
if (items.length === 0) {
|
|
todoList.innerHTML = '';
|
|
emptyState.classList.remove('hidden');
|
|
return;
|
|
}
|
|
|
|
emptyState.classList.add('hidden');
|
|
|
|
todoList.innerHTML = items.map(item => `
|
|
<div class="todo-item p-6">
|
|
<div class="flex items-start space-x-4">
|
|
<!-- 상태 아이콘 -->
|
|
<div class="flex-shrink-0 mt-1">
|
|
<div class="w-8 h-8 rounded-full flex items-center justify-center ${getStatusColor(item.status)}">
|
|
<i class="fas ${getStatusIcon(item.status)} text-sm"></i>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 사진 (있는 경우) -->
|
|
${item.photo ? `
|
|
<div class="flex-shrink-0">
|
|
<img src="${item.photo}" class="w-16 h-16 object-cover rounded-lg" alt="첨부 사진">
|
|
</div>
|
|
` : ''}
|
|
|
|
<!-- 내용 -->
|
|
<div class="flex-1 min-w-0">
|
|
<h4 class="text-gray-900 font-medium mb-2">${item.content}</h4>
|
|
<div class="flex items-center space-x-4 text-sm text-gray-500">
|
|
<span>
|
|
<i class="fas fa-calendar mr-1"></i>시작일: ${formatDate(item.start_date)}
|
|
</span>
|
|
<span>
|
|
<i class="fas fa-clock mr-1"></i>등록: ${formatDate(item.created_at)}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 액션 버튼 -->
|
|
<div class="flex-shrink-0 flex space-x-2">
|
|
${item.status !== 'completed' ? `
|
|
<button onclick="startTodo(${item.id})" class="text-blue-500 hover:text-blue-700" title="시작하기">
|
|
<i class="fas fa-play"></i>
|
|
</button>
|
|
<button onclick="completeTodo(${item.id})" class="text-green-500 hover:text-green-700" title="완료하기">
|
|
<i class="fas fa-check"></i>
|
|
</button>
|
|
` : ''}
|
|
<button onclick="editTodo(${item.id})" class="text-gray-400 hover:text-blue-500" title="수정하기">
|
|
<i class="fas fa-edit"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`).join('');
|
|
}
|
|
|
|
// 상태별 색상
|
|
function getStatusColor(status) {
|
|
const colors = {
|
|
scheduled: 'bg-blue-100 text-blue-600',
|
|
active: 'bg-orange-100 text-orange-600',
|
|
completed: 'bg-green-100 text-green-600'
|
|
};
|
|
return colors[status] || 'bg-gray-100 text-gray-600';
|
|
}
|
|
|
|
// 상태별 아이콘
|
|
function getStatusIcon(status) {
|
|
const icons = {
|
|
scheduled: 'fa-calendar',
|
|
active: 'fa-play',
|
|
completed: 'fa-check'
|
|
};
|
|
return icons[status] || 'fa-circle';
|
|
}
|
|
|
|
// 날짜 포맷팅
|
|
function formatDate(dateString) {
|
|
const date = new Date(dateString);
|
|
return date.toLocaleDateString('ko-KR');
|
|
}
|
|
|
|
// Todo 시작
|
|
function startTodo(id) {
|
|
console.log('Todo 시작:', id);
|
|
// TODO: API 호출하여 상태를 'active'로 변경
|
|
}
|
|
|
|
// Todo 완료
|
|
function completeTodo(id) {
|
|
console.log('Todo 완료:', id);
|
|
// TODO: API 호출하여 상태를 'completed'로 변경
|
|
}
|
|
|
|
// Todo 편집
|
|
function editTodo(id) {
|
|
console.log('Todo 편집:', id);
|
|
// TODO: 편집 모달 또는 페이지로 이동
|
|
}
|
|
|
|
// 필터링
|
|
function filterTodos(filter) {
|
|
console.log('필터:', filter);
|
|
// TODO: 필터에 따라 목록 재로드
|
|
}
|
|
|
|
// 대시보드로 이동
|
|
function goToDashboard() {
|
|
window.location.href = 'dashboard.html';
|
|
}
|
|
|
|
// 전역 함수 등록
|
|
window.goToDashboard = goToDashboard;
|
|
</script>
|
|
</body>
|
|
</html>
|