유형 B 파이프라인 연결: block_assembler type B 조립 + zone 기반 전환 시작
- block_assembler: _assemble_slide_html_type_b 추가 (filled/after용 HTML 생성) - fit_verifier: redistribute()가 ROLE_ZONE_MAP 대신 containers zone 사용 - renderer: render_slide_from_html()에 zone 기반 높이 탐색 추가 - pipeline: 팝업 HTML CSS를 콘텐츠 유형별(table/list/text) 분기 - run_from_stage1b: MDX 파일 하드코딩 제거 + layout_template 전달 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1088,6 +1088,34 @@ async def generate_slide(
|
||||
# markdown bold → HTML bold
|
||||
clean_content = _re.sub(r'\*\*(.+?)\*\*', r'<strong>\1</strong>', clean_content)
|
||||
|
||||
# 콘텐츠 유형 감지: 테이블 vs 리스트
|
||||
has_table = "<table" in clean_content
|
||||
has_list = "<ul" in clean_content or "<li" in clean_content
|
||||
|
||||
# 콘텐츠 유형별 CSS
|
||||
if has_table:
|
||||
# 3열 비교표: 양쪽 동일 너비, 중앙 맞춤, bold+br 지원
|
||||
content_css = """
|
||||
table {{ border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 13px; table-layout: fixed; }}
|
||||
th {{ background: var(--color-primary); color: #fff; font-weight: 700; padding: 10px 14px; text-align: center; border: 1px solid #334155; }}
|
||||
th:nth-child(1), th:nth-child(3) {{ width: 42%; }}
|
||||
th:nth-child(2) {{ width: 16%; }}
|
||||
td {{ padding: 10px 14px; border: 1px solid var(--color-border); vertical-align: middle; text-align: center; line-height: 1.6; }}
|
||||
tr:nth-child(even) {{ background: var(--color-bg-subtle); }}"""
|
||||
elif has_list:
|
||||
# 카드형 리스트: 항목별 박스, 하위 항목은 인라인
|
||||
content_css = """
|
||||
ul {{ padding-left: 0; margin: 12px 0; list-style: none; }}
|
||||
li {{ margin-bottom: 12px; font-size: 14px; background: #f8fafc; border: 1px solid var(--color-border); border-radius: 8px; padding: 14px 18px; }}
|
||||
li ul {{ margin-top: 8px; margin-bottom: 0; padding-left: 0; }}
|
||||
li li {{ background: transparent; border: none; border-radius: 0; padding: 2px 0; margin-bottom: 4px; font-size: 13px; color: #475569; }}
|
||||
li li::before {{ content: "\\2022"; color: var(--color-accent); margin-right: 8px; }}"""
|
||||
else:
|
||||
# 기본 (텍스트)
|
||||
content_css = """
|
||||
ul {{ padding-left: 20px; margin: 8px 0; }}
|
||||
li {{ margin-bottom: 4px; font-size: 13px; }}"""
|
||||
|
||||
popup_html = f"""<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
@@ -1125,30 +1153,7 @@ h1 {{
|
||||
color: #64748b;
|
||||
margin-bottom: 20px;
|
||||
}}
|
||||
table {{
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 16px 0;
|
||||
font-size: 13px;
|
||||
}}
|
||||
th {{
|
||||
background: var(--color-primary);
|
||||
color: #ffffff;
|
||||
font-weight: 700;
|
||||
padding: 10px 14px;
|
||||
text-align: center;
|
||||
border: 1px solid #334155;
|
||||
}}
|
||||
td {{
|
||||
padding: 8px 14px;
|
||||
border: 1px solid var(--color-border);
|
||||
vertical-align: top;
|
||||
line-height: 1.5;
|
||||
}}
|
||||
tr:nth-child(even) {{ background: var(--color-bg-subtle); }}
|
||||
td:first-child {{ font-weight: 600; background: #f1f5f9; }}
|
||||
ul {{ padding-left: 20px; margin: 8px 0; }}
|
||||
li {{ margin-bottom: 4px; font-size: 13px; }}
|
||||
{content_css}
|
||||
strong {{ color: var(--color-primary); }}
|
||||
.source {{
|
||||
font-size: 11px;
|
||||
|
||||
Reference in New Issue
Block a user