Skip to content

Solution to the dbt Lab take home challenge built with vanilla JS, ES6, flexbox and mobile-first workflow

Notifications You must be signed in to change notification settings

sadiejay/dbtlabs-take-home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

Customer Display

This is a solution to the dbt Lab take home challenge.

Table of contents

Overview

The challenge

  • Starting from the starter file ( technical-task-L2.html below) please build out this display of customers, their names, logos, and call-to-action buttons according to the comp in image 1 below.
  • You should use the customers array in the starter file to write each customer’s data as a child of div.customers-container .
  • Use vanilla HTML, CSS, and JS (ES6 okay) — no libraries or frameworks.
  • At mobile breakpoints (~500px wide or below), the customer cards should collapse to a single column. (See image 3 below)
  • When you hover one of the call-to-action buttons, the colors of the button should reverse. (See image 2 below).
  • We encourage you to start with and spend the most time on whatever piece feels most comfortable to you. If you are less comfortable with JS, you are welcome to start with static HTML on the page before you write the script — or vice versa. Show us what you are best at
  • Looking stuff up is fine and expected.

Screenshot

Mobile view

Screenshot 2022-03-11 at 00-50-16 Technical Task for L2

Desktop view

Screenshot 2022-03-11 at 00-50-02 Technical Task for L2

Links

My process

  • Using pseudocode
    • Break down the design into chunks and write out what all needed to be created
      • in order from Outside - Inside starting with the customers-container div
        • the individual cards
          • the company name
          • company image
          • company link
    • Then google how to create dom elements with js
      • insert needed code with an idea of keeping variable names consistent
    • Look up for each loop syntax
  • Created the for each method and gave customers as the parameter
  • Logged my for each loop to see if it was working
  • Inserted my first element from pseduocode (individual cards)
    • Create a style rule to see what was happening:
    div {
      outline: red 1px solid;
    }
  • Inserted the rest of my element as defined from pseduocode
  • Added styles as time allowed

Built with

  • Pseudocode
  • JS script
  • Stackoverflow
  • CSS Flexbox
  • Media queries

What I learned

  • I CAN DO IT!! 🙌🏾 🙌🏾 🙌🏾 I sorely underestimated myself and my abilities 😭 I'm excited to implement what I've learned in other projects, especially my in progress email generator!

    code snippets

const customerCard = document.createElement("div");
  customerCard.className = "customer-card";
  const customersContainer = document.querySelector('.customers-container');
  customersContainer.appendChild(customerCard);

Continued development

  • I could continue to add the styling for example to the a tags as well as play around with sizing of the cards.
  • I'm curious if I could add mulitle class names using js but I couldn't figure that out with the time I gave myself

Useful resources

Author

Acknowledgments

  • Thank you Thank you Thank you Lise and Rob. There are no words to express the depths of my gradtitude.

About

Solution to the dbt Lab take home challenge built with vanilla JS, ES6, flexbox and mobile-first workflow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages