Skip to content

Commit b3e3326

Browse files
authored
Merge pull request #45 from Marius-K/2.x
Exported purged CSS file to template
2 parents 57f37e5 + e2f3345 commit b3e3326

File tree

3 files changed

+98
-13
lines changed

3 files changed

+98
-13
lines changed

public/bootstrap.min.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

resources/views/templates/default.blade.php

Lines changed: 97 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,111 @@
44
<title>{{ $invoice->name }}</title>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
66

7-
<link rel="stylesheet" href="{{ asset('vendor/invoices/bootstrap.min.css') }}">
8-
97
<style type="text/css" media="screen">
10-
* {
11-
font-family: "DejaVu Sans";
12-
}
138
html {
9+
font-family: sans-serif;
10+
line-height: 1.15;
1411
margin: 0;
1512
}
13+
1614
body {
15+
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";
16+
font-weight: 400;
17+
line-height: 1.5;
18+
color: #212529;
19+
text-align: left;
20+
background-color: #fff;
1721
font-size: 10px;
1822
margin: 36pt;
1923
}
24+
25+
h4 {
26+
margin-top: 0;
27+
margin-bottom: 0.5rem;
28+
}
29+
30+
p {
31+
margin-top: 0;
32+
margin-bottom: 1rem;
33+
}
34+
35+
strong {
36+
font-weight: bolder;
37+
}
38+
39+
img {
40+
vertical-align: middle;
41+
border-style: none;
42+
}
43+
44+
table {
45+
border-collapse: collapse;
46+
}
47+
48+
th {
49+
text-align: inherit;
50+
}
51+
52+
h4, .h4 {
53+
margin-bottom: 0.5rem;
54+
font-weight: 500;
55+
line-height: 1.2;
56+
}
57+
58+
h4, .h4 {
59+
font-size: 1.5rem;
60+
}
61+
62+
.table {
63+
width: 100%;
64+
margin-bottom: 1rem;
65+
color: #212529;
66+
}
67+
68+
.table th,
69+
.table td {
70+
padding: 0.75rem;
71+
vertical-align: top;
72+
border-top: 1px solid #dee2e6;
73+
}
74+
75+
.table thead th {
76+
vertical-align: bottom;
77+
border-bottom: 2px solid #dee2e6;
78+
}
79+
80+
.table tbody + tbody {
81+
border-top: 2px solid #dee2e6;
82+
}
83+
84+
.mt-5 {
85+
margin-top: 3rem !important;
86+
}
87+
88+
.pr-0,
89+
.px-0 {
90+
padding-right: 0 !important;
91+
}
92+
93+
.pl-0,
94+
.px-0 {
95+
padding-left: 0 !important;
96+
}
97+
98+
.text-right {
99+
text-align: right !important;
100+
}
101+
102+
.text-center {
103+
text-align: center !important;
104+
}
105+
106+
.text-uppercase {
107+
text-transform: uppercase !important;
108+
}
109+
* {
110+
font-family: "DejaVu Sans";
111+
}
20112
body, h1, h2, h3, h4, h5, h6, table, th, tr, td, p, div {
21113
line-height: 1.1;
22114
}

src/Invoice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function render()
242242
$view = View::make($template, ['invoice' => $this]);
243243
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
244244

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

0 commit comments

Comments
 (0)