Skip to content

Commit

Permalink
Merge pull request #45 from Marius-K/2.x
Browse files Browse the repository at this point in the history
Exported purged CSS file to template
  • Loading branch information
PovilasKorop authored Sep 25, 2020
2 parents 57f37e5 + e2f3345 commit b3e3326
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 13 deletions.
7 changes: 0 additions & 7 deletions public/bootstrap.min.css

This file was deleted.

102 changes: 97 additions & 5 deletions resources/views/templates/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,111 @@
<title>{{ $invoice->name }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<link rel="stylesheet" href="{{ asset('vendor/invoices/bootstrap.min.css') }}">

<style type="text/css" media="screen">
* {
font-family: "DejaVu Sans";
}
html {
font-family: sans-serif;
line-height: 1.15;
margin: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
font-size: 10px;
margin: 36pt;
}
h4 {
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
strong {
font-weight: bolder;
}
img {
vertical-align: middle;
border-style: none;
}
table {
border-collapse: collapse;
}
th {
text-align: inherit;
}
h4, .h4 {
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h4, .h4 {
font-size: 1.5rem;
}
.table {
width: 100%;
margin-bottom: 1rem;
color: #212529;
}
.table th,
.table td {
padding: 0.75rem;
vertical-align: top;
border-top: 1px solid #dee2e6;
}
.table thead th {
vertical-align: bottom;
border-bottom: 2px solid #dee2e6;
}
.table tbody + tbody {
border-top: 2px solid #dee2e6;
}
.mt-5 {
margin-top: 3rem !important;
}
.pr-0,
.px-0 {
padding-right: 0 !important;
}
.pl-0,
.px-0 {
padding-left: 0 !important;
}
.text-right {
text-align: right !important;
}
.text-center {
text-align: center !important;
}
.text-uppercase {
text-transform: uppercase !important;
}
* {
font-family: "DejaVu Sans";
}
body, h1, h2, h3, h4, h5, h6, table, th, tr, td, p, div {
line-height: 1.1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function render()
$view = View::make($template, ['invoice' => $this]);
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');

$this->pdf = PDF::setOptions(['enable_php' => true, 'enable_remote' => true])->loadHtml($html);
$this->pdf = PDF::setOptions(['enable_php' => true])->loadHtml($html);
$this->output = $this->pdf->output();
}

Expand Down

0 comments on commit b3e3326

Please sign in to comment.