feat(project): add font options and selected goal text formatting

Restore the board header add button to the task side panel while keeping footer quick entry. Add safe, persisted goal text formatting and self-hosted Project font preferences with shared help updates and regression coverage.
This commit is contained in:
2026-10-02 17:28:54 +09:00
parent 035cb83d6f
commit 20232baf06
39 changed files with 756 additions and 54 deletions
+2 -2
View File
@@ -2392,9 +2392,9 @@ class ProjectStore:
"SELECT row_id, month, body FROM goal_cells WHERE row_id = ANY(%s) AND month = ANY(%s)",
(rows_in, cols_in),
).fetchall()}
text = store.validate_goal_text("\n".join(
text = store.merge_goal_texts([
bodies[(r, m)] for r in rows_in for m in cols_in if bodies.get((r, m))
))
])
conn.execute(
"DELETE FROM goal_cell_merges WHERE row_id = ANY(%s) AND start_month = ANY(%s)",
(rows_in, cols_in),
+3 -2
View File
@@ -2567,7 +2567,8 @@ def _goal_area_layout(rows: list[dict[str, Any]], this_month: int) -> None:
kind = "year" if m == store.GOAL_YEAR else "quarter" if m in store.GOAL_COL_QUARTER else "month"
h = 0 if kind == "year" else store.GOAL_COL_QUARTER[m] if kind == "quarter" else store.goal_quarter_of(m)
out.append({"m": m, "kind": kind, "h": h, "span": span, "rspan": rspan,
"now": kind == "month" and m <= this_month <= m + span - 1})
"now": kind == "month" and m <= this_month <= m + span - 1,
"html": store.goal_text_html(row.get("cells", {}).get(m, ""))})
row["layout"] = out
@@ -3062,7 +3063,7 @@ def _month_plan(st: Any, year: int, month: int) -> list[dict[str, Any]] | None:
if not row.get("label_cont"):
label = row.get("label") or ""
cell = next((c for c in row["layout"] if c["kind"] == "month" and c["m"] <= month <= c["m"] + c["span"] - 1), None)
text = (row["cells"].get(cell["m"], "") if cell else "").strip()
text = store.goal_text_plain(row["cells"].get(cell["m"], "") if cell else "").strip()
if not text:
continue
rng = f"{cell['m']}~{cell['m'] + cell['span'] - 1}월" if cell["span"] > 1 else ""
+74
View File
@@ -6,8 +6,10 @@ DB 없이 단위 테스트 가능한 순수 함수만 둔다(malaysia.store 패
from __future__ import annotations
import json
import re
from datetime import date, timedelta
from html import escape
from html.parser import HTMLParser
from typing import Any
@@ -475,11 +477,83 @@ def validate_goal_color(color: Any) -> str:
def validate_goal_text(body: Any) -> str:
v = str(body or "").replace("\r\n", "\n").strip()
if v.startswith(GOAL_RICH_PREFIX):
runs = goal_text_runs(v, strict=True)
if not "".join(r["text"] for r in runs).strip():
return ""
return GOAL_RICH_PREFIX + json.dumps(runs, ensure_ascii=False, separators=(",", ":"))
if len(v) > GOAL_TEXT_MAX:
raise ValueError(f"칸 하나에 {GOAL_TEXT_MAX}자까지 쓸 수 있습니다.")
return v
# 기존 TEXT 칸에 버전이 있는 텍스트 조각을 저장한다. 예전 평문은 그대로 유지한다.
GOAL_RICH_PREFIX = "pj-rich:v1:"
def goal_text_runs(body: Any, *, strict: bool = False) -> list[dict[str, Any]]:
value = str(body or "")
if not value.startswith(GOAL_RICH_PREFIX):
return [{"text": value}]
try:
raw = json.loads(value[len(GOAL_RICH_PREFIX):])
if not isinstance(raw, list) or len(raw) > GOAL_TEXT_MAX:
raise ValueError("서식 데이터가 올바르지 않습니다.")
runs = []
for item in raw:
if not isinstance(item, dict) or not isinstance(item.get("text"), str):
raise ValueError("서식 데이터가 올바르지 않습니다.")
run: dict[str, Any] = {"text": item["text"]}
if isinstance(item.get("bold"), bool):
run["bold"] = item["bold"]
if re.fullmatch(r"#[0-9a-fA-F]{6}", str(item.get("color", ""))):
run["color"] = item["color"].lower()
size = item.get("size")
if isinstance(size, int) and not isinstance(size, bool) and 10 <= size <= 32:
run["size"] = size
if run["text"]:
runs.append(run)
if sum(len(r["text"]) for r in runs) > GOAL_TEXT_MAX:
raise ValueError(f"칸 하나에 {GOAL_TEXT_MAX}자까지 쓸 수 있습니다.")
return runs
except (ValueError, TypeError) as err:
if strict:
raise ValueError("칸의 서식 데이터가 올바르지 않습니다.") from err
return [{"text": value}]
def goal_text_plain(body: Any) -> str:
return "".join(r["text"] for r in goal_text_runs(body))
def goal_text_html(body: Any) -> str:
"""허용한 글자 서식만 HTML로 만든다. 사용자 텍스트는 항상 escape한다."""
out = []
for run in goal_text_runs(body):
style = []
if "bold" in run:
style.append("font-weight:" + ("700" if run["bold"] else "400"))
if "color" in run:
style.append("color:" + run["color"])
if "size" in run:
style.append(f'font-size:{run["size"]}px')
text = escape(run["text"])
out.append(f'<span style="{";".join(style)}">{text}</span>' if style else text)
return "".join(out)
def merge_goal_texts(bodies: list[str]) -> str:
values = [v for v in bodies if goal_text_plain(v).strip()]
if not any(v.startswith(GOAL_RICH_PREFIX) for v in values):
return validate_goal_text("\n".join(values))
runs = []
for value in values:
if runs:
runs.append({"text": "\n"})
runs.extend(goal_text_runs(value))
return validate_goal_text(GOAL_RICH_PREFIX + json.dumps(runs, ensure_ascii=False))
# ── 엑셀식 사각형 병합(마이그레이션 015) ──────────────────────────────
class GoalMigration015Needed(RuntimeError):
"""세로 병합·주간 회의록은 마이그레이션 015 뒤에만 된다."""
@@ -34,3 +34,4 @@
title="프로젝트 관리 도움말" aria-label="프로젝트 관리 도움말">
<span class="material-symbols-outlined">help</span>
</a>
{% include "project/_options.html" %}
@@ -0,0 +1,31 @@
<button type="button" class="pj-help-btn" id="pj-options-btn" aria-label="Project 옵션" title="Project 옵션">
<span class="material-symbols-outlined">settings</span>
</button>
<dialog class="pj-options-dialog" id="pj-options-dialog" aria-labelledby="pj-options-title">
<form id="pj-options-form">
<h2 id="pj-options-title">Project 옵션</h2>
<label for="pj-options-font">폰트</label>
<select id="pj-options-font" name="font">
<option value="system">기본 시스템 폰트</option>
<option value="pretendard">프리텐다드</option>
<option value="nanum-square">나눔 스퀘어</option>
<option value="nanum-square-neo">나눔 스퀘어 네오</option>
<option value="nanum-square-round">나눔 스퀘어 라운드</option>
</select>
<div class="pj-options-preview" id="pj-options-preview">프로젝트와 목표를 한눈에<br><b>Project · 업무 이름 · 가나다 123</b></div>
<p>이 브라우저의 모든 Project 화면에 적용됩니다.</p>
<p class="pj-options-error" id="pj-options-error" role="alert" hidden></p>
<div class="pj-options-actions">
<button type="button" class="pj-btn" id="pj-options-cancel">취소</button>
<button type="submit" class="pj-btn pj-btn-primary" id="pj-options-save">저장</button>
</div>
</form>
</dialog>
<script>
try {
var pf = localStorage.getItem("pj_font") || "system";
if (["system", "pretendard", "nanum-square", "nanum-square-neo", "nanum-square-round"].indexOf(pf) >= 0)
document.documentElement.dataset.pjFont = pf;
} catch (_) {}
</script>
<script src="/static/project-options.js?v=20261002g" defer></script>
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -296,5 +296,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261002f" defer></script>
<script src="/static/project.js?v=20261002g" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -37,6 +37,15 @@
{% endif %}
</div>
{% if is_admin and goals_enabled and board %}
<div class="pj-goal-format" id="pj-goal-format" role="toolbar" aria-label="선택한 글자 서식">
<span>글자를 드래그해 선택한 뒤 서식을 변경하세요.</span>
<label>색상 <input type="color" value="#1e1f21" data-goal-format="color" aria-label="글자 색상" disabled></label>
<label>굵기 <select data-goal-format="bold" aria-label="글자 굵기" disabled><option value="400">보통</option><option value="700">굵게</option></select></label>
<label>크기 <select data-goal-format="size" aria-label="글자 크기" disabled>{% for size in (10, 12, 14, 16, 18, 20, 24, 28, 32) %}<option value="{{ size }}"{% if size == 14 %} selected{% endif %}>{{ size }}px</option>{% endfor %}</select></label>
<button type="button" class="pj-btn" data-goal-format="reset" disabled>서식 초기화</button>
</div>
{% endif %}
<div class="pj-view pj-goal-pane" id="pj-goal-pane">
{% if not goals_enabled %}
<div class="pj-empty">연간 목표가 아직 준비되지 않았습니다(DB 마이그레이션 013 필요).</div>
@@ -166,10 +175,11 @@
{% if c.kind in ('month', 'quarter') %}data-h="{{ c.h }}" {% endif %}data-month="{{ c.m }}" data-span="{{ c.span }}" data-rspan="{{ c.rspan }}"
{%- if c.span > 1 %} colspan="{{ c.span }}" style="--span: {{ c.span }}"{% endif %}{% if c.rspan > 1 %} rowspan="{{ c.rspan }}"{% endif %}>
{%- if editable -%}
<textarea class="pj-goal-text" rows="1" data-row="{{ row.id }}" data-month="{{ c.m }}"
placeholder="{{ '연간 목표' if c.m == 0 else ((c.h ~ '분기 목표') if c.kind == 'quarter' else '') }}">{{ row.cells.get(c.m, '') }}</textarea>
<div class="pj-goal-text" contenteditable="true" role="textbox" aria-multiline="true" aria-label="목표 내용"
data-row="{{ row.id }}" data-month="{{ c.m }}"
data-placeholder="{{ '연간 목표' if c.m == 0 else ((c.h ~ '분기 목표') if c.kind == 'quarter' else '') }}">{{ c.html|safe }}</div>
{%- else -%}
<div class="pj-goal-text-ro">{{ row.cells.get(c.m, '') }}</div>
<div class="pj-goal-text-ro">{{ c.html|safe }}</div>
{%- endif -%}
</td>
{% endfor %}
@@ -181,7 +191,7 @@
{% if is_admin %}
<div class="pj-goal-foot">
<button type="button" class="pj-btn" id="pj-goal-area-add">+ 업무 영역 추가</button>
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 글자를 드래그해 선택하면 표 위에서 색상·굵기·크기를 바꾸거나 서식을 초기화할 수 있습니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
{%- if board.halves %} 칸을 마우스로 끌어 여러 칸을 고른 뒤 우클릭 → 셀 병합, 병합된 칸은 우클릭 → 병합 해제(글은 왼쪽 위 칸에 남음).{% endif %}
월 이름을 누르면 그 달 주간 회의록이 열립니다.</span>
</div>
@@ -196,5 +206,6 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261002f" defer></script>
<script src="/static/project-goal-text.js?v=20261002g" defer></script>
<script src="/static/project.js?v=20261002g" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<link rel="stylesheet" href="/static/project-help.css?v=20261002d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -78,7 +78,7 @@
<section class="pjh-sec" id="layout">
<h2><span class="pjh-num">2</span>화면 구성</h2>
<div class="pjh-map" aria-hidden="true">
<div class="pjh-map-top"><span><b>위쪽 바</b>화면 이름</span><span>🔔 알림 · 내 이름 · 로그아웃 · <b style="display:inline">?</b> 도움말</span></div>
<div class="pjh-map-top"><span><b>위쪽 바</b>화면 이름</span><span>🔔 알림 · 내 이름 · 로그아웃 · <b style="display:inline">?</b> 도움말 · 옵션</span></div>
<div class="pjh-map-side"><b>왼쪽 사이드바</b>전체 검색<br>수신함 · 내 작업 · 휴지통 · 목표<br>프로젝트 목록<br>완료 프로젝트<br>전체 멤버</div>
<div class="pjh-map-main"><b>가운데 작업 영역</b>왼쪽 위: 프로젝트 제목 · 멤버<br>그 아래: 보기 탭(보드 · 목록 · 캘린더 · 타임라인 · 대시보드)<br>오른쪽 위: 범위(이 프로젝트 / 전체 프로젝트)<br>필터 바<br>작업들</div>
</div>
@@ -94,7 +94,9 @@
<b>달성</b>은 실적÷목표(100% 이상 초록)로 저절로 계산됩니다. 분기 칸 머리의 <b>‹</b> 버튼을 누르면 그 분기의 월 칸 3개가
접히고, 다시 누르면 펼쳐집니다(접힌 상태는 내 브라우저에 기억). 월 이름을 누르면 그 달 <b>주간 회의록</b>이 열립니다.
<b>입력은 관리자만</b> 할 수 있고(칸을 고치면 바로 저장), 다른 직원은 보기만 합니다. 관리자는 <b>+ 연도 추가</b>로 새해 목표를
만들고(이전 연도의 업무 영역 구성을 그대로 가져옴), 영역·줄 이름은 <b>눌러서 그 자리에서 고치고</b>(Enter 저장, Esc 취소),
만듭니다(이전 연도의 업무 영역 구성을 그대로 가져옴). 글 칸에서 <b>글자를 드래그해 선택</b>하고 표 위 서식 도구로 <b>색상·굵기·크기</b>를 바꾸면 선택한 글자에만 적용됩니다.
<span class="pjh-ui">서식 초기화</span>는 선택한 글자를 기본 서식으로 되돌리며 내용은 유지합니다. 서식도 자동으로 저장됩니다.
영역·줄 이름은 <b>눌러서 그 자리에서 고치고</b>(Enter 저장, Esc 취소),
구역·항목 칸을 <b>우클릭</b>하거나 칸 오른쪽 위의 작은 <span class="pjh-ui">⋮</span> 버튼(마우스를 올리면 보임)을 눌러 색·순서·줄 추가·삭제를 합니다.
키보드로는 <kbd>Tab</kbd>으로 이름 칸·<span class="pjh-ui">⋮</span>로 가서 <kbd>Enter</kbd>(이름 칸 = 이름 고치기, ⋮ = 메뉴), 메뉴 안에서 <kbd>↑</kbd><kbd>↓</kbd>·<kbd>Enter</kbd>,
<kbd>Esc</kbd>로 닫습니다. 터치 화면에서는 ⋮ 버튼이 늘 옅게 보여 손가락으로 누르면 됩니다. 업무 영역 칸은 엑셀처럼 <b>병합</b>할 수 있습니다 — 칸을 마우스로
@@ -116,6 +118,8 @@
<li><span class="pjh-ui"><span class="material-symbols-outlined">notifications</span></span> 종 아이콘 — 읽지 않은 알림 수가 표시되고, 누르면 수신함으로 갑니다.</li>
<li><span class="pjh-ui"><span class="material-symbols-outlined">fit_screen</span></span> 화면 배율 — 누르면(파랗게 켜짐) 화면 전체를 75%로 줄입니다. 2880×1620 모니터를 Windows 배율 200%로 쓰면 화면이 꽉 차 보이는데, 이때 켜면 1920×1080 모니터와 같은 모습이 됩니다. 브라우저마다 기억합니다. 메뉴·말풍선 같은 작은 팝업은 원래 크기로 뜹니다.</li>
<li><span class="pjh-ui"><span class="material-symbols-outlined">help</span></span> 물음표 — 지금 보고 있는 이 도움말을 새 탭으로 엽니다.</li>
<li><span class="pjh-ui"><span class="material-symbols-outlined">settings</span></span> 도움말 오른쪽의 옵션 — 폰트를 고르고 미리 본 뒤 <span class="pjh-ui">저장</span>을 누르면 Project 화면에 적용되고 창이 닫힙니다.
기본 시스템 폰트·프리텐다드·나눔 스퀘어·나눔 스퀘어 네오·나눔 스퀘어 라운드 중 선택할 수 있습니다. 설정은 이 브라우저의 모든 Project 화면에서 기억합니다. <span class="pjh-ui">취소</span>는 변경을 적용하지 않고 닫습니다.</li>
</ul>
<h3>프로젝트 제목</h3>
<p>가운데 위 프로젝트 제목에 마우스를 올리면 테두리가 생깁니다. 누르면 그 자리에서 이름을 고칩니다 — <kbd>Enter</kbd>나 바깥을 누르면 저장, <kbd>Esc</kbd>는 취소. (그 프로젝트 멤버·관리자만)</p>
@@ -232,7 +236,8 @@
<div><b>기본 담당자</b>를 정해 두면, 그 섹션에 담당자 없는 작업을 새로 만들거나 옮겨 올 때 그 사람이 자동으로 담당자가 됩니다. 예) “검토” 섹션의 기본 담당자 = 팀장.</div></div>
<h3>작업 카드 다루기</h3>
<ul>
<li><b>작업 추가</b> — 섹션 머리의 <span class="pjh-ui">+</span> 또는 섹션 맨 아래 <span class="pjh-ui">+ 작업 추가</span>를 누르면 보드 안에 입력 카드가 나타납니다. <b>작업 이름·담당자·마감일</b>을 정한 뒤 <kbd>Enter</kbd>를 누르거나 카드 밖을 클릭하면 저장됩니다. Enter로 저장하면 다음 작업을 계속 입력할 수 있고, <kbd>Esc</kbd>로 취소할 수 있습니다.</li>
<li><b>상단 작업 추가</b> — 섹션 머리의 <span class="pjh-ui">+</span>는 오른쪽에서 작업 상세창을 엽니다. 제목·설명·담당자·우선순위·마감일을 설정할 수 있습니다.</li>
<li><b>하단 작업 추가</b> — 섹션 맨 아래 <span class="pjh-ui">+ 작업 추가</span>는 보드 안에 간단한 입력 카드를 엽니다. <b>작업 이름·담당자·마감일</b>을 정한 뒤 <kbd>Enter</kbd>를 누르거나 카드 밖을 클릭하면 저장됩니다. Enter로 저장하면 다음 작업을 계속 입력할 수 있고, <kbd>Esc</kbd>로 취소할 수 있습니다.</li>
<li><b>열기</b> — 카드를 누르면 오른쪽에 작업 편집 창이 열립니다. (<a href="#task">8장</a>)</li>
<li><b>담당자·마감일 바로 바꾸기</b> — 카드의 사람 아이콘이나 날짜를 누르면 그 자리에서 바꿉니다. 비어 있으면 카드에 마우스를 올렸을 때 점선 원 아이콘이 나타납니다.</li>
<li><b>옮기기</b> — 카드를 끌어 다른 섹션에 놓으면 섹션이 바뀌고, 같은 섹션 안에서 위아래로 놓으면 순서가 바뀝니다.</li>
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261002f" defer></script>
<script src="/static/project.js?v=20261002g" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<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=20261002f" defer></script>
<script src="/static/project.js?v=20261002g" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -496,5 +496,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261002f" defer></script>
<script src="/static/project.js?v=20261002g" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<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=20261002f" defer></script>
<script src="/static/project.js?v=20261002g" defer></script>
{% endblock %}
+10
View File
@@ -0,0 +1,10 @@
@font-face { font-family: "Pretendard Variable"; src: url("vendor/project-fonts/PretendardVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquare"; src: url("vendor/project-fonts/NanumSquareR.woff") format("woff"); font-weight: 100 599; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquare"; src: url("vendor/project-fonts/NanumSquareB.woff") format("woff"); font-weight: 600 749; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquare"; src: url("vendor/project-fonts/NanumSquareEB.woff") format("woff"); font-weight: 750 900; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquareNeo"; src: url("vendor/project-fonts/NanumSquareNeoR.woff") format("woff"); font-weight: 100 599; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquareNeo"; src: url("vendor/project-fonts/NanumSquareNeoB.woff") format("woff"); font-weight: 600 749; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquareNeo"; src: url("vendor/project-fonts/NanumSquareNeoEB.woff") format("woff"); font-weight: 750 900; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquareRound"; src: url("vendor/project-fonts/NanumSquareRoundR.woff2") format("woff2"); font-weight: 100 599; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquareRound"; src: url("vendor/project-fonts/NanumSquareRoundB.woff2") format("woff2"); font-weight: 600 749; font-style: normal; font-display: swap; }
@font-face { font-family: "NanumSquareRound"; src: url("vendor/project-fonts/NanumSquareRoundEB.woff2") format("woff2"); font-weight: 750 900; font-style: normal; font-display: swap; }
+170
View File
@@ -0,0 +1,170 @@
/* 목표 셀의 선택한 글자 서식. 서버와 같은 버전 있는 텍스트 조각을 사용한다. */
(function () {
"use strict";
const PREFIX = "pj-rich:v1:";
function styles(node, inherited) {
const s = Object.assign({}, inherited);
if (node.nodeType !== 1) return s;
const css = node.style;
if (node.tagName === "B" || node.tagName === "STRONG") s.bold = true;
if (css.fontWeight) s.bold = css.fontWeight === "bold" || Number(css.fontWeight) >= 600;
const size = parseInt(css.fontSize, 10);
if (size >= 10 && size <= 32) s.size = size;
if (css.color) {
const rgb = css.color.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
const hex = rgb ? "#" + rgb.slice(1).map(function (v) { return Number(v).toString(16).padStart(2, "0"); }).join("") : css.color;
if (/^#[\da-f]{6}$/i.test(hex)) s.color = hex.toLowerCase();
}
return s;
}
function readRuns(editor) {
const runs = [];
function add(text, style) { if (text) runs.push(Object.assign({ text: text }, style)); }
function walk(node, inherited) {
if (node.nodeType === 3) { add(node.nodeValue, inherited); return; }
if (node.nodeType !== 1) return;
if (node.tagName === "BR") { add("\n", inherited); return; }
if (/^(SCRIPT|STYLE|IMG|IFRAME)$/.test(node.tagName)) return;
const style = styles(node, inherited);
const block = /^(DIV|P)$/.test(node.tagName);
if (block && runs.length && !runs[runs.length - 1].text.endsWith("\n")) add("\n", inherited);
Array.from(node.childNodes).forEach(function (child) { walk(child, style); });
}
Array.from(editor.childNodes).forEach(function (child) { walk(child, {}); });
return compact(runs);
}
function compact(runs) {
const out = [];
runs.forEach(function (run) {
if (!run.text) return;
const prev = out[out.length - 1];
if (prev && prev.bold === run.bold && prev.color === run.color && prev.size === run.size) prev.text += run.text;
else out.push(Object.assign({}, run));
});
return out;
}
function encode(runs) {
runs = compact(runs);
return runs.some(function (r) { return Object.keys(r).length > 1; }) ? PREFIX + JSON.stringify(runs) : runs.map(function (r) { return r.text; }).join("");
}
function decode(value) {
if (value.startsWith(PREFIX)) {
try { const runs = JSON.parse(value.slice(PREFIX.length)); if (Array.isArray(runs)) return runs; } catch (_) {}
}
return [{ text: value }];
}
function paint(editor, runs) {
editor.replaceChildren();
runs.forEach(function (r) {
if (typeof r.text !== "string") return;
const span = document.createElement("span");
span.textContent = r.text;
if (typeof r.bold === "boolean") span.style.fontWeight = r.bold ? "700" : "400";
if (/^#[\da-f]{6}$/i.test(r.color || "")) span.style.color = r.color;
if (Number.isInteger(r.size) && r.size >= 10 && r.size <= 32) span.style.fontSize = r.size + "px";
editor.appendChild(span.style.cssText ? span : document.createTextNode(r.text));
});
}
function restore(editor, start, end) {
const walker = document.createTreeWalker(editor, NodeFilter.SHOW_TEXT);
const points = [], range = document.createRange();
let node, offset = 0;
while ((node = walker.nextNode())) {
points.push({ node: node, start: offset, end: offset + node.length }); offset += node.length;
}
function point(n) { return points.find(function (p) { return n <= p.end; }) || points[points.length - 1]; }
const a = point(start), b = point(end);
if (!a || !b) { range.selectNodeContents(editor); range.collapse(false); }
else { range.setStart(a.node, Math.max(0, start - a.start)); range.setEnd(b.node, Math.max(0, end - b.start)); }
const selection = window.getSelection(); selection.removeAllRanges(); selection.addRange(range);
return range;
}
function attach(editor) {
// 기존 자동 저장·병합·초안 복구와 같은 value 인터페이스를 제공한다.
Object.defineProperty(editor, "value", { configurable: true,
get: function () { return encode(readRuns(editor)); },
set: function (v) { paint(editor, decode(String(v || ""))); },
});
editor.addEventListener("keydown", function (e) {
if (e.isComposing || e.keyCode === 229) return;
if (e.key === "Enter") { e.preventDefault(); insert(editor, "\n"); }
});
editor.addEventListener("paste", function (e) {
e.preventDefault(); insert(editor, e.clipboardData.getData("text/plain"));
});
}
function insert(editor, text) {
const sel = window.getSelection();
if (!sel.rangeCount || !editor.contains(sel.getRangeAt(0).commonAncestorContainer)) return;
const range = sel.getRangeAt(0); range.deleteContents();
const node = document.createTextNode(text); range.insertNode(node);
range.setStartAfter(node); range.collapse(true); sel.removeAllRanges(); sel.addRange(range);
editor.dispatchEvent(new Event("input", { bubbles: true }));
}
function init(table, toolbar) {
if (!toolbar) return;
let saved = null;
function clear() {
saved = null;
toolbar.querySelectorAll("button, input, select").forEach(function (el) { el.disabled = true; });
}
function capture() {
// 서식 도구에 포커스를 옮길 때는 직전 글자 선택을 유지한다.
if (toolbar.contains(document.activeElement)) return;
const sel = window.getSelection();
if (!sel.rangeCount || sel.isCollapsed) { clear(); return; }
const range = sel.getRangeAt(0);
const root = range.startContainer.nodeType === 1 ? range.startContainer : range.startContainer.parentElement;
const editor = root.closest(".pj-goal-text[contenteditable='true']");
if (!editor || !table.contains(editor) || !editor.contains(range.endContainer)) { clear(); return; }
const pre = document.createRange(); pre.selectNodeContents(editor); pre.setEnd(range.startContainer, range.startOffset);
saved = { editor: editor, start: pre.toString().length, end: pre.toString().length + range.toString().length };
toolbar.querySelectorAll("button, input, select").forEach(function (el) { el.disabled = false; });
let pos = 0;
const chosen = readRuns(editor).filter(function (run) {
const end = pos + run.text.length, intersects = end > saved.start && pos < saved.end;
pos = end; return intersects;
});
function uniform(key, fallback) {
const value = chosen[0] && chosen[0][key];
return chosen.every(function (r) { return r[key] === value; }) && value !== undefined ? value : fallback;
}
toolbar.querySelector("[data-goal-format='bold']").value = uniform("bold", false) ? "700" : "400";
toolbar.querySelector("[data-goal-format='color']").value = uniform("color", "#1e1f21");
toolbar.querySelector("[data-goal-format='size']").value = String(uniform("size", 14));
}
document.addEventListener("selectionchange", capture);
table.addEventListener("mouseup", capture);
table.addEventListener("keyup", capture);
toolbar.addEventListener("mousedown", function (e) { if (e.target.closest("button")) e.preventDefault(); });
function apply(key, value) {
if (!saved || !saved.editor.isConnected) return;
const editor = saved.editor, out = []; let pos = 0;
readRuns(editor).forEach(function (run) {
const end = pos + run.text.length;
const a = Math.max(pos, saved.start), b = Math.min(end, saved.end);
if (b <= a) out.push(run);
else {
if (a > pos) out.push(Object.assign({}, run, { text: run.text.slice(0, a - pos) }));
const middle = Object.assign({}, run, { text: run.text.slice(a - pos, b - pos) });
if (key === "reset") { delete middle.color; delete middle.bold; delete middle.size; }
else middle[key] = value;
out.push(middle);
if (b < end) out.push(Object.assign({}, run, { text: run.text.slice(b - pos) }));
}
pos = end;
});
paint(editor, compact(out)); editor.focus(); restore(editor, saved.start, saved.end);
editor.dispatchEvent(new Event("input", { bubbles: true }));
}
toolbar.querySelector("[data-goal-format='color']").addEventListener("input", function (e) { apply("color", e.target.value); });
toolbar.querySelector("[data-goal-format='bold']").addEventListener("change", function (e) { apply("bold", e.target.value === "700"); });
toolbar.querySelector("[data-goal-format='size']").addEventListener("change", function (e) { apply("size", Number(e.target.value)); });
toolbar.querySelector("[data-goal-format='reset']").addEventListener("click", function () { apply("reset"); });
document.addEventListener("mousedown", function (e) {
if (toolbar.contains(e.target) || (saved && saved.editor.contains(e.target))) return;
clear();
}, true);
}
window.PJGoalText = { attach: attach, init: init, readRuns: readRuns, paint: paint, encode: encode };
})();
+40
View File
@@ -0,0 +1,40 @@
(function () {
"use strict";
const button = document.getElementById("pj-options-btn"), dialog = document.getElementById("pj-options-dialog");
if (!button || !dialog || button.dataset.bound) return;
button.dataset.bound = "1";
const names = { system: null, pretendard: "Pretendard Variable", "nanum-square": "NanumSquare",
"nanum-square-neo": "NanumSquareNeo", "nanum-square-round": "NanumSquareRound" };
const select = document.getElementById("pj-options-font"), preview = document.getElementById("pj-options-preview");
const error = document.getElementById("pj-options-error"), save = document.getElementById("pj-options-save");
const cancel = document.getElementById("pj-options-cancel");
function current() { const v = document.documentElement.dataset.pjFont; return Object.hasOwn(names, v) ? v : "system"; }
function paint() {
const font = names[select.value];
preview.style.fontFamily = font ? '"' + font + '", sans-serif' : "var(--pj-system-font)";
}
button.addEventListener("click", function () {
select.value = current(); error.hidden = true; paint(); dialog.showModal(); select.focus();
});
select.addEventListener("change", paint);
cancel.addEventListener("click", function () { if (!save.disabled) dialog.close(); });
dialog.addEventListener("cancel", function (e) { if (save.disabled) e.preventDefault(); });
dialog.addEventListener("close", function () { button.focus(); });
document.getElementById("pj-options-form").addEventListener("submit", async function (e) {
e.preventDefault(); if (save.disabled) return;
const value = select.value, font = names[value];
if (!Object.hasOwn(names, value)) return;
save.disabled = select.disabled = cancel.disabled = true; error.hidden = true;
try {
if (font && document.fonts) {
const loaded = await Promise.all([document.fonts.load('400 14px "' + font + '"', "가나다 Project"), document.fonts.load('700 14px "' + font + '"', "가나다 Project")]);
if (loaded.some(function (list) { return !list.length; })) throw new Error("폰트를 불러오지 못했습니다. 다시 시도해 주세요.");
}
localStorage.setItem("pj_font", value);
document.documentElement.dataset.pjFont = value;
window.dispatchEvent(new Event("resize"));
dialog.close();
} catch (err) { error.textContent = "설정을 저장하지 못했습니다. " + err.message; error.hidden = false; }
finally { save.disabled = select.disabled = cancel.disabled = false; }
});
})();
+29 -4
View File
@@ -1,3 +1,5 @@
@import url("project-fonts.css?v=20261002g");
/* 프로젝트 관리(아사나식) 모듈 스타일.
* 기존 erp.css 토큰(폰트 등) 위에 아사나 느낌의 색·카드·그림자를 별도 변수로
* 얹는다 — 다른 모듈(erp.css)은 그대로 두고 이 모듈(.pj- 클래스)에만 적용. */
@@ -17,9 +19,10 @@
/* 아사나 웹앱 기본 시스템 폰트 + 한글 대체(Apple SD Gothic Neo·Malgun Gothic).
project.css 는 Project 화면에서만 불러오므로 공통 토큰 --font-geist 를 여기서
덮으면 본문·상단바·공용 대화상자(erp-dialog.css)까지 이 화면에서만 바뀐다. */
--pj-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
--pj-system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Helvetica, Arial,
"Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
--pj-font: var(--pj-system-font);
--font-geist: var(--pj-font);
/* 실제 아사나 웹앱에서 측정한 본문/보조/섹션/제목 타이포그래피.
공통 ERP 파일은 유지하고 Project가 불러오는 토큰만 재정의한다. */
@@ -2195,18 +2198,20 @@ th.pj-goal-area-name:focus-within .pj-goal-menu-btn, th.pj-goal-row-label:focus-
.pj-goal-area-text[tabindex]:focus-visible, .pj-goal-row-text[tabindex]:focus-visible { outline: 2px solid var(--pj-accent); outline-offset: 1px; border-radius: 4px; }
html.pj-goal-selecting .pj-goal-menu-btn { pointer-events: none; }
@media print { .pj-goal-menu-btn { display: none !important; } }
textarea.pj-goal-text {
.pj-goal-text {
display: block; width: 100%; box-sizing: border-box; min-height: 46px; padding: 6px; border: none;
white-space: pre-wrap; overflow-wrap: anywhere;
background: transparent; font: inherit; line-height: var(--pj-text-leading); color: inherit; resize: none; overflow: hidden;
}
/* 입력 중인 칸 — 테두리·밝은 배경은 입력칸(글 높이만큼)이 아니라 칸 전체(td)에 */
textarea.pj-goal-text:focus { outline: none; }
.pj-goal-text:focus { outline: none; }
.pj-goal-table td.pj-goal-texttd:focus-within {
box-shadow: inset 0 0 0 2px var(--pj-accent);
background-image: linear-gradient(rgba(255, 255, 255, .75), rgba(255, 255, 255, .75));
}
textarea.pj-goal-text::placeholder { color: rgba(0, 0, 0, .3); }
.pj-goal-text:empty::before { content: attr(data-placeholder); pointer-events: none; color: rgba(0, 0, 0, .3); }
.pj-goal-text-ro { min-height: 46px; padding: 6px; line-height: var(--pj-text-leading); white-space: pre-wrap; overflow-wrap: anywhere; }
.pj-goal-text span, .pj-goal-text-ro span { line-height: normal; }
.pj-goal-area td.is-now { box-shadow: inset 2px 0 0 rgba(123, 104, 238, .35), inset -2px 0 0 rgba(123, 104, 238, .35); }
.pj-goal-texttd.pj-goal-year-col { font-weight: 600; }
/* 가로 스크롤 때 3열(구분·항목·연간)까지 고정 — 연간 열 left = 1열 + 2열 너비, 오른쪽에 경계 그림자.
@@ -2666,3 +2671,23 @@ select.pj-meet-eval[data-v="miss"], .pj-meet-eval-ro[data-v="miss"] { color: #c2
}
/* 댓글 대화창 — 보낼 수 없었던 파일(빈 파일·20MB 초과) */
.pj-chat-pending-chip.is-failed { border-color: #e5484d; background: #fdecea; color: #a1261b; }
html[data-pj-font="pretendard"] { --pj-font: "Pretendard Variable", var(--pj-system-font); }
html[data-pj-font="nanum-square"] { --pj-font: "NanumSquare", var(--pj-system-font); }
html[data-pj-font="nanum-square-neo"] { --pj-font: "NanumSquareNeo", var(--pj-system-font); }
html[data-pj-font="nanum-square-round"] { --pj-font: "NanumSquareRound", var(--pj-system-font); }
.pj-options-dialog { width: min(440px, calc(100vw - 40px)); box-sizing: border-box; padding: 24px; border: 1px solid #d8dce2; border-radius: 12px; color: var(--pj-ink); font-family: var(--pj-font); box-shadow: 0 12px 40px #0003; }
.pj-options-dialog::backdrop { background: #0005; }
.pj-options-dialog h2 { margin: 0 0 22px; font-size: 20px; font-weight: 500; }
.pj-options-dialog label { display: block; margin-bottom: 8px; }
.pj-options-dialog select { width: 100%; padding: 9px; border: 1px solid #d8dce2; border-radius: 6px; font: inherit; }
.pj-options-preview { padding: 18px 12px; margin-top: 16px; border: 1px solid #e5e6e8; border-radius: 6px; font-size: 16px; line-height: 1.7; }
.pj-options-dialog p { font-size: 12px; color: var(--pj-ink-soft); }
.pj-options-dialog .pj-options-error { color: #c22b10; }
.pj-options-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.pj-goal-format { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--pj-border); background: #fff; font-size: 12px; }
.pj-goal-format > span { color: var(--pj-ink-soft); }
.pj-goal-format label { display: flex; align-items: center; gap: 6px; }
.pj-goal-format select { padding: 4px; border: 1px solid #d8dce2; border-radius: 4px; font: inherit; }
.pj-goal-format input[type="color"] { width: 30px; height: 28px; padding: 2px; border: 1px solid #d8dce2; border-radius: 4px; background: #fff; cursor: pointer; }
.pj-goal-format :disabled { opacity: .45; cursor: default; }
+16 -11
View File
@@ -2152,6 +2152,9 @@
win.document.open();
win.document.write(html);
win.document.close();
const fontCSS = win.document.createElement("link"); fontCSS.rel = "stylesheet";
fontCSS.href = new URL("/static/project-fonts.css?v=20261002g", location.href).href; win.document.head.appendChild(fontCSS);
win.document.body.style.fontFamily = getComputedStyle(document.body).fontFamily;
try { win.focus(); } catch (_) {}
}
@@ -4469,7 +4472,7 @@
nameEl.addEventListener("click", function (e) { e.stopPropagation(); startRename(); });
}
const addBtn = col.querySelector(".pj-col-add");
if (addBtn) addBtn.addEventListener("click", function (e) { e.stopPropagation(); openBoardTaskDraft(s); });
if (addBtn) addBtn.addEventListener("click", function (e) { e.stopPropagation(); openTaskModal(null, s.id); });
const moreBtn = col.querySelector(".pj-col-more");
if (moreBtn) moreBtn.addEventListener("click", function (e) {
e.stopPropagation();
@@ -8667,7 +8670,7 @@
syncFoldBtn(h);
if (!animate || reduce) {
cells.forEach(function (c) { c.classList.toggle("is-shrunk", folded); c.classList.toggle("is-gone", folded); });
if (!folded) table.querySelectorAll('.pj-goal-m[data-h="' + h + '"] textarea.pj-goal-text').forEach(fit);
if (!folded) table.querySelectorAll('.pj-goal-m[data-h="' + h + '"] .pj-goal-text').forEach(fit);
return;
}
table.classList.add("is-folding");
@@ -8680,7 +8683,7 @@
}
foldTimers[h] = setTimeout(function () {
if (folded) cells.forEach(function (c) { c.classList.add("is-gone"); });
else table.querySelectorAll('.pj-goal-m[data-h="' + h + '"] textarea.pj-goal-text').forEach(fit);
else table.querySelectorAll('.pj-goal-m[data-h="' + h + '"] .pj-goal-text').forEach(fit);
delete foldTimers[h];
if (!Object.keys(foldTimers).length) table.classList.remove("is-folding");
}, FOLD_MS + 20);
@@ -8705,7 +8708,7 @@
ta.style.height = "auto";
ta.style.height = ta.scrollHeight + "px";
}
function fitAll() { table.querySelectorAll("textarea.pj-goal-text").forEach(fit); }
function fitAll() { table.querySelectorAll(".pj-goal-text").forEach(fit); }
QUARTERS.forEach(function (q) { applyFold(q, false); });
// 병합 선택(Shift+클릭) — 관리자 전용, 아래에서 채운다. 접기 버튼이 먼저 부르므로 여기 둔다.
@@ -8775,9 +8778,10 @@
// 글 칸 연결 — 처음 한 번 + 표를 그 자리에서 다시 그린 뒤 새 칸에(refreshTable). 되살린 초안 수를 돌려준다.
function bindTexts(root) {
let restored = 0, conflict = 0;
root.querySelectorAll("textarea.pj-goal-text").forEach(function (ta) {
root.querySelectorAll(".pj-goal-text").forEach(function (ta) {
if (ta.dataset.bound) return;
ta.dataset.bound = "1";
if (ta.tagName !== "TEXTAREA") window.PJGoalText.attach(ta);
const r = textSaver.track(ta, ta.value);
if (r === "restored") restored++;
else if (r === "conflict") conflict++;
@@ -8789,17 +8793,18 @@
else if (conflict) showToast("다른 곳에서 바뀐 칸 " + conflict + "개는 예전 초안을 되살리지 않았습니다.");
}
bindTexts(table);
window.PJGoalText.init(table, el("pj-goal-format"));
// 칸이 세로로 길어도(옆 칸 글이 길거나 세로 병합) 칸 아무 곳이나 누르면 그 칸 입력 — 커서는 글 끝(엑셀처럼).
// 입력칸(textarea)은 글 높이만큼이라 그 아래를 누르면 아무것도 안 되던 것. Shift+클릭(범위 고르기)·끌기는 그대로.
table.addEventListener("click", function (e) {
if (e.shiftKey || e.button !== 0) return;
const td = e.target.closest("td.pj-goal-texttd");
if (!td || e.target.closest("textarea, input, button, a")) return;
const ta = td.querySelector("textarea.pj-goal-text");
if (!td || e.target.closest(".pj-goal-text, textarea, input, button, a")) return;
const ta = td.querySelector(".pj-goal-text");
if (!ta || ta === document.activeElement) return;
ta.focus();
const n = ta.value.length;
ta.setSelectionRange(n, n);
const range = document.createRange(); range.selectNodeContents(ta); range.collapse(false);
const selection = window.getSelection(); selection.removeAllRanges(); selection.addRange(range);
});
// 한 줄 안 칸들 높이는 표가 맞춘다 — 창 폭이 바뀌면 글 줄바꿈이 달라지니 다시 잰다.
window.addEventListener("resize", fitAll);
@@ -9324,7 +9329,7 @@
let lastCleared = null; // [[textarea, 예전 글], …]
const clearSel = async function (s) {
const tas = s.cells.filter(function (c) { return hits(c, s); })
.map(function (c) { return c.td.querySelector("textarea.pj-goal-text"); })
.map(function (c) { return c.td.querySelector(".pj-goal-text"); })
.filter(function (ta) { return ta && ta.value !== ""; });
if (!tas.length) return;
lastCleared = tas.map(function (ta) { return [ta, ta.value]; });
@@ -9414,7 +9419,7 @@
items.push({ label: "병합 해제" + (mergedIn.length > 1 ? " (" + mergedIn.length + "곳)" : ""), icon: menuIcon("call_split"),
onClick: function () { clearMergeSel(); unmerge(mergedIn); } });
}
if (inSel.some(function (c) { const t = c.td.querySelector("textarea.pj-goal-text"); return t && t.value; })) {
if (inSel.some(function (c) { const t = c.td.querySelector(".pj-goal-text"); return t && t.value; })) {
items.push({ label: "내용 지우기 (Del)", icon: menuIcon("ink_eraser"), onClick: function () { clearSel(s); } });
}
if (td.dataset.month === "0" && s.n === 1) { // 3열(연간 칸) 하나 우클릭 — 줄 추가·삭제도
+98
View File
@@ -0,0 +1,98 @@
NanumSquare — Copyright 2016 NAVER Corporation. Font designed by Sandoll Communications Inc.
NanumSquareNeo — Copyright 2022 NAVER Corp. Font Designed by Sandoll Inc.
NanumSquareRound — Copyright 2017 NAVER Corporation. Font designed by Sandoll Communications Inc.
Original copyright notices embedded in the unmodified fonts are reproduced in the accompanying *.LICENSE.txt files.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
## SIL OPEN FONT LICENSE
Version 1.1 - 26 February 2007
## PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
## DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
## PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
##TERMINATION
This license becomes null and void if any of the above conditions are
not met.
##DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
Copyright © 2022 NAVER Corp. All rights reserved. Font Designed by Sandoll Inc.
Binary file not shown.
@@ -0,0 +1,5 @@
Copyright ®œ 2016 NAVER Corporation. All rights reserved. Font designed by Sandoll Communications Inc.
NAVER Corporation
www.navercorp.com
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
Copyright ®œ 2017 NAVER Corporation. All rights reserved. Font designed by Sandoll Communications Inc.
NAVER Corporation
http://www.navercorp.com
+94
View File
@@ -0,0 +1,94 @@
Copyright (c) 2021, Kil Hyung-jin (https://github.com/orioncactus/pretendard),
with Reserved Font Name Pretendard.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
+12
View File
@@ -0,0 +1,12 @@
# Project 웹폰트
Project 옵션에서 선택한 폰트만 브라우저가 불러옵니다. 외부 CDN 요청은 없으며 파일을 수정하지 않았습니다.
- Pretendard Variable 1.3.9: https://github.com/orioncactus/pretendard (SIL OFL 1.1, `Pretendard-LICENSE.txt`)
- NanumSquare / NanumSquareNeo / NanumSquareRound: https://campaign.naver.com/nanumsquare_neo/
네이버 공식 웹폰트 `https://hangeul.pstatic.net/hangeul_static/webfont/`에서 배포하는 원본.
각 폰트에 내장된 저작권 표기는 `*.LICENSE.txt`, OFL 1.1 전문은 `Nanum-OFL.md`에 포함했습니다.
OFL 본문 출처: https://github.com/naver/nanumfont/wiki/Open-Font-License
원본 문서의 NanumGothicCoding 저작권 머리글은 이 폴더에 포함된 세 폰트의 내장 저작권 정보로 바꾸고, 라이선스 본문은 그대로 두었습니다.
Regular / Bold / ExtraBold를 각각 제공하고, Pretendard는 100~900 가변 굵기를 제공합니다.