feat: 学生档案与报告生成
This commit is contained in:
20
apps/server/src/archive/archive-report.helpers.ts
Normal file
20
apps/server/src/archive/archive-report.helpers.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export function esc(value: string): string {
|
||||
return value
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
export function pageFrame(inner: string): string {
|
||||
return `<div class="page"><div class="frame"></div>${inner}</div>`;
|
||||
}
|
||||
|
||||
export function pageHeader(title: string): string {
|
||||
return `<div class="header"><span class="logo">G</span><span class="brand">恭学教育 · 学生档案</span><span class="page-kicker">${esc(title)}</span></div>`;
|
||||
}
|
||||
|
||||
export function pageFooter(): string {
|
||||
return `<div class="footer"><span>恭学教育 · 学生档案报告</span><span>机密 · 仅限内部使用</span></div>`;
|
||||
}
|
||||
Reference in New Issue
Block a user