<?php echo $this->doctype() ?>
<html lang="en">
<head>
<?php
// meta tags
echo $this->headMeta()
->appendHttpEquiv('content-type', 'text/html; charset=utf-8')
->appendHttpEquiv('X-UA-Compatible', 'IE=Edge')
->appendName('viewport', 'width=device-width, initial-scale=1.0');
// output title
$this->headTitle()
->setSeparator(' - ')
->prepend('Swarm');
echo $this->headTitle();
// we extend the head link and head script helpers to add in our default css/scripts automatically
// we will also include anything under public/custom/*.(js|css) or public/custom/*/*.(js|css)
// link tags (icons, stylesheets)
$this->headLink(array('rel' => 'shortcut icon', 'href' => $this->basePath() . '/favicon.ico?v2'));
$this->headLink(array('rel' => 'apple-touch-icon', 'href' => $this->basePath() . '/apple-touch-icon.png'));
echo $this->headLink();
// javascript
echo $this->headScript();
?>
</head>
<?php
// compose classes for the body tag.
// - we include the name of the route that was matched to render this page.
// this is useful when targeting specific pages with JS or CSS
// - we tag the body as 'authenticated' or 'anonymous' based on whether or
// not the user is logged in. this allows us to show/hide elements easily
$user = $this->user();
$services = $this->getHelperPluginManager()->getServiceLocator();
$route = $services->get('application')->getMvcEvent()->getRouteMatch();
$this->bodyClass()->prepend('route-' . $route->getMatchedRouteName());
$this->bodyClass()->prepend($user->getId() ? 'authenticated' : 'anonymous');
$this->bodyClass()->prepend($this->permissions()->is('admin') ? 'admin' : 'non-admin');
// embed user info in data attr on body tag
$userData = $user->getId() ? array(
'id' => $user->getId(),
'name' => $user->getFullName(),
'email' => $user->getEmail(),
'avatar' => $this->avatar($user, 64),
) : null;
?>
<body class="<?php echo $this->bodyClass() ?>"
data-user="<?php echo $this->escapeHtmlAttr(json_encode($userData)) ?>"
data-csrf="<?php echo $this->csrf() ?>">
<!-- Google Tag Manager --><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-PJBHZV"height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-PJBHZV');</script><!-- End Google Tag Manager -->
<?php include __DIR__ . '/toolbar.phtml' ?>
<div class="container">
<?php echo $this->license() ?>
</div>
<?php if (!in_array('route-home', $this->bodyClass()->getValue())): ?>
<div class="container">
<?php endif; ?>
<?php echo $content ?>
<?php if (!in_array('route-home', $this->bodyClass()->getValue())): ?>
</div>
<?php endif; ?>
</body>
</html>