Skip to content

Commit 3dade02

Browse files
author
Itamar Junior
committed
feat: add blinking border animation for highlighted contracts and adjust select styling
1 parent e0177e8 commit 3dade02

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

resources/views/livewire/company/budget-calendar.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class="flex h-9 w-12 items-center justify-center rounded-r-md border-y border-r
4141
<div class="max-w-sm mx-auto">
4242
<label for="company" class="sr-only">Select an option</label>
4343
<select id="company" wire:model.live="selectedCompanyId"
44-
class="font-semibold text-gray-900 text-sm rounded-lg block w-full p-2.5 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">
44+
class="font-semibold text-gray-900 text-sm rounded-lg block w-full p-2.5 px-3 gap-x-1.5 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">
4545
<option selected>Choose a company</option>
4646
@foreach ($companies as $company)
4747
<option value="{{ $company->id }}">{{ $company->name }}</option>

resources/views/livewire/company/service/contract-manager.blade.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
<div class="space-y-3">
1414
@forelse ($contracts as $contract)
15-
<div class="border p-4 rounded-xl bg-white dark:bg-gray-800" id="contract-{{ $contract->id }}">
15+
<div x-data x-init="if (window.location.hash === '#contract-{{ $contract->id }}') $el.classList.add('alerts-border')" class="border p-4 rounded-xl bg-white dark:bg-gray-800"
16+
id="contract-{{ $contract->id }}">
1617
<div class="flex justify-between items-start">
1718
<div>
1819
<div class="text-sm text-gray-500">{{ $contract->company->name }}</div>
@@ -60,6 +61,7 @@
6061
</x-ui.modal>
6162
@endif
6263

64+
{{-- EDIT MODAL --}}
6365
@if ($showEditModal)
6466
<x-ui.modal wire:model="showEditModal">
6567
<div class="mt-3 text-center sm:mt-5">
@@ -78,6 +80,7 @@
7880
</x-ui.modal>
7981
@endif
8082

83+
{{-- DELETE MODAL --}}
8184
@if ($showDeleteModal)
8285
<x-ui.modal wire:model="showDeleteModal">
8386
<div class="mx-auto flex size-12 items-center justify-center rounded-full bg-red-100">
@@ -106,6 +109,23 @@
106109
</x-ui.modal>
107110
@endif
108111

109-
110112
</x-contract.layout>
113+
<style>
114+
.alerts-border {
115+
border: 4px #1c2ecb solid;
116+
117+
animation: blink 0.8s ease-in-out;
118+
animation-iteration-count: 5;
119+
animation-fill-mode: forwards;
120+
121+
border-radius: 0.5rem;
122+
box-shadow: 0 0 10px rgba(28, 46, 203, 0.5);
123+
}
124+
125+
@keyframes blink {
126+
50% {
127+
border-color: #fff;
128+
}
129+
}
130+
</style>
111131
</section>

0 commit comments

Comments
 (0)