Files
ai-dev-portal/public/css/layout.css
2620227 a199114453 feat(notifications): 알림 종 + 공지 기능 추가
- 헤더 프로필 왼쪽 알림 종: 드롭다운·안읽음 배지·60초 폴링(최초 폴링 도입)
- 내 프로젝트 좋아요/즐겨찾기/댓글 시 소유자에게 알림(본인 제외·재토글 도배 방지)
- 관리자 공지: /announcements 목록 + 작성/수정/삭제, 등록 시 전 직원에게 fan-out 알림
- notifications/announcements 테이블(멱등) + requireAdmin 가드 + bell/megaphone 아이콘

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 14:10:04 +09:00

119 lines
7.9 KiB
CSS

/* 골격 — 헤더 · 메인/섹션 · 푸터. */
/* ===================== 헤더 ===================== */
.hdr { position: sticky; top: 0; z-index: 300; background: var(--hbg); border-bottom: 1px solid var(--hbd); }
.hdr-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; flex: 0 0 auto; }
.brand-mark { display: inline-flex; color: var(--hfg); transition: transform .2s ease, filter .2s ease; }
.brand-name { font-weight: 800; font-size: 15px; letter-spacing: .13em; color: var(--hfg); }
.brand-sub { font-size: 15px; color: var(--hfg2); font-weight: 500; border-left: 1px solid var(--hbd); padding-left: 10px; margin-left: 2px; white-space: nowrap; }
.hdr-search { flex: 1; max-width: 300px; position: relative; display: flex; align-items: center; }
.hdr-search-ico { position: absolute; left: 10px; display: inline-flex; color: var(--hfg2); pointer-events: none; }
.hdr-search input {
width: 100%; font-family: inherit; font-size: 13px; color: var(--hfg);
background: var(--hsearch-bg); border: 1px solid var(--hsearch-bd); border-radius: 7px;
padding: 6px 10px 6px 32px; outline: none;
}
.hdr-search input:focus { border-color: var(--link); background: var(--bg); color: var(--fg); }
.hdr-search input::-webkit-search-cancel-button { filter: invert(.5); }
.hdr-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: auto; }
.icon-btn {
width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--hbd); background: transparent;
cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--hfg2);
transition: background .14s ease, color .14s ease;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--hfg); }
/* 헤더 텍스트 링크 버튼(매뉴얼 등) — 아이콘 + 글자 */
.hdr-link {
display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
border-radius: 8px; border: 1px solid var(--hbd); background: transparent;
color: var(--hfg2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
transition: background .14s ease, color .14s ease;
}
.hdr-link:hover { background: rgba(255,255,255,.08); color: var(--hfg); }
.theme-ico-sun { display: none; }
html[data-aidev-theme="dark"] .theme-ico-moon { display: none; }
html[data-aidev-theme="dark"] .theme-ico-sun { display: inline-flex; }
.admin-pill {
display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
color: #fff; background: color-mix(in srgb, var(--admin) 80%, transparent);
border: 1px solid var(--hbd); border-radius: 999px; padding: 4px 11px; white-space: nowrap;
}
.usermenu { position: relative; }
.usermenu-btn {
display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent;
border-radius: 8px; padding: 4px 6px 4px 8px; cursor: pointer; font-family: inherit;
}
.usermenu-btn:hover { background: rgba(255,255,255,.08); }
.usermenu-btn .who { font-size: 13px; font-weight: 600; color: var(--hfg); font-variant-numeric: tabular-nums; }
.usermenu-btn .caret { display: inline-flex; color: var(--hfg2); }
.usermenu-pop {
position: absolute; top: 46px; right: 0; width: 212px; background: var(--card); border: 1px solid var(--border);
border-radius: 10px; box-shadow: 0 8px 24px var(--shadow-strong); padding: 6px; z-index: 320; animation: aidev-pop .14s ease-out;
}
.usermenu-pop[hidden] { display: none; }
.usermenu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--divider); margin-bottom: 6px; }
.usermenu-label { font-size: 12px; color: var(--fg2); }
.usermenu-sabun { font-size: 13.5px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.usermenu-role { font-size: 11.5px; color: var(--fg2); margin-top: 2px; }
.usermenu-item { width: 100%; text-align: left; background: transparent; border: 0; border-radius: 6px; padding: 8px 10px; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.usermenu-item:hover { background: var(--panel); }
.usermenu-ico { display: inline-flex; color: var(--fg2); }
/* ===================== 알림(🔔) 종 ===================== */
.notif { position: relative; }
.notif-btn { position: relative; } /* 배지 기준 */
/* 안 읽은 수 배지 — 종 우상단 빨강 pill */
.notif-badge {
position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
display: inline-flex; align-items: center; justify-content: center;
background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
border-radius: 999px; border: 1px solid var(--hbg); box-sizing: border-box;
}
.notif-badge[hidden] { display: none; }
/* 드롭다운 패널 — 사용자 메뉴 팝오버와 동일 패턴(더 넓게) */
.notif-pop {
position: absolute; top: 46px; right: 0; width: min(340px, calc(100vw - 32px));
background: var(--card); border: 1px solid var(--border); border-radius: 10px;
box-shadow: 0 8px 24px var(--shadow-strong); padding: 6px; z-index: 320; animation: aidev-pop .14s ease-out;
}
.notif-pop[hidden] { display: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; border-bottom: 1px solid var(--divider); margin-bottom: 4px; }
.notif-title { font-size: 13px; font-weight: 700; color: var(--fg); }
.notif-readall { background: transparent; border: 0; cursor: pointer; font-family: inherit; font-size: 12px; color: var(--link); padding: 2px 4px; }
.notif-readall:hover { text-decoration: underline; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; gap: 9px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--fg); }
.notif-item:hover { background: var(--panel); }
.notif-item.unread { background: var(--attn-bg); }
.notif-item-ico { flex: 0 0 auto; font-size: 15px; line-height: 1.3; }
.notif-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-item-text { font-size: 12.5px; line-height: 1.4; color: var(--fg); word-break: break-word; }
.notif-item-time { font-size: 11px; color: var(--fg3); }
.notif-empty { padding: 22px 10px; text-align: center; color: var(--fg3); font-size: 12.5px; }
.notif-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; margin-top: 4px; border-top: 1px solid var(--divider); font-size: 12.5px; font-weight: 600; color: var(--link); text-decoration: none; }
.notif-foot:hover { background: var(--panel); border-radius: 6px; }
/* ===================== 메인 / 섹션 ===================== */
.main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-titlewrap { display: flex; align-items: baseline; gap: 10px; }
.section-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--fg); letter-spacing: -.01em; }
.section-sub { font-size: 13px; color: var(--fg2); }
/* ===================== 푸터 ===================== */
.footer { border-top: 1px solid var(--border-soft); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 20px 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-left { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--fg3); font-size: 12px; }
.footer-tech { font-size: 11.5px; color: var(--fg3); font-family: 'SF Mono', ui-monospace, Menlo, monospace; }
/* 버그 제보 안내 — 브랜드 옆에 한 줄로 이어 표시 */
.footer-bug { font-size: 11.5px; color: var(--fg3); }
.footer-bug a { color: var(--link); text-decoration: none; }
.footer-bug a:hover { text-decoration: underline; }