<!DOCTYPE HTML>
<html lang="pl">
    <head>
        <meta charset="utf-8" />
        <title>Tytuł</title>
        <style type="text/css">
            @page {
                size: "A4";
                margin: 2.5cm 1.5cm 2.5cm 1.5cm;
                @frame footer {
                    -pdf-frame-content: footerContent;
                    bottom: 0cm;
                    margin-left: 0cm;
                    margin-right: 0cm;
                    height: 1cm;
                }
            }
            #footerContent {
                color: #666;
                font-size: 10pt;
                text-align: center;
            }
            body {
                margin: 0;
                font: 10pt Arial, sans-serif;
                line-height: 150%;
            }
            p {
                font-weight: normal;
                font-size: 10pt;
            }
            p.h1 {
                font-size: 16pt;
                line-height: 100%;
                font-weight: bold;
                padding: 0;
                margin: 0;
                text-align: center;
                margin-bottom: 16pt;
            }
            p.h2 {
                font-size: 16pt;
                line-height: 100%;
                font-weight: bold;
                padding: 0;
                margin: 0;
                margin-bottom: 16pt;
            }
            table {
                border-collapse: collapse;
            }
            tr {
                padding-bottom: 5pt;
            }
            td {
                margin-bottom: 5pt;
                vertical-align: top;
            }
        </style>
    </head>
    <body>
        <div>
            <p class="h1">Curriculum Vitae</p>
            <table>
                <tr>
                    <td><p><b>{{ cv.first_name }} {{ cv.last_name }}</b><br />
                        Kontakt: {{ cv.email }}</p>
                    </td>
                    <td align="right">
                        <img src="{{ STATIC_ROOT }}/site/img/smiley.jpg" width="100" height="100" />
                    </td>
                </tr>
            </table>

            <p class="h2">Doświadczenie</p>
            <table>
                {% for experience in cv.experience_set.all %}
                    <tr>
                        <td><p>{{ experience.from_date|date:"F Y" }} -
                            {% if experience.till_date %}
                                {{ experience.till_date|date:"F Y" }}
                            {% else %}
                                present
                            {% endif %}<br />
                            {{ experience.position }} w {{ experience.company }}</p>
                        </td>
                        <td><p><b>Zdobyte umiejętności</b><br>
                            {{ experience.skills|linebreaksbr }}
                            <br>
                            <br>
                            </p>
                        </td>
                    </tr>
                {% endfor %}
            </table>
        </div>
        <pdf:nextpage>
        <div>
            Pusta strona pozostawiona celowo.
        </div>
        <div id="footerContent">
            Data wygenerowania dokumentu: {% now "Y-m-d" %} |
            Strona <pdf:pagenumber> z <pdf:pagecount>
        </div>
    </body>
</html>

