Skip to content

Commit

Permalink
styling..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 10, 2022
1 parent db87942 commit fc1bc45
Show file tree
Hide file tree
Showing 3 changed files with 327 additions and 155 deletions.
165 changes: 115 additions & 50 deletions resources/views/components/documents/template/classic.blade.php
Expand Up @@ -12,7 +12,7 @@
<div class="col-58">
<div class="text">
@stack('company_logo_start')
@if (!$hideCompanyLogo)
@if (! $hideCompanyLogo)
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
<img class="c-logo w-image" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
@else
Expand All @@ -31,19 +31,20 @@
{{ $textDocumentSubheading }}
</p>
@endif
@if (!$hideCompanyDetails)
@if (!$hideCompanyName)

@if (! $hideCompanyDetails)
@if (! $hideCompanyName)
<p>{{ setting('company.name') }}</p>
@endif

@if (!$hideCompanyAddress)
@if (! $hideCompanyAddress)
<p>
{!! nl2br(setting('company.address')) !!}
{!! $document->company->location !!}
</p>
@endif

@if (!$hideCompanyTaxNumber)
@if (! $hideCompanyTaxNumber)
@if (setting('company.tax_number'))
<p>
<span class="text-medium text-default">
Expand All @@ -54,16 +55,18 @@
@endif
@endif

@if (!$hideCompanyPhone)
@if (! $hideCompanyPhone)
@if (setting('company.phone'))
<p>
{{ setting('company.phone') }}
</p>
@endif
@endif

@if (!$hideCompanyEmail)
<p class="small-text">{{ setting('company.email') }}</p>
@if (! $hideCompanyEmail)
<p class="small-text">
{{ setting('company.email') }}
</p>
@endif
@endif
@stack('company_details_end')
Expand All @@ -81,9 +84,14 @@
<div class="invoice-classic-frame ml-1 mt-1" style="border: 1px solid {{ $backgroundColor }}">
<div class="invoice-classic-inline-frame text-center" style="border: 1px solid {{ $backgroundColor }}">
@stack('invoice_number_input_start')
@if (!$hideDocumentNumber)
@if (! $hideDocumentNumber)
<div class="text small-text text-semibold mt-classic">
<span>{{ trans($textDocumentNumber) }}:</span><br>
<span>
{{ trans($textDocumentNumber) }}:
</span>

<br>

{{ $document->document_number }}
</div>
@endif
Expand All @@ -102,17 +110,21 @@
<div class="col-60">
<div class="text p-index-left">
@if (! $hideContactInfo)
<p class="text-semibold mb-0">{{ trans($textContactInfo) }}</p>
<p class="text-semibold mb-0">
{{ trans($textContactInfo) }}
</p>
@endif

@stack('name_input_start')
@if (!$hideContactName)
<p>{{ $document->contact_name }}</p>
@if (! $hideContactName)
<p>
{{ $document->contact_name }}
</p>
@endif
@stack('name_input_end')

@stack('address_input_start')
@if (!$hideContactAddress)
@if (! $hideContactAddress)
<p>
{!! nl2br($document->contact_address) !!}
<br>
Expand All @@ -122,7 +134,7 @@
@stack('address_input_end')

@stack('tax_number_input_start')
@if (!$hideContactTaxNumber)
@if (! $hideContactTaxNumber)
@if ($document->contact_tax_number)
<p>
<span class="text-medium text-default">
Expand All @@ -135,7 +147,7 @@
@stack('tax_number_input_end')

@stack('phone_input_start')
@if (!$hideContactPhone)
@if (! $hideContactPhone)
@if ($document->contact_phone)
<p>
{{ $document->contact_phone }}
Expand All @@ -145,8 +157,10 @@
@stack('phone_input_end')

@stack('email_start')
@if (!$hideContactEmail)
<p class="small-text">{{ $document->contact_email }}</p>
@if (! $hideContactEmail)
<p class="small-text">
{{ $document->contact_email }}
</p>
@endif
@stack('email_input_end')
</div>
Expand All @@ -155,82 +169,112 @@
<div class="col-40">
<div class="text p-index-right">
@stack('order_number_input_start')
@if (!$hideOrderNumber)
@if (! $hideOrderNumber)
@if ($document->order_number)
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textOrderNumber) }}:</span>
<span class="float-right spacing">{{ $document->order_number }}</span>
<span class="text-semibold spacing">
{{ trans($textOrderNumber) }}:
</span>

<span class="float-right spacing">
{{ $document->order_number }}
</span>
</p>
@endif
@endif
@stack('order_number_input_end')

@stack('issued_at_input_start')
@if (!$hideIssuedAt)
@if (! $hideIssuedAt)
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textIssuedAt) }}:</span>
<span class="float-right spacing">@date($document->issued_at)</span>
<span class="text-semibold spacing">
{{ trans($textIssuedAt) }}:
</span>

<span class="float-right spacing">
@date($document->issued_at)
</span>
</p>
@endif
@stack('issued_at_input_end')

@stack('due_at_input_start')
@if (!$hideDueAt)
@if (! $hideDueAt)
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textDueAt) }}:</span>
<span class="float-right spacing">@date($document->due_at)</span>
<span class="text-semibold spacing">
{{ trans($textDueAt) }}:
</span>

<span class="float-right spacing">
@date($document->due_at)
</span>
</p>
@endif
@stack('due_at_input_end')

@foreach ($document->totals_sorted as $total)
@if ($total->code == 'total')
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($total->name) }}:</span>
<span class="float-right spacing">@money($total->amount - $document->paid, $document->currency_code, true)</span>
<span class="text-semibold spacing">
{{ trans($total->name) }}:
</span>

<span class="float-right spacing">
@money($total->amount - $document->paid, $document->currency_code, true)
</span>
</p>
@endif
@endforeach
</div>
</div>
</div>

@if (!$hideItems)
@if (! $hideItems)
<div class="row">
<div class="col-100">
<div class="text extra-spacing">
<table class="c-lines">
<thead>
<tr>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="item text text-semibold text-alignment-left text-left">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@if (! $hideItems || (! $hideName && ! $hideDescription))
<th class="item text text-semibold text-alignment-left text-left">
{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}
</th>
@endif
@stack('name_th_end')

@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity text text-semibold text-alignment-right text-right">{{ trans($textQuantity) }}</th>
@if (! $hideQuantity)
<th class="quantity text text-semibold text-alignment-right text-right">
{{ trans($textQuantity) }}
</th>
@endif
@stack('quantity_th_end')

@stack('price_th_start')
@if (!$hidePrice)
<th class="price text text-semibold text-alignment-right text-right">{{ trans($textPrice) }}</th>
@if (! $hidePrice)
<th class="price text text-semibold text-alignment-right text-right">
{{ trans($textPrice) }}
</th>
@endif
@stack('price_th_end')

@if (!$hideDiscount)
@if (! $hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount text text-semibold text-alignment-right text-right">{{ trans('invoices.discount') }}</th>
<th class="discount text text-semibold text-alignment-right text-right">
{{ trans('invoices.discount') }}
</th>
@stack('discount_td_end')
@endif
@endif

@stack('total_th_start')
@if (!$hideAmount)
<th class="total text text-semibold text-alignment-right text-right">{{ trans($textAmount) }}</th>
@if (! $hideAmount)
<th class="total text text-semibold text-alignment-right text-right">
{{ trans($textAmount) }}
</th>
@endif
@stack('total_th_end')
</tr>
Expand Down Expand Up @@ -270,9 +314,12 @@
<div class="col-60">
<div class="text p-index-right">
@stack('notes_input_start')
@if($hideNote)
@if ($hideNote)
@if ($document->notes)
<strong>{{ trans_choice('general.notes', 2) }}</strong>
<strong>
{{ trans_choice('general.notes', 2) }}
</strong>

{!! nl2br($document->notes) !!}
@endif
@endif
Expand All @@ -285,36 +332,54 @@
@if ($total->code != 'total')
@stack($total->code . '_total_tr_start')
<div class="text border-bottom-dashed py-1">
<strong class="float-left text-semibold">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $document->currency_code, true)</span>
<strong class="float-left text-semibold">
{{ trans($total->title) }}:
</strong>

<span>
@money($total->amount, $document->currency_code, true)
</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($document->paid)
@stack('paid_total_tr_start')
<div class="text border-bottom-dashed py-1">
<span class="float-left text-semibold">{{ trans('invoices.paid') }}:</span>
<span>- @money($document->paid, $document->currency_code, true)</span>
<span class="float-left text-semibold">
{{ trans('invoices.paid') }}:
</span>

<span>
- @money($document->paid, $document->currency_code, true)
</span>
</div>
@stack('paid_total_tr_end')
@endif

@stack('grand_total_tr_start')
<div class="text border-bottom-dashed py-1">
<span class="float-left text-semibold">{{ trans($total->name) }}:</span>
<span>@money($document->amount_due, $document->currency_code, true)</span>
<span class="float-left text-semibold">
{{ trans($total->name) }}:
</span>

<span>
@money($document->amount_due, $document->currency_code, true)
</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>
</div>

@if (!$hideFooter)
@if (! $hideFooter)
@if ($document->footer)
<div class="row mt-1">
<div class="col-100">
<div class="text company">
<strong>{!! nl2br($document->footer) !!}</strong>
<strong>
{!! nl2br($document->footer) !!}
</strong>
</div>
</div>
</div>
Expand Down

0 comments on commit fc1bc45

Please sign in to comment.