GitXplorerGitXplorer
f

xgen-coding-challenge

public
0 stars
3 forks
0 issues

Commits

List of commits on branch main.
Unverified
2836355fc392bde35594ca72a061c43c045a845e

center the products

ffredwong-it committed 3 years ago
Unverified
8f8469f4ef5f95983eac637dc64ded170e363700

display only 4 products

ffredwong-it committed 3 years ago
Unverified
99d6918417d4970583d8c9f4c04adfc4e414dfcd

remove console.log

ffredwong-it committed 3 years ago
Unverified
e5bd354b55367560aa740229e04cf1d0be6935d0

update htmltemplate, refactor code and update style

ffredwong-it committed 3 years ago
Unverified
f6232740a6a6ea96dec221ff502290eca0eda259

wip

ffredwong-it committed 3 years ago
Unverified
99f396edcb88f9361d2e1a3a02021c14b7ce70a1

create project

DDavidSimmermanXgen committed 3 years ago

README

The README file for this repository.

xgen-coding-challenge

Requirements

  • Write a script using the index.js file that will:
    • Take the provided HTML template and use it to display 4 products in the #XgenElement div
    • Replace any {{...}} fields with the information from the products
      • EX: {{prod_name}} should be replaced with Top 2
    • Only display Tops, every other type of product should be excluded
    • Exclude any product that is "is_in_stock": "0"
  • This should be done programmatically and nothing should be hard coded
    • If you were to add a new HTML template with new {{...}} fields it should still work
    • If you mix up the order of the products or add new ones, the correct products should still be displayed
    • Using indices like products[3] to filter out products does not count
  • Products are stored in the global variable products
  • The HTML template is stored in the global variable htmlTemplate
  • Use style.css to make the products presentable, but it doesn't have to look fancy

Bonus Points

  • Create your own HTML template with the provided products
  • Show product sale prices if a product is on sale
  • Style the page to look pretty