From c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:08:27 +0200 Subject: add: graphs et rushs --- graphs/js/counter/counter.js | 12 ++++++++++++ graphs/js/counter/index.html | 20 ++++++++++++++++++++ graphs/js/counter/style.css | 31 +++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 graphs/js/counter/counter.js create mode 100644 graphs/js/counter/index.html create mode 100644 graphs/js/counter/style.css (limited to 'graphs/js/counter') diff --git a/graphs/js/counter/counter.js b/graphs/js/counter/counter.js new file mode 100644 index 0000000..89198de --- /dev/null +++ b/graphs/js/counter/counter.js @@ -0,0 +1,12 @@ +const counter = document.getElementById("count"); +let counterVal = parseInt(counter.innerHTML); +const btnPlus = document.getElementById("plus"); +const btnMinus = document.getElementById("minus"); + +btnPlus.addEventListener("click", () => { + counter.innerHTML = ++counterVal; +}); + +btnMinus.addEventListener("click", () => { + counter.innerHTML = --counterVal; +}); diff --git a/graphs/js/counter/index.html b/graphs/js/counter/index.html new file mode 100644 index 0000000..d088aac --- /dev/null +++ b/graphs/js/counter/index.html @@ -0,0 +1,20 @@ + + + + + + + + + My Super Counter + + +
+
0
+
+ + +
+
+ + diff --git a/graphs/js/counter/style.css b/graphs/js/counter/style.css new file mode 100644 index 0000000..677acc2 --- /dev/null +++ b/graphs/js/counter/style.css @@ -0,0 +1,31 @@ +html, +body { + height: 100%; +} + +.container { + height: 100%; + display: flex; + justify-content: center; + flex-direction: column; + align-items: center; +} + +#count { + font-size: 20vh; +} + +.actions { + display: flex; + height: 10vh; +} + +.actions > button { + width: 10vw; + background-color: rgb(0, 132, 255); + font-size: 5vh; +} + +#plus { + margin-right: 20px; +} -- cgit v1.2.3