<?php
// Set doctype explicitly if it is not `HTML4_LOOSE`, i.e. 'HTML 4.01 Transitional'
// $this->doctype('HTML4_LOOSE');

// Load translation data
$this->i18nTheme();

// Load Bootstrap
$this->bootstrap();

// Load style.css
$this->css($this->assetTheme('css/style.css'));

// Explicitly load favicon
$this->headLink([
    'rel'  => 'shortcut icon',
    'type' => 'image/x-icon',
    'href' => $this->favicon(),
]);
$this->headLink([
    'rel'  => 'shortcut icon',
    'type' => 'image/png',
    'href' => $this->favicon('favicon.png'),
]);

// Load google analytics code
$this->ga();

// Get module name
$module = Pi::service('module')->current();

?>
<!DOCTYPE HTML>
<html lang="<?php echo $locale; ?>">
<head>
    <meta charset="<?php echo $charset; ?>">
</head>
<body id="pi-<?php echo $module; ?>" class="pi-locale-<?php echo $locale; ?> pi-layout-style">
<div class="container-fluid pi-main-container">
    <!-- Flash messenger -->
    <?php include $this->template('flash-messenger'); ?>
    <?php if (!empty($content)) { ?>
        <div class="<?php echo $module; ?>">
            <div class="pi-module-content" data-ng-app="<?php echo $module; ?>">
                <?php echo $content; ?>
            </div>
        </div>
    <?php } ?>
</div>
</body>
</html>