관리자 페이지에 로고 메뉴를 넣었다. 그림을 올리거나 제미나이로 만든 후보를 골라 홈페이지 로고와 브라우저 탭 및 홈 화면 아이콘을 한 번에 바꾼다. 관리자 브라우저가 가운데를 정사각형으로 잘라 크기별 PNG 다섯 장을 만들고 서버는 PNG 서명과 크기만 확인해 데이터 폴더에 둔다. 새 파이썬 패키지는 쓰지 않는다. 바꾼 그림이 없으면 기본 로고를 쓰고 언제든 되돌릴 수 있다. 홈페이지와 관리자 페이지는 brand/ 주소로 로고를 읽고 앱 설치 정보는 서버가 서비스 이름과 아이콘 주소로 만들어 준다. 로고 업로드 주소만 요청 한도를 6MB로 올리고 나머지는 256KB를 지킨다. 제미나이 후보는 설명과 모델 이름으로 1~4장을 뒤에서 만들고 화면이 진행을 확인한다. 키는 systemd LoadCredential로만 받고 응답과 기록에 남기지 않는다. 키가 없으면 안내만 보인다. 검사: test_site_admin 8개 통과(로고 올리기·크기 검사·한도·되돌리기, 가짜 제미나이로 키 전달·후보 저장·삭제·모델 오류). 기존 웹 검사 5개 통과. 시험 서버에서 PC와 390px 휴대폰으로 올리기·미리보기·바꾸기·후보 만들기·고르기를 확인하고 홈페이지 로고와 파비콘이 새 PNG로 바뀌는 것을 확인했다. 시험 중 확인 창 뒤에 저장 버튼이 비어 저장이 안 되던 것과 CSP가 blob: 그림을 막던 것 및 키·모델 오류 원인이 작업 상태에 안 남던 것을 고쳤다. 실제 제미나이 호출은 키가 없어 아직 확인하지 않았다.
109 lines
9.8 KiB
CSS
109 lines
9.8 KiB
CSS
/* 관리자 페이지. 홈페이지의 색과 대화상자 및 입력칸 스타일(style.css)을 그대로 쓰고 배치만 더한다. */
|
|
body.admin{background:#eef0ee;min-height:100vh}
|
|
.gate{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;padding:24px}
|
|
.gate h1{font-size:24px}.gate p{color:var(--muted);font-size:14px;line-height:1.7}
|
|
.gate-link{display:inline-block;margin-top:6px;padding:11px 18px;border-radius:5px;background:var(--ink);color:#fff;text-decoration:none;font-weight:650}
|
|
.shell{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100vh}
|
|
.side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:26px;padding:26px 18px;background:var(--ink);color:#e9edf3}
|
|
.side-brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;padding:0 6px}
|
|
.side-brand img{border-radius:9px;box-shadow:0 0 0 1px #ffffff26}
|
|
.side-brand b{display:block;font-size:17px;letter-spacing:-.5px}.side-brand small{display:block;font-size:11px;color:#aab6c6;margin-top:3px;letter-spacing:.06em}
|
|
.side-nav{display:flex;flex-direction:column;gap:4px}
|
|
.side-nav button{display:flex;align-items:center;gap:11px;width:100%;min-height:42px;padding:9px 12px;border-radius:6px;background:transparent;color:#cdd6e1;font-weight:600;text-align:left}
|
|
.side-nav button:hover{background:#ffffff14;color:#fff}
|
|
.side-nav button.active{background:#fffdf8;color:var(--ink)}
|
|
.side-nav svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
|
|
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;font-size:13px;padding:0 6px}
|
|
.side-foot a{color:#cdd6e1}.side-foot .me{color:#fff;font-weight:650}
|
|
.side-foot .text-button{color:#cdd6e1;justify-content:flex-start;text-align:left;padding:4px 0;min-height:0}.side-foot .text-button:hover{background:transparent;color:#fff;text-decoration:underline}
|
|
.panel{padding:34px 40px 60px;min-width:0;margin:0;max-width:none;width:100%}
|
|
.view-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px}
|
|
.view-head h1{font-size:28px}.count{font-size:13px;color:var(--muted)}
|
|
.card{background:var(--paper);border:1px solid #dcdfdc;border-radius:8px;padding:20px 22px}
|
|
.card h2{font-size:16px;margin-bottom:12px}.card .small{margin-top:10px}
|
|
.card>button{margin-top:14px}
|
|
.stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;margin-bottom:14px}
|
|
.stat{background:var(--paper);border:1px solid #dcdfdc;border-radius:8px;padding:16px 18px}
|
|
.stat span{display:block;font-size:12px;color:var(--muted);font-weight:600}
|
|
.stat strong{display:block;font-size:30px;letter-spacing:-1px;margin:6px 0 4px;font-variant-numeric:tabular-nums}
|
|
.stat p{font-size:12px;color:var(--muted);line-height:1.6}
|
|
.stat.accent{border-top:3px solid var(--accent)}
|
|
.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}
|
|
.info-list{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 18px;margin:0;font-size:14px}
|
|
.info-list dt{color:var(--muted)}.info-list dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
|
|
.plain-list{list-style:none;margin:0;padding:0;font-size:14px}
|
|
.plain-list li{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #e6e7e3}
|
|
.plain-list li:last-child{border-bottom:0}.plain-list small{color:var(--muted);white-space:nowrap}
|
|
.toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
|
|
.toolbar input{flex:1 1 220px;width:auto}.toolbar select{flex:0 1 190px;width:auto}
|
|
.table-wrap{overflow-x:auto;background:var(--paper);border:1px solid #dcdfdc;border-radius:8px}
|
|
.data-table{width:100%;border-collapse:collapse;font-size:14px}
|
|
.data-table th{text-align:left;font-size:12px;color:var(--muted);font-weight:650;padding:11px 14px;border-bottom:1px solid #dcdfdc;white-space:nowrap;background:#f7f6f1}
|
|
.data-table td{padding:12px 14px;border-bottom:1px solid #ecece8;vertical-align:middle}
|
|
.data-table tbody tr:last-child td{border-bottom:0}
|
|
.data-table tbody tr.clickable{cursor:pointer}.data-table tbody tr.clickable:hover{background:#f3f1ea}
|
|
.data-table td small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
|
|
.data-table .empty{text-align:center;color:var(--muted);padding:28px}
|
|
.data-table td .secondary{min-height:34px;padding:6px 10px;font-size:12px;margin-left:4px}
|
|
.badge{display:inline-block;font-size:11px;font-weight:700;padding:3px 8px;border-radius:20px;background:#e9ecef;color:#4b5563;white-space:nowrap}
|
|
.badge.admin{background:#26364d;color:#fff}.badge.off{background:#f6e3e1;color:#9e3934}.badge.warn{background:#fbeedd;color:#8a5216}.badge.ok{background:#e3efe6;color:#2f6b45}
|
|
.pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:14px;font-size:13px;color:var(--muted)}
|
|
.pager button{min-height:38px;padding:7px 14px}
|
|
.action-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.action-row .danger{margin-right:0;margin-left:auto}
|
|
dialog h3{font-size:15px;margin:22px 0 4px}
|
|
#md-info,#cd-info{padding:14px 16px;background:#f7f6f1;border-radius:6px}
|
|
#cd-rename{margin-top:14px}#cd-rename input{flex:1}
|
|
.site-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:20px;align-items:start}
|
|
.site-form fieldset{border:1px solid #dcdfdc;border-radius:8px;background:var(--paper);padding:6px 20px 20px;margin:0 0 14px}
|
|
.site-form legend{font-weight:700;font-size:14px;padding:0 6px}
|
|
.site-form label{margin-top:16px}
|
|
.site-form .check{flex-direction:row;align-items:center;gap:10px}.site-form .check input{width:20px;height:20px;flex:none}
|
|
.site-form textarea{resize:vertical}
|
|
.field-meta{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);margin-top:6px;font-weight:400}
|
|
.field-meta button{min-height:28px;padding:3px 9px;font-size:12px}
|
|
.field-meta .changed{color:var(--accent);font-weight:650}
|
|
.preview-wrap{position:sticky;top:24px}
|
|
.preview{border:1px solid #d6d9d6;border-radius:10px;overflow:hidden;background:#f4f1ea;box-shadow:0 10px 30px #26364d14;margin-bottom:10px}
|
|
.pv-top{display:flex;align-items:center;gap:9px;padding:13px 16px;border-bottom:1px solid #d9dbd8}
|
|
.pv-top img{border-radius:7px}.pv-top b{display:block;font-size:15px}.pv-top small{display:block;font-size:10px;color:var(--muted);letter-spacing:.06em}
|
|
.pv-notice{padding:8px 16px;font-size:12px;background:#e9eef5;border-bottom:1px solid #cfd8e3}.pv-notice.warn{background:#f8ece5;border-color:#e8cbbb}
|
|
.pv-hero{padding:20px 16px}.pv-eyebrow{font-size:11px;color:var(--muted);font-weight:650}
|
|
.pv-hero h2{font-size:26px;line-height:1.3;letter-spacing:-1px;margin:8px 0}.pv-intro{font-size:13px;line-height:1.7;color:#3d4a5c}
|
|
.pv-button{display:inline-block;margin-top:14px;padding:9px 14px;border-radius:5px;background:var(--ink);color:#fff;font-size:13px;font-weight:650}
|
|
.pv-caption{margin-top:16px;padding-top:12px;border-top:1px solid #dcdad2;font-size:12px}.pv-caption p{color:var(--muted);margin-top:4px;line-height:1.6}
|
|
.pv-foot{display:flex;justify-content:space-between;gap:10px;padding:10px 16px;border-top:1px solid #d9dbd8;font-size:11px;color:var(--muted)}
|
|
@media(max-width:1100px){.site-layout{grid-template-columns:1fr}.preview-wrap{position:static}}
|
|
@media(max-width:820px){
|
|
.shell{grid-template-columns:minmax(0,1fr)}
|
|
.side{position:sticky;top:0;z-index:5;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 14px}
|
|
.side-brand{padding:0}.side-brand img{width:30px;height:30px}
|
|
.side-nav{order:3;flex-direction:row;width:100%;overflow-x:auto;gap:4px;scrollbar-width:none}
|
|
.side-nav button{width:auto;flex:none;min-height:38px;padding:7px 11px;font-size:13px}
|
|
.side-nav svg{width:16px;height:16px}
|
|
.side-foot{margin:0 0 0 auto;flex-direction:row;align-items:center;gap:12px;font-size:12px}.side-foot .me{display:none}
|
|
.panel{padding:22px 16px 50px}
|
|
.view-head{align-items:flex-start;flex-direction:column;gap:8px}.view-head h1{font-size:23px}
|
|
.two-col{grid-template-columns:1fr}
|
|
.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
|
|
.stat strong{font-size:25px}
|
|
.data-table{font-size:13px}.data-table th,.data-table td{padding:10px}
|
|
.action-row .danger{margin-left:0}
|
|
}
|
|
.danger-strong{background:#9e3934;color:#fff}.danger-strong:hover{background:#87302c}
|
|
/* 로고 메뉴 */
|
|
.logo-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:22px;margin:6px 0 10px}
|
|
.logo-row figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:8px}
|
|
.logo-row figcaption{font-size:12px;color:var(--muted)}
|
|
.logo-row img,.logo-row canvas{display:block;background:repeating-conic-gradient(#e7e8e4 0 25%,#fff 0 50%) 0 0/12px 12px;border:1px solid #dcdfdc}
|
|
.logo-row canvas{width:128px;height:128px}
|
|
#pv-mask,#cur-mask{width:96px;height:96px}#pv-64{width:40px;height:40px}#pv-16{width:16px;height:16px;image-rendering:pixelated}
|
|
.logo-row .round{border-radius:50%}.logo-row .rounded{border-radius:10px}
|
|
.apply-card{margin-bottom:14px;border-top:3px solid var(--accent)}
|
|
.apply-card input[type=range]{padding:0}.apply-card input[type=color]{height:44px;padding:4px}
|
|
.candidate-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px;margin-top:12px}
|
|
.candidate{border:1px solid #dcdfdc;border-radius:8px;overflow:hidden;background:#fff;display:flex;flex-direction:column}
|
|
.candidate img{width:100%;aspect-ratio:1;object-fit:cover;display:block;background:#f3f1ea}
|
|
.candidate p{font-size:11px;color:var(--muted);padding:8px 10px 0;line-height:1.5;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
|
|
.candidate .action-row{padding:8px 10px 10px;margin-top:auto}.candidate .action-row button{min-height:34px;padding:6px 10px;font-size:12px}
|
|
@media(max-width:820px){.logo-row{gap:14px}.logo-row canvas,#cur-512{width:96px;height:96px}.candidate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
|