<commit_before><?php
?>
  <header class="navbar" role="navigation">
    <div id="bg">
    </div>

    <div class="container">
      <div class="navbar-header">

        <a id="nav-logo" href="/">
          <!-- edd logo -->
        </a>
        </div><!-- ./navbar-header -->

      <div id="contact">

      </div>

      <nav class="nav-menu">
        <ul class="nav navbar-nav">
          <li>
            <a href="">Home</a>
          </li>

          <li class="dropdown">
            <a class="dropdown-toggle">
              Cakes
              <span class="glyphicon glyphicon-menu-down"></span>
            </a>
            <!--TODO:: glyph here-->
            <ul class="dropdown-menu">
              <li>
                <a href="#">Wedding Cakes</a>
              </li>
              <li class="divider"></li>
              <li>
                <a href="#">Birthday Cakes</a>
              </li>
              <li class="divider"></li>
              <li>
                <a href="#">Cupcakes</a>
              </li>
              <li class="divider"></li>
              <li>
                <a href="#">Treats & Flavours</a>
              </li>
            </ul>
          </li>

          <li>
            <a href="#">Bread</a>
          </li>

          <li>
            <a href="#">Store</a>
          </li>

          <li>
            <a href="#">About</a>
          </li>

          <li>
            <a href="#">FAQ</a>
          </li>

          <li>
            <a href="#">Contact</a>
          </li>
        </ul>

        <ul class="nav navbar-nav navbar-right">
          <li class="nav-login dropdown" id="login">
            <a>Login</a>

            <ul class="dropdown-menu">
              <li>
              <span class="invisble">
                <form action="login.php" method="POST" id="nav-form">
                 <input type="email" placeholder="e-mail" name="alias"/>
                </form>
              </span>
              </li>
              <li id="pass">
                <input type="password" placeholder="password" name="password"/>
                <button type="button">Register</button>
                <button type="button">Login</button>
              </li>
            </ul><!-- /.dropdown-menu -->
          </li><!-- /.nav-login -->
        </ul><!-- /.nav navbar-nav navbar-right dropdown -->
      </nav><!-- /.nav-menu -->
    </div><!-- /.container -->
  </header><!-- /.navbar --><commit_msg>Header section :: Reflect user login status<commit_after><?php

require_once('persistence.class.php');

$right_drop_type = persistence::user()->authenticated() ? "profile" : "login";
$username        = persistence::user()->username;


$login = <<<LOGIN
<li class="nav-login dropdown" id="{$right_drop_type}">
  <a>Login</a>

  <ul class="dropdown-menu">
    <li>
      <span>
        <form action="login.php" method="POST" id="nav-form">
         <input type="email" placeholder="e-mail" name="alias"/>
        </form>
      </span>
    </li>
    <li id="pass">
      <input type="password" placeholder="password" name="password"/>
      <button type="button" id="register_btn">Register</button>
      <button type="button" id="login_btn">Login</button>
    </li>
  </ul>
</li>
LOGIN;

$profile = <<<PROFILE
<li class="nav-login dropdown" id="{$right_drop_type}">
  <a>{$username}</a>

  <ul class="dropdown-menu">
    <li><a>Profile</a></li>
    <li><a>Sign Out</a></li>
  </ul>
</li>
PROFILE;


$header = <<<HEAD
<header class="navbar" role="navigation">
  <div id="bg">
  </div>

  <div class="container">
    <div class="navbar-header">

      <a id="nav-logo" href="/">
        <!-- edd logo -->
      </a>
      </div>

    <div id="contact">

    </div>

    <nav id="sticky-menu" class="nav-menu">
      <ul class="nav navbar-nav">
        <li>
          <a class="tab" href="">Home</a>
        </li>

        <li class="dropdown">
          <a class="dropdown-toggle tab">
            Cakes
            <span class="glyphicon glyphicon-menu-down"></span>
          </a>
          <!--TODO:: glyph here-->
          <ul class="dropdown-menu">
            <li>
              <a href="#">Wedding Cakes</a>
            </li>
            <li class="divider"></li>
            <li>
              <a href="#">Birthday Cakes</a>
            </li>
            <li class="divider"></li>
            <li>
              <a href="#">Cupcakes</a>
            </li>
            <li class="divider"></li>
            <li>
              <a href="#">Treats &amp; Flavours</a>
            </li>
          </ul>
        </li>

        <li>
          <a class="tab">Bread</a>
        </li>

        <li>
          <a class="tab">Store</a>
        </li>

        <li>
          <a class="tab">About</a>
        </li>

        <li>
          <a class="tab">FAQ</a>
        </li>

        <li>
          <a class="tab">Contact</a>
        </li>
      </ul>

      <ul class="nav navbar-nav navbar-right">
        {${$right_drop_type}}
      </ul>
    </nav>
  </div>
</header>
HEAD;

echo $header;
{'fraction_non_alphanumeric': 0.20135161995627113, 'fraction_numerical': 0.0, 'mean_word_length': 1.4344460570875666, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 0, '>': 215, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6453576', 'n_tokens_mistral': 1639, 'n_tokens_neox': 1565, 'n_words': 319}