Skip to content

Commit b0e8358

Browse files
committed
Fix CSS inclusion in PDF
1 parent b1180a9 commit b0e8358

File tree

3 files changed

+94
-10
lines changed

3 files changed

+94
-10
lines changed

css/main.css

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
* {
2+
margin: 0;
3+
outline: none;
4+
padding: 0;
5+
}
6+
7+
body {
8+
/* background: url('../images/background.png'); */
9+
font-family: "Gill Sans", "Lucida Grande", "Verdana", sans-serif;
10+
}
11+
12+
a {
13+
border-bottom: 1px dotted;
14+
color: #368BB7;
15+
text-decoration: none;
16+
}
17+
18+
a:hover {
19+
border-bottom: 1px solid;
20+
}
21+
22+
h1, h2, h3, h4, h5, h6 {
23+
color: #483738;
24+
}
25+
26+
h1 {
27+
border-bottom: 1px solid #ccc;
28+
margin-right: 100px;
29+
padding-bottom: 0.5em;
30+
text-align: center;
31+
}
32+
33+
h2, h3, h4, h5, h6 {
34+
padding: 0.5em 0;
35+
}
36+
37+
ul {
38+
margin-left: 1em;
39+
}
40+
41+
p {
42+
margin-bottom: 1em;
43+
}
44+
45+
#content {
46+
background: url('../images/synbioz.png') no-repeat top right;
47+
background-color: white;
48+
border: 0.1em solid #ccc;
49+
margin: 1em auto;
50+
padding: 1em 2em;
51+
width: 40em;
52+
border-radius: 1em;
53+
-moz-border-radius: 1em;
54+
-webkit-border-radius: 1em;
55+
}
56+
57+
#content pre {
58+
background-color: lightyellow;
59+
border: 1px dotted #ccc;
60+
margin: 0.5em 0;
61+
padding: 1em 1em;
62+
width: 48em;
63+
white-space: pre-wrap; /* css-3 */
64+
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
65+
white-space: -pre-wrap; /* Opera 4-6 */
66+
white-space: -o-pre-wrap; /* Opera 7 */
67+
word-wrap: break-word; /* Internet Explorer 5.5+ */
68+
}

css/pdf.css

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
@page {
2-
margin: 1cm;
3-
@bottom {
4-
color: #1d1d20;
5-
content: "Synbioz, page " counter(page) " sur " counter(pages);
6-
font-family: "Lucida Grande", "Verdana", "Helvetica", "Nimbus Sans L", sans-serif;
7-
font-size: 8pt;
8-
}
2+
margin: 1cm;
3+
@bottom {
4+
color: #1d1d20;
5+
content: "Synbioz, 5 rue de douai 75009 Paris | page " counter(page) " sur " counter(pages);
6+
font-family: "Lucida Grande", "Verdana", "Helvetica", "Nimbus Sans L", sans-serif;
7+
font-size: 8pt;
8+
}
99
}
1010

1111
body {
12-
background: none;
12+
background: none;
1313
}
1414

1515
#content {
16-
background-image-resolution: 100dpi;
16+
background-image-resolution: 100dpi;
17+
}
18+
19+
#content pre {
20+
width: 16cm !important;
21+
}
22+
23+
table {
24+
border-collapse: collapse;
25+
}
26+
27+
table td, table th {
28+
border: 1px solid grey;
29+
}
30+
31+
table td {
32+
padding: 0 10px 0 20px;
1733
}

layout.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
66
<title>{{title}}</title>
7-
<link rel="stylesheet" href="{{stylesheet}}" type="text/css" media="screen" charset="utf-8">
7+
<link rel="stylesheet" href="{{stylesheet}}" type="text/css" charset="utf-8">
88
</head>
99
<body>
1010
<div id="content">

0 commit comments

Comments
 (0)