Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout CSS pour impression tickets. #415

Merged
merged 1 commit into from
Nov 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions css/ticket_impression.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/** CSS des tickets d'impression
* Auteur initial: Jean jlinux <jeannevoux14@gmail.com>
* License: AGPLv3
* Testé avec chromium sur une EPSON POS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai rajouté un petit paragraphe d'entête vu que c'est ton travail ;) 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci Axel de ton aide

*/

@page {
size: 8cm 15cm ;
}

html {
font-family: sans-serif;
font-size: 0.5rem;
}

p {
font-size: 1rem;
}

table {
table-layout: fixed;
width: 300px;
border-collapse: separate;
border: 2px solid black;
}

td, th {
border: 1px solid black;
padding: 5px 2px;
text-align: center;
}

th {
background-color: rgb(235,235,235);
}

td {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

caption {
caption-side: bottom;
}
8 changes: 1 addition & 7 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,7 @@ function impressionTicket(data, response, unit = 'kg', tvaStuff = () => '', sumF
<head>
<meta charset="utf-8">
<title>Ticket ${title} &#x2116;${response.id}</title>
<style>
size: 21cm 29.7cm;
margin: 30mm 45mm 30mm 45mm;
p {
font-size: 8px;
}
</style>
<link rel="stylesheet" href="../css/ticket_impression.css" type="text/css">
</head>
<body>
<p>${document.querySelector('h1').innerHTML}</p>
Expand Down