KK KTP arsip

This commit is contained in:
2025-12-31 01:38:01 +08:00
parent 4fe381b3f0
commit 1de94bfeb4
28 changed files with 3296 additions and 191 deletions

View File

@@ -175,6 +175,121 @@ header h1 {
max-height: 400px;
border-radius: var(--radius);
cursor: pointer;
display: block;
margin: 0 auto;
}
/* Crop Container */
.crop-container {
position: relative;
max-width: 100%;
margin-bottom: 1rem;
overflow: hidden;
border-radius: var(--radius);
background: #000;
}
.crop-area {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
/* Let clicks pass through, handles catch them */
}
/* Perspective Crop Handles */
.crop-handle {
position: absolute;
width: 20px;
height: 20px;
background: var(--accent-primary);
border: 2px solid #fff;
border-radius: 50%;
transform: translate(-50%, -50%);
cursor: move;
pointer-events: auto;
z-index: 10;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
transition: transform 0.1s ease;
}
.crop-handle:hover,
.crop-handle.active {
background: #fff;
border-color: var(--accent-primary);
transform: translate(-50%, -50%) scale(1.2);
}
/* Crop Actions & Controls */
.crop-actions-container {
display: flex;
flex-direction: column;
gap: 1rem;
margin-top: 1rem;
padding: 1rem;
background: var(--bg-secondary);
border-radius: var(--radius);
border: 1px solid var(--border);
}
.rotation-control {
display: flex;
align-items: center;
gap: 1rem;
color: var(--text-secondary);
}
.rotation-control label {
font-weight: 500;
min-width: 80px;
}
.rotation-control input[type="range"] {
flex: 1;
cursor: pointer;
accent-color: var(--accent-primary);
}
.crop-buttons {
display: flex;
gap: 1rem;
justify-content: center;
}
.crop-action-btn {
padding: 0.5rem 1rem;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-weight: 500;
transition: all 0.2s ease;
flex: 1;
}
.crop-action-btn.primary {
background: var(--accent-gradient);
color: white;
}
.crop-action-btn.primary:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: var(--shadow);
}
.crop-action-btn.primary:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.crop-action-btn.secondary {
background: var(--bg-tertiary);
color: var(--text-secondary);
border: 1px solid var(--border);
}
.crop-action-btn.secondary:hover {
background: var(--bg-primary);
color: var(--text-primary);
}
/* Process Button */
@@ -533,6 +648,290 @@ footer a:hover {
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
/* Archive Header Button */
.header-actions {
display: flex;
gap: 1rem;
justify-content: center;
margin-top: 1rem;
}
.archive-header-btn {
padding: 0.5rem 1.25rem;
background: transparent;
border: 1px solid var(--accent-secondary);
color: var(--accent-secondary);
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
transition: all 0.2s ease;
}
.archive-header-btn:hover {
background: var(--accent-primary);
color: white;
border-color: var(--accent-primary);
}
/* Modal Styles */
.modal {
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
overflow: auto;
animation: fadeIn 0.3s;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.modal-content {
background-color: var(--bg-secondary);
margin: 5% auto;
padding: 2rem;
border: 1px solid var(--border);
border-radius: var(--radius-lg);
width: 90%;
max-width: 1000px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
position: relative;
animation: slideDown 0.3s;
}
@keyframes slideDown {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border);
}
.modal-header h2 {
color: var(--text-primary);
font-size: 1.5rem;
}
.close-btn {
background: transparent;
border: none;
color: var(--text-muted);
font-size: 2rem;
cursor: pointer;
line-height: 1;
transition: color 0.2s;
}
.close-btn:hover {
color: var(--text-primary);
}
/* Archive List Grid */
.archive-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 1.5rem;
max-height: 70vh;
overflow-y: auto;
padding-right: 0.5rem;
}
.archive-card {
background: var(--bg-tertiary);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
flex-direction: column;
}
.archive-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--accent-primary);
}
.archive-card-img {
width: 100%;
height: 160px;
background: #000;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.archive-card-img img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s;
}
.archive-card:hover .archive-card-img img {
transform: scale(1.05);
}
.archive-card-content {
padding: 1rem;
flex: 1;
display: flex;
flex-direction: column;
}
.archive-card-content h3 {
font-size: 1rem;
margin-bottom: 0.5rem;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.archive-card-meta {
margin-bottom: 1rem;
font-size: 0.8rem;
color: var(--text-muted);
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.archive-card-actions {
margin-top: auto;
}
.view-btn {
width: 100%;
padding: 0.5rem;
background: var(--bg-primary);
border: 1px solid var(--border);
color: var(--text-secondary);
border-radius: 6px;
cursor: pointer;
font-size: 0.875rem;
transition: all 0.2s;
}
.view-btn:hover {
background: var(--accent-primary);
color: white;
border-color: var(--accent-primary);
}
.archive-loading,
.archive-empty {
text-align: center;
padding: 3rem;
color: var(--text-muted);
font-size: 1.1rem;
}
/* Print Styles */
@media print {
/* Reset Page */
@page {
margin: 0;
size: auto;
}
body {
margin: 0;
padding: 0;
background: white !important;
/* Ensure no scroll or extra pages from hidden content */
height: 100vh !important;
overflow: hidden !important;
}
/* Hide EVERYTHING initially with high specificity */
body * {
visibility: hidden !important;
display: none !important;
/* Force display none to remove layout space */
}
/* Show ONLY Print Area and its children */
#printArea,
#printArea * {
visibility: visible !important;
display: flex !important;
/* Restore display for parent */
}
/* Reset display for children of printArea specifically */
#printArea * {
display: block !important;
/* Default to block or whatever needed */
}
/* Specific fix for image inside */
#printArea img {
display: inline-block !important;
}
#printArea {
position: fixed !important;
/* Fixed helps detach from flow */
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 100% !important;
overflow: visible !important;
z-index: 99999 !important;
background: white !important;
display: flex !important;
justify-content: center;
align-items: flex-start;
padding-top: 5cm;
/* Adjust padding as needed */
}
.ktp-print-size {
/* Standar ISO/IEC 7810 ID-1: 85.60 × 53.98 mm */
width: 85.60mm !important;
height: 53.98mm !important;
max-width: none !important;
max-height: none !important;
border: 1px dashed #ccc;
box-shadow: none !important;
/* Remove any shadow */
}
.a4-print-size {
/* A4 Landscape: 297mm x 210mm */
/* Use slightly less to account for margins if necessary, but standard is distinct */
width: 297mm !important;
height: 210mm !important;
max-width: none !important;
max-height: none !important;
border: none;
}
}