From ddf1cf494fb501efe29175f18ada3a817ddc1192 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 14 Oct 2024 19:31:04 +0800 Subject: [PATCH] Fix wrong images --- index.html | 8 +++++--- package-lock.json | 1 + pokemon.css | 22 +++++++++++----------- pokemon.min.css | 2 +- scripts/sprite.js | 9 +++++---- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index d50127b..d464ec5 100644 --- a/index.html +++ b/index.html @@ -176,13 +176,15 @@

Repokémon

' - + '
' + + '
' + '

' + d.name + '

' + ''; var longDesc = repo.desc || ''; @@ -191,7 +193,7 @@

Repokémon

' + '' - + '
' + + '
' + '

' + d.name + '

' + '' + '' diff --git a/package-lock.json b/package-lock.json index 7705244..1639536 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "repokemon", "version": "1.0.0", "license": "ISC", "devDependencies": { diff --git a/pokemon.css b/pokemon.css index bb43bee..820f068 100644 --- a/pokemon.css +++ b/pokemon.css @@ -1,4 +1,4 @@ -[class*=i0],.i100{ +.c0{ background-image: url(data/pokemon-0.jpg); background-size: 1000px 1000px; } @@ -102,7 +102,7 @@ .i098{background-position: -700px -900px;} .i099{background-position: -800px -900px;} .i100{background-position: -900px -900px;} -[class*=i1]:not(.i100),.i200{ +.c1{ background-image: url(data/pokemon-1.jpg); background-size: 1000px 1000px; } @@ -206,7 +206,7 @@ .i198{background-position: -700px -900px;} .i199{background-position: -800px -900px;} .i200{background-position: -900px -900px;} -[class*=i2]:not(.i200),.i300{ +.c2{ background-image: url(data/pokemon-2.jpg); background-size: 1000px 1000px; } @@ -310,7 +310,7 @@ .i298{background-position: -700px -900px;} .i299{background-position: -800px -900px;} .i300{background-position: -900px -900px;} -[class*=i3]:not(.i300),.i400{ +.c3{ background-image: url(data/pokemon-3.jpg); background-size: 1000px 1000px; } @@ -414,7 +414,7 @@ .i398{background-position: -700px -900px;} .i399{background-position: -800px -900px;} .i400{background-position: -900px -900px;} -[class*=i4]:not(.i400),.i500{ +.c4{ background-image: url(data/pokemon-4.jpg); background-size: 1000px 1000px; } @@ -518,7 +518,7 @@ .i498{background-position: -700px -900px;} .i499{background-position: -800px -900px;} .i500{background-position: -900px -900px;} -[class*=i5]:not(.i500),.i600{ +.c5{ background-image: url(data/pokemon-5.jpg); background-size: 1000px 1000px; } @@ -622,7 +622,7 @@ .i598{background-position: -700px -900px;} .i599{background-position: -800px -900px;} .i600{background-position: -900px -900px;} -[class*=i6]:not(.i600),.i700{ +.c6{ background-image: url(data/pokemon-6.jpg); background-size: 1000px 1000px; } @@ -726,7 +726,7 @@ .i698{background-position: -700px -900px;} .i699{background-position: -800px -900px;} .i700{background-position: -900px -900px;} -[class*=i7]:not(.i700),.i800{ +.c7{ background-image: url(data/pokemon-7.jpg); background-size: 1000px 1000px; } @@ -830,7 +830,7 @@ .i798{background-position: -700px -900px;} .i799{background-position: -800px -900px;} .i800{background-position: -900px -900px;} -[class*=i8]:not(.i800),.i900{ +.c8{ background-image: url(data/pokemon-8.jpg); background-size: 1000px 1000px; } @@ -934,7 +934,7 @@ .i898{background-position: -700px -900px;} .i899{background-position: -800px -900px;} .i900{background-position: -900px -900px;} -[class*=i9]:not(.i900),.i1000{ +.c9{ background-image: url(data/pokemon-9.jpg); background-size: 1000px 1000px; } @@ -1038,7 +1038,7 @@ .i998{background-position: -700px -900px;} .i999{background-position: -800px -900px;} .i1000{background-position: -900px -900px;} -[class*=i10]:not(.i1000),.i1100{ +.c10{ background-image: url(data/pokemon-10.jpg); background-size: 500px 500px; } diff --git a/pokemon.min.css b/pokemon.min.css index c8a4727..a9de541 100644 --- a/pokemon.min.css +++ b/pokemon.min.css @@ -1 +1 @@ -.i100,[class*=i0]{background-image:url(data/pokemon-0.jpg);background-size:1000px 1000px}.i001,.i1001,.i101,.i201,.i301,.i401,.i501,.i601,.i701,.i801,.i901{background-position:0 0}.i002,.i1002,.i102,.i202,.i302,.i402,.i502,.i602,.i702,.i802,.i902{background-position:-100px 0}.i003,.i1003,.i103,.i203,.i303,.i403,.i503,.i603,.i703,.i803,.i903{background-position:0 -100px}.i004,.i1004,.i104,.i204,.i304,.i404,.i504,.i604,.i704,.i804,.i904{background-position:-100px -100px}.i005,.i1005,.i105,.i205,.i305,.i405,.i505,.i605,.i705,.i805,.i905{background-position:-200px 0}.i006,.i1006,.i106,.i206,.i306,.i406,.i506,.i606,.i706,.i806,.i906{background-position:-200px -100px}.i007,.i1007,.i107,.i207,.i307,.i407,.i507,.i607,.i707,.i807,.i907{background-position:0 -200px}.i008,.i1008,.i108,.i208,.i308,.i408,.i508,.i608,.i708,.i808,.i908{background-position:-100px -200px}.i009,.i1009,.i109,.i209,.i309,.i409,.i509,.i609,.i709,.i809,.i909{background-position:-200px -200px}.i010,.i1010,.i110,.i210,.i310,.i410,.i510,.i610,.i710,.i810,.i910{background-position:-300px 0}.i011,.i1011,.i111,.i211,.i311,.i411,.i511,.i611,.i711,.i811,.i911{background-position:-300px -100px}.i012,.i1012,.i112,.i212,.i312,.i412,.i512,.i612,.i712,.i812,.i912{background-position:-300px -200px}.i013,.i1013,.i113,.i213,.i313,.i413,.i513,.i613,.i713,.i813,.i913{background-position:0 -300px}.i014,.i1014,.i114,.i214,.i314,.i414,.i514,.i614,.i714,.i814,.i914{background-position:-100px -300px}.i015,.i1015,.i115,.i215,.i315,.i415,.i515,.i615,.i715,.i815,.i915{background-position:-200px -300px}.i016,.i1016,.i116,.i216,.i316,.i416,.i516,.i616,.i716,.i816,.i916{background-position:-300px -300px}.i017,.i1017,.i117,.i217,.i317,.i417,.i517,.i617,.i717,.i817,.i917{background-position:-400px 0}.i018,.i1018,.i118,.i218,.i318,.i418,.i518,.i618,.i718,.i818,.i918{background-position:-400px -100px}.i019,.i1019,.i119,.i219,.i319,.i419,.i519,.i619,.i719,.i819,.i919{background-position:-400px -200px}.i020,.i1020,.i120,.i220,.i320,.i420,.i520,.i620,.i720,.i820,.i920{background-position:-400px -300px}.i021,.i1021,.i121,.i221,.i321,.i421,.i521,.i621,.i721,.i821,.i921{background-position:0 -400px}.i022,.i1022,.i122,.i222,.i322,.i422,.i522,.i622,.i722,.i822,.i922{background-position:-100px -400px}.i023,.i1023,.i123,.i223,.i323,.i423,.i523,.i623,.i723,.i823,.i923{background-position:-200px -400px}.i024,.i1024,.i124,.i224,.i324,.i424,.i524,.i624,.i724,.i824,.i924{background-position:-300px -400px}.i025,.i1025,.i125,.i225,.i325,.i425,.i525,.i625,.i725,.i825,.i925{background-position:-400px -400px}.i026,.i126,.i226,.i326,.i426,.i526,.i626,.i726,.i826,.i926{background-position:-500px 0}.i027,.i127,.i227,.i327,.i427,.i527,.i627,.i727,.i827,.i927{background-position:-500px -100px}.i028,.i128,.i228,.i328,.i428,.i528,.i628,.i728,.i828,.i928{background-position:-500px -200px}.i029,.i129,.i229,.i329,.i429,.i529,.i629,.i729,.i829,.i929{background-position:-500px -300px}.i030,.i130,.i230,.i330,.i430,.i530,.i630,.i730,.i830,.i930{background-position:-500px -400px}.i031,.i131,.i231,.i331,.i431,.i531,.i631,.i731,.i831,.i931{background-position:0 -500px}.i032,.i132,.i232,.i332,.i432,.i532,.i632,.i732,.i832,.i932{background-position:-100px -500px}.i033,.i133,.i233,.i333,.i433,.i533,.i633,.i733,.i833,.i933{background-position:-200px -500px}.i034,.i134,.i234,.i334,.i434,.i534,.i634,.i734,.i834,.i934{background-position:-300px -500px}.i035,.i135,.i235,.i335,.i435,.i535,.i635,.i735,.i835,.i935{background-position:-400px -500px}.i036,.i136,.i236,.i336,.i436,.i536,.i636,.i736,.i836,.i936{background-position:-500px -500px}.i037,.i137,.i237,.i337,.i437,.i537,.i637,.i737,.i837,.i937{background-position:-600px 0}.i038,.i138,.i238,.i338,.i438,.i538,.i638,.i738,.i838,.i938{background-position:-600px -100px}.i039,.i139,.i239,.i339,.i439,.i539,.i639,.i739,.i839,.i939{background-position:-600px -200px}.i040,.i140,.i240,.i340,.i440,.i540,.i640,.i740,.i840,.i940{background-position:-600px -300px}.i041,.i141,.i241,.i341,.i441,.i541,.i641,.i741,.i841,.i941{background-position:-600px -400px}.i042,.i142,.i242,.i342,.i442,.i542,.i642,.i742,.i842,.i942{background-position:-600px -500px}.i043,.i143,.i243,.i343,.i443,.i543,.i643,.i743,.i843,.i943{background-position:0 -600px}.i044,.i144,.i244,.i344,.i444,.i544,.i644,.i744,.i844,.i944{background-position:-100px -600px}.i045,.i145,.i245,.i345,.i445,.i545,.i645,.i745,.i845,.i945{background-position:-200px -600px}.i046,.i146,.i246,.i346,.i446,.i546,.i646,.i746,.i846,.i946{background-position:-300px -600px}.i047,.i147,.i247,.i347,.i447,.i547,.i647,.i747,.i847,.i947{background-position:-400px -600px}.i048,.i148,.i248,.i348,.i448,.i548,.i648,.i748,.i848,.i948{background-position:-500px -600px}.i049,.i149,.i249,.i349,.i449,.i549,.i649,.i749,.i849,.i949{background-position:-600px -600px}.i050,.i150,.i250,.i350,.i450,.i550,.i650,.i750,.i850,.i950{background-position:-700px 0}.i051,.i151,.i251,.i351,.i451,.i551,.i651,.i751,.i851,.i951{background-position:-700px -100px}.i052,.i152,.i252,.i352,.i452,.i552,.i652,.i752,.i852,.i952{background-position:-700px -200px}.i053,.i153,.i253,.i353,.i453,.i553,.i653,.i753,.i853,.i953{background-position:-700px -300px}.i054,.i154,.i254,.i354,.i454,.i554,.i654,.i754,.i854,.i954{background-position:-700px -400px}.i055,.i155,.i255,.i355,.i455,.i555,.i655,.i755,.i855,.i955{background-position:-700px -500px}.i056,.i156,.i256,.i356,.i456,.i556,.i656,.i756,.i856,.i956{background-position:-700px -600px}.i057,.i157,.i257,.i357,.i457,.i557,.i657,.i757,.i857,.i957{background-position:0 -700px}.i058,.i158,.i258,.i358,.i458,.i558,.i658,.i758,.i858,.i958{background-position:-100px -700px}.i059,.i159,.i259,.i359,.i459,.i559,.i659,.i759,.i859,.i959{background-position:-200px -700px}.i060,.i160,.i260,.i360,.i460,.i560,.i660,.i760,.i860,.i960{background-position:-300px -700px}.i061,.i161,.i261,.i361,.i461,.i561,.i661,.i761,.i861,.i961{background-position:-400px -700px}.i062,.i162,.i262,.i362,.i462,.i562,.i662,.i762,.i862,.i962{background-position:-500px -700px}.i063,.i163,.i263,.i363,.i463,.i563,.i663,.i763,.i863,.i963{background-position:-600px -700px}.i064,.i164,.i264,.i364,.i464,.i564,.i664,.i764,.i864,.i964{background-position:-700px -700px}.i065,.i165,.i265,.i365,.i465,.i565,.i665,.i765,.i865,.i965{background-position:-800px 0}.i066,.i166,.i266,.i366,.i466,.i566,.i666,.i766,.i866,.i966{background-position:-800px -100px}.i067,.i167,.i267,.i367,.i467,.i567,.i667,.i767,.i867,.i967{background-position:-800px -200px}.i068,.i168,.i268,.i368,.i468,.i568,.i668,.i768,.i868,.i968{background-position:-800px -300px}.i069,.i169,.i269,.i369,.i469,.i569,.i669,.i769,.i869,.i969{background-position:-800px -400px}.i070,.i170,.i270,.i370,.i470,.i570,.i670,.i770,.i870,.i970{background-position:-800px -500px}.i071,.i171,.i271,.i371,.i471,.i571,.i671,.i771,.i871,.i971{background-position:-800px -600px}.i072,.i172,.i272,.i372,.i472,.i572,.i672,.i772,.i872,.i972{background-position:-800px -700px}.i073,.i173,.i273,.i373,.i473,.i573,.i673,.i773,.i873,.i973{background-position:0 -800px}.i074,.i174,.i274,.i374,.i474,.i574,.i674,.i774,.i874,.i974{background-position:-100px -800px}.i075,.i175,.i275,.i375,.i475,.i575,.i675,.i775,.i875,.i975{background-position:-200px -800px}.i076,.i176,.i276,.i376,.i476,.i576,.i676,.i776,.i876,.i976{background-position:-300px -800px}.i077,.i177,.i277,.i377,.i477,.i577,.i677,.i777,.i877,.i977{background-position:-400px -800px}.i078,.i178,.i278,.i378,.i478,.i578,.i678,.i778,.i878,.i978{background-position:-500px -800px}.i079,.i179,.i279,.i379,.i479,.i579,.i679,.i779,.i879,.i979{background-position:-600px -800px}.i080,.i180,.i280,.i380,.i480,.i580,.i680,.i780,.i880,.i980{background-position:-700px -800px}.i081,.i181,.i281,.i381,.i481,.i581,.i681,.i781,.i881,.i981{background-position:-800px -800px}.i082,.i182,.i282,.i382,.i482,.i582,.i682,.i782,.i882,.i982{background-position:-900px 0}.i083,.i183,.i283,.i383,.i483,.i583,.i683,.i783,.i883,.i983{background-position:-900px -100px}.i084,.i184,.i284,.i384,.i484,.i584,.i684,.i784,.i884,.i984{background-position:-900px -200px}.i085,.i185,.i285,.i385,.i485,.i585,.i685,.i785,.i885,.i985{background-position:-900px -300px}.i086,.i186,.i286,.i386,.i486,.i586,.i686,.i786,.i886,.i986{background-position:-900px -400px}.i087,.i187,.i287,.i387,.i487,.i587,.i687,.i787,.i887,.i987{background-position:-900px -500px}.i088,.i188,.i288,.i388,.i488,.i588,.i688,.i788,.i888,.i988{background-position:-900px -600px}.i089,.i189,.i289,.i389,.i489,.i589,.i689,.i789,.i889,.i989{background-position:-900px -700px}.i090,.i190,.i290,.i390,.i490,.i590,.i690,.i790,.i890,.i990{background-position:-900px -800px}.i091,.i191,.i291,.i391,.i491,.i591,.i691,.i791,.i891,.i991{background-position:0 -900px}.i092,.i192,.i292,.i392,.i492,.i592,.i692,.i792,.i892,.i992{background-position:-100px -900px}.i093,.i193,.i293,.i393,.i493,.i593,.i693,.i793,.i893,.i993{background-position:-200px -900px}.i094,.i194,.i294,.i394,.i494,.i594,.i694,.i794,.i894,.i994{background-position:-300px -900px}.i095,.i195,.i295,.i395,.i495,.i595,.i695,.i795,.i895,.i995{background-position:-400px -900px}.i096,.i196,.i296,.i396,.i496,.i596,.i696,.i796,.i896,.i996{background-position:-500px -900px}.i097,.i197,.i297,.i397,.i497,.i597,.i697,.i797,.i897,.i997{background-position:-600px -900px}.i098,.i198,.i298,.i398,.i498,.i598,.i698,.i798,.i898,.i998{background-position:-700px -900px}.i099,.i199,.i299,.i399,.i499,.i599,.i699,.i799,.i899,.i999{background-position:-800px -900px}.i100,.i1000,.i200,.i300,.i400,.i500,.i600,.i700,.i800,.i900{background-position:-900px -900px}.i200,[class*=i1]:not(.i100){background-image:url(data/pokemon-1.jpg);background-size:1000px 1000px}.i300,[class*=i2]:not(.i200){background-image:url(data/pokemon-2.jpg);background-size:1000px 1000px}.i400,[class*=i3]:not(.i300){background-image:url(data/pokemon-3.jpg);background-size:1000px 1000px}.i500,[class*=i4]:not(.i400){background-image:url(data/pokemon-4.jpg);background-size:1000px 1000px}.i600,[class*=i5]:not(.i500){background-image:url(data/pokemon-5.jpg);background-size:1000px 1000px}.i700,[class*=i6]:not(.i600){background-image:url(data/pokemon-6.jpg);background-size:1000px 1000px}.i800,[class*=i7]:not(.i700){background-image:url(data/pokemon-7.jpg);background-size:1000px 1000px}.i900,[class*=i8]:not(.i800){background-image:url(data/pokemon-8.jpg);background-size:1000px 1000px}.i1000,[class*=i9]:not(.i900){background-image:url(data/pokemon-9.jpg);background-size:1000px 1000px}.i1100,[class*=i10]:not(.i1000){background-image:url(data/pokemon-10.jpg);background-size:500px 500px} \ No newline at end of file +.c0{background-image:url(data/pokemon-0.jpg);background-size:1000px 1000px}.i001,.i1001,.i101,.i201,.i301,.i401,.i501,.i601,.i701,.i801,.i901{background-position:0 0}.i002,.i1002,.i102,.i202,.i302,.i402,.i502,.i602,.i702,.i802,.i902{background-position:-100px 0}.i003,.i1003,.i103,.i203,.i303,.i403,.i503,.i603,.i703,.i803,.i903{background-position:0 -100px}.i004,.i1004,.i104,.i204,.i304,.i404,.i504,.i604,.i704,.i804,.i904{background-position:-100px -100px}.i005,.i1005,.i105,.i205,.i305,.i405,.i505,.i605,.i705,.i805,.i905{background-position:-200px 0}.i006,.i1006,.i106,.i206,.i306,.i406,.i506,.i606,.i706,.i806,.i906{background-position:-200px -100px}.i007,.i1007,.i107,.i207,.i307,.i407,.i507,.i607,.i707,.i807,.i907{background-position:0 -200px}.i008,.i1008,.i108,.i208,.i308,.i408,.i508,.i608,.i708,.i808,.i908{background-position:-100px -200px}.i009,.i1009,.i109,.i209,.i309,.i409,.i509,.i609,.i709,.i809,.i909{background-position:-200px -200px}.i010,.i1010,.i110,.i210,.i310,.i410,.i510,.i610,.i710,.i810,.i910{background-position:-300px 0}.i011,.i1011,.i111,.i211,.i311,.i411,.i511,.i611,.i711,.i811,.i911{background-position:-300px -100px}.i012,.i1012,.i112,.i212,.i312,.i412,.i512,.i612,.i712,.i812,.i912{background-position:-300px -200px}.i013,.i1013,.i113,.i213,.i313,.i413,.i513,.i613,.i713,.i813,.i913{background-position:0 -300px}.i014,.i1014,.i114,.i214,.i314,.i414,.i514,.i614,.i714,.i814,.i914{background-position:-100px -300px}.i015,.i1015,.i115,.i215,.i315,.i415,.i515,.i615,.i715,.i815,.i915{background-position:-200px -300px}.i016,.i1016,.i116,.i216,.i316,.i416,.i516,.i616,.i716,.i816,.i916{background-position:-300px -300px}.i017,.i1017,.i117,.i217,.i317,.i417,.i517,.i617,.i717,.i817,.i917{background-position:-400px 0}.i018,.i1018,.i118,.i218,.i318,.i418,.i518,.i618,.i718,.i818,.i918{background-position:-400px -100px}.i019,.i1019,.i119,.i219,.i319,.i419,.i519,.i619,.i719,.i819,.i919{background-position:-400px -200px}.i020,.i1020,.i120,.i220,.i320,.i420,.i520,.i620,.i720,.i820,.i920{background-position:-400px -300px}.i021,.i1021,.i121,.i221,.i321,.i421,.i521,.i621,.i721,.i821,.i921{background-position:0 -400px}.i022,.i1022,.i122,.i222,.i322,.i422,.i522,.i622,.i722,.i822,.i922{background-position:-100px -400px}.i023,.i1023,.i123,.i223,.i323,.i423,.i523,.i623,.i723,.i823,.i923{background-position:-200px -400px}.i024,.i1024,.i124,.i224,.i324,.i424,.i524,.i624,.i724,.i824,.i924{background-position:-300px -400px}.i025,.i1025,.i125,.i225,.i325,.i425,.i525,.i625,.i725,.i825,.i925{background-position:-400px -400px}.i026,.i126,.i226,.i326,.i426,.i526,.i626,.i726,.i826,.i926{background-position:-500px 0}.i027,.i127,.i227,.i327,.i427,.i527,.i627,.i727,.i827,.i927{background-position:-500px -100px}.i028,.i128,.i228,.i328,.i428,.i528,.i628,.i728,.i828,.i928{background-position:-500px -200px}.i029,.i129,.i229,.i329,.i429,.i529,.i629,.i729,.i829,.i929{background-position:-500px -300px}.i030,.i130,.i230,.i330,.i430,.i530,.i630,.i730,.i830,.i930{background-position:-500px -400px}.i031,.i131,.i231,.i331,.i431,.i531,.i631,.i731,.i831,.i931{background-position:0 -500px}.i032,.i132,.i232,.i332,.i432,.i532,.i632,.i732,.i832,.i932{background-position:-100px -500px}.i033,.i133,.i233,.i333,.i433,.i533,.i633,.i733,.i833,.i933{background-position:-200px -500px}.i034,.i134,.i234,.i334,.i434,.i534,.i634,.i734,.i834,.i934{background-position:-300px -500px}.i035,.i135,.i235,.i335,.i435,.i535,.i635,.i735,.i835,.i935{background-position:-400px -500px}.i036,.i136,.i236,.i336,.i436,.i536,.i636,.i736,.i836,.i936{background-position:-500px -500px}.i037,.i137,.i237,.i337,.i437,.i537,.i637,.i737,.i837,.i937{background-position:-600px 0}.i038,.i138,.i238,.i338,.i438,.i538,.i638,.i738,.i838,.i938{background-position:-600px -100px}.i039,.i139,.i239,.i339,.i439,.i539,.i639,.i739,.i839,.i939{background-position:-600px -200px}.i040,.i140,.i240,.i340,.i440,.i540,.i640,.i740,.i840,.i940{background-position:-600px -300px}.i041,.i141,.i241,.i341,.i441,.i541,.i641,.i741,.i841,.i941{background-position:-600px -400px}.i042,.i142,.i242,.i342,.i442,.i542,.i642,.i742,.i842,.i942{background-position:-600px -500px}.i043,.i143,.i243,.i343,.i443,.i543,.i643,.i743,.i843,.i943{background-position:0 -600px}.i044,.i144,.i244,.i344,.i444,.i544,.i644,.i744,.i844,.i944{background-position:-100px -600px}.i045,.i145,.i245,.i345,.i445,.i545,.i645,.i745,.i845,.i945{background-position:-200px -600px}.i046,.i146,.i246,.i346,.i446,.i546,.i646,.i746,.i846,.i946{background-position:-300px -600px}.i047,.i147,.i247,.i347,.i447,.i547,.i647,.i747,.i847,.i947{background-position:-400px -600px}.i048,.i148,.i248,.i348,.i448,.i548,.i648,.i748,.i848,.i948{background-position:-500px -600px}.i049,.i149,.i249,.i349,.i449,.i549,.i649,.i749,.i849,.i949{background-position:-600px -600px}.i050,.i150,.i250,.i350,.i450,.i550,.i650,.i750,.i850,.i950{background-position:-700px 0}.i051,.i151,.i251,.i351,.i451,.i551,.i651,.i751,.i851,.i951{background-position:-700px -100px}.i052,.i152,.i252,.i352,.i452,.i552,.i652,.i752,.i852,.i952{background-position:-700px -200px}.i053,.i153,.i253,.i353,.i453,.i553,.i653,.i753,.i853,.i953{background-position:-700px -300px}.i054,.i154,.i254,.i354,.i454,.i554,.i654,.i754,.i854,.i954{background-position:-700px -400px}.i055,.i155,.i255,.i355,.i455,.i555,.i655,.i755,.i855,.i955{background-position:-700px -500px}.i056,.i156,.i256,.i356,.i456,.i556,.i656,.i756,.i856,.i956{background-position:-700px -600px}.i057,.i157,.i257,.i357,.i457,.i557,.i657,.i757,.i857,.i957{background-position:0 -700px}.i058,.i158,.i258,.i358,.i458,.i558,.i658,.i758,.i858,.i958{background-position:-100px -700px}.i059,.i159,.i259,.i359,.i459,.i559,.i659,.i759,.i859,.i959{background-position:-200px -700px}.i060,.i160,.i260,.i360,.i460,.i560,.i660,.i760,.i860,.i960{background-position:-300px -700px}.i061,.i161,.i261,.i361,.i461,.i561,.i661,.i761,.i861,.i961{background-position:-400px -700px}.i062,.i162,.i262,.i362,.i462,.i562,.i662,.i762,.i862,.i962{background-position:-500px -700px}.i063,.i163,.i263,.i363,.i463,.i563,.i663,.i763,.i863,.i963{background-position:-600px -700px}.i064,.i164,.i264,.i364,.i464,.i564,.i664,.i764,.i864,.i964{background-position:-700px -700px}.i065,.i165,.i265,.i365,.i465,.i565,.i665,.i765,.i865,.i965{background-position:-800px 0}.i066,.i166,.i266,.i366,.i466,.i566,.i666,.i766,.i866,.i966{background-position:-800px -100px}.i067,.i167,.i267,.i367,.i467,.i567,.i667,.i767,.i867,.i967{background-position:-800px -200px}.i068,.i168,.i268,.i368,.i468,.i568,.i668,.i768,.i868,.i968{background-position:-800px -300px}.i069,.i169,.i269,.i369,.i469,.i569,.i669,.i769,.i869,.i969{background-position:-800px -400px}.i070,.i170,.i270,.i370,.i470,.i570,.i670,.i770,.i870,.i970{background-position:-800px -500px}.i071,.i171,.i271,.i371,.i471,.i571,.i671,.i771,.i871,.i971{background-position:-800px -600px}.i072,.i172,.i272,.i372,.i472,.i572,.i672,.i772,.i872,.i972{background-position:-800px -700px}.i073,.i173,.i273,.i373,.i473,.i573,.i673,.i773,.i873,.i973{background-position:0 -800px}.i074,.i174,.i274,.i374,.i474,.i574,.i674,.i774,.i874,.i974{background-position:-100px -800px}.i075,.i175,.i275,.i375,.i475,.i575,.i675,.i775,.i875,.i975{background-position:-200px -800px}.i076,.i176,.i276,.i376,.i476,.i576,.i676,.i776,.i876,.i976{background-position:-300px -800px}.i077,.i177,.i277,.i377,.i477,.i577,.i677,.i777,.i877,.i977{background-position:-400px -800px}.i078,.i178,.i278,.i378,.i478,.i578,.i678,.i778,.i878,.i978{background-position:-500px -800px}.i079,.i179,.i279,.i379,.i479,.i579,.i679,.i779,.i879,.i979{background-position:-600px -800px}.i080,.i180,.i280,.i380,.i480,.i580,.i680,.i780,.i880,.i980{background-position:-700px -800px}.i081,.i181,.i281,.i381,.i481,.i581,.i681,.i781,.i881,.i981{background-position:-800px -800px}.i082,.i182,.i282,.i382,.i482,.i582,.i682,.i782,.i882,.i982{background-position:-900px 0}.i083,.i183,.i283,.i383,.i483,.i583,.i683,.i783,.i883,.i983{background-position:-900px -100px}.i084,.i184,.i284,.i384,.i484,.i584,.i684,.i784,.i884,.i984{background-position:-900px -200px}.i085,.i185,.i285,.i385,.i485,.i585,.i685,.i785,.i885,.i985{background-position:-900px -300px}.i086,.i186,.i286,.i386,.i486,.i586,.i686,.i786,.i886,.i986{background-position:-900px -400px}.i087,.i187,.i287,.i387,.i487,.i587,.i687,.i787,.i887,.i987{background-position:-900px -500px}.i088,.i188,.i288,.i388,.i488,.i588,.i688,.i788,.i888,.i988{background-position:-900px -600px}.i089,.i189,.i289,.i389,.i489,.i589,.i689,.i789,.i889,.i989{background-position:-900px -700px}.i090,.i190,.i290,.i390,.i490,.i590,.i690,.i790,.i890,.i990{background-position:-900px -800px}.i091,.i191,.i291,.i391,.i491,.i591,.i691,.i791,.i891,.i991{background-position:0 -900px}.i092,.i192,.i292,.i392,.i492,.i592,.i692,.i792,.i892,.i992{background-position:-100px -900px}.i093,.i193,.i293,.i393,.i493,.i593,.i693,.i793,.i893,.i993{background-position:-200px -900px}.i094,.i194,.i294,.i394,.i494,.i594,.i694,.i794,.i894,.i994{background-position:-300px -900px}.i095,.i195,.i295,.i395,.i495,.i595,.i695,.i795,.i895,.i995{background-position:-400px -900px}.i096,.i196,.i296,.i396,.i496,.i596,.i696,.i796,.i896,.i996{background-position:-500px -900px}.i097,.i197,.i297,.i397,.i497,.i597,.i697,.i797,.i897,.i997{background-position:-600px -900px}.i098,.i198,.i298,.i398,.i498,.i598,.i698,.i798,.i898,.i998{background-position:-700px -900px}.i099,.i199,.i299,.i399,.i499,.i599,.i699,.i799,.i899,.i999{background-position:-800px -900px}.i100,.i1000,.i200,.i300,.i400,.i500,.i600,.i700,.i800,.i900{background-position:-900px -900px}.c1{background-image:url(data/pokemon-1.jpg);background-size:1000px 1000px}.c2{background-image:url(data/pokemon-2.jpg);background-size:1000px 1000px}.c3{background-image:url(data/pokemon-3.jpg);background-size:1000px 1000px}.c4{background-image:url(data/pokemon-4.jpg);background-size:1000px 1000px}.c5{background-image:url(data/pokemon-5.jpg);background-size:1000px 1000px}.c6{background-image:url(data/pokemon-6.jpg);background-size:1000px 1000px}.c7{background-image:url(data/pokemon-7.jpg);background-size:1000px 1000px}.c8{background-image:url(data/pokemon-8.jpg);background-size:1000px 1000px}.c9{background-image:url(data/pokemon-9.jpg);background-size:1000px 1000px}.c10{background-image:url(data/pokemon-10.jpg);background-size:500px 500px} \ No newline at end of file diff --git a/scripts/sprite.js b/scripts/sprite.js index 4e78691..f615437 100644 --- a/scripts/sprite.js +++ b/scripts/sprite.js @@ -48,10 +48,11 @@ const dataPromises = dataChunks.map(function (chunk, chunkID) { const height = result.properties.height; const coords = Object.keys(result.coordinates); // const lastCoordID = coords[coords.length - 1].match(/\d+/); - const notSelector = chunkID ? ':not(.i' + chunkID * 100 + ')' : ''; - let selector = `[class*=i${chunkID}]${notSelector},.i${ - (chunkID + 1) * 100 - }`; + // const notSelector = chunkID ? ':not(.i' + chunkID * 100 + ')' : ''; + // let selector = `[class*=i${chunkID}]${notSelector},.i${ + // (chunkID + 1) * 100 + // }`; + let selector = '.c' + chunkID; const css = `${selector}{ background-image: url(${path.replace('.png', '.jpg')}); background-size: ${width / ratio}px ${height / ratio}px;