Compass79's picture
use montserrat black font and distinguish the font for the case numbers and deadlines and potential relief with bold or underlined or whatever is the most zen-trauma-informed design possible
6ef7402 verified
Raw History Blame Contribute Delete
5.03 kB
class CustomCaseHeader extends HTMLElement {
constructor() {
super();
this.caseNumber = this.getAttribute('case-number') || '';
this.caseTitle = this.getAttribute('case-title') || '';
this.status = this.getAttribute('status') || 'Active';
}
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
.status-badge {
display: inline-flex;
align-items: center;
padding: 0.25rem 0.5rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 600;
line-height: 1;
}
.status-active {
background-color: #d1fae5;
color: #065f46;
}
.status-closed {
background-color: #fee2e2;
color: #991b1b;
}
</style>
<div class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="p-4 sm:p-6">
<div class="flex items-start justify-between">
<div class="flex-1 min-w-0">
<div class="flex items-center space-x-2">
<h1 class="text-xl sm:text-2xl font-black text-gray-900 truncate">${this.caseTitle}</h1>
<span class="status-badge status-${this.status.toLowerCase()}">
${this.status}
</span>
</div>
<div class="mt-2">
<div class="flex flex-wrap gap-x-4 gap-y-1 text-sm text-gray-500">
<span class="font-mono bg-gray-100 px-2 py-0.5 rounded">Case #25PDRO01260</span>
<span class="text-gray-400">(Main DVRO)</span>
<span class="font-mono bg-gray-100 px-2 py-0.5 rounded">Case #25FLRO01260</span>
<span class="text-gray-400">(Supporting FL)</span>
<span class="font-mono bg-gray-100 px-2 py-0.5 rounded">Case #25SCRO01260</span>
<span class="text-gray-400">(Custody/Support)</span>
</div>
</div>
</div>
<div class="flex space-x-2">
<button class="p-2 rounded-lg bg-gray-100 hover:bg-gray-200">
<i data-feather="share-2" class="w-5 h-5 text-gray-600"></i>
</button>
<button class="p-2 rounded-lg bg-gray-100 hover:bg-gray-200">
<i data-feather="printer" class="w-5 h-5 text-gray-600"></i>
</button>
</div>
</div>
<div class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-2">
<div class="bg-blue-50 p-3 rounded-lg">
<div class="flex items-center space-x-2">
<div class="p-2 rounded-full bg-blue-100 flex-shrink-0">
<i data-feather="calendar" class="w-5 h-5 text-blue-600"></i>
</div>
<div>
<p class="text-xs text-gray-500">Next Deadline</p>
<p class="font-medium">Nov 1, 2025</p>
</div>
</div>
</div>
<div class="bg-green-50 p-3 rounded-lg">
<div class="flex items-center space-x-2">
<div class="p-2 rounded-full bg-green-100 flex-shrink-0">
<i data-feather="dollar-sign" class="w-5 h-5 text-green-600"></i>
</div>
<div>
<p class="text-xs text-gray-500">Potential Relief</p>
<p class="font-medium">$98K-$158K</p>
</div>
</div>
</div>
<div class="bg-purple-50 p-3 rounded-lg">
<div class="flex items-center space-x-2">
<div class="p-2 rounded-full bg-purple-100 flex-shrink-0">
<i data-feather="shield" class="w-5 h-5 text-purple-600"></i>
</div>
<div>
<p class="text-xs text-gray-500">Assets Protected</p>
<p class="font-medium">$550K-$750K</p>
</div>
</div>
</div>
</div>
</div>
</div>
`;
}
}
customElements.define('custom-case-header', CustomCaseHeader);