<%- include('../partials/header') %>
  <section id="navigation">
    <nav class="navbar navbar navbar-dark bg-dark">
      <a class="navbar-brand" href="home"><i class="fab fa-opera"></i>ptimizedHealth</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="ml-auto navbar-nav">
          <li class="nav-item">
            <a class="nav-link" href="nutrition">Nutrition</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="sleep">Sleep</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="fitness">Fitness</a>
          </li>
          
          <li class="nav-item">
            <a class="nav-link" href="trending">Trending</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="about">About</a>
          </li>
          <li class="nav-item active">
            <a class="nav-link" href="profile">Dashboard</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/">Register!</a>
          </li>
        </ul>
      </div>
    </nav>
  </section>


  
  <div style="background-image: url('../img/yoga.jpeg')" class="profileHeader card profilepic">
    <h1 class="hiname">Welcome to your dashboard, <%=user%></h1>

    

    <div class="imagecard" style="width: 18rem; height:18rem;">
      
      <img class="card-img-top" src="/img/dummyImage.png" alt="Profile Picture" height="100px" width="100px">
    </div>
   
    <p style="text-align:center; margin:0"><a href="/logout">Log out</a></p>

    <div class="quote">
      <h5 style="font-style:italic">"<%=user_quote%>"</h5>
      <h6 style="font-style:italic">--<%=quote_author%></h6>

    </div>

  </div>
    

   

    
    <div style="background-color: #4080bf ">
    <div class="" >
      <div class="card analytics " style="background-color:#a1c0e0; height:25rem;">
    
        <div class="card-body each">
          <h5 class="card-title text-muted">Today is <%=today  %> </h5>
          <!-- Will be some sort of list -->
          
          <h6 class="card-subtitle mb-2">Write in your journal</h6>
          <form action="/profile" method="post">
            <textarea name="comments" id="comments" style="width:100%;height:15rem;font-size:1.2em;background-color:aliceblue;;">
              <% if(journal!=null){%>
                <%=journal%>
                
              <%}else{%>
                <%=journal%>
                

              <%}%>
            
            </textarea><br>
            <button class="btn btn-dark"type="submit" value="Submit">Save</button>
            </form>

      
        </div>
      </div>

      <div class="card analytics " style="background-color:aliceblue; height:18rem;">
        <div class="card-body ">
          <h5 class="card-title">Analytics</h5>
          <h6 class="card-subtitle mb-2 text-muted">Stats</h6>
          <h3 style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"><a href="/BMRcalc">BMR</a>: <%=user_bmr%> </h3>
          <h3 style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"><a href="/TDEEcalc">TDEE</a>: <%=user_tdee%> </h3><br>
          <h3 style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif">Previous Daily <a href="nutritionCalc">Caloric Intake: </a> </h3> 
          <h3 style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size:1.2rem">Breakfast: <%=b%> kcals | Lunch: <%=l%> kcals | Dinner: <%=d%> kcals | First Snack: <%=s1%> kcals | Second Snack: <%=s2%> kcals</h3> 
         
          <p class="card-text"></p>

        </div>
      </div>

      <div class="card analytics"  style=" background-color:#a1c0e0; height:18rem;">
        <div class="card-body each">
          <h5 class="card-title">Account Info</h5>
          <h6 class="card-subtitle mb-2 text-muted"></h6>
          <h6>Username: <%=user%></h6>
          <h6>Email: <%=user_email%></h6>
        
          
          <p class="card-text"></p>

        </div>
      </div>
    </div>
  </div>
 
  
  
<%- include('../partials/footer') %>
