style(project): 연간 목표 분기 구분 — 분기별 색 띠·열 음영, 접기 아이콘은 엑셀식 −/+

- 분기마다 차분한 색(파랑·청록·보라·남색): 머리 위 색 띠(월 3px · 분기 6px), 분기 열 전체 옅은 음영,
  분기 칸 오른쪽 2px 경계, 분기 머리 글자·아이콘은 분기 색
- 접기 아이콘: 네모 안 −(펼침) / +(접힘), 90° 돌며 세로 막대가 자라고 줄어드는 애니메이션
- project.css 캐시 버전 올림

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 17:39:32 +09:00
parent ac4f2653af
commit 21981eb946
9 changed files with 50 additions and 35 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001z" />
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
<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=20261001z" />
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -78,11 +78,12 @@
{# 월 이름을 누르면 그 달 주간 회의록(/goals/{연도}/meetings/{월}) #}
{% for mo in hmonths %}<th class="pj-goal-m{% if mo == this_month %} is-now{% endif %}" data-h="{{ h }}" data-col="m{{ mo }}"><a class="pj-goal-mlabel pj-goal-mlink" href="/project/goals/{{ goal_year }}/meetings/{{ mo }}" title="{{ mo }}월 주간 회의록">{{ mo }}월</a><span class="pj-goal-colresize" data-col="m{{ mo }}" title="끌어서 너비 조절"></span></th>{% endfor %}
{# 분기 칸 — 머리 칸 아무 곳이나 누르면 그 분기의 월 칸을 접었다 편다(localStorage pj_goal_fold_q).
아이콘: 펼침 = →|← (접기), 접힘 = ←|→ (펼치기) — 화살표가 반 바퀴 돌며 바뀐다 #}
아이콘은 엑셀 열 그룹처럼 네모 안 − (펼침, 누르면 접힘) / + (접힘, 누르면 펼침).
분기 색(data-h → --qc)은 머리 위 색 띠(월 가늘게·분기 두껍게)와 분기 열 옅은 음영 #}
<th class="pj-goal-half-col pj-goal-fold-th" data-h="{{ h }}" data-col="q{{ h }}">
<button type="button" class="pj-goal-fold" data-h="{{ h }}" aria-expanded="true"
data-label="{{ hmonths[0] }}~{{ hmonths[-1] }}월"
title="{{ hmonths[0] }}~{{ hmonths[-1] }}월 접기"><svg class="pj-goal-fold-ic" viewBox="0 0 22 16" width="20" height="15" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path class="pj-goal-fold-bar" d="M11 2.5v11"/><g class="pj-goal-fold-l"><path d="M1.5 8h6M5 5 8 8 5 11"/></g><g class="pj-goal-fold-r"><path d="M20.5 8h-6M17 5l-3 3 3 3"/></g></svg></button>{{ hname }}
title="{{ hmonths[0] }}~{{ hmonths[-1] }}월 접기"><svg class="pj-goal-fold-ic" viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><rect x="1.75" y="1.75" width="12.5" height="12.5" rx="3"/><path d="M5 8h6"/><path class="pj-goal-fold-v" d="M8 5v6"/></svg></button>{{ hname }}
<span class="pj-goal-colresize" data-col="q{{ h }}" title="끌어서 너비 조절"></span>
</th>
{% endfor %}
@@ -97,7 +98,7 @@
<td class="pj-goal-sum pj-goal-year-col" data-metric="sales" data-kind="target" data-scope="0"></td>
{% for h, hmonths, hm, hname in quarters %}
{% for mo in hmonths %}{{ num_cell("sales", "target", sm.target_label, mo) }}{% endfor %}
<td class="pj-goal-sum pj-goal-half-col" data-metric="sales" data-kind="target" data-scope="{{ hm }}"></td>
<td class="pj-goal-sum pj-goal-half-col" data-metric="sales" data-kind="target" data-scope="{{ hm }}" data-h="{{ h }}"></td>
{% endfor %}
</tr>
<tr>
@@ -105,7 +106,7 @@
<td class="pj-goal-sum pj-goal-year-col" data-metric="sales" data-kind="actual" data-scope="0"></td>
{% for h, hmonths, hm, hname in quarters %}
{% for mo in hmonths %}{{ num_cell("sales", "actual", sm.actual_label, mo) }}{% endfor %}
<td class="pj-goal-sum pj-goal-half-col" data-metric="sales" data-kind="actual" data-scope="{{ hm }}"></td>
<td class="pj-goal-sum pj-goal-half-col" data-metric="sales" data-kind="actual" data-scope="{{ hm }}" data-h="{{ h }}"></td>
{% endfor %}
</tr>
<tr class="pj-goal-rate-row">
@@ -113,7 +114,7 @@
<td class="pj-goal-rate pj-goal-year-col" data-month="0"></td>
{% for h, hmonths, hm, hname in quarters %}
{% for mo in hmonths %}<td class="pj-goal-rate pj-goal-m{% if mo == this_month %} is-now{% endif %}" data-h="{{ h }}" data-month="{{ mo }}"></td>{% endfor %}
<td class="pj-goal-rate pj-goal-half-col" data-month="{{ hm }}"></td>
<td class="pj-goal-rate pj-goal-half-col" data-month="{{ hm }}" data-h="{{ h }}"></td>
{% endfor %}
</tr>
<tr>
@@ -123,7 +124,7 @@
<td class="pj-goal-sum pj-goal-year-col" data-metric="roas" data-kind="target" data-scope="0"></td>
{% for h, hmonths, hm, hname in quarters %}
{% for mo in hmonths %}{{ num_cell("roas", "target", rm.target_label, mo) }}{% endfor %}
<td class="pj-goal-sum pj-goal-half-col" data-metric="roas" data-kind="target" data-scope="{{ hm }}"></td>
<td class="pj-goal-sum pj-goal-half-col" data-metric="roas" data-kind="target" data-scope="{{ hm }}" data-h="{{ h }}"></td>
{% endfor %}
</tr>
<tr>
@@ -131,7 +132,7 @@
<td class="pj-goal-sum pj-goal-year-col" data-metric="roas" data-kind="actual" data-scope="0"></td>
{% for h, hmonths, hm, hname in quarters %}
{% for mo in hmonths %}{{ num_cell("roas", "actual", rm.actual_label, mo) }}{% endfor %}
<td class="pj-goal-sum pj-goal-half-col" data-metric="roas" data-kind="actual" data-scope="{{ hm }}"></td>
<td class="pj-goal-sum pj-goal-half-col" data-metric="roas" data-kind="actual" data-scope="{{ hm }}" data-h="{{ h }}"></td>
{% endfor %}
</tr>
</tbody>
@@ -158,7 +159,7 @@
{% set editable = is_admin and (c.kind != 'quarter' or (board.halves and (c.m not in (15, 16) or board.quarters))) %}
{% set merged = c.span > 1 or c.rspan > 1 %}
<td class="pj-goal-texttd {{ 'pj-goal-m' if c.kind == 'month' else ('pj-goal-year-col' if c.kind == 'year' else 'pj-goal-half-col') }}{% if merged %} is-merged{% endif %}{% if c.now %} is-now{% endif %}"
{% if c.kind == 'month' %}data-h="{{ c.h }}" {% endif %}data-month="{{ c.m }}" data-span="{{ c.span }}" data-rspan="{{ c.rspan }}"
{% 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 }}"
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001z" />
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
<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=20261001z" />
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
<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=20261001z" />
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
<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=20261001z" />
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001z" />
<link rel="stylesheet" href="/static/project.css?v=20261001q" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
+29 -19
View File
@@ -2135,31 +2135,41 @@ textarea.pj-goal-text::placeholder { color: rgba(0, 0, 0, .3); }
.pj-goal-kpi td.pj-goal-half-col { background: #f4f5f7; }
.pj-goal-texttd.pj-goal-half-col { font-weight: 600; }
.pj-goal-kpi td { white-space: nowrap; }
/* 분기 접기 — 머리 칸 전체가 버튼(.pj-goal-fold-th, project.js). 아이콘 →|← (펼침 = 누르면 접힘) ↔ ←|→ (접힘 = 누르면 펼침):
양쪽 화살표가 제자리에서 반 바퀴 돌고 가운데 막대가 한 번 줄었다 늘며 바뀐다. 접힌 분기는 강조색 */
.pj-goal-table thead th.pj-goal-fold-th { cursor: pointer; user-select: none; transition: background-color .15s; }
/* 분기 색(monday.com 그룹 색 띠 방식, 2026-10-01) — 좋고 나쁨 뜻이 없는 차분한 색(달성률 빨강·초록과 겹치지 않게).
data-h(분기 1~4)가 있는 칸마다 --qc(띠·글자) · --qt(분기 열 음영) · --qt2(접힌 분기 머리) */
.pj-goal-table [data-h="1"] { --qc: #4f7cc9; --qt: rgba(79, 124, 201, .09); --qt2: rgba(79, 124, 201, .18); }
.pj-goal-table [data-h="2"] { --qc: #2a9d8f; --qt: rgba(42, 157, 143, .09); --qt2: rgba(42, 157, 143, .18); }
.pj-goal-table [data-h="3"] { --qc: #8a63c9; --qt: rgba(138, 99, 201, .09); --qt2: rgba(138, 99, 201, .18); }
.pj-goal-table [data-h="4"] { --qc: #3d4f73; --qt: rgba(61, 79, 115, .09); --qt2: rgba(61, 79, 115, .18); }
/* 머리 위 색 띠 — 월 칸 3px, 분기 칸 6px(같은 색으로 이어져 "석 달 + 합계"가 한 묶음). 월 이름 링크가 칸을 덮어도 보이게 ::before */
.pj-goal-table thead th[data-h]::before {
content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--qc); z-index: 2; pointer-events: none;
}
.pj-goal-table thead th.pj-goal-half-col[data-h]::before { height: 6px; }
/* 분기 열 — 같은 색 옅은 음영(영역 색 위에도 덮인다) + 오른쪽 굵은 경계(분기 묶음의 끝) */
.pj-goal-table td.pj-goal-half-col[data-h] { background-image: linear-gradient(var(--qt), var(--qt)); }
.pj-goal-table .pj-goal-half-col { border-right: 2px solid #a3abb5; }
.pj-goal-table tr > .pj-goal-half-col:last-child { border-right: none; }
/* 분기 접기 — 머리 칸 전체가 버튼(.pj-goal-fold-th, project.js). 아이콘은 엑셀 열 그룹처럼 네모 안 −(펼침) / +(접힘):
바뀔 때 아이콘이 90° 돌며 세로 막대가 자라나거나(− → +) 줄어든다(+ → −). 접힌 분기 머리는 분기 색으로 진하게 */
.pj-goal-table thead th.pj-goal-fold-th { cursor: pointer; user-select: none; transition: background-color .15s; color: var(--qc); }
.pj-goal-table thead th.pj-goal-fold-th:hover { background: #e3e6ea; }
.pj-goal-table thead th.pj-goal-fold-th.is-folded { background: var(--pj-accent-tint); color: var(--pj-accent-dark); }
.pj-goal-table thead th.pj-goal-fold-th.is-folded { background-image: linear-gradient(var(--qt2), var(--qt2)); }
.pj-goal-fold {
display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 20px;
display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
margin: 0 3px 0 -3px; padding: 0; border: none; border-radius: 5px; background: transparent;
color: var(--pj-ink-soft); cursor: pointer; vertical-align: -5px; pointer-events: none; /* 클릭은 머리 칸이 받는다 */
color: var(--qc, var(--pj-ink-soft)); cursor: pointer; vertical-align: -5px; pointer-events: none; /* 클릭은 머리 칸이 받는다 */
}
.pj-goal-fold-th:hover .pj-goal-fold { color: var(--pj-ink); }
.pj-goal-fold.is-folded { background: #fff; color: var(--pj-accent-dark); box-shadow: 0 0 0 1px var(--pj-accent-tint); }
.pj-goal-fold-ic { display: block; overflow: visible; }
.pj-goal-fold-l, .pj-goal-fold-r {
transform-box: fill-box; transform-origin: center; transition: transform .36s cubic-bezier(.4, 0, .2, 1);
.pj-goal-fold-ic { display: block; transition: transform .32s cubic-bezier(.4, 0, .2, 1); }
.pj-goal-fold-v {
transform-box: fill-box; transform-origin: center; transform: scaleY(0);
transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.pj-goal-fold.is-folded .pj-goal-fold-l, .pj-goal-fold.is-folded .pj-goal-fold-r { transform: rotate(180deg); }
.pj-goal-fold-bar { transform-box: fill-box; transform-origin: center; }
.pj-goal-fold.is-folded .pj-goal-fold-bar { animation: pj-goal-fold-bar .36s ease; }
.pj-goal-fold:not(.is-folded) .pj-goal-fold-bar { animation: pj-goal-fold-bar2 .36s ease; }
@keyframes pj-goal-fold-bar { 50% { transform: scaleY(.4); } }
@keyframes pj-goal-fold-bar2 { 50% { transform: scaleY(.4); } }
.pj-goal-fold.is-folded .pj-goal-fold-ic { transform: rotate(90deg); }
.pj-goal-fold.is-folded .pj-goal-fold-v { transform: scaleY(1); }
@media (prefers-reduced-motion: reduce) {
.pj-goal-fold-l, .pj-goal-fold-r { transition: none; }
.pj-goal-fold-bar { animation: none !important; }
.pj-goal-fold-ic, .pj-goal-fold-v { transition: none; }
}
/* 접기 애니메이션 — 월 칸 너비를 0 으로(.is-shrunk) 줄인 뒤 숨김(.is-gone), 펼 땐 거꾸로(initGoals applyFold).
줄어드는 동안 칸 안 글이 다시 줄바꿈돼 줄 높이가 출렁이지 않게 안쪽 내용은 원래 폭(--fold-w = 걸친 월 너비 합)으로 고정해 잘라 낸다. */
+5 -1
View File
@@ -535,7 +535,11 @@ description 을 항상 HTML로 취급하기 때문). 두 번 실행하면 이중
- **숫자 지표** — 분기 칸 = 그 분기 월 합계, 달성률 = 분기 실적 합계 ÷ 분기 목표 합계(`SUM_SCOPES` 연간 + 4분기),
로아스 분기 = 매출 가중 평균(연간과 같은 규칙).
- **분기 접기** — 분기 **머리 칸 아무 곳이나** 누르면(`.pj-goal-fold-th`, 너비 조절 손잡이를 끈 직후 0.3초 클릭은 무시) 그 분기 월 칸을
접었다 편다. 아이콘은 SVG →|← (펼침, 누르면 접힘) ↔ ←|→ (접힘, 강조색) — 양쪽 화살표가 반 바퀴 돌고 가운데 막대가 줄었다 늘며 바뀐다. 상태는 localStorage `pj_goal_fold_q`(반기 때 `pj_goal_fold` 와 따로),
접었다 편다. 아이콘은 엑셀 열 그룹처럼 네모 안 − (펼침, 누르면 접힘) / + (접힘) — 바뀔 때 90° 돌며 세로 막대가 자라거나 줄어든다.
- **분기 색(monday.com 그룹 색 띠 방식)** — 분기마다 차분한 색 하나(1 파랑 · 2 청록 · 3 보라 · 4 남색, 달성률 빨강·초록과 안 겹치게).
`data-h` 가 있는 칸에 `--qc`·`--qt`·`--qt2`. 머리 위 색 띠 = 월 칸 3px · 분기 칸 6px(`th::before`, 월 링크가 덮어도 보임),
분기 열 전체 옅은 음영(`td.pj-goal-half-col[data-h]` background-image — 영역 색 위에도), 분기 칸 오른쪽 2px 경계,
분기 머리 글자·아이콘은 분기 색, 접힌 분기 머리는 진한 음영.
열 너비 키는 `q1`~`q4`(기본 80px).
- 아래 6-9-1 의 상·하반기 설명은 014 당시 기록 — 칸 번호·접기·병합 규칙은 이 절이 우선.