Weshouldcreate a partialthatencapsulateshowthesebooksshouldbedisplayed.
Andifwegobacktoourapplicationhere, youcouldseeit.
Thesearedisplayedat a normalsizeonthispage.
Ourbookshavedisplayedverylargely, andonourhomepage, ourbooksarealsodisplayedlargely, soweneedtobeabletodetermineifwewantedtobe a largebookgridor a smallbook, greataswell.
Solet's createthatpartialdownherenewfileandwe'regonnacallthis a bookgriddi E.
J s andtheninsideofthispartial.
Let's justcopyoverallthecodefromourauthorsection.
Hastethatintohere.
Andwe'regonnachangebooksbyoffertobebooks, becausewe'regoingtohavethisbe a genericpartial.
That's justgoingtotake a listofbooks.
Also, as I mentioned, thisparcelisgoingtotakewhetherornotthisis a largebookgridlikethisorifit's goingtobe a smallbookgrouplikethis.
Soinsteadofallthiscoderighthere, wecanreplacethiswith a single, include, Sowecansayhereincludeandwewanttoincludefromthepartialsfolderjustlikethat, andwewillincludethebookgrid, andallweneedtodoispassthevariables.
Butthat's justbecausewehaven't suppliedtheclassesyetfor a bookcoverandbothgrids.
Solet's dothatnow.
Wecandoitin a filehere, callthebookdotCSS, whichisallofourbooksspecificstylings.
Andagainwewanttoincludethatrighthere.
RemainthatCSSandmakesurethat I spellthatproperlyBookstopCSSthatwegoandtogetstartedwastofind a fewvariableswhereyou'regoingtodeterminethesizingofourbookcovervariables.
Sothefirst, ifthereweregoingtogive a classofbookdetailslabelbecausethisisgoingtobe a label, it's justgoingtosayauthorwith a SimColemanafteritdidn't closethatNowwecancopythisdownfourtimesforeachoneofourdifferentsectionsbecauseallofourlabelsaregoingtobeexactlythesame.
Andthereasonweusegridisthatweget a nicelinehere, whereeverythinglinesupontherighthandsidewiththevaluesforthelefthandsidebecauseifwedidn't usegridthisKyletowouldbepushedrightupagainstauthorandsoon.
Thistimewe'regonnabeusingareasinsteadofactuallytofindin a roseandcombsothatwecanuseeverythingbynameandeasiestwaytodothisisactuallyinventontothenextlineandwe'regoingtofirsthaveoureditbuttonandthenwe'regonnahavetobebutton.
Sowe'regonnahaveauthorandauthorsincewewantheroffthebuttontobetwiceaswideasourotherbuttons, asyoucanseehereandthatwith a cynicalandthenallweneedtodoisaddinthegap.
Sowe'llsayGreatgaphere.
0.5 areIan.
Andwewant a littlebitofspaceinbetweenthebuttonsanditimage.
Onethingtonoteisthatsincewe'reusingimportinsideofourCSShere, thisCSSinthisimportactuallygetsloadedafterourMacy s s getsloadedandafterthedocumentgetsloaded.
Ifyoudidenjoythiscourseorhaveanyfeedbackatall, pleaseletmeknowdowninthecommentsbecause I wanttocreatemoreforcesinthefuture, and I wanttomakethemevenbetterthanthisone.