Add full project structure: backend, frontend, Docker, and CI workflows
- Organize backend into src/ (routes/, services/, db/) per package.json entrypoint - Add migrations/import-mdb.js for one-time .mdb → SQLite migration - Add public/ frontend: check ledger table, slide-in new/edit panel, PDF generation - Add docker/Dockerfile and docker-compose.yml for self-hosted deployment - Add .github/workflows: Docker Hub build+push on main/tags, TODO→Issues scanner - Add GnuMICR font files (GPL-2.0) for MICR E-13B line rendering
This commit is contained in:
@@ -0,0 +1,313 @@
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
--bg: #f5f5f5;
|
||||
--surface: #ffffff;
|
||||
--border: #d0d0d0;
|
||||
--header-bg: #1a2b3c;
|
||||
--header-fg: #ffffff;
|
||||
--primary: #2563eb;
|
||||
--primary-hover: #1d4ed8;
|
||||
--danger: #dc2626;
|
||||
--text: #1a1a1a;
|
||||
--text-muted: #6b7280;
|
||||
--row-hover: #f0f4ff;
|
||||
--panel-width: 420px;
|
||||
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font);
|
||||
font-size: 13px;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ── Header ── */
|
||||
header {
|
||||
background: var(--header-bg);
|
||||
color: var(--header-fg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 1rem;
|
||||
height: 44px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.header-brand { font-size: 15px; font-weight: 600; }
|
||||
.header-info { font-size: 12px; color: rgba(255,255,255,0.7); }
|
||||
.header-info strong { color: #fff; }
|
||||
|
||||
/* ── Toolbar ── */
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 1rem;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.toolbar-left { display: flex; align-items: center; gap: 8px; }
|
||||
.toolbar-right { display: flex; align-items: center; gap: 8px; }
|
||||
.toolbar label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
|
||||
|
||||
select {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
font-size: 13px;
|
||||
font-family: var(--font);
|
||||
background: var(--surface);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ── Buttons ── */
|
||||
button {
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
font-family: var(--font);
|
||||
padding: 5px 12px;
|
||||
line-height: 1.4;
|
||||
transition: background 0.1s, opacity 0.1s;
|
||||
}
|
||||
button:disabled { opacity: 0.45; cursor: not-allowed; }
|
||||
|
||||
.btn-primary { background: var(--primary); color: #fff; font-weight: 500; }
|
||||
.btn-primary:not(:disabled):hover { background: var(--primary-hover); }
|
||||
|
||||
.btn-secondary {
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.btn-secondary:hover { background: var(--bg); }
|
||||
|
||||
.btn-ghost { background: transparent; color: var(--text-muted); }
|
||||
.btn-ghost:hover { color: var(--text); background: var(--bg); }
|
||||
|
||||
.btn-icon {
|
||||
background: transparent;
|
||||
color: rgba(255,255,255,0.75);
|
||||
font-size: 22px;
|
||||
padding: 0 6px;
|
||||
line-height: 1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.btn-icon:hover { color: #fff; background: rgba(255,255,255,0.1); }
|
||||
|
||||
.btn-sm {
|
||||
padding: 2px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.btn-edit { background: transparent; color: var(--primary); }
|
||||
.btn-edit:hover { background: #eff6ff; }
|
||||
.btn-delete { background: transparent; color: var(--danger); }
|
||||
.btn-delete:hover { background: #fee2e2; }
|
||||
.btn-reprint { background: transparent; color: var(--text-muted); }
|
||||
.btn-reprint:hover { background: var(--bg); }
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
background: rgba(255,255,255,0.25);
|
||||
border-radius: 10px;
|
||||
padding: 1px 7px;
|
||||
font-size: 11px;
|
||||
min-width: 20px;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ── Table ── */
|
||||
.table-wrap {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background: #f8f8f8;
|
||||
border-bottom: 2px solid var(--border);
|
||||
padding: 6px 8px;
|
||||
text-align: left;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
user-select: none;
|
||||
}
|
||||
thead th.sortable { cursor: pointer; }
|
||||
thead th.sortable:hover { color: var(--text); }
|
||||
thead th.sort-asc .sort-indicator::after { content: ' ↑'; }
|
||||
thead th.sort-desc .sort-indicator::after { content: ' ↓'; }
|
||||
|
||||
tbody tr { border-bottom: 1px solid #f0f0f0; }
|
||||
tbody tr:hover { background: var(--row-hover); }
|
||||
tbody tr.printed { color: var(--text-muted); }
|
||||
|
||||
td {
|
||||
padding: 6px 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.col-select { width: 32px; }
|
||||
.col-no { width: 60px; font-variant-numeric: tabular-nums; }
|
||||
.col-date { width: 95px; white-space: nowrap; }
|
||||
.col-amount { width: 95px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
|
||||
.col-memo { color: var(--text-muted); font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.col-status { width: 88px; text-align: center; }
|
||||
.col-actions { width: 130px; text-align: right; white-space: nowrap; }
|
||||
|
||||
.status-badge {
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
padding: 2px 7px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.status-unprinted { background: #fef3c7; color: #92400e; }
|
||||
.status-printed { background: #e0f2fe; color: #0369a1; }
|
||||
|
||||
.loading-row td,
|
||||
.empty-row td { text-align: center; padding: 2rem; color: var(--text-muted); }
|
||||
|
||||
/* ── Slide-in panel ── */
|
||||
#panel-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.3);
|
||||
z-index: 100;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
#panel-overlay.open { opacity: 1; pointer-events: auto; }
|
||||
|
||||
#check-panel {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: var(--panel-width);
|
||||
height: 100vh;
|
||||
background: var(--surface);
|
||||
z-index: 101;
|
||||
box-shadow: -4px 0 24px rgba(0,0,0,0.15);
|
||||
transform: translateX(100%);
|
||||
transition: transform 0.2s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#check-panel.open { transform: translateX(0); }
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 16px;
|
||||
background: var(--header-bg);
|
||||
color: var(--header-fg);
|
||||
flex-shrink: 0;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.panel-header h2 { font-size: 14px; font-weight: 600; }
|
||||
|
||||
/* ── Form ── */
|
||||
#check-form {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
.form-group label {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.form-group.required label::after { content: ' *'; color: var(--danger); }
|
||||
|
||||
.form-group input {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
padding: 7px 10px;
|
||||
font-size: 13px;
|
||||
font-family: var(--font);
|
||||
width: 100%;
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
}
|
||||
.form-group input:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
|
||||
}
|
||||
.form-group input.error { border-color: var(--danger); }
|
||||
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.address-section {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.address-section summary {
|
||||
padding: 8px 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
list-style: none;
|
||||
}
|
||||
.address-section summary::before { content: '▶ '; font-size: 9px; }
|
||||
.address-section[open] summary::before { content: '▼ '; }
|
||||
.address-section[open] summary { border-bottom: 1px solid var(--border); }
|
||||
.address-fields {
|
||||
padding: 10px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding-top: 4px;
|
||||
border-top: 1px solid var(--border);
|
||||
margin-top: auto;
|
||||
}
|
||||
.form-actions .btn-primary { flex: 1; padding: 8px; }
|
||||
Reference in New Issue
Block a user