feat: add example in pdf and html

fix: styles dir with twig
This commit is contained in:
Matthieu Bessat 2022-02-22 13:59:24 +01:00
commit d045d04cc9
6 changed files with 222 additions and 2 deletions

View file

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<title>Facture</title>
<style>
{% include('../styles/main.css') %}
{% include('./styles/main.css') %}
</style>
</head>
<body>

81
templates/styles/main.css Normal file
View file

@ -0,0 +1,81 @@
body {
background: white;
}
.container {
margin: 0 auto;
width: 80%;
}
.category {
border: 1px solid black;
margin-bottom: 1em;
}
.row {
padding: 3px 5px;
border-top: 1px dashed rgba(0, 0, 0, 0.8);
}
.row {
display: flex;
justify-content: space-between;
}
.category .row:first-of-type {
border-top: 0;
}
.category-name {
font-weight: bold;
}
.sub-total {
display: flex;
justify-content: flex-end;
}
.sub-total > div {
display: flex;
justify-content: space-between;
width: 200px;
}
.header {
display: flex;
justify-content: space-between;
}
.summary {
display: flex;
justify-content: flex-end;
}
.summary-content {
background: rgba(149, 165, 166, 0.3);
padding: 0;
border: 1px solid black;
}
.summary-content .row td {
padding: 5px;
}
.summary-content .row:first-of-type {
border-top: 0;
}
.summary-content tr td:first-of-type {
padding-right: 20px;
}
.summary-content tr td:nth-of-type(2) {
text-align: right;
}
.header-column {
list-style-type: none;
padding-left: 0em;
}
.footer {
margin-top: 60px;
font-size: 0.8em;
}
.banking {
display: flex;
}
.banking div {
margin-right: 4em;
}