<!DOCTYPE html>
<html lang="en">
  <head>
    <%- include("partials/meta.ejs") %>
    <title>RecipEasy: Show recipe</title>
  </head>
  <body>
    <div class="container">
      <%- include('partials/header-nav.ejs') %>
      <main>
        <div class="show-recipe">
          <section class="request-image">
            <% if (rPhotoName != ""){ %>
            <img src="/uploads/<%= rPhotoName%>" /> <br />
            <% } %>
          </section>
          <section class="recipe-details">
            <h2><b>Recipe Name:</b> <%= rRecipeName %></h2>
            <p>
              <b>Chef: </b> <%= rName %> <br />
              <b>Email:</b> <%= rEmail %> <br>
              <img src="/images/receipeasy_logo_v2.png" alt="RecipEasy logo" style="width: 100px;"/>
              <img src="/images/chefdevs_logo_v2.png" alt="chefdevs logo" style="width: 120px;" />
            </p>
            <p><b>Description:</b> <br> <%- rDescription %></p>
            <% if (user == rUserName) {%> 
            <a href="/edit-recipe/<%= _id %>"> <i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>&nbsp; &nbsp; 
            <a href="/delete-recipe/<%= _id %>"> <i class="fa fa-trash-o" aria-hidden="true"></i></a> <br>
            <% } %> 
          </section>
        </div>
      </main>
      <%- include("partials/footer.ejs") %>
    </div> 
  </body>
</html>
