Compare commits
3 Commits
bfc477bedc
...
909340ff76
| Author | SHA1 | Date | |
|---|---|---|---|
| 909340ff76 | |||
| 130ea35d29 | |||
| b3bbde55fa |
66
analyze.py
66
analyze.py
@@ -6,7 +6,7 @@ try:
|
||||
import pytesseract
|
||||
from pdf2image import convert_from_path
|
||||
from PIL import Image
|
||||
TESSERACT_PATH = r'C:\Users\User\AppData\Local\Programs\Tesseract-OCR esseract.exe'
|
||||
TESSERACT_PATH = r'C:\Users\User\AppData\Local\Programs\Tesseract-OCR\tesseract.exe'
|
||||
POPPLER_PATH = r'D:\이태훈\00크롬다운로드\poppler-25.12.0\Library\bin'
|
||||
pytesseract.pytesseract.tesseract_cmd = TESSERACT_PATH
|
||||
OCR_AVAILABLE = True
|
||||
@@ -18,51 +18,67 @@ def analyze_file_content(filename: str):
|
||||
if not os.path.exists(file_path):
|
||||
return {"error": "File not found"}
|
||||
|
||||
content_parts = []
|
||||
log_steps = []
|
||||
content_parts = []
|
||||
|
||||
# Layer 1: 제목 분석
|
||||
log_steps.append("1. 레이어: 파일 제목 분석 중...")
|
||||
title_text = filename.lower().replace(" ", "")
|
||||
|
||||
# Layer 2: 텍스트 추출
|
||||
log_steps.append("2. 레이어: PDF 텍스트 엔진 가동...")
|
||||
try:
|
||||
if filename.lower().endswith(".pdf"):
|
||||
log_steps.append("1. 레이어: 파일 제목 분석 중...")
|
||||
log_steps.append("2. 레이어: PDF 텍스트 엔진 가동...")
|
||||
reader = PdfReader(file_path)
|
||||
text_extracted = ""
|
||||
for page in reader.pages[:5]:
|
||||
text = page.extract_text()
|
||||
if text: text_extracted += text + "
|
||||
"
|
||||
if text: text_extracted += text + "\n"
|
||||
if text_extracted.strip():
|
||||
content_parts.append(unicodedata.normalize('NFC', text_extracted))
|
||||
|
||||
log_steps.append("3. 레이어: OCR 이미지 스캔 강제 실행...")
|
||||
if OCR_AVAILABLE and os.path.exists(TESSERACT_PATH):
|
||||
images = convert_from_path(file_path, first_page=1, last_page=2, poppler_path=POPPLER_PATH)
|
||||
for i, img in enumerate(images):
|
||||
page_text = pytesseract.image_to_string(img, lang='kor+eng')
|
||||
content_parts.append(unicodedata.normalize('NFC', page_text))
|
||||
else:
|
||||
with open(file_path, "r", encoding="utf-8", errors="ignore") as f:
|
||||
content_parts.append(unicodedata.normalize('NFC', f.read(5000)))
|
||||
norm = unicodedata.normalize('NFC', text_extracted)
|
||||
content_parts.append(norm)
|
||||
log_steps.append(f" - 텍스트 추출 성공 ({len(norm)}자)")
|
||||
except: pass
|
||||
|
||||
full_content = "
|
||||
".join(content_parts)
|
||||
search_pool = (full_content + " " + filename).lower().replace(" ", "").replace("
|
||||
", "")
|
||||
# Layer 3: OCR 강제 실행
|
||||
log_steps.append("3. 레이어: OCR 이미지 스캔 강제 실행...")
|
||||
if OCR_AVAILABLE and os.path.exists(TESSERACT_PATH):
|
||||
try:
|
||||
images = convert_from_path(file_path, first_page=1, last_page=2, poppler_path=POPPLER_PATH)
|
||||
for i, img in enumerate(images):
|
||||
page_text = pytesseract.image_to_string(img, lang='kor+eng')
|
||||
norm_ocr = unicodedata.normalize('NFC', page_text)
|
||||
content_parts.append(norm_ocr)
|
||||
log_steps.append(f" - OCR 정밀 분석 완료")
|
||||
except Exception as e:
|
||||
log_steps.append(f" - OCR 오류: {str(e)[:20]}")
|
||||
|
||||
full_content = "\n".join(content_parts)
|
||||
search_pool = (full_content + " " + filename).lower().replace(" ", "").replace("\n", "")
|
||||
|
||||
result = {
|
||||
"suggested_path": "분석실패",
|
||||
"confidence": "Low",
|
||||
"log_steps": log_steps,
|
||||
"raw_text": full_content,
|
||||
"reason": "일치 키워드 없음"
|
||||
"reason": "일치하는 키워드가 본문 및 제목에서 발견되지 않음"
|
||||
}
|
||||
|
||||
# 정밀 분류 로직
|
||||
if "실정보고" in search_pool:
|
||||
if any(k in search_pool for k in ["어천", "공주"]):
|
||||
if "품질" in search_pool: result["suggested_path"] = "설계변경 > 실정보고(어천~공주) > 품질관리"
|
||||
else: result["suggested_path"] = "설계변경 > 실정보고(어천~공주) > 기타"
|
||||
if "품질" in search_pool:
|
||||
result["suggested_path"] = "설계변경 > 실정보고(어천~공주) > 품질관리"
|
||||
elif any(k in search_pool for k in ["토지", "임대", "가설사무실"]):
|
||||
result["suggested_path"] = "설계변경 > 실정보고(어천~공주) > 기타"
|
||||
else:
|
||||
result["suggested_path"] = "설계변경 > 실정보고(어천~공주) > 기타"
|
||||
result["confidence"] = "100%"
|
||||
result["reason"] = "3중 레이어 분석: 실정보고+어천공주 키워드 통합 검출"
|
||||
result["reason"] = "3중 레이어 합의를 통해 실정보고(어천-공주) 핵심 키워드 완벽 일치"
|
||||
|
||||
elif "품질" in search_pool:
|
||||
result["suggested_path"] = "공사관리 > 품질 관리 > 품질시험계획서"
|
||||
result["confidence"] = "90%"
|
||||
result["reason"] = "품질 관리 지표 다수 식별"
|
||||
|
||||
return result
|
||||
|
||||
110
mailTest.html
110
mailTest.html
@@ -13,33 +13,81 @@
|
||||
<ul class="nav-list">
|
||||
<li class="nav-item" onclick="location.href='/dashboard'">대시보드</li>
|
||||
<li class="nav-item active" onclick="location.href='/mailTest'">메일관리</li>
|
||||
<li class="nav-item">로그관리</li>
|
||||
<li class="nav-item">파일관리</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="mail-wrapper">
|
||||
<aside class="mail-sidebar">
|
||||
<select class="project-select"><option>라오스 ITTC 관개 교육센터</option></select>
|
||||
<ul class="folder-list"><li class="folder-item active"><span>📥 수신함</span></li></ul>
|
||||
<select class="project-select">
|
||||
<option>라오스 ITTC 관개 교육센터</option>
|
||||
<option>베트남 푸옥호아 발전소</option>
|
||||
</select>
|
||||
<ul class="folder-list">
|
||||
<li class="folder-item active"><span>📥 수신함</span><span>12</span></li>
|
||||
<li class="folder-item"><span>📤 발신함</span></li>
|
||||
<li class="folder-item"><span>📁 중요메일</span></li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<section class="mail-list-area">
|
||||
<div class="mail-items-container"><div class="mail-item active"><div>라오스 농림부</div><div>ITTC 교육센터 착공식 일정 협의</div></div></div>
|
||||
<div class="search-bar">
|
||||
<input type="text" placeholder="제목, 내용, 기관 검색...">
|
||||
<div style="display:flex; gap:4px;">
|
||||
<select style="flex:1; padding:4px; font-size:11px;"><option>모든 상대기관</option></select>
|
||||
<select style="flex:1; padding:4px; font-size:11px;"><option>전체 기간</option></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mail-items-container">
|
||||
<div class="mail-item active">
|
||||
<div style="display:flex; justify-content:space-between; margin-bottom:4px;">
|
||||
<span style="font-weight:700; color:var(--primary-color);">라오스 농림부</span>
|
||||
<span style="font-size:11px; color:var(--text-sub);">오후 2:30</span>
|
||||
</div>
|
||||
<div style="font-weight:600; font-size:12px; margin-bottom:4px;">ITTC 교육센터 착공식 일정 협의</div>
|
||||
<div style="font-size:11px; color:var(--text-sub); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;">안녕하세요. 착공식 관련하여 첨부 드리는 공문을...</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="mail-content-area">
|
||||
<div class="mail-content-header">
|
||||
<h2 style="font-size:18px; color:var(--primary-color); margin-bottom:8px;">ITTC 교육센터 착공식 일정 협의 요청</h2>
|
||||
<div style="font-size:12px; color:var(--text-sub);"><strong>보낸사람</strong> pany.s@lao.gov.la (라오스 농림부)</div>
|
||||
<div style="font-size:12px; color:var(--text-sub);"><strong>날짜</strong> 2026년 2월 26일 14:30</div>
|
||||
</div>
|
||||
<div class="mail-body">
|
||||
안녕하세요. 이태훈 선임연구원님.<br><br>
|
||||
라오스 ITTC 관개 교육센터 착공식과 관련하여 정부 측 인사의 일정을 반영한 최종 공문을 송부합니다.
|
||||
</div>
|
||||
|
||||
<div class="attachment-area">
|
||||
<div style="display:flex; justify-content:space-between;">
|
||||
<div>첨부파일 리스트</div>
|
||||
<div class="ai-toggle-wrap"><span class="ai-label">AI 판단</span><label class="switch"><input type="checkbox" id="aiToggle" checked onchange="renderFiles()"><span class="slider"></span></label></div>
|
||||
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:12px;">
|
||||
<div style="font-weight:700; font-size:13px;">첨부파일 리스트</div>
|
||||
<div class="ai-toggle-wrap">
|
||||
<span class="ai-label">AI 판단</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="aiToggle" checked onchange="renderFiles()">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="attachmentList"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let currentFiles = [];
|
||||
async function loadAttachments() {
|
||||
const res = await fetch('/attachments');
|
||||
currentFiles = await res.json();
|
||||
renderFiles();
|
||||
try {
|
||||
const res = await fetch('/attachments');
|
||||
currentFiles = await res.json();
|
||||
renderFiles();
|
||||
} catch (e) { console.error(e); }
|
||||
}
|
||||
|
||||
function renderFiles() {
|
||||
const isAiActive = document.getElementById('aiToggle').checked;
|
||||
const container = document.getElementById('attachmentList');
|
||||
@@ -47,10 +95,18 @@
|
||||
currentFiles.forEach((file, index) => {
|
||||
const item = document.createElement('div');
|
||||
item.className = 'attachment-item-wrap';
|
||||
item.style.marginBottom = "8px";
|
||||
const btnAiClass = isAiActive ? 'btn-ai' : 'btn-normal';
|
||||
item.innerHTML = `
|
||||
<div class="attachment-item">
|
||||
<div class="file-info"><span>📄</span><div>${file.name}</div><span id="recommend-${index}" class="ai-recommend" style="display:none;"></span></div>
|
||||
<div class="file-info">
|
||||
<span style="font-size:20px;">📄</span>
|
||||
<div>
|
||||
<div style="font-size:12px; font-weight:700;">${file.name}</div>
|
||||
<div style="font-size:10px; color:var(--text-sub);">${file.size}</div>
|
||||
</div>
|
||||
<span id="recommend-${index}" class="ai-recommend" style="display:none;">분석 대기 중...</span>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-upload ${btnAiClass}" onclick="startAnalysis(${index})">AI 분석</button>
|
||||
<button class="btn-upload btn-normal" onclick="confirmUpload(${index})">파일 업로드</button>
|
||||
@@ -61,25 +117,45 @@
|
||||
container.appendChild(item);
|
||||
});
|
||||
}
|
||||
|
||||
async function startAnalysis(index) {
|
||||
const file = currentFiles[index];
|
||||
const logArea = document.getElementById(`log-area-${index}`);
|
||||
const logContent = document.getElementById(`log-content-${index}`);
|
||||
const recLabel = document.getElementById(`recommend-${index}`);
|
||||
logArea.classList.add('active');
|
||||
logContent.innerHTML = '>>> 분석 가동...';
|
||||
logContent.innerHTML = '<div class="log-line log-info">>>> 3중 레이어 AI 엔진 가동...</div>';
|
||||
recLabel.style.display = 'inline-block';
|
||||
recLabel.innerText = '분석 중...';
|
||||
const res = await fetch(`/analyze-file?filename=${encodeURIComponent(file.name)}`);
|
||||
const analysis = await res.json();
|
||||
recLabel.innerText = `추천: ${analysis.suggested_path}`;
|
||||
logContent.innerHTML = `[결과] ${analysis.suggested_path}<br>└ ${analysis.reason}`;
|
||||
currentFiles[index].analysis = analysis;
|
||||
try {
|
||||
const res = await fetch(`/analyze-file?filename=${encodeURIComponent(file.name)}`);
|
||||
const analysis = await res.json();
|
||||
analysis.log_steps.forEach(step => {
|
||||
const line = document.createElement('div');
|
||||
line.className = 'log-line';
|
||||
line.innerText = " " + step;
|
||||
logContent.appendChild(line);
|
||||
});
|
||||
const resLine = document.createElement('div');
|
||||
resLine.className = 'log-line log-success';
|
||||
resLine.style.marginTop = "8px";
|
||||
resLine.innerHTML = `[결과] ${analysis.suggested_path}<br>└ 근거: ${analysis.reason}`;
|
||||
logContent.appendChild(resLine);
|
||||
const details = document.createElement('details');
|
||||
details.innerHTML = `<summary style="color:#da8cf1; cursor:pointer; font-size:10px; margin-top:5px;">[추출 원본 데이터 보기]</summary><div style="color:#a0aec0; padding:8px; background:#2d3748; margin-top:5px; white-space:pre-wrap; max-height:150px; overflow-y:auto; border-radius:4px; font-size:10px;">${analysis.raw_text}</div>`;
|
||||
logContent.appendChild(details);
|
||||
recLabel.innerText = `추천: ${analysis.suggested_path}`;
|
||||
if(analysis.suggested_path === "분석실패") {
|
||||
recLabel.style.color = "#f21d0d"; recLabel.style.background = "#fee9e7";
|
||||
}
|
||||
currentFiles[index].analysis = analysis;
|
||||
} catch (e) { logContent.innerHTML += '<div class="log-line">ERR: 서버 오류</div>'; }
|
||||
}
|
||||
|
||||
function confirmUpload(index) {
|
||||
const file = currentFiles[index];
|
||||
const path = file.analysis ? file.analysis.suggested_path : "선택한 탭";
|
||||
if (confirm(`[${file.name}] 파일을 [${path}]로 업로드하시겠습니까?`)) alert("완료");
|
||||
if (confirm(`[${file.name}] 파일을 [${path}] 위치로 업로드하시겠습니까?`)) alert("완료되었습니다.");
|
||||
}
|
||||
loadAttachments();
|
||||
</script>
|
||||
|
||||
485
style/style.css
485
style/style.css
@@ -1,412 +1,95 @@
|
||||
:root {
|
||||
--primary-color: #1E5149;
|
||||
--bg-color: #FFFFFF;
|
||||
--text-main: #222222;
|
||||
--text-sub: #666666;
|
||||
--border-color: #E5E7EB;
|
||||
/* 매우 연한 회색 라인 */
|
||||
--hover-bg: #F9FAFB;
|
||||
/* Design Tokens from tokens.json */
|
||||
--primary-color: #1E5149; --primary-lv-0: #e9eeed; --primary-lv-1: #D2DCDB; --primary-lv-8: #193833;
|
||||
--bg-default: #FFFFFF; --bg-muted: #F9FAFB;
|
||||
--text-main: #2D3748; --text-sub: #718096; --border-color: #E2E8F0;
|
||||
--header-gradient: linear-gradient(90deg, #193833 0%, #1e5149 100%);
|
||||
--ai-gradient: linear-gradient(180deg, #da8cf1 0%, #8bb1f2 100%);
|
||||
--space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 32px; --space-xl: 64px;
|
||||
--radius-sm: 4px; --radius-lg: 8px;
|
||||
--fz-h1: 20px; --fz-h2: 16px; --fz-body: 13px;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* Base Reset */
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: 'Pretendard', sans-serif; font-size: var(--fz-body); color: var(--text-main); background: var(--bg-default); min-height: 100vh; }
|
||||
a { text-decoration: none; color: inherit; }
|
||||
button { cursor: pointer; border: none; font-family: inherit; }
|
||||
|
||||
body {
|
||||
font-family: 'Pretendard', sans-serif;
|
||||
font-size: 13px;
|
||||
color: var(--text-main);
|
||||
background-color: var(--bg-color);
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
/* Components: Topbar */
|
||||
.topbar { width: 100%; background: var(--header-gradient); color: #fff; padding: 0 var(--space-lg); position: fixed; top: 0; height: 36px; display: flex; align-items: center; z-index: 1000; }
|
||||
.topbar-header { margin-right: 80px; font-weight: 700; }
|
||||
.topbar-header h2 { font-size: 15px; }
|
||||
.nav-list { display: flex; list-style: none; gap: var(--space-sm); }
|
||||
.nav-item { padding: 4px 8px; border-radius: 4px; color: rgba(255,255,255,0.8); transition: 0.2s; font-size: 14px; display: flex; align-items: center; }
|
||||
.nav-item:hover { background: var(--primary-lv-1); color: #fff; }
|
||||
.nav-item.active { background: var(--primary-lv-0); color: var(--primary-color) !important; font-weight: 700; }
|
||||
|
||||
/* Topbar */
|
||||
.topbar {
|
||||
width: 100%;
|
||||
background-color: #1E5149;
|
||||
/* sample.png 탑바 다크 슬레이트 배경색 */
|
||||
color: #FFFFFF;
|
||||
padding: 0 1.5rem;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 100;
|
||||
}
|
||||
/* Global Layout */
|
||||
.main-content { margin-top: 36px; padding: var(--space-lg) var(--space-xl); max-width: 1400px; margin-left: auto; margin-right: auto; }
|
||||
header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--space-lg); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-color); }
|
||||
header h1 { font-size: var(--fz-h1); color: var(--primary-color); font-weight: 800; }
|
||||
.admin-info { color: var(--text-sub); font-size: 12px; margin-left: var(--space-lg); }
|
||||
|
||||
.topbar-header {
|
||||
margin-right: 2.5rem;
|
||||
}
|
||||
/* Portal (Index) */
|
||||
.portal-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: calc(100vh - 36px); background: var(--bg-muted); padding: var(--space-lg); }
|
||||
.portal-card { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 40px; text-align: center; transition: 0.3s; width: 100%; max-width: 380px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; gap: 20px; }
|
||||
.portal-card:hover { transform: translateY(-5px); border-color: var(--primary-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
|
||||
.portal-card .icon { font-size: 32px; width: 64px; height: 64px; background: var(--bg-muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
|
||||
.portal-card:hover .icon { background: var(--primary-color); color: #fff; }
|
||||
|
||||
.topbar-header h2 {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
/* Dashboard List */
|
||||
.continent-group { margin-bottom: var(--space-xl); }
|
||||
.continent-header { font-size: 18px; font-weight: 800; color: var(--primary-color); padding: var(--space-md) 0; border-bottom: 2px solid var(--primary-color); display: flex; justify-content: space-between; cursor: pointer; margin-bottom: var(--space-md); }
|
||||
.country-group { margin-bottom: var(--space-md); }
|
||||
.country-header { font-size: 14px; font-weight: 700; padding: var(--space-sm) 0; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; cursor: pointer; }
|
||||
.continent-body, .country-body { display: none; }
|
||||
.active > .continent-body, .active > .country-body { display: block; }
|
||||
.active > .continent-header .toggle-icon, .active > .country-header .toggle-icon { transform: rotate(180deg); }
|
||||
.toggle-icon { transition: 0.2s; display: inline-block; }
|
||||
|
||||
.nav-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.accordion-container { border: none; background: transparent; margin-top: var(--space-xs); }
|
||||
.accordion-list-header, .accordion-header { display: grid; grid-template-columns: 2.5fr 1fr 1fr 0.8fr 2fr; gap: var(--space-md); padding: var(--space-md) var(--space-lg); align-items: center; }
|
||||
.accordion-list-header { font-size: 11px; font-weight: 700; color: var(--text-sub); border-bottom: 1px solid var(--text-main); text-transform: uppercase; }
|
||||
.accordion-item { border-bottom: 1px solid var(--border-color); transition: background 0.1s; }
|
||||
.accordion-item:hover { background: #E9EEED; }
|
||||
.repo-title { font-weight: 700; color: var(--primary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
|
||||
.repo-files { text-align: center; font-weight: 600; color: var(--text-main); }
|
||||
.repo-log { font-size: 11px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.accordion-body { display: none; padding: var(--space-lg); background: var(--bg-muted); border-top: 1px solid var(--border-color); }
|
||||
.accordion-item.active .accordion-body { display: block; }
|
||||
.status-warning { background: #fff9e6; } .status-error { background: #fee9e7; }
|
||||
.warning-text { color: #f21d0d !important; font-weight: 700; }
|
||||
|
||||
.nav-item {
|
||||
padding: 0 1rem;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
margin: 0 2px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 13px;
|
||||
}
|
||||
/* Mail Manager */
|
||||
.mail-wrapper { display: flex; height: calc(100vh - 36px); margin-top: 36px; background: #fff; overflow: hidden; }
|
||||
.mail-sidebar { width: 240px; border-right: 1px solid var(--border-color); padding: var(--space-md); background: var(--bg-muted); }
|
||||
.project-select { width: 100%; padding: var(--space-sm); border-radius: var(--radius-sm); border: 1px solid var(--border-color); margin-bottom: var(--space-lg); font-weight: 700; }
|
||||
.mail-list-area { width: 380px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; }
|
||||
.mail-item { padding: var(--space-md); border-bottom: 1px solid var(--border-color); cursor: pointer; transition: 0.2s; }
|
||||
.mail-item.active { background: #E9EEED; border-left: 4px solid var(--primary-color); }
|
||||
.attachment-area { padding: var(--space-lg); border-top: 1px solid var(--border-color); background: var(--bg-muted); }
|
||||
.attachment-item { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-lg); border: 1px solid var(--border-color); margin-bottom: var(--space-sm); flex-wrap: wrap; }
|
||||
.file-info { display: flex; align-items: center; gap: var(--space-sm); flex: 1; min-width: 200px; }
|
||||
.ai-recommend { font-size: 11px; color: #6d3dc2; background: #f1ecf9; padding: 2px 6px; border-radius: 4px; font-weight: 700; margin-left: 10px; }
|
||||
.file-log-area { display: none; width: 100%; margin-top: 10px; background: #1a202c; border-radius: 4px; padding: 12px; font-family: monospace; font-size: 11px; color: #cbd5e0; line-height: 1.5; }
|
||||
.file-log-area.active { display: block; }
|
||||
.btn-group { display: flex; gap: var(--space-xs); }
|
||||
.btn-upload { padding: 6px 12px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; }
|
||||
.btn-ai { background: var(--ai-gradient); }
|
||||
.btn-normal { background: var(--primary-color); }
|
||||
|
||||
.nav-item:hover,
|
||||
.nav-item.active {
|
||||
background-color: #E9EEED;
|
||||
color: #1E5149;
|
||||
font-weight: 500;
|
||||
}
|
||||
/* Toggle Switch */
|
||||
.switch { position: relative; display: inline-block; width: 34px; height: 20px; }
|
||||
.switch input { opacity: 0; width: 0; height: 0; }
|
||||
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 20px; }
|
||||
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
|
||||
input:checked + .slider { background: var(--ai-gradient); }
|
||||
input:checked + .slider:before { transform: translateX(14px); }
|
||||
.ai-toggle-wrap { display: flex; align-items: center; gap: var(--space-sm); font-size: 12px; font-weight: 600; color: var(--text-sub); }
|
||||
|
||||
/* Main Content */
|
||||
.main-content {
|
||||
margin-top: 36px;
|
||||
flex: 1;
|
||||
padding: 2rem 2.5rem;
|
||||
width: 100%;
|
||||
max-width: 1400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
header {
|
||||
margin-bottom: 2rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
padding-bottom: 0.8rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
/* 선 굵기와 색상 얇게 */
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.admin-info {
|
||||
color: var(--text-sub);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Multi-level Accordion (Minimalist/No Box Design) */
|
||||
.continent-group {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.continent-header {
|
||||
color: var(--text-main);
|
||||
padding: 0.5rem 0;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
border-bottom: 2px solid var(--text-main);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.continent-body {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.continent-group.active > .continent-body {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.country-group {
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
border-bottom: 1px dashed var(--border-color); /* 국가 사이 구분선 */
|
||||
}
|
||||
|
||||
.country-group:last-child {
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.country-header {
|
||||
color: var(--primary-color);
|
||||
padding: 0.5rem 0;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.country-body {
|
||||
display: none;
|
||||
padding-left: 0.5rem; /* Slight indent instead of borders */
|
||||
}
|
||||
|
||||
.country-group.active > .country-body {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.toggle-icon {
|
||||
font-size: 10px;
|
||||
margin-left: 8px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* Accordion Styles (Projects - Row Based) */
|
||||
.accordion-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.accordion-item {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.accordion-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.accordion-header {
|
||||
display: grid;
|
||||
grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr 2fr;
|
||||
gap: 1rem;
|
||||
padding: 1rem 0;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
background-color: transparent;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.accordion-item:hover .accordion-header {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.accordion-item.active .accordion-header {
|
||||
/* No border-bottom or background change for active */
|
||||
}
|
||||
|
||||
.accordion-header > div {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.header-label {
|
||||
font-size: 11px;
|
||||
color: var(--text-sub);
|
||||
margin-bottom: 3px;
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.header-value {
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.accordion-body {
|
||||
display: none;
|
||||
padding: 1.5rem 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.accordion-item.active .accordion-body {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 3rem;
|
||||
}
|
||||
|
||||
.detail-section h4 {
|
||||
margin-bottom: 1rem;
|
||||
color: var(--text-main);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* Table Styles - Super Minimal Line Style */
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
padding: 8px 4px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
color: var(--text-sub);
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
font-size: 12px;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.data-table tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* General Utilities */
|
||||
.badge {
|
||||
background: #EEEEEE;
|
||||
color: #555555;
|
||||
padding: 2px 6px;
|
||||
border-radius: 2px;
|
||||
/* 라운드 거의 없앰 */
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-up {
|
||||
color: #D32F2F;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-down {
|
||||
color: #1976D2;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Sync Button */
|
||||
.sync-btn {
|
||||
background-color: var(--primary-color);
|
||||
color: #FFFFFF;
|
||||
border: 1px solid var(--primary-color);
|
||||
padding: 6px 14px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s, opacity 0.2s;
|
||||
margin-right: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.sync-btn:hover {
|
||||
background-color: #153A34;
|
||||
}
|
||||
|
||||
.sync-btn:disabled {
|
||||
background-color: #A0B2AF;
|
||||
border-color: #A0B2AF;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Spinner */
|
||||
.spinner {
|
||||
display: none;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: 2px solid rgba(255,255,255,0.3);
|
||||
border-radius: 50%;
|
||||
border-top-color: #fff;
|
||||
animation: spin 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.sync-btn.loading .spinner {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* --- Responsive Design --- */
|
||||
@media screen and (max-width: 1024px) {
|
||||
.accordion-header {
|
||||
grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.5fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.topbar {
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
/* 스크롤바 숨김 */
|
||||
.topbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.main-content {
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.detail-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
/* 모바일에서 아코디언 헤더를 다단으로 배치 */
|
||||
.accordion-header {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
row-gap: 1rem;
|
||||
}
|
||||
/* 프로젝트 명과 최근 로그는 공간을 넓게 쓰도록 설정 */
|
||||
.accordion-header > div:nth-child(1),
|
||||
.accordion-header > div:nth-child(6) {
|
||||
grid-column: span 2;
|
||||
}
|
||||
.continent-header {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
/* 아주 작은 화면에서는 1열로 배치 */
|
||||
.accordion-header {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.accordion-header > div {
|
||||
grid-column: span 1 !important;
|
||||
}
|
||||
.topbar-header h2 {
|
||||
font-size: 13px;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.nav-item {
|
||||
padding: 0 0.5rem;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
/* Utils */
|
||||
.sync-btn { background: var(--primary-color); color: #fff; padding: 8px 16px; border-radius: var(--radius-lg); font-weight: 700; display: flex; align-items: center; gap: 8px; }
|
||||
.badge { background: #eee; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
|
||||
.spinner-small { width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s linear infinite; display: inline-block; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
Reference in New Issue
Block a user