Skip to content

Commit

Permalink
fix: download button formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Feb 28, 2024
1 parent e8720ac commit 257903e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
6 changes: 0 additions & 6 deletions src/resources/sass/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@
margin-top: 0;
}

.btn-label {
margin-bottom: 10px;
width: 180px;
padding: 10px;
}

.btn-table {
margin-top: 0 !important;
}
Expand Down
6 changes: 3 additions & 3 deletions src/resources/views/shipment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@

@if (isset($shipment->postage_label->label_url))
<div>
<a class="btn btn-primary btn-label" href="{{ $shipment->postage_label->label_url }}"
download="{{ $shipment->id }}" target="_blank">DOWNLOAD LABEL&nbsp;&nbsp;<i
<a class="btn btn-primary" href="{{ $shipment->postage_label->label_url }}"
download="{{ $shipment->id }}" target="_blank">Download Label&nbsp;&nbsp;<i
class="fas fa-download"></i>
</a>
</div>
Expand All @@ -94,7 +94,7 @@ class="fas fa-download"></i>

@foreach ($shipment->forms as $form)
<a href="{{ $form->form_url }}" class="btn btn-primary" target="_blank">Download
{{ $form->form_type }}</a>
{{ $form->form_type }}&nbsp;&nbsp;<i class="fas fa-download"></i></a>
@endforeach
<hr />
@endif
Expand Down
25 changes: 15 additions & 10 deletions src/resources/views/shipments.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,12 @@
<div class="response">
<h2>Shipments</h2>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#createShipment">Create a Shipment</button>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#generateQrCodes">Generate QR Codes</button>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#buyStamp">Buy a Stamp</button>
<hr />
@foreach ($json->shipments as $shipment)
<a href="/shipments/{{ $shipment->id }}"><button
class="btn btn-primary btn-sm btn-shipment">{{ substr($shipment->id, 0, 10) }}...</button></a>
class="btn btn-primary btn-shipment">{{ substr($shipment->id, 0, 10) }}...</button></a>
<p>Created at: {{ $shipment->created_at }}</p>
@if (isset($shipment->postage_label->label_url))
<div>
<a class="btn btn-primary btn-label btn-sm" href="{{ $shipment->postage_label->label_url }}"
download="{{ $shipment->id }}" target="_blank">
DOWNLOAD LABEL&nbsp;<i class="fas fa-download"></i>
</a>
</div>
@endif
<div class="row">
<div class="col-md-4">
<p>
Expand Down Expand Up @@ -72,6 +63,20 @@ class="btn btn-primary btn-sm btn-shipment">{{ substr($shipment->id, 0, 10) }}..
</p>
</div>
</div>
@if (isset($shipment->postage_label->label_url))
<div>
<a class="btn btn-primary mb-1" href="{{ $shipment->postage_label->label_url }}"
download="{{ $shipment->id }}" target="_blank">
Download Label&nbsp;<i class="fas fa-download"></i>
</a>
</div>
@endif
@if (isset($shipment->forms))
@foreach ($shipment->forms as $form)
<a href="{{ $form->form_url }}" class="btn btn-primary" target="_blank">Download
{{ $form->form_type }}&nbsp;&nbsp;<i class="fas fa-download"></i></a>
@endforeach
@endif
<hr />
@endforeach
</div>
Expand Down

0 comments on commit 257903e

Please sign in to comment.