 <!doctype html>
 <html lang="pt-br"><head>
  <base href="<?=BASE_URL?>" />
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!--     <meta name="description" content="">
  <meta name="author" content=""> -->
  <link rel="icon" href="favicon.ico">

  <?php echo $this->headTitle() ?>
  <script type="text/javascript">
    var BASE_URL = '<?=BASE_URL?>';
  </script>

  <?php echo $this->headLink() ?>


  <?php echo $this->headMeta() ?>

  <style type="text/css">
  main #conteudo .grade .item .thumb img{
    max-height: 117px;
  }
  main #conteudo .grade .item .thumb{
    max-height: 117px;
    /*overflow-y: hidden;*/
    border-radius: 4px;
  }
  .campo_file{
    position: relative;
    
  }
  .campo_file label {
    position: relative;
    text-transform: uppercase;
    border: #c10a0c 1px solid;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.42px;
    text-transform: uppercase;
    border-radius: 4px;

    text-align: center;
    display: block;

    padding: 8px 20px;
    background-color: #e57d00;
    border-color: rgba(229, 125, 0, 0);
    color: #fff;
  }
  .campo_file input {
    position: absolute;
    top: 0px;
    opacity: 0;
    height: 100%;
    max-width: 100%; }
    .ead_logado:hover{
      color: #fff;
      opacity: .8;
    }
    .ead_logado{
     background: none;
     border:0px;
     text-align: center;
     text-transform: uppercase;
     color: #fff;
     background: #008EA8;
     bottom: -43px;
     position: absolute;
     right: 0;
     border-radius: 4px 4px 0 0;
     /*font-size: 10px;*/
     /*letter-spacing: 0.36px;*/
     /*font-weight: 600;*/
     /*padding: 14px 15px; */

   }
   #barra-lateral .usuario .ead{
     background: none;
     display: block;
     width: 100%;
     margin:0px;
     border:0px;
     background: #008ea8 none repeat scroll 0 0;



   }
   main #conteudo .grade.agenda > div .item{
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(87,79,93,0.2);
  }
  main #conteudo .noticia.detalhe header h3,h1, .h1{
    font-size: 30px;
  }
  main #conteudo .thumb .tag.closed::before{

   border-color: rgba(194, 225, 245, 0) #995300 rgba(194, 225, 245, 0) rgba(194, 225, 245, 0);
 }
 main #conteudo .tag.closed
 {
  background: #e57d00;    
}
main #conteudo .grade .alinhamento-vertical > div{
  vertical-align: top;
}
main #conteudo .grade.lg .item header h3{
  padding-top: 0px;
}
main.interna #conteudo .grade .item.noticia{
  margin-bottom: 40px;
}
main #conteudo .texto p{
  text-align: justify;
}
.sublogo{
  font-size: 18px;
}
</style>


<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.9&appId=212441672592866";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>



    <aside id="barra-lateral">
      <?php 
      if (!empty($_SESSION[NOME_SESSAO]['usuario'])) {
        ?>

        <ul class="nav usuario">
          <li>
            <span class="avatar">
              <?php
              if(!empty($_SESSION[NOME_SESSAO]['usuario']->foto)){
                echo '<img src="'.BASE_URL.'uploads/usuarios/'.$_SESSION[NOME_SESSAO]['usuario']->foto.'" alt="" class="img-responsive">';

              }else{
                echo '<img src="assets/images/user-avatar.svg" alt="">';
              }
              ?>
              
              <p><?=$_SESSION[NOME_SESSAO]['usuario']->firstname?></p>
            </span>
            <form action="<?=MOODLE_URL?>login/index.php" target="_blank" method="post">
              <input type="hidden" name="username" value="<?=$_SESSION[NOME_SESSAO]['usuario']->username?>">
              <input type="hidden" name="password" value="<?=$_SESSION[NOME_SESSAO]['thepasswd']?>">
              <button type="submit" class="ead" > Ambiente de realização de cursos ></button>
            </form>
            <!-- <a class="ead" href="<?=MOODLE_URL?>" target="_blank">Ambiente de realização de cursos ></a> -->
            <!-- <a class="ead" href="<?=MOODLE_URL?>" target="_blank">Ambiente de realização de cursos ></a> -->
          </li>
        </ul>
        <?php
      }
      ?>

      <ul class="nav nav-pills nav-stacked">
        <li class="<?=($this->menu == 'inicio' ? 'active' : '')?>">
          <a href="<?=BASE_URL?>"><img src="assets/images/icone-inicio.svg" alt=""><span>Início</span></a>
        </li>
        <li class="<?=($this->menu == 'noticias' ? 'active' : '')?>">
          <a href="<?=BASE_URL?>noticias"><img src="assets/images/icone-noticias.svg" alt=""><span>Notícias</span></a>
        </li>
        <li  class="<?=($this->menu == 'cursos' ? 'active' : '')?>" >
          <a href="<?=BASE_URL?>cursos"><img src="assets/images/icone-cursos.svg" alt=""><span>Cursos Ofertados</span></a>
        </li>
        <li  class="<?=($this->menu == 'agenda' ? 'active' : '')?>" >
          <a href="<?=BASE_URL?>eventos"><img src="assets/images/icone-agenda.svg" alt=""><span>Agenda</span></a>
        </li>
        <?php 
        if (!empty($_SESSION[NOME_SESSAO]['usuario'])) {
          ?>
          <li  class="<?=($this->menu == 'inscricoes' ? 'active' : '')?>" >
            <a href="<?=BASE_URL?>usuarios/inscricoes"><img src="assets/images/icone-inscricoes.svg" alt=""><span>Meus Cursos</span></a>
          </li>
          <?php 
        }
        ?>
        <li  class="<?=($this->menu == 'biblioteca' ? 'active' : '')?>" >
          <a href="<?=BASE_URL?>biblioteca"><img src="assets/images/icone-biblioteca.svg" alt=""><span>Biblioteca</span></a>
        </li>
        <li  class="<?=($this->menu == 'certificados' ? 'active' : '')?>" >
          <a href="<?=BASE_URL?>usuarios/certificados"><img src="assets/images/icone-certificados.svg" alt=""><span>Certificados</span></a>
        </li>
        <li  class="<?=($this->menu == 'institucional' ? 'active' : '')?> dropdown" class="">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="assets/images/icone-institucional.svg" alt=""><span>Institucional <b class="caret"></b></span></a>
          <ul class="dropdown-menu">
            <li><a href="<?=BASE_URL?>missao">Missão</a></li>
            <li><a href="<?=BASE_URL?>visao">Visão</a></li>
            <li><a href="<?=BASE_URL?>quem-somos">Quem Somos</a></li>
          </ul>
        </li>
        <li class="<?=($this->menu == 'transparencia' ? 'active' : '')?>" >
          <a href="<?=BASE_URL?>transparencia"><img src="assets/images/icone-transparencia.svg" alt=""><span>Transparência</span></a>
        </li>
        <li class="<?=($this->menu == 'fale-conosco' ? 'active' : '')?>" >
          <a href="<?=BASE_URL?>fale-conosco"><img src="assets/images/icone-institucional.svg" alt=""><span>Fale conosco</span></a>
        </li>
      </ul>

    </aside>
    <main class="<?=(!empty($this->classmain) ? $this->classmain : '')?>">

      <header id="header">

        <div class="container-fluid">

          <div class="col-esquerda">

            <div class="logo">
              <figure><img src="assets/images/logo-ceped.svg" alt="Logo CEPED"></figure>
              <h1>Portal de Ensino à Distância <br><span class="sublogo">Centro Universitário de Estudos e Pesquisas sobre Desastres</span></h1>
            </div>

          </div>

          <div class="col-direita" style="position: relative;">
            <div class="button-group">
              <a class="btn btn-orange inverse" href="<?=BASE_URL?>usuarios/cadastro" role="button"> <?php 
              if (!empty($_SESSION[NOME_SESSAO]['usuario'])) {
                ?>Meus dados<?php 
              }else{echo "Cadastro";}
              ?></a>
              <?php 
              if (!empty($_SESSION[NOME_SESSAO]['usuario'])) {
                ?>
                <a class="btn btn-danger" href="<?=BASE_URL?>usuarios/logout" role="button">Sair</a>
                <form action="<?=MOODLE_URL?>login/index.php" target="_blank" method="post">
                  <input type="hidden" name="username" value="<?=$_SESSION[NOME_SESSAO]['usuario']->username?>">
                  <input type="hidden" name="password" value="<?=$_SESSION[NOME_SESSAO]['thepasswd']?>">
                  <button type="submit" class="btn ead_logado" > Acessar ambiente de realização de cursos ></button>
                </form>

                <?php 
              }else{
                ?>
                <a class="btn btn-blue" href="<?=BASE_URL?>usuarios/login" role="button">Login</a>
                <?php
              }
              ?>


              <button type="button" class="navbar-toggle visible-xs-inline-block visible-sm-inline-block" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar one"></span>
                <span class="icon-bar two"></span>
                <span class="icon-bar three"></span>
              </button>

            </div>
          </div>

        </div>

      </header>


      <?php echo $this->layout()->content ?>
    </main>
    <footer id="footer">
      <div class="container-fluid">
        <div class="col-esquerda">
          <div class="logo">
            <div class="wrapper">
              <img src="assets/images/logo-ceped.svg" alt="Logo CEPED">
            </div>
            <div class="wrapper">
              <div class="copy">
                <p><strong>Centro Universitário de Estudos e Pesquisas sobre Desastres</strong></p>
                <p>Praça Nossa Senhora de Salete, s/n — Palácio Iguaçu</p>
                <p>Telefone: (41) 3350-2610 | (41)3350-2609</p>
              </div>
            </div>
          </div>
        </div>

        <div class="col-direita">
          <div class="wrapper">
            <p class="redes">NAS REDES:</p>
          </div>
          <div class="wrapper">
            <div class="btn-group">
              <a class="" href="https://www.facebook.com/cepedpr" target="_blank" role="button">
                <img src="assets/images/icone-facebook.svg" class="img-responsive" alt="Image">
              </a>
              <a class="" href="https://www.youtube.com/channel/UCjqT1IMWwqpN7j8Nach7USQ" role="button" target="_blank" >
                <img src="assets/images/icone-youtube.svg" class="img-responsive" alt="Image">
              </a>
            </div> 
          </div>
        </div>
      </div>
    </footer>
    <?php echo $this->headStyle() ?>
    <?php echo $this->headScript() ?>



  </body>
  </html>


