Skip to content

Commit

Permalink
Merge pull request #106 from VSVverkeerskunde/feature/VSVGVQ-112
Browse files Browse the repository at this point in the history
VSVGVQ-112 Bigger photos on PDF.
  • Loading branch information
Luc Wollants committed Aug 30, 2018
2 parents 6a2562c + 8bf3b98 commit 1aa924c
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 62 deletions.
16 changes: 16 additions & 0 deletions assets/scss/core/_print.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@media print {
body {
padding-left: 1em;
padding-right: 1em;
}

* {
background: transparent !important;
color: #000 !important; /* Black prints faster: h5bp.com/s */
Expand Down Expand Up @@ -63,4 +68,15 @@
display: inline;
}

table.print .image {
width: 20%;
}
table.print .question {
width: 55%;
}
table.print tfoot img {
height: 50px;
width: auto;
}

}
3 changes: 2 additions & 1 deletion assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
@import "mixins/type";

@import "core/scaffold";
@import "core/print";

@import "components/overrides";
@import "components/content";
@import "components/footer";
@import "components/header";

@import "core/print";
121 changes: 68 additions & 53 deletions public/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions public/css/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions templates/questions/print.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% block body %}

<table class="table">
<table class="table print">
<thead>
<tr>
<th colspan="5">{% trans %}GVQ.title{% endtrans %}</th>
Expand All @@ -22,11 +22,11 @@
<tbody>
{% for question in questions %}
<tr>
<td>
<td class="image">
<img src="{{ uploadPath ~ question.imageFileName.toNative }}"
width="200">
</td>
<td>
<td class="question">
<strong>{{ question.text.toNative }}</strong>
<ul>
{% for answer in question.answers.toArray %}
Expand All @@ -38,13 +38,13 @@
<p>{{ question.feedback.toNative }}</p>
<h5><span class="badge badge-secondary">{{ question.id.toString }}</span></h5>
</td>
<td>
<td class="year">
{{ question.year.toNative }}
</td>
<td>
<td class="lang">
{{ question.language.toNative }}
</td>
<td>
<td class="cat">
{{ question.category.name.toNative }}
</td>
</tr>
Expand Down

0 comments on commit 1aa924c

Please sign in to comment.