{**
 * @param string   $basePath web base path
 * @param array    $flashes  flash messages
 *}

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>{ifset title}{include title|striptags} | {/ifset}Grimfield - The Great Plague of 1665</title>

	<link rel="stylesheet" href="{$basePath}/css/style.css">
  <link rel="stylesheet" href="{$basePath}/css/lightbox.css">
  
	<link rel="shortcut icon" href="{$basePath}/favicon.ico">
	<meta name="viewport" content="width=device-width">
	{block head}{/block}
</head>

<body>

 <div id="main">
    <div id="header">
        <div id="logo">
            <div id="logo_text">
                <h1><a href="{$basePath}"><span class="logo_colour">Grimfield</span></a></h1>
                <h2>The Great Plague of 1665</h2>
            </div>
        </div>
      <div id="menubar">
        <ul id="menu">
          <!-- put class="current" in the li tag for the selected page - to highlight which page you're on -->


          {foreach $menu as $key => $item}


          	{if $key == "Webs:$action" && $presenterName=="App\Presenters\WebsPresenter"}
	          <li class="current">
	          	{else}
	          <li>
	        {/if}
	        
	        {if in_array(substr($presenterName, 15), $playArray) && $key=="Homepage:default" && $action!="top"}
	          <li class="current">
	        {/if}
	        
	         <a n:href="{$key}">{$item|noescape}</a></li>
          
          {/foreach}
          
        </ul>
      </div>
    </div>
     <div id="site_content">
         <div class="sidebar">
             <h3>About the Project</h3>
             <p class="justify">This webpage is a part of an educational project for Masaryk University in Brno.  </p>
             <p class="justify">A purpose of the project is to offer interesting and meaningful speaking practice for EFL students. This web page serves as home for the pre-speaking part.</p>
             <h4>Template and pictures used:</h4>
             <ul>
                 <li><a href="http://www.html5webtemplates.co.uk/templates.html">Web Template</a></li>
                 <li><a href="http://www.pixabay.com">Pixabay (CC0 pics)</a></li>
                 <li><a href="http://www.maxpixel.freegreatpicture.com">Max Pixel (CC0 pics)</a></li>
                 <li><a href="https://wwww.commons.wikimedia.org">Wikimedia (CC0 pics)</a></li>
             </ul>
             <h3>Useful Links</h3>
             <ul>
                 <li><a href="http://www.englishclub.com/speaking/agreeing-disagreeing-expressions.htm">Useful Phrases for Debating</a></li>
                 <li><a href="https://www.facebook.com/agamaedu">Facebook Page</a></li>
             </ul>
             <h4>Average Population of Town</h4>
             <div id="population">
                 <p>{$avgpeople}</p>
             </div>
         </div>
      <div id="content">

                {if $start_time}
        	<div id="time_started" data-time="{$start_time ? $start_time}"></div>

          {if $start_time}
          <div id="stage_started" data-time="{$stage_time ? $stage_time}"></div>
          {/if}
        	{if $stop_time}
        	<div id="time_ended" data-time="{$stop_time ? $stop_time}"></div>
        	{/if}
       {if $show == 1}
        <div class="timelist">
            <table id="time_table">
                <tr>
                    {if $showstage == 1}
                    <th>
                <p>Stage:</p>
        	<div class="timer"></div>
                    </th>
                    {/if}
                    <th>
            <p>Game:</p>
        	<div class="timer"></div>
                    </th>
                </tr>
            </table>
        </div>
          {/if}
          {/if}

        
        	<div n:foreach="$flashes as $flash" n:class="flash, $flash->type">{$flash->message}</div>
        
        	{include content}

        
      </div>
    </div>
    <div id="footer">
        <p>Copyright &copy; night_sky_2 | <a href="http://validator.w3.org/check?uri=referer">HTML5</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> | <a href="http://www.html5webtemplates.co.uk">Website templates</a></p>
    </div>
  </div>
   


	{block scripts}
	<script src="{$basePath}/js/jquery-1.12.0.min.js"></script>
	<script src="{$basePath}/js/main.js"></script>
	<script src="{$basePath}/js/lightbox.js"></script>
	{/block}
</body>
</html>
