<?php echo $this->doctype; ?>
<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
<html class="no-js" lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">

    <title><?php echo $this->title; ?></title>
    <?php
    $this->scripts();
    $this->styles();
    ?>
    <style>
        @page
        {
            size: auto;   /* auto is the initial value */

            /* this affects the margin in the printer settings */
            margin: 10mm 10mm 10mm 10mm;
        }

        body
        {
            /* this affects the margin on the content before sending to printer */
            margin: 0px;
        }

        td
        {
            padding:2px !important;
            font-size:8pt !important;
        }

        th
        {
            padding:2px !important;
            font-size:8pt !important;
        }

        p
        {
            font-size:8pt !important;
        }

    </style>
</head>
<body onload="window.print()">
<nav class="top-bar hide-for-print" data-topbar role="navigation">
    <ul class="title-area">
        <li class="name">
            <h1><a href="#">Print Preview</a></h1>
        </li>
    </ul>

    <section class="top-bar-section">
        <!-- Right Nav Section -->
        <ul class="right">
            <li><a href="#" id="print"><i class="fa fa-print"></i> Print</a></li>
            <li><a href="#" id="close"><i class="fa fa-close"></i> Close</a></li>
        </ul>
    </section>
</nav>
<?php $this->content();?>

<script>
    $("#print").click(function() {
        window.print();
    });

    $("#close").click(function() {
        window.close();
    });
</script>
</body>
</html>
