<!DOCTYPE html>
<html lang="<?= $this->language ?>"<?php if ($this->isRTL): ?> dir="rtl"<?php endif; ?>>
<head>

  <?php $this->block('head'); ?>
    <meta charset="<?= $this->charset ?>">
    <title><?= $this->title ?></title>
    <base href="<?= $this->base ?>">

    <?php $this->block('meta'); ?>
      <meta name="robots" content="<?= $this->robots ?>">
      <meta name="description" content="<?= $this->description ?>">
      <meta name="keywords" content="<?= $this->keywords ?>">
      <meta name="generator" content="Contao Open Source CMS">
    <?php $this->endblock(); ?>

    <?= $this->viewport ?>
    <?= $this->framework ?>
    <?= $this->stylesheets ?>
    <?= $this->mooScripts ?>
    <?= $this->head ?>

    <?php $this->block('html5shiv'); ?>
      <!--[if lt IE 9]><script src="<?= TL_ASSETS_URL ?>assets/html5shiv/<?= $GLOBALS['TL_ASSETS']['HTML5SHIV'] ?>/html5shiv-printshiv.min.js"></script><![endif]-->
    <?php $this->endblock(); ?>
  <?php $this->endblock(); ?>

</head>
<body id="top" class="{{ua::class}}<?php if ($this->class) echo ' ' . $this->class; ?>"<?php if ($this->onload): ?> onload="<?= $this->onload ?>"<?php endif; ?>>

  <?php $this->block('body'); ?>
    <?php $this->sections('top'); ?>

    <div id="wrapper">

      <?php $this->block('header'); ?>
        <?php if ($this->header): ?>
          <header id="header">
            <div class="inside">
              <?= $this->header ?>
            </div>
          </header>
        <?php endif; ?>
      <?php $this->endblock(); ?>

      <?php $this->sections('before'); ?>

      <?php $this->block('container'); ?>
        <div id="container">

          <?php $this->block('main'); ?>
            <div id="main">
              <div class="inside">
                <?= $this->main ?>
              </div>
              <?php $this->sections('main'); ?>
            </div>
          <?php $this->endblock(); ?>

          <?php $this->block('left'); ?>
            <?php if ($this->left): ?>
              <aside id="left">
                <div class="inside">
                  <?= $this->left ?>
                </div>
              </aside>
            <?php endif; ?>
          <?php $this->endblock(); ?>

          <?php $this->block('right'); ?>
            <?php if ($this->right): ?>
              <aside id="right">
                <div class="inside">
                  <?= $this->right ?>
                </div>
              </aside>
            <?php endif; ?>
          <?php $this->endblock(); ?>

        </div>
      <?php $this->endblock(); ?>

      <?php $this->sections('after'); ?>

      <?php $this->block('footer'); ?>
        <?php if ($this->footer): ?>
          <footer id="footer">
            <div class="inside">
              <?= $this->footer ?>
            </div>
          </footer>
        <?php endif; ?>
      <?php $this->endblock(); ?>

    </div>

    <?php $this->sections('bottom'); ?>
  <?php $this->endblock(); ?>

  <?= $this->mootools ?>

</body>
</html>
