proforma-html-renderer 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e1e224c8644cde3fe550f2d4d4f6da92a65c6dca9f233e7131b42686dd74f33
4
- data.tar.gz: abac419e39206d169a0110c592b2f536473d4f2dc3fe618158e9e41768d006b4
3
+ metadata.gz: 0724ac52181a7f2c4d3ac2f73fcfdafbd4a79c57b80e197a404d7a2fc485e3bd
4
+ data.tar.gz: 8886d7881f38f112e0f80022a894bf756eec81ee2a5819fd3a15ab39b363bde5
5
5
  SHA512:
6
- metadata.gz: e12d0e54825e88283d14d688d8ab222eee3064eb4d3e645bb7f9c12ddc88c9ee7055708f1dde3d565a1e8abdb0e85b562b58c2bba1cfc876233dd525161c02ad
7
- data.tar.gz: 3cafa744445dbed65639d89f46b5802db3a22d8dd2e9e6153bd22072efd228d513f1e25b5b2f198056dc5bb91cd37dd16c88eb9706e26286e837188aebc9a29f
6
+ metadata.gz: '009a43dfd219ecc040f106cda039799fcda49cef90a81bea2d936803055b4ba8475648e6d4a514316a1ec0e5842c424efef70b09c44f78a48ab9a20866db0c96'
7
+ data.tar.gz: 161fb3337c60cccb6ad84aead24a69acdabada0ff6c4f8ced0a31528521a9c77e324352b795ddf258164639d720da1789e99ba519e849b96de1bbd3fadfce25f
@@ -1,3 +1,7 @@
1
+ # 1.0.2 (June 14th, 2019)
2
+
3
+ * Added surrounding <div> element encapsulating all child elements. This should help with embedding the contents inside consumer web applications while still using the provided custom styles while preventing cross-contamination.
4
+
1
5
  # 1.0.1 (June 6th, 2019)
2
6
 
3
7
  * Added additional right padding to middle pane value cells.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proforma-html-renderer (1.0.1)
4
+ proforma-html-renderer (1.0.2)
5
5
  proforma (~> 1)
6
6
 
7
7
  GEM
@@ -109,3 +109,6 @@ DEPENDENCIES
109
109
  rubocop (~> 0.63.1)
110
110
  simplecov (~> 0.16.1)
111
111
  simplecov-console (~> 0.4.2)
112
+
113
+ BUNDLED WITH
114
+ 2.0.1
@@ -9,6 +9,6 @@
9
9
 
10
10
  module Proforma
11
11
  class HtmlRenderer
12
- VERSION = '1.0.1'
12
+ VERSION = '1.0.2'
13
13
  end
14
14
  end
@@ -3,8 +3,12 @@
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="utf-8">
6
- <style>
7
- * {
6
+ <style title="Basic Payslip Styles">
7
+ body {
8
+ margin: 15px;
9
+ }
10
+
11
+ .payslip-view * {
8
12
  box-sizing: border-box;
9
13
  font-family: sans-serif;
10
14
  font-size: 13px;
@@ -14,59 +18,61 @@
14
18
  padding: 0;
15
19
  }
16
20
 
17
- strong {
21
+ .payslip-view strong {
18
22
  font-weight: bold;
19
23
  }
20
24
 
21
- p, h1, table {
25
+ .payslip-view p,
26
+ .payslip-view h1,
27
+ .payslip-view table {
22
28
  margin: 8px 0;
23
29
  }
24
30
 
25
- hr {
31
+ .payslip-view hr {
26
32
  border-top: 1px solid black;
27
33
  }
28
34
 
29
- h1 {
35
+ .payslip-view h1 {
30
36
  font-size: 18px;
31
37
  font-weight: bold;
32
38
  }
33
39
 
34
- body {
35
- margin: 15px;
36
- }
37
-
38
- table {
40
+ .payslip-view table {
39
41
  border-collapse: collapse;
40
42
  border-spacing: 0;
41
43
  width: 100%;
42
44
  }
43
45
 
44
- td, th {
46
+ .payslip-view td,
47
+ .payslip-view th {
45
48
  vertical-align: top;
46
49
  text-align: left;
47
50
  padding: 5px;
48
51
  }
49
52
 
50
- table.table th {
53
+ .payslip-view table.table th {
51
54
  border-bottom: 1px solid black;
52
55
  }
53
56
 
54
- table.table tbody td {
57
+ .payslip-view table.table tbody td {
55
58
  border-bottom: 1px solid black;
56
59
  }
57
60
 
58
- table.table tfoot td, table.table th {
61
+ .payslip-view table.table tfoot td,
62
+ .payslip-view table.table th {
59
63
  background-color: #D3D3D3;
60
64
  font-weight: bold;
61
65
  }
62
66
 
63
- table.pane td, table.pane th {
67
+ .payslip-view table.pane td,
68
+ .payslip-view table.pane th {
64
69
  padding: 5px 5px 5px 0;
65
70
  }
66
71
  </style>
67
72
  </head>
68
73
  <body>
69
-
74
+ <div class="payslip-view">
75
+
70
76
 
71
77
  <table class="banner">
72
78
  <tbody>
@@ -1764,14 +1770,14 @@ Chicago, IL 62626
1764
1770
  </tr>
1765
1771
  </tbody>
1766
1772
  </table>
1767
- <br>
1768
- <h1>User List</h1>
1773
+ <br>
1774
+ <h1>User List</h1>
1769
1775
 
1770
- <hr>
1771
- <p>The following is a list of users</p>
1776
+ <hr>
1777
+ <p>The following is a list of users</p>
1772
1778
 
1773
- <br>
1774
-
1779
+ <br>
1780
+
1775
1781
 
1776
1782
  <table class="table">
1777
1783
  <thead>
@@ -1817,11 +1823,11 @@ Chicago, IL 62626
1817
1823
  </tfoot>
1818
1824
  </table>
1819
1825
 
1820
- <br>
1821
- <h1>User Details</h1>
1826
+ <br>
1827
+ <h1>User Details</h1>
1822
1828
 
1823
- <hr>
1824
-
1829
+ <hr>
1830
+
1825
1831
 
1826
1832
  <table class="pane">
1827
1833
  <tbody>
@@ -1839,10 +1845,10 @@ Chicago, IL 62626
1839
1845
  <tr>
1840
1846
  </tbody>
1841
1847
  </table>
1842
- <br>
1843
- <h1>Phone Numbers</h1>
1848
+ <br>
1849
+ <h1>Phone Numbers</h1>
1844
1850
 
1845
-
1851
+
1846
1852
 
1847
1853
  <table class="table">
1848
1854
  <thead>
@@ -1865,12 +1871,12 @@ Chicago, IL 62626
1865
1871
  </tfoot>
1866
1872
  </table>
1867
1873
 
1868
- <br>
1869
- <br>
1870
- <h1>User Details</h1>
1874
+ <br>
1875
+ <br>
1876
+ <h1>User Details</h1>
1871
1877
 
1872
- <hr>
1873
-
1878
+ <hr>
1879
+
1874
1880
 
1875
1881
  <table class="pane">
1876
1882
  <tbody>
@@ -1888,10 +1894,10 @@ Chicago, IL 62626
1888
1894
  <tr>
1889
1895
  </tbody>
1890
1896
  </table>
1891
- <br>
1892
- <h1>Phone Numbers</h1>
1897
+ <br>
1898
+ <h1>Phone Numbers</h1>
1893
1899
 
1894
-
1900
+
1895
1901
 
1896
1902
  <table class="table">
1897
1903
  <thead>
@@ -1910,12 +1916,12 @@ Chicago, IL 62626
1910
1916
  </tfoot>
1911
1917
  </table>
1912
1918
 
1913
- <br>
1914
- <br>
1915
- <h1>User Details</h1>
1919
+ <br>
1920
+ <br>
1921
+ <h1>User Details</h1>
1916
1922
 
1917
- <hr>
1918
-
1923
+ <hr>
1924
+
1919
1925
 
1920
1926
  <table class="pane">
1921
1927
  <tbody>
@@ -1933,11 +1939,12 @@ Chicago, IL 62626
1933
1939
  <tr>
1934
1940
  </tbody>
1935
1941
  </table>
1936
- <br>
1937
- <h1>Phone Numbers</h1>
1942
+ <br>
1943
+ <h1>Phone Numbers</h1>
1938
1944
 
1939
- <p>No phone numbers.</p>
1945
+ <p>No phone numbers.</p>
1940
1946
 
1941
- <br>
1942
- </body>
1947
+ <br>
1948
+ </div>
1949
+ </body>
1943
1950
  </html>
@@ -3,8 +3,12 @@
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="utf-8">
6
- <style>
7
- * {
6
+ <style title="Basic Payslip Styles">
7
+ body {
8
+ margin: 15px;
9
+ }
10
+
11
+ .payslip-view * {
8
12
  box-sizing: border-box;
9
13
  font-family: <%= options.font_family %>;
10
14
  font-size: <%= options.text_font_size %>px;
@@ -14,60 +18,63 @@
14
18
  padding: 0;
15
19
  }
16
20
 
17
- strong {
21
+ .payslip-view strong {
18
22
  font-weight: <%= options.bold_weight %>;
19
23
  }
20
24
 
21
- p, h1, table {
25
+ .payslip-view p,
26
+ .payslip-view h1,
27
+ .payslip-view table {
22
28
  margin: 8px 0;
23
29
  }
24
30
 
25
- hr {
31
+ .payslip-view hr {
26
32
  border-top: 1px solid black;
27
33
  }
28
34
 
29
- h1 {
35
+ .payslip-view h1 {
30
36
  font-size: <%= options.header_font_size %>px;
31
37
  font-weight: <%= options.bold_weight %>;
32
38
  }
33
39
 
34
- body {
35
- margin: 15px;
36
- }
37
-
38
- table {
40
+ .payslip-view table {
39
41
  border-collapse: collapse;
40
42
  border-spacing: 0;
41
43
  width: 100%;
42
44
  }
43
45
 
44
- td, th {
46
+ .payslip-view td,
47
+ .payslip-view th {
45
48
  vertical-align: top;
46
49
  text-align: left;
47
50
  padding: 5px;
48
51
  }
49
52
 
50
- table.table th {
53
+ .payslip-view table.table th {
51
54
  border-bottom: 1px solid black;
52
55
  }
53
56
 
54
- table.table tbody td {
57
+ .payslip-view table.table tbody td {
55
58
  border-bottom: 1px solid black;
56
59
  }
57
60
 
58
- table.table tfoot td, table.table th {
61
+ .payslip-view table.table tfoot td,
62
+ .payslip-view table.table th {
59
63
  background-color: #D3D3D3;
60
64
  font-weight: <%= options.bold_weight %>;
61
65
  }
62
66
 
63
- table.pane td, table.pane th {
67
+ .payslip-view table.pane td,
68
+ .payslip-view table.pane th {
64
69
  padding: 5px 5px 5px 0;
65
70
  }
66
71
  </style>
67
72
  </head>
68
73
  <body>
69
- <% object.children.each do |child| -%>
70
- <%= ProformaWriter.render(child, options) %>
71
- <% end -%>
74
+ <div class="payslip-view">
75
+ <% object.children.each do |child| -%>
76
+ <%= ProformaWriter.render(child, options) %>
77
+ <% end -%>
78
+ </div>
72
79
  </body>
73
80
  </html>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proforma-html-renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-06 00:00:00.000000000 Z
11
+ date: 2019-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: proforma