fix(project): 설명 체크리스트를 진짜 글머리 기호처럼 + 서식 도구 상단 고정

- 체크박스를 글자 속 <input> 대신 글머리 자리에 CSS 로 그린다(li::before) —
  체크박스 왼쪽에 글자가 들어가던 버그 해결, Enter·빈 줄 Enter·Backspace 는
  브라우저 글머리 목록 동작 그대로. 체크 여부는 li data-checked="true",
  글자보다 왼쪽(체크박스)을 누르면 체크/해제. 새 줄은 체크 안 된 채로 시작
- 예전 방식(<input type=checkbox>) 체크리스트는 열 때 자동으로 새 방식으로 변환
- 서버 정리기: li 의 data-checked="true" 만 허용
- 서식 도구 줄 sticky — 설명을 아래로 스크롤해도 설명 구간 안에서는 위에 붙어 있음
- 정적 파일 버전 20260926r

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 14:43:08 +09:00
parent 5b0c5905b2
commit 7743361607
8 changed files with 80 additions and 71 deletions
+4
View File
@@ -349,6 +349,8 @@ _DESC_ALLOWED_ATTRS: dict[str, frozenset[str]] = {
"input": frozenset({"type", "checked"}),
# ul: 체크리스트(서식 도구 ☑ — 줄마다 체크박스) 표시용 class="pj-checklist" 하나만
"ul": frozenset({"class"}),
# li: 체크리스트 줄의 체크 여부 — data-checked="true" 만(체크박스는 CSS 가 글머리처럼 그린다)
"li": frozenset({"data-checked"}),
}
# URL 은 금지 목록이 아니라 허용 목록으로 검사한다. 금지 목록(javascript: 등)은
# "jav&#x09;ascript:" 처럼 중간에 탭/개행을 끼우면 통과하는데, 브라우저는 URL 을
@@ -446,6 +448,8 @@ class _DescriptionSanitizer(HTMLParser):
# 화면 스타일을 흔들 여지를 남기지 않는다.
if name == "class" and value.strip() != _DESC_ALLOWED_CLASS.get(tag):
continue
if name == "data-checked" and value.strip() != "true":
continue
kept.append(f'{name}="{_desc_escape_attr(value)}"')
attr_text = (" " + " ".join(kept)) if kept else ""
self.out.append(f"<{tag}{attr_text}>")
@@ -1,8 +1,8 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926q" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926q" />
<link rel="stylesheet" href="/static/project.css?v=20260926r" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926r" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926q" />
<link rel="stylesheet" href="/static/project.css?v=20260926r" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -101,5 +101,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260926q" defer></script>
<script src="/static/project.js?v=20260926r" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926q" />
<link rel="stylesheet" href="/static/project.css?v=20260926r" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20260926q" defer></script>
<script src="/static/project.js?v=20260926r" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926q" />
<link rel="stylesheet" href="/static/project.css?v=20260926r" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -472,5 +472,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260926q" defer></script>
<script src="/static/project.js?v=20260926r" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926q" />
<link rel="stylesheet" href="/static/project.css?v=20260926r" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260926q" defer></script>
<script src="/static/project.js?v=20260926r" defer></script>
{% endblock %}