Open christopherjohnson1 opened 4 years ago
const sock = {
name: 'steve',
age: 24,
brand: 'hanes',
color: 'white',
status: 'Extra Dirty',
hobby: 'swimming',
location: 'San Francisco',
size: 'one size fits most',
wantsLeft: true,
height: 'tube',
daysSingle: 365,
description: 'bla bla bla',
quote: ''Do not hang me out to dry
}
User Story
As a user when the home page loads, I want to see all the socks.
AC
WHEN the home page loads THEN I should see all the socks AND they should appear as images AND when I hover over one the image should be greyed out and the name should appear
Dev Notes
sock-drawer
class=d-flex flex-wrap
printToDom
function - that takes in adivid
andtextToPrint
sockBuilder
function - that takes in an array, loops over the array, builds adomString
(image, h2 tags for name (these should be hidden), container div should have a class ofsock-card col-4
), and callsprintToDom
.sock-card
- (use getElementByClassName and loop) with function calledshowName
.sock-card
- (use getElementByClassName and loop) with function calledhideName
showName
function - grey out image(use opacity), show h2 tag with namehideName
function - display regular image, hide h2 tag with name