diff --git a/css/home.css b/css/home.css index 91028e9..5d5fc30 100644 --- a/css/home.css +++ b/css/home.css @@ -17,6 +17,57 @@ height: 200px; } +/* Section des dons */ + +#don > div { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-evenly; +} + +#don button { + flex-grow: 1; + width: 3em; + color: white; + font-size: 2em; + border: none; + font-family: MonTrappist; + margin: 0.2em; + padding: 0.3em; + background: var(--primary-bg-color); + background: linear-gradient(0deg,rgba(136, 0, 255, 1) 0%, rgba(255, 191, 62, 1) 50%, rgba(255, 78, 0, 1) 100%); + box-shadow: -5px 5px 0px var(--accent-yellow), -10px 10px 0px var(--accent-orange), -15px 15px 0px var(--accent-violet); + cursor: pointer; +} + +#don > hr { + margin-top: 1em; +} + +#don p { + text-align: justify; + text-align: center; +} + +@keyframes bang { + from { + transform: translate3d(0,0,0); + opacity: 1; + } +} + +.btn-pop i { + /* position: ; */ + display:run-in; + left: 0px; + top: 0px; + width: 1px; + height: 1px; + background: red; + opacity: 0; +} + /* Barre de progression */ .progression { diff --git a/index.html b/index.html index 33387a6..4ea4806 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@ + Camp Interhack @@ -92,8 +93,34 @@

Et nous avons reçu

? %
-

des dons dont nous avons besoin (voir le détail des comptes)

+

des dons dont nous avons besoin

+ +

+ Faire un don +

+
+

Nous avons besoin de sous avant le débût du Camp pour financer l'achat de fournitures, payer la réservation du lieu et monter la logistique.

+
+ + + + + + + + +
+ +
+
+

Nous estimons avoir un budget de 15 000€ et être autour de 200, et aurons donc besoin d'au moins autant pour que le camp soit à l'équilibre.

+ Voir le détail des comptes +
+
+ + +

Iels y participent

@@ -131,5 +158,5 @@ - + diff --git a/js/pop.js b/js/pop.js new file mode 100644 index 0000000..345b250 --- /dev/null +++ b/js/pop.js @@ -0,0 +1,31 @@ +document.querySelectorAll('button').forEach(function(button) { + button.addEventListener('mouseenter', function() { + function random(max) { + return Math.random() * (max - 0) + 0; + } + + var c = document.createDocumentFragment(); + for (var i = 0; i < 100; i++) { + var styles = 'position: absolute;' + + 'left: ' + (random(100)) + '30%;' + // Limit the position to within the button + 'top: ' + (random(60)) + '30%;' + // Limit the position to within the button + 'width: 3px; height: 6px; ' + // Increase size + 'transform: translate(-50%, -50%) rotate(' + random(360) + 'deg);' + + 'background: hsla(' + random(360) + ', 100%, 50%, 1);' + + 'animation: bang 2000ms ease-out forwards;' + + 'opacity: 0;' + + 'z-index: 10;'; // Set a high z-index + + var e = document.createElement("i"); + e.style.cssText = styles; + c.appendChild(e); + } + button.appendChild(c); + setTimeout(() => { + // Create an array of the elements to remove + let childrenToRemove = Array.from(button.querySelectorAll('i')); + // Remove each element + childrenToRemove.forEach(child => button.removeChild(child)); + }, 3000); + }); +});