feat: generation auto de pixels randoms

This commit is contained in:
gdamms 2022-04-23 20:46:51 +02:00
parent b26762a4e4
commit 2259efb048
7 changed files with 419 additions and 103 deletions

View file

@ -8,6 +8,7 @@
<link rel="stylesheet" href="title-bar.css"> <link rel="stylesheet" href="title-bar.css">
<link rel="stylesheet" href="login-signup.css"> <link rel="stylesheet" href="login-signup.css">
<link rel="stylesheet" href="pixels.css"> <link rel="stylesheet" href="pixels.css">
<link rel="stylesheet" href="pix.css">
<script> <script>
function toggleLoginSignup(l, s) { function toggleLoginSignup(l, s) {
document.getElementById("show-login").checked = l; document.getElementById("show-login").checked = l;
@ -20,7 +21,8 @@
<div class="title-bar"> <div class="title-bar">
<div class="title"> <div class="title">
<img src="logo.png" /> Pixels </div> <img src="logo.png" /> Pixels
</div>
<div class="profil"> <div class="profil">
<input type="checkbox" id="show-login" class="show"> <input type="checkbox" id="show-login" class="show">
<label for="show-login" class="login-btn">Login</label> <label for="show-login" class="login-btn">Login</label>
@ -80,128 +82,127 @@
</div> </div>
</div> </div>
</div> </div>
<div class="pixel-container"> <div class="pixel-container">
<table> <table>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r0c0"></td>
<td class="pixel"></td> <td class="pixel" id="r0c1"></td>
<td class="pixel"></td> <td class="pixel" id="r0c2"></td>
<td class="pixel"></td> <td class="pixel" id="r0c3"></td>
<td class="pixel"></td> <td class="pixel" id="r0c4"></td>
<td class="pixel"></td> <td class="pixel" id="r0c5"></td>
<td class="pixel"></td> <td class="pixel" id="r0c6"></td>
<td class="pixel"></td> <td class="pixel" id="r0c7"></td>
<td class="pixel"></td> <td class="pixel" id="r0c8"></td>
<td class="pixel"></td> <td class="pixel" id="r0c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r1c0"></td>
<td class="pixel"></td> <td class="pixel" id="r1c1"></td>
<td class="pixel"></td> <td class="pixel" id="r1c2"></td>
<td class="pixel"></td> <td class="pixel" id="r1c3"></td>
<td class="pixel"></td> <td class="pixel" id="r1c4"></td>
<td class="pixel"></td> <td class="pixel" id="r1c5"></td>
<td class="pixel"></td> <td class="pixel" id="r1c6"></td>
<td class="pixel"></td> <td class="pixel" id="r1c7"></td>
<td class="pixel"></td> <td class="pixel" id="r1c8"></td>
<td class="pixel"></td> <td class="pixel" id="r1c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r2c0"></td>
<td class="pixel"></td> <td class="pixel" id="r2c1"></td>
<td class="pixel"></td> <td class="pixel" id="r2c2"></td>
<td class="pixel"></td> <td class="pixel" id="r2c3"></td>
<td class="pixel"></td> <td class="pixel" id="r2c4"></td>
<td class="pixel"></td> <td class="pixel" id="r2c5"></td>
<td class="pixel"></td> <td class="pixel" id="r2c6"></td>
<td class="pixel"></td> <td class="pixel" id="r2c7"></td>
<td class="pixel"></td> <td class="pixel" id="r2c8"></td>
<td class="pixel"></td> <td class="pixel" id="r2c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r3c0"></td>
<td class="pixel"></td> <td class="pixel" id="r3c1"></td>
<td class="pixel"></td> <td class="pixel" id="r3c2"></td>
<td class="pixel"></td> <td class="pixel" id="r3c3"></td>
<td class="pixel"></td> <td class="pixel" id="r3c4"></td>
<td class="pixel"></td> <td class="pixel" id="r3c5"></td>
<td class="pixel"></td> <td class="pixel" id="r3c6"></td>
<td class="pixel"></td> <td class="pixel" id="r3c7"></td>
<td class="pixel"></td> <td class="pixel" id="r3c8"></td>
<td class="pixel"></td> <td class="pixel" id="r3c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r4c0"></td>
<td class="pixel"></td> <td class="pixel" id="r4c1"></td>
<td class="pixel"></td> <td class="pixel" id="r4c2"></td>
<td class="pixel"></td> <td class="pixel" id="r4c3"></td>
<td class="pixel"></td> <td class="pixel" id="r4c4"></td>
<td class="pixel"></td> <td class="pixel" id="r4c5"></td>
<td class="pixel"></td> <td class="pixel" id="r4c6"></td>
<td class="pixel"></td> <td class="pixel" id="r4c7"></td>
<td class="pixel"></td> <td class="pixel" id="r4c8"></td>
<td class="pixel"></td> <td class="pixel" id="r4c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r5c0"></td>
<td class="pixel"></td> <td class="pixel" id="r5c1"></td>
<td class="pixel"></td> <td class="pixel" id="r5c2"></td>
<td class="pixel"></td> <td class="pixel" id="r5c3"></td>
<td class="pixel"></td> <td class="pixel" id="r5c4"></td>
<td class="pixel"></td> <td class="pixel" id="r5c5"></td>
<td class="pixel"></td> <td class="pixel" id="r5c6"></td>
<td class="pixel"></td> <td class="pixel" id="r5c7"></td>
<td class="pixel"></td> <td class="pixel" id="r5c8"></td>
<td class="pixel"></td> <td class="pixel" id="r5c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r6c0"></td>
<td class="pixel"></td> <td class="pixel" id="r6c1"></td>
<td class="pixel"></td> <td class="pixel" id="r6c2"></td>
<td class="pixel"></td> <td class="pixel" id="r6c3"></td>
<td class="pixel"></td> <td class="pixel" id="r6c4"></td>
<td class="pixel"></td> <td class="pixel" id="r6c5"></td>
<td class="pixel"></td> <td class="pixel" id="r6c6"></td>
<td class="pixel"></td> <td class="pixel" id="r6c7"></td>
<td class="pixel"></td> <td class="pixel" id="r6c8"></td>
<td class="pixel"></td> <td class="pixel" id="r6c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r7c0"></td>
<td class="pixel"></td> <td class="pixel" id="r7c1"></td>
<td class="pixel"></td> <td class="pixel" id="r7c2"></td>
<td class="pixel"></td> <td class="pixel" id="r7c3"></td>
<td class="pixel"></td> <td class="pixel" id="r7c4"></td>
<td class="pixel"></td> <td class="pixel" id="r7c5"></td>
<td class="pixel"></td> <td class="pixel" id="r7c6"></td>
<td class="pixel"></td> <td class="pixel" id="r7c7"></td>
<td class="pixel"></td> <td class="pixel" id="r7c8"></td>
<td class="pixel"></td> <td class="pixel" id="r7c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r8c0"></td>
<td class="pixel"></td> <td class="pixel" id="r8c1"></td>
<td class="pixel"></td> <td class="pixel" id="r8c2"></td>
<td class="pixel"></td> <td class="pixel" id="r8c3"></td>
<td class="pixel"></td> <td class="pixel" id="r8c4"></td>
<td class="pixel"></td> <td class="pixel" id="r8c5"></td>
<td class="pixel"></td> <td class="pixel" id="r8c6"></td>
<td class="pixel"></td> <td class="pixel" id="r8c7"></td>
<td class="pixel"></td> <td class="pixel" id="r8c8"></td>
<td class="pixel"></td> <td class="pixel" id="r8c9"></td>
</tr> </tr>
<tr> <tr>
<td class="pixel"></td> <td class="pixel" id="r9c0"></td>
<td class="pixel"></td> <td class="pixel" id="r9c1"></td>
<td class="pixel"></td> <td class="pixel" id="r9c2"></td>
<td class="pixel"></td> <td class="pixel" id="r9c3"></td>
<td class="pixel"></td> <td class="pixel" id="r9c4"></td>
<td class="pixel"></td> <td class="pixel" id="r9c5"></td>
<td class="pixel"></td> <td class="pixel" id="r9c6"></td>
<td class="pixel"></td> <td class="pixel" id="r9c7"></td>
<td class="pixel"></td> <td class="pixel" id="r9c8"></td>
<td class="pixel"></td> <td class="pixel" id="r9c9"></td>
</tr> </tr>
</table> </table>
<div class="pixel-description"> <div class="pixel-description">

301
src/front/pix.css Normal file
View file

@ -0,0 +1,301 @@
#r0c0 {
background: #bd8226; }
#r0c1 {
background: #6ad2bb; }
#r0c2 {
background: #ac6816; }
#r0c3 {
background: #f0e5ad; }
#r0c4 {
background: #9b7ae2; }
#r0c5 {
background: #fc4b16; }
#r0c6 {
background: #493562; }
#r0c7 {
background: #597b58; }
#r0c8 {
background: #f68af4; }
#r0c9 {
background: #29d291; }
#r1c0 {
background: #a9da86; }
#r1c1 {
background: #ee5ccc; }
#r1c2 {
background: #c2170c; }
#r1c3 {
background: #38cd2b; }
#r1c4 {
background: #7c2adf; }
#r1c5 {
background: #fcbc48; }
#r1c6 {
background: #31aa29; }
#r1c7 {
background: #b65dd9; }
#r1c8 {
background: #cab125; }
#r1c9 {
background: #b41569; }
#r2c0 {
background: #308164; }
#r2c1 {
background: #5fe6c4; }
#r2c2 {
background: #740cd8; }
#r2c3 {
background: #16340a; }
#r2c4 {
background: #0f48dc; }
#r2c5 {
background: #047373; }
#r2c6 {
background: #a683c6; }
#r2c7 {
background: #acf056; }
#r2c8 {
background: #5261ea; }
#r2c9 {
background: #1dc6ce; }
#r3c0 {
background: #05f60b; }
#r3c1 {
background: #a7e815; }
#r3c2 {
background: #1ed985; }
#r3c3 {
background: #7154e4; }
#r3c4 {
background: #fbd471; }
#r3c5 {
background: #3dccb7; }
#r3c6 {
background: #b021a9; }
#r3c7 {
background: #b2f2fc; }
#r3c8 {
background: #2b21a2; }
#r3c9 {
background: #65f83b; }
#r4c0 {
background: #dfbfad; }
#r4c1 {
background: #e99270; }
#r4c2 {
background: #b36216; }
#r4c3 {
background: #5d531b; }
#r4c4 {
background: #76da95; }
#r4c5 {
background: #79884f; }
#r4c6 {
background: #e8dfc5; }
#r4c7 {
background: #8971f4; }
#r4c8 {
background: #1ceb1f; }
#r4c9 {
background: #a15e02; }
#r5c0 {
background: #604930; }
#r5c1 {
background: #65274c; }
#r5c2 {
background: #61bd26; }
#r5c3 {
background: #5759a2; }
#r5c4 {
background: #b9cda2; }
#r5c5 {
background: #961983; }
#r5c6 {
background: #a3cc2b; }
#r5c7 {
background: #7e8361; }
#r5c8 {
background: #50f4f9; }
#r5c9 {
background: #b14f97; }
#r6c0 {
background: #1e8113; }
#r6c1 {
background: #e004b9; }
#r6c2 {
background: #7ed1ec; }
#r6c3 {
background: #26c544; }
#r6c4 {
background: #426012; }
#r6c5 {
background: #ef7356; }
#r6c6 {
background: #4399f5; }
#r6c7 {
background: #89d054; }
#r6c8 {
background: #746b0f; }
#r6c9 {
background: #b616f7; }
#r7c0 {
background: #27ed47; }
#r7c1 {
background: #c570e7; }
#r7c2 {
background: #379b0a; }
#r7c3 {
background: #d0dcf9; }
#r7c4 {
background: #b6ba04; }
#r7c5 {
background: #0f563d; }
#r7c6 {
background: #4e34b0; }
#r7c7 {
background: #e3c32d; }
#r7c8 {
background: #f39d9e; }
#r7c9 {
background: #e9f9e0; }
#r8c0 {
background: #1a4571; }
#r8c1 {
background: #5ad67d; }
#r8c2 {
background: #e6a830; }
#r8c3 {
background: #3b089a; }
#r8c4 {
background: #033b9c; }
#r8c5 {
background: #9e0d6e; }
#r8c6 {
background: #b29f25; }
#r8c7 {
background: #1d33d8; }
#r8c8 {
background: #053658; }
#r8c9 {
background: #23b71d; }
#r9c0 {
background: #5c32c5; }
#r9c1 {
background: #9d7d3e; }
#r9c2 {
background: #172f58; }
#r9c3 {
background: #850343; }
#r9c4 {
background: #79eac9; }
#r9c5 {
background: #ff9abd; }
#r9c6 {
background: #4ca78c; }
#r9c7 {
background: #d25aae; }
#r9c8 {
background: #9130d0; }
#r9c9 {
background: #7529f8; }
/*# sourceMappingURL=pix.css.map */

7
src/front/pix.css.map Normal file
View file

@ -0,0 +1,7 @@
{
"version": 3,
"mappings": "AAEQ,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA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0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C;;AAD1D,KAAc;EACV,UAAU,EAAE,OAA0C",
"sources": ["pix.scss"],
"names": [],
"file": "pix.css"
}

7
src/front/pix.scss Normal file
View file

@ -0,0 +1,7 @@
@for $i from 0 through 9 {
@for $j from 0 through 9 {
#r#{$i}c#{$j} {
background: rgb(random(255), random(255), random(255));
}
}
}

View file

@ -8,7 +8,7 @@
.pixel { .pixel {
background: #0f0; background: #fff;
width: 80px; width: 80px;
height: 80px; height: 80px;
} }