Challenge-results-summary-component

Frontend Mentor - Results summary component solution

This is a solution to the Results summary component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

Screenshot

My process

Built with

What I learned

<% content.forEach(function(element) { %>
  <div class="card summary-card" style="background-color: <%=element.background%>;">
    <div class="row">
      <div class="col category-text">
        <img src="<%= element.icon%>" alt="icon">
        <p class="category" style="color: <%=element.color%>; ">
          <%= element.category %>
        </p>
      </div>
      <div class="col score-text">
        <p class="score">
          <%= element.score %>
        </p>
        <p class="hundred">
          / 100
        </p>
      </div>
    </div>
  </div>
<% }); %>
app.get('/', function (req, res) {
    content = [];
    json.forEach(element => {
        content.push(element);
    });  
    res.render('index', { content: content });
});

Author