diff --git a/SRC/public/css/frontend.css b/SRC/public/css/frontend.css index 37bcf37..8e02e7c 100755 --- a/SRC/public/css/frontend.css +++ b/SRC/public/css/frontend.css @@ -172,7 +172,22 @@ button.level:active { cursor:pointer; background-position: center center; background-size:cover; + line-height:100px; + font-weight:bold; + font-size:40px; } #imgRef:active { cursor:wait; -} \ No newline at end of file +} + +.trophy-text { + font-weight: bold; + line-height: 40px; + font-size: 25px; + color: gold; + display: inline-block; + padding: 0 15px; + height: 40px; + border-radius: 50%; + background: rgba(0, 0, 0, 0.7) +} diff --git a/SRC/public/imgs/Search.png b/SRC/public/imgs/Search.png deleted file mode 100755 index 8df50c4..0000000 Binary files a/SRC/public/imgs/Search.png and /dev/null differ diff --git a/SRC/public/imgs/adminbgOrgi.jpg b/SRC/public/imgs/adminbgOrgi.jpg deleted file mode 100755 index af48748..0000000 Binary files a/SRC/public/imgs/adminbgOrgi.jpg and /dev/null differ diff --git a/SRC/public/imgs/ariane/Thumbs.db b/SRC/public/imgs/ariane/Thumbs.db deleted file mode 100755 index 188db6f..0000000 Binary files a/SRC/public/imgs/ariane/Thumbs.db and /dev/null differ diff --git a/SRC/public/imgs/ariane/bg-gradient.jpg b/SRC/public/imgs/ariane/bg-gradient.jpg deleted file mode 100755 index 84207b7..0000000 Binary files a/SRC/public/imgs/ariane/bg-gradient.jpg and /dev/null differ diff --git a/SRC/public/imgs/ariane/first-left.gif b/SRC/public/imgs/ariane/first-left.gif deleted file mode 100755 index 150ee96..0000000 Binary files a/SRC/public/imgs/ariane/first-left.gif and /dev/null differ diff --git a/SRC/public/imgs/ariane/first-left.png b/SRC/public/imgs/ariane/first-left.png deleted file mode 100755 index ab8cfbf..0000000 Binary files a/SRC/public/imgs/ariane/first-left.png and /dev/null differ diff --git a/SRC/public/imgs/ariane/general-left.gif b/SRC/public/imgs/ariane/general-left.gif deleted file mode 100755 index ecd7d81..0000000 Binary files a/SRC/public/imgs/ariane/general-left.gif and /dev/null differ diff --git a/SRC/public/imgs/ariane/general-left.png b/SRC/public/imgs/ariane/general-left.png deleted file mode 100755 index 5ce1753..0000000 Binary files a/SRC/public/imgs/ariane/general-left.png and /dev/null differ diff --git a/SRC/public/imgs/ariane/general-right.gif b/SRC/public/imgs/ariane/general-right.gif deleted file mode 100755 index a1e4d3e..0000000 Binary files a/SRC/public/imgs/ariane/general-right.gif and /dev/null differ diff --git a/SRC/public/imgs/ariane/general-right.png b/SRC/public/imgs/ariane/general-right.png deleted file mode 100755 index 4ec5f29..0000000 Binary files a/SRC/public/imgs/ariane/general-right.png and /dev/null differ diff --git a/SRC/public/imgs/ariane/wrap-gradient.jpg b/SRC/public/imgs/ariane/wrap-gradient.jpg deleted file mode 100755 index b5bf2ba..0000000 Binary files a/SRC/public/imgs/ariane/wrap-gradient.jpg and /dev/null differ diff --git a/SRC/public/imgs/avatar/4.jpg b/SRC/public/imgs/avatar/4.jpg new file mode 100644 index 0000000..8998ad1 Binary files /dev/null and b/SRC/public/imgs/avatar/4.jpg differ diff --git a/SRC/public/imgs/home.png b/SRC/public/imgs/home.png deleted file mode 100755 index e8e8626..0000000 Binary files a/SRC/public/imgs/home.png and /dev/null differ diff --git a/SRC/public/imgs/memo.jpg b/SRC/public/imgs/memo.jpg deleted file mode 100755 index 933d877..0000000 Binary files a/SRC/public/imgs/memo.jpg and /dev/null differ diff --git a/SRC/public/imgs/memo/memo.png b/SRC/public/imgs/memo/memo.png deleted file mode 100755 index 3c9c7c7..0000000 Binary files a/SRC/public/imgs/memo/memo.png and /dev/null differ diff --git a/SRC/public/imgs/puzzle.jpg b/SRC/public/imgs/puzzle.jpg deleted file mode 100755 index 07d3cbe..0000000 Binary files a/SRC/public/imgs/puzzle.jpg and /dev/null differ diff --git a/SRC/public/js/fire-work.js b/SRC/public/js/fire-work.js new file mode 100644 index 0000000..2d2d738 --- /dev/null +++ b/SRC/public/js/fire-work.js @@ -0,0 +1,254 @@ +var SCREEN_WIDTH = window.innerWidth, + SCREEN_HEIGHT = window.innerHeight, + mousePos = { + x: 400, + y: 300 + }, + +// create canvas + canvas = document.createElement('canvas'), + context = canvas.getContext('2d'), + particles = [], + rockets = [], + MAX_PARTICLES = 400, + colorCode = 0; + + + +// update mouse position +window.addEventListener('mousemove', function(e) { + e.preventDefault(); + mousePos = { + x: e.clientX, + y: e.clientY + }; +}); + +// launch more rockets!!! +window.addEventListener('mousedown', function(e) { + for (var i = 0; i < 5; i++) { + launchFrom(Math.random() * SCREEN_WIDTH * 2 / 3 + SCREEN_WIDTH / 6); + } +}); + +function launch() { + launchFrom(mousePos.x); +} + +function launchFrom(x) { + if (rockets.length < 10) { + var rocket = new Rocket(x); + rocket.explosionColor = Math.floor(Math.random() * 360 / 10) * 10; + rocket.vel.y = Math.random() * -3 - 4; + rocket.vel.x = Math.random() * 6 - 3; + rocket.size = 8; + rocket.shrink = 0.999; + rocket.gravity = 0.01; + rockets.push(rocket); + } +} + +function loop() { + // update screen size + if (SCREEN_WIDTH != window.innerWidth) { + canvas.width = SCREEN_WIDTH = window.innerWidth; + } + if (SCREEN_HEIGHT != window.innerHeight) { + canvas.height = SCREEN_HEIGHT = window.innerHeight; + } + + // clear canvas + context.fillStyle = "rgba(0, 0, 0, 0.05)"; + context.fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + var existingRockets = []; + + for (var i = 0; i < rockets.length; i++) { + // update and render + rockets[i].update(); + rockets[i].render(context); + + // calculate distance with Pythagoras + var distance = Math.sqrt(Math.pow(mousePos.x - rockets[i].pos.x, 2) + Math.pow(mousePos.y - rockets[i].pos.y, 2)); + + // random chance of 1% if rockets is above the middle + var randomChance = rockets[i].pos.y < (SCREEN_HEIGHT * 2 / 3) ? (Math.random() * 100 <= 1) : false; + + /* Explosion rules + - 80% of screen + - going down + - close to the mouse + - 1% chance of random explosion + */ + if (rockets[i].pos.y < SCREEN_HEIGHT / 5 || rockets[i].vel.y >= 0 || distance < 50 || randomChance) { + rockets[i].explode(); + } else { + existingRockets.push(rockets[i]); + } + } + + rockets = existingRockets; + + var existingParticles = []; + + for (var i = 0; i < particles.length; i++) { + particles[i].update(); + + // render and save particles that can be rendered + if (particles[i].exists()) { + particles[i].render(context); + existingParticles.push(particles[i]); + } + } + + // update array with existing particles - old particles should be garbage collected + particles = existingParticles; + + while (particles.length > MAX_PARTICLES) { + particles.shift(); + } +} + +function Particle(pos) { + this.pos = { + x: pos ? pos.x : 0, + y: pos ? pos.y : 0 + }; + this.vel = { + x: 0, + y: 0 + }; + this.shrink = .97; + this.size = 2; + + this.resistance = 1; + this.gravity = 0; + + this.flick = false; + + this.alpha = 1; + this.fade = 0; + this.color = 0; +} + +Particle.prototype.update = function() { + // apply resistance + this.vel.x *= this.resistance; + this.vel.y *= this.resistance; + + // gravity down + this.vel.y += this.gravity; + + // update position based on speed + this.pos.x += this.vel.x; + this.pos.y += this.vel.y; + + // shrink + this.size *= this.shrink; + + // fade out + this.alpha -= this.fade; +}; + +Particle.prototype.render = function(c) { + if (!this.exists()) { + return; + } + + c.save(); + + c.globalCompositeOperation = 'lighter'; + + var x = this.pos.x, + y = this.pos.y, + r = this.size / 2; + + var gradient = c.createRadialGradient(x, y, 0.1, x, y, r); + gradient.addColorStop(0.1, "rgba(255,255,255," + this.alpha + ")"); + gradient.addColorStop(0.8, "hsla(" + this.color + ", 100%, 50%, " + this.alpha + ")"); + gradient.addColorStop(1, "hsla(" + this.color + ", 100%, 50%, 0.1)"); + + c.fillStyle = gradient; + + c.beginPath(); + c.arc(this.pos.x, this.pos.y, this.flick ? Math.random() * this.size : this.size, 0, Math.PI * 2, true); + c.closePath(); + c.fill(); + + c.restore(); +}; + +Particle.prototype.exists = function() { + return this.alpha >= 0.1 && this.size >= 1; +}; + +function Rocket(x) { + Particle.apply(this, [{ + x: x, + y: SCREEN_HEIGHT}]); + + this.explosionColor = 0; +} + +Rocket.prototype = new Particle(); +Rocket.prototype.constructor = Rocket; + +Rocket.prototype.explode = function() { + var count = Math.random() * 10 + 80; + + for (var i = 0; i < count; i++) { + var particle = new Particle(this.pos); + var angle = Math.random() * Math.PI * 2; + + // emulate 3D effect by using cosine and put more particles in the middle + var speed = Math.cos(Math.random() * Math.PI / 2) * 15; + + particle.vel.x = Math.cos(angle) * speed; + particle.vel.y = Math.sin(angle) * speed; + + particle.size = 10; + + particle.gravity = 0.2; + particle.resistance = 0.92; + particle.shrink = Math.random() * 0.05 + 0.93; + + particle.flick = true; + particle.color = this.explosionColor; + + particles.push(particle); + } +}; + +Rocket.prototype.render = function(c) { + if (!this.exists()) { + return; + } + + c.save(); + + c.globalCompositeOperation = 'lighter'; + + var x = this.pos.x, + y = this.pos.y, + r = this.size / 2; + + var gradient = c.createRadialGradient(x, y, 0.1, x, y, r); + gradient.addColorStop(0.1, "rgba(255, 255, 255 ," + this.alpha + ")"); + gradient.addColorStop(1, "rgba(0, 0, 0, " + this.alpha + ")"); + + c.fillStyle = gradient; + + c.beginPath(); + c.arc(this.pos.x, this.pos.y, this.flick ? Math.random() * this.size / 2 + this.size / 2 : this.size, 0, Math.PI * 2, true); + c.closePath(); + c.fill(); + + c.restore(); +}; + + +document.body.appendChild(canvas); +canvas.width = SCREEN_WIDTH; +canvas.height = SCREEN_HEIGHT; +setInterval(launch, 800); +setInterval(loop, 1000 / 50); diff --git a/SRC/public/pictures/homePic/fond2.jpg b/SRC/public/pictures/homePic/fond2.jpg deleted file mode 100755 index 1b2d96c..0000000 Binary files a/SRC/public/pictures/homePic/fond2.jpg and /dev/null differ diff --git a/SRC/resources/views/frontend/games.blade.php b/SRC/resources/views/frontend/games.blade.php index db40dc8..0b93d0a 100755 --- a/SRC/resources/views/frontend/games.blade.php +++ b/SRC/resources/views/frontend/games.blade.php @@ -4,7 +4,7 @@ @section('content')
-
+

@@ -15,15 +15,18 @@

- {{$nbBronze}} +
{{$nbBronze}}
+

- {{$nbArgent}} +
{{$nbArgent}}
+

- {{$nbOr}} +
{{$nbOr}}
+
@endsection diff --git a/SRC/resources/views/frontend/puzzle.blade.php b/SRC/resources/views/frontend/puzzle.blade.php index 1429608..eaf7ed2 100755 --- a/SRC/resources/views/frontend/puzzle.blade.php +++ b/SRC/resources/views/frontend/puzzle.blade.php @@ -6,15 +6,49 @@