<!DOCTYPE html>
<html lang="<?= $this->language ?>">
<head>

  <meta charset="<?= $this->charset ?>">
  <title><?= $this->title ?> - Contao Open Source CMS <?= VERSION ?></title>
  <base href="<?= $this->base ?>">
  <meta name="generator" content="Contao Open Source CMS">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <meta name="referrer" content="origin">

  <link rel="stylesheet" href="<?php
    $objCombiner = new Combiner();
    $objCombiner->add('system/themes/'. $this->theme .'/basic.css');
    $objCombiner->add('system/themes/'. $this->theme .'/main.css');
    echo $objCombiner->getCombinedFile();
  ?>">
  <!--[if IE]><link rel="stylesheet" href="<?= TL_ASSETS_URL ?>system/themes/<?= $this->theme ?>/iefixes.css"><![endif]-->
  <?= $this->stylesheets ?>

  <script><?= $this->getLocaleString() ?></script>
  <script src="<?php
    $objCombiner = new Combiner();
    $objCombiner->add('assets/mootools/core/' . $GLOBALS['TL_ASSETS']['MOOTOOLS'] . '/mootools.js', $GLOBALS['TL_ASSETS']['MOOTOOLS']);
    $objCombiner->add('assets/mootools/mootao/Mootao.js');
    $objCombiner->add('assets/contao/js/core.js');
    $objCombiner->add('system/themes/'. $this->theme .'/hover.js');
    echo $objCombiner->getCombinedFile();
  ?>"></script>
  <script><?= $this->getDateString() ?></script>
  <?= $this->javascripts ?>
  <!--[if lt IE 9]><script src="<?= TL_ASSETS_URL ?>assets/html5shiv/<?= $GLOBALS['TL_ASSETS']['HTML5SHIV'] ?>/html5shiv.min.js"></script><![endif]-->

</head>
<body class="<?= $this->ua ?> popup">

  <div id="container">
    <div id="main">
      <?php if ($this->managerHref || $this->switchHref): ?>
        <div id="manager">
          <?php if ($this->switchHref): ?>
            <a href="<?= $this->switchHref ?>" class="open"><?= $this->switch ?></a>
          <?php endif; ?>
          <?php if ($this->managerHref): ?>
            <a href="<?= $this->managerHref ?>" class="open"><?= $this->manager ?></a>
          <?php endif; ?>
        </div>
      <?php endif; ?>
      <?php if ($this->addSearch): ?>
        <form action="<?= $this->action ?>" method="post">
          <div id="search">
            <input type="hidden" name="FORM_SUBMIT" value="item_selector">
            <input type="hidden" name="REQUEST_TOKEN" value="<?= REQUEST_TOKEN ?>">
            <input type="text" name="keyword" id="keyword" value="<?= $this->value ?>" class="tl_text<?php if ($this->value != ''): ?> active<?php endif; ?>">
            <input type="submit" name="search" value="<?= $this->search ?>" class="tl_submit">
          </div>
        </form>
      <?php endif; ?>
      <div class="tl_listing_container tree_view unselectable" id="tl_select">
        <?= $this->breadcrumb ?>
        <?= $this->main ?>
      </div>
    </div>
  </div>

  <script>
    if (window.outerWidth && window.outerWidth < 768) {
      document.body.setStyle('width', window.outerWidth - 20);
    }
  </script>

</body>
</html>