<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title><?php p(isset($meta_title) ? $meta_title : $title) ?></title>
        <?php $this->printLayoutHead(); ?>
    </head>
    <body<?php if (!empty($body_class)): ?> class="<?php p($body_class) ?>"<?php endif; ?>>
        <?php echo $this->placeholder('body-start'); ?>
        <?php include $this->_script('_demo.phtml'); ?>
        <?php include $this->_script('_maintenance.phtml'); ?>
        <div class="am-layout am-common">
            <a name="top"></a>
            <div class="am-header">
                <div class="am-header-content-wrapper am-main">
                    <div class="am-header-content">
                        <div class="am-header-logo-wrapper">
                            <?php include $this->_script('_logo.phtml'); ?>
                        </div>
                        <div class="am-header-content-content">
                            <?php echo $theme->getConfig('header'); ?>
                        </div>
                        <?php if (($_ = $theme->getNavigation('_header')) && count($_)) :?>
                        <div class="am-header-menu-wrapper">
                            <div class="am-header-menu-toggle"><a href="javascript:;"><?php __e('Menu') ?></a></div>
                            <?php echo $this->menu()->renderMenu($_, ['ulClass' => 'am-header-menu', 'normalClass' => 'normal', 'maxDepth' => 3,]); ?>
                        </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
            <div class="am-header-line">

            </div>
            <div class="am-body">
                <div class="am-body-content-wrapper am-main">
                    <?php include $this->_script('_content.phtml'); ?>
                </div>
            </div>
        </div>
        <div class="am-footer">
            <div class="am-footer-content-wrapper am-main">
                <div class="am-footer-content">
                    <div class="am-footer-actions">
                        <a href="#top" id="am-action-move-to-top"></a>
                    </div>
                    <div class="am-credits">Built on <a href="http://www.amember.com/" style="text-decoration: none;" title="flexible, user-friendly membership software (subscription script)">aMember Pro&trade; membership software</a></div>
                    <div class="am-footer-content-content">
                        <div class="am-footer-text"><?php echo str_replace(
                            ['%site_title%', '%year%'],
                            [$di->config->get('site_title'), date('Y')], $theme->getConfig('footer', "&copy; %year% - {$di->config->get('site_title')}")); ?></div>
                        <div class="am-footer-sm">
                            <?php foreach ($theme->getConfig('sm', []) as $id => $url): ?>
                                <?php if (!empty($url)) : ?>
                                    <a href="<?php p($url) ?>" target="_blank"><i class="fab fa-<?= $theme->getConfig('sm_icons')[$id] ?>"></i></a>
                                <?php endif; ?>
                            <?php endforeach; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php echo $this->placeholder('body-finish'); ?>
    </body>
</html>