From 65fa6f9e23655fd88b968dbef19cc40abddfd9a7 Mon Sep 17 00:00:00 2001 From: readhame Date: Wed, 1 Jul 2020 20:14:50 +0200 Subject: [PATCH] correction mod --- HyperSet/.idea/workspace.xml | 32 ++- HyperSet/metiers/deck.php | 14 +- HyperSet/vues/css/style.css | 342 +++++++++++++++++++++++++------- HyperSet/vues/homePage.html | 9 +- HyperSet/vues/images/zigzag.png | Bin 0 -> 1643 bytes HyperSet/vues/js/set.js | 83 ++++++-- 6 files changed, 368 insertions(+), 112 deletions(-) create mode 100644 HyperSet/vues/images/zigzag.png diff --git a/HyperSet/.idea/workspace.xml b/HyperSet/.idea/workspace.xml index 7e8871b..40f95c8 100644 --- a/HyperSet/.idea/workspace.xml +++ b/HyperSet/.idea/workspace.xml @@ -45,11 +45,19 @@ + + + + + + + + @@ -57,13 +65,6 @@ - - - - - - - @@ -104,6 +105,7 @@ + @@ -139,18 +141,26 @@ - + - - + + - + + + + + + + + + diff --git a/HyperSet/metiers/deck.php b/HyperSet/metiers/deck.php index 4d015d9..6e6d709 100644 --- a/HyperSet/metiers/deck.php +++ b/HyperSet/metiers/deck.php @@ -130,24 +130,24 @@ class Deck { }elseif ($changes === 'deal0') { $colors = array('green', 'red', 'purple'); $shapes = array('oval', 'diamond', 'wave'); - $fills = array('solid', 'stripped', 'open'); + $fill = 'open'; $border = 'simple'; - //$numbers = array(1, 2, 3); - $number = 3; + $numbers = array(1, 2, 3); + $index0 = 1; foreach ($colors as $color) { foreach ($shapes as $shape) { - foreach ($fills as $fill) { + //foreach ($fills as $fill) { //foreach ($borders as $border) { - //foreach ($numbers as $number) { + foreach ($numbers as $number) { $cardAttributes = new CardAttributes($color, $shape, $fill, $border, $number, $index0); $card = new Card($cardAttributes, $this); $index0++; - //} + } //} - } + //} } } diff --git a/HyperSet/vues/css/style.css b/HyperSet/vues/css/style.css index 37090a7..3684ea5 100644 --- a/HyperSet/vues/css/style.css +++ b/HyperSet/vues/css/style.css @@ -32,9 +32,9 @@ h1 { .card { display: table-cell; - width: 290px; + width: 200px; - height: 200px; + height: 140px; border: 2px solid #ccc; background: #F5F5F5; } @@ -48,21 +48,21 @@ h1 { } .game-board { - margin-top: 5%; + margin-top: 18%; height: auto; width: auto; transform: rotate(90deg); } .game-board0 { - margin-top: 22%; + margin-top: 30%; height: auto; width: auto; transform: rotate(90deg); } .game-board1 { - margin-top: -27%; + margin-top: -15%; height: auto; width: auto; transform: rotate(90deg); @@ -70,50 +70,161 @@ h1 { .shape { display: inline-block; - width: 40px; - height: 90px; + width: 30px; + height: 68px; -webkit-mask-repeat: no-repeat; -webkit-mask-position: 15px; margin-top: 22%; + } .diamond { - transform: rotate(67deg) skewX(45deg) scaleY( 0.40); - width: 50px; + transform: rotate(-67deg) skewX(-45deg) scaleY( 0.40); + width: 38px; +} + + + +.diamond.red.stripped { + transform: rotate(-67deg) skewX(-45deg) scaleY( 0.40); + width: 38px; + background: repeating-linear-gradient(25deg, red, red 8px, white 8px, white 15px); + border: 2px solid red; +} +.diamond.lightblue.stripped { + transform: rotate(-67deg) skewX(-45deg) scaleY( 0.40); + width: 38px; + background: repeating-linear-gradient(25deg, lightblue, lightblue 8px, white 8px, white 15px); + border: 2px solid lightblue; +} +.diamond.yellow.stripped { + transform: rotate(-67deg) skewX(-45deg) scaleY( 0.40); + width: 38px; + background: repeating-linear-gradient(25deg, saddlebrown, saddlebrown 8px, white 8px, white 15px); + border: 2px solid saddlebrown; +} +.diamond.green.stripped { + transform: rotate(-67deg) skewX(-45deg) scaleY( 0.40); + width: 38px; + background: repeating-linear-gradient(25deg, green, green 8px, white 8px, white 15px); + border: 2px solid green; +} +.diamond.purple.stripped { + transform: rotate(-67deg) skewX(-45deg) scaleY( 0.40); + width: 38px; + background: repeating-linear-gradient(25deg, purple, purple 8px, white 8px, white 15px); + border: 2px solid purple; +} + + + +.diamond.green.quadrillage{ + background-color: green; + background-image: + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 20px 19px; + background-position: 0 0, 10px 10px; + border: 2px solid green; +} +.diamond.red.quadrillage{ + background-color: red; + background-image: + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 20px 19px; + background-position: 0 0, 10px 10px; + border: 2px solid red; +} +.diamond.yellow.quadrillage{ + background-color: saddlebrown; + background-image: + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 20px 19px; + background-position: 0 0, 10px 10px; + border: 2px solid brown; +} + +.diamond.lightblue.quadrillage{ + background-color: lightblue; + background-image: + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 20px 19px; + background-position: 0 0, 10px 10px; + border: 2px solid lightblue; +} +.diamond.purple.quadrillage{ + background-color: purple; + background-image: + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(-35deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 20px 19px; + background-position: 0 0, 10px 10px; + border: 2px solid purple; } + + + + + + + + + + .wave { border-radius: 15px 180px 15px 180px; transform: rotate(1deg) skewX(0.5deg) scaleX(0.8); - width: 50px; + width: 38px; } + + + + + + .oval { border-radius: 40px / 50px; transform: rotate(0.5deg) skewX(1deg) scaleX(0.8); - width: 50px; - height: 100px; + width: 38px; + height: 80px; } + + + + + + .rectangle{ transform: rotate(0.5deg) skewX(1deg) scaleX(0.8); - width: 50px; + width: 38px; } + + + + + + .triangle{ clip-path: polygon(50% 0%, 0% 100%, 100% 100%); - width: 50px; + width: 38px; } @@ -152,8 +263,8 @@ $borders = array('plein', 'point', 'rond', 'zigzag','hachure'); } .yellow.pointille{ - background-image: radial-gradient(orangered 40%, #F5F5F5 40%), - radial-gradient(orangered 20%, #F5F5F5 20%), + background-image: radial-gradient(saddlebrown 40%, #F5F5F5 40%), + radial-gradient(saddlebrown 20%, #F5F5F5 20%), radial-gradient(#fafafa 10%, transparent 10%); background-position: 0 0, 1px 1px; background-size: 15px 15px; @@ -189,87 +300,82 @@ radial-gradient(#fafafa 10%, transparent 10%); .green.quadrillage{ background-color: green; background-image: - linear-gradient(rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(rgba(255,255,255,.28) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.28) 2px, transparent 2px); - background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; - background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px; + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 15px 15px; + background-position: 0 0, 8px 8px; border: 2px solid green; } .red.quadrillage{ background-color: red; background-image: - linear-gradient(rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(rgba(255,255,255,.28) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.28) 2px, transparent 2px); - background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; - background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px; + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 15px 15px; + background-position: 0 0, 8px 8px; border: 2px solid red; } .yellow.quadrillage{ - background-color: orangered; + background-color: saddlebrown; background-image: - linear-gradient(rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(rgba(255,255,255,.28) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.28) 2px, transparent 2px); - background-size: 80px 80px, 80px 80px, 15px 15px, 15px 15px; - background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px; + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 15px 15px; + background-position: 0 0, 8px 8px; border: 2px solid brown; } .lightblue.quadrillage{ background-color: lightblue; background-image: - linear-gradient(rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(rgba(255,255,255,.28) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.28) 2px, transparent 2px); - background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; - background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px; + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 15px 15px; + background-position: 0 0, 8px 8px; border: 2px solid lightblue; } .purple.quadrillage{ background-color: purple; background-image: - linear-gradient(rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.5) 2px, transparent 2px), - linear-gradient(rgba(255,255,255,.28) 2px, transparent 2px), - linear-gradient(90deg, rgba(255,255,255,.28) 2px, transparent 2px); - background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; - background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px; + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%), + linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%); + background-size: 15px 15px; + background-position: 0 0, 8px 8px; border: 2px solid purple; } -.green.rond { + + + + + +.green.rond.open{ border-style: dotted; border-color: green; border-width: 7px; } -.lightblue.rond { +.lightblue.rond.open { border-style: dotted; border-color: lightblue; border-width: 7px; } -.purple.rond { +.purple.rond.open { border-style: dotted; border-color: purple; border-width: 7px; } -.yellow.rond { +.yellow.rond.open { border-style: dotted; - border-color: orangered; + border-color: saddlebrown; border-width: 7px; } -.red.rond { +.red.rond.open { border-style: dotted; border-color: red; border-width: 7px; @@ -282,25 +388,27 @@ radial-gradient(#fafafa 10%, transparent 10%); -.green.point{ + + +.green.point.open{ border-style: dashed; border-color: green; } -.red.point{ +.red.point.open{ border-style: dashed; border-color: red; } -.lightblue.point{ +.lightblue.point.open{ border-style: dashed; border-color: lightblue; } -.purple.point{ +.purple.point.open{ border-style: dashed; border-color: purple; } -.yellow.point{ +.yellow.point.open{ border-style: dashed; - border-color: orangered; + border-color: saddlebrown; } @@ -331,7 +439,7 @@ radial-gradient(#fafafa 10%, transparent 10%); } .yellow.solid { - background: orangered; + background: saddlebrown; } @@ -339,6 +447,12 @@ radial-gradient(#fafafa 10%, transparent 10%); + + + + + + .solid.plein { border: 2px solid black; background: lightblue; @@ -364,7 +478,7 @@ radial-gradient(#fafafa 10%, transparent 10%); .pointille.rond{ border-style: dotted; border-color: black; - border-width: 7; + border-width: 7px; } .pointille.plein{ border: 2px solid black; @@ -374,6 +488,7 @@ radial-gradient(#fafafa 10%, transparent 10%); .pointille.point{ border-style: dashed; border-color: black; + border-width: 4px; } @@ -385,16 +500,25 @@ radial-gradient(#fafafa 10%, transparent 10%); .quadrillage.point{ border-style: dashed; border-color: black; + border-width: 4px; } .zigzag{ - border-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228px%22%20height%3D%224px%22%3E%3Cpolygon%20points%3D%220%2C0%204%2C4%208%2C0%22%20fill%3D%22%23CC0000%22%2F%3E%3C%2Fsvg%3E"); + + border-image-source : url('../images/zigzag.png'); border-color: black; + background: white; } + + + + + + .red.open{ border: 2px solid red; } @@ -409,7 +533,7 @@ radial-gradient(#fafafa 10%, transparent 10%); } .yellow.open { - border: 2px solid orangered; + border: 2px solid saddlebrown; } .purple.open { @@ -419,34 +543,114 @@ radial-gradient(#fafafa 10%, transparent 10%); + .red.stripped{ - background: repeating-linear-gradient(-40deg, red, red 5px, white 5px, white 10px); + background: repeating-linear-gradient(-45deg, red, red 5px, white 5px, white 10px); border: 2px solid red; } .lightblue.stripped{ - background: repeating-linear-gradient(-40deg, lightblue, lightblue 5px, white 5px, white 10px); + background: repeating-linear-gradient(-45deg, lightblue, lightblue 5px, white 5px, white 10px); border: 2px solid lightblue; } .yellow.stripped{ - background: repeating-linear-gradient(-40deg, orangered, orangered 5px, white 5px, white 10px); - border: 2px solid orangered; + background: repeating-linear-gradient(-45deg, saddlebrown, saddlebrown 5px, white 5px, white 10px); + border: 2px solid saddlebrown; } .green.stripped { - background: repeating-linear-gradient(-40deg, green, green 5px, white 5px, white 10px); + background: repeating-linear-gradient(-45deg, green, green 5px, white 5px, white 10px); border: 2px solid green; } .purple.stripped { - background: repeating-linear-gradient(-40deg, purple, purple 5px, white 5px, white 10px); + background: repeating-linear-gradient(-45deg, purple, purple 5px, white 5px, white 10px); border: 2px solid purple; } + + + + + + + + + +.red.stripped.rond{ + background: repeating-linear-gradient(-45deg, red, red 5px, white 5px, white 10px); + border: 7px dotted black; + + +} + +.lightblue.stripped.rond{ + background: repeating-linear-gradient(-45deg, lightblue, lightblue 5px, white 5px, white 10px); + border: 7px dotted black; + +} + +.yellow.stripped.rond{ + background: repeating-linear-gradient(-45deg, saddlebrown, saddlebrown 5px, white 5px, white 10px); + border: 7px dotted black; + +} + +.green.stripped.rond { + background: repeating-linear-gradient(-45deg, green, green 5px, white 5px, white 10px); + border: 7px dotted black; + +} + +.purple.stripped.rond { + background: repeating-linear-gradient(-45deg, purple, purple 5px, white 5px, white 10px); + border: 7px dotted black; +} + + + + + + + + + + +.red.stripped.point{ + background: repeating-linear-gradient(-45deg, red, red 5px, white 5px, white 10px); + border: 4px dashed black; + +} + +.lightblue.stripped.point{ + background: repeating-linear-gradient(-45deg, lightblue, lightblue 5px, white 5px, white 10px); + border: 4px dashed black; + +} + +.yellow.stripped.point{ + background: repeating-linear-gradient(-45deg, saddlebrown, saddlebrown 5px, white 5px, white 10px); + border: 4px dashed black; + +} + +.green.stripped.point { + background: repeating-linear-gradient(-45deg, green, green 5px, white 5px, white 10px); + border: 4px dashed black; + +} + +.purple.stripped.point { + background: repeating-linear-gradient(-45deg, purple, purple 5px, white 5px, white 10px); + border: 4px dashed black; +} + + + /*solution pour avoir l'image en rainure ou vide a voir dans le css*/ \ No newline at end of file diff --git a/HyperSet/vues/homePage.html b/HyperSet/vues/homePage.html index dfaca04..e0e9a9d 100644 --- a/HyperSet/vues/homePage.html +++ b/HyperSet/vues/homePage.html @@ -89,18 +89,11 @@

Nombre de carte = 3; Nombre de critères = 4

Sets found: 0

Number of Sets:

-
- -
- -
-
-