update css kad-anggota

This commit is contained in:
hayatie
2025-12-09 11:43:21 +08:00
parent 6ae5b24d11
commit 32a4cc9221
@@ -1,6 +1,3 @@
<template> <template>
<div class="row col-md-10 col-md-offset-1"> <div class="row col-md-10 col-md-offset-1">
@@ -62,7 +59,7 @@
style="width: 124px; height: auto; filter: drop-shadow(3px 3px 4px black); margin-right: 0;"> style="width: 124px; height: auto; filter: drop-shadow(3px 3px 4px black); margin-right: 0;">
</div> </div>
<br><br>
<div class="kad-content"> <div class="kad-content">
<img src="images/KOPKB_Final.png" class="watermark" alt="Watermark"> <img src="images/KOPKB_Final.png" class="watermark" alt="Watermark">
@@ -84,7 +81,7 @@
<span class="detail-label">UNIT:</span> <span class="detail-label">UNIT:</span>
<span class="detail-value">{{ data.user.unit }}</span> <span class="detail-value">{{ data.user.unit }}</span>
</div> </div>
<br>
<div class="detail-item"> <div class="detail-item">
<svg id="barcode" class="detail-value">{{ data.user.no_kp }}</svg> <svg id="barcode" class="detail-value">{{ data.user.no_kp }}</svg>
@@ -364,11 +361,20 @@ export default {
.kad-keahlian { .kad-keahlian {
width: 85mm; width: 80vw;
/* padding: 0; */ /* responsive width */
/* adjust size */ max-width: 320px;
height: 60mm; /* limit for desktop */
/* adjust size */ aspect-ratio: 1.30 / 1;
/* maintain card ratio */
max-height: 200px;
/* anda boleh cuba 220px atau 200px */
overflow: hidden;
/* pastikan isi tidak meletup keluar */
padding: 18px;
/* kurangkan padding supaya content muat */
font-size: 0.8rem;
border-radius: 12px; border-radius: 12px;
border: 3px solid #0d0d0e; border: 3px solid #0d0d0e;
box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3); box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
@@ -376,21 +382,27 @@ export default {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
/* standard card width */ padding: 20px;
padding: 8mm;
box-sizing: border-box; box-sizing: border-box;
font-weight: bold; font-weight: bold;
font-size: 13px; font-size: 0.8rem;
/* responsive text */
color: whitesmoke; color: whitesmoke;
cursor: pointer; cursor: pointer;
transition: transform 0.25s ease, box-shadow 0.25s ease; transition: transform 0.25s ease, box-shadow 0.25s ease;
background-image: url('/images/kad_bg.jpeg'); background-image: url('/images/kad_bg.jpeg');
/* path to your image */
background-size: cover; background-size: cover;
/* cover whole div */ background-position: center;
} }
@media (max-height: 700px) {
.kad-keahlian {
max-height: 210px;
padding: 12px;
font-size: 0.75rem;
}
}
.kad-logo { .kad-logo {
position: absolute; position: absolute;
/* place inside kad-anggota */ /* place inside kad-anggota */
@@ -419,11 +431,10 @@ export default {
.kad-keahlian::before { .kad-keahlian::before {
content: ""; content: "";
position: relative; position: absolute;
/* ❗ fixed */
background-size: 100%; background-size: 100%;
/* adjust watermark size */
opacity: 0.08; opacity: 0.08;
/* faint watermark */
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
@@ -432,49 +443,46 @@ export default {
.kad-keahlian:hover { .kad-keahlian:hover {
transform: scale(1.03); transform: scale(1.03);
transition: 0.2s ease;
} }
.kad-title { /* .kad-title {
text-align: center; text-align: center;
font-size: 12px; font-size: 1.1rem;
font-weight: bold; font-weight: bold;
color: white; color: white;
text-shadow: 3px 3px 4px rgb(244, 241, 241); text-shadow: 3px 3px 4px rgb(244, 241, 241);
position: relative; position: relative;
z-index: 5; z-index: 5;
} } */
.member-details { .member-details {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 1.1rem;
line-height: 1.4; line-height: 1.3;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 2mm; gap: 6px;
margin-left: 35px; margin-left: 40px;
} }
.kad-content { .kad-content {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0;
gap: 10px; gap: 10px;
margin-top: 5px; margin-top: 5px;
position: relative; position: relative;
z-index: 5; z-index: 5;
border-radius: 18px;
/* optional: rounded corners */ /* optional: rounded corners */
} }
.kad-details { .kad-details {
font-size: 10px; font-size: 0.75rem;
font-weight: normal; font-weight: normal;
margin-bottom: 4px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
@@ -484,7 +492,7 @@ export default {
.kad-details .row { .kad-details .row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
/* ⭐ pushes label left, value right */ width: 100%;
} }
@@ -496,9 +504,9 @@ export default {
} }
#barcode { #barcode {
transform: scaleX(2.0); transform: scaleX(1.5);
/* 1.0 = normal, 2.0 = 2x longer */
transform-origin: left; transform-origin: left;
max-width: 100%;
} }
@@ -522,18 +530,19 @@ export default {
} }
.contact-info { .contact-info {
text-align: right; /* aligns everything inside to right */ text-align: right;
font-size: 9px; /* small text for card */ /* aligns everything inside to right */
font-size: 9px;
/* small text for card */
line-height: 1.2; line-height: 1.2;
color: rgb(12, 12, 12); color: rgb(12, 12, 12);
} }
.contact-info i { .contact-info i {
margin-right: 3px; /* spacing between icon & text */ margin-right: 3px;
font-size: 8px; /* icon size */ /* spacing between icon & text */
font-size: 8px;
/* icon size */
font-weight: normal; font-weight: normal;
} }
</style> </style>