<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="author" content="Cryxtalix">
  <meta name="description" content="My Resume Writer">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Resume</title>
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>

  <div class="Section1">
    <div class="Name">
      <h1><%= name %></h1>
    </div>
    
    <div class="Info">
      <div id="section_item">
        <% info.forEach((data, index) => { %>
          <% if (typeof data === "object") { %>
            <p><small><a href=<%= Object.values(data) %>><%= Object.keys(data) %></a></small></p>
          <% } else { %>
            <p><small><%= data %></small></p>
          <% } %>
          <% if (index !== info.length - 1) { %>
            <p><small> | </small></p>
          <% } %>
        <% }) %>
      </div>
    </div>

    <div class="Introduction">
      <div id="section_title">
        <b>About me</b>
      </div>

      <div id="section_body">
        <% intro.forEach((data, index) => { %>
          <div id="section_item">
            <p><%= data %></p>
          </div>
        <% }) %>
      </div>
    </div>
    
    <div class="Education">
      <div id="section_title">
        <b>Education</b>
      </div>

      <div id="section_body">
        <% education.forEach((data, index) => { %>
          <div id="section_item">
            <% if (data.Grades == "") { %>
              <p><b><%= data.Title %></b>, <%= data.Institution %></p>
            <% } else { %>
              <p><b><%= data.Title %></b>, <%= data.Institution %>, <%= data.Grades %></p>
            <% }; %>
            <p><small><i><%= data.Years %></i></small></p>
          </div>
        <% }) %>
      </div>
    </div>
  </div>

  <div class="Section2">
    <div class="Work_Experience">
      <div id="section_title">
        <b>Work/Professional Experience</b>
      </div>

      <div id="section_body">
        <% work_experience.forEach((data, index) => { %>
          <div id="section_item">
            <p><b><%= data.Institution %></b>, <%= data.Title %></p>
            <p><small><i><%= data.Years %></i></small></p>
            <ul>
              <% data.Description.forEach(des => { %>
                <li><%= des %></li>
              <% }) %>
            </ul>
          </div>
        <% }) %>
      </div>
    </div>

    <div class="Skills">
      <div id="section_title">
        <b>Skills/Certifications</b>
      </div>

      <div id="section_body">
        <ul>
          <% skill.forEach(data => { %>
            <li><%= data %></li>
          <% }) %>
        </ul>
      </div>
    </div>
  </div>

  <script src="app.js"></script>
</body>
</html>