commit 60c89344d0f699baf43c174e877376ccd7049e66
Author: root <root@hub.scroll.pub> Date: 2024-12-27 10:47:09 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..a36d837 --- /dev/null +++ b/body.html @@ -0,0 +1,27 @@ +<header> + <h1>Kaldırdım Bet</h1> + <p>How many times will "kaldırdım" be sent in the Support group today? Place your bet!</p> +</header> +<main> + <section id="bet-section"> + <h2>Place Your Bet</h2> + <form id="bet-form"> + <label for="bet">Your Guess:</label> + <input type="number" id="bet" name="bet" min="1" required> + <button type="submit">Submit Bet</button> + </form> + </section> + <section id="stats-section"> + <h2>Statistics</h2> + <div class="chart-container"> + <canvas id="bet-chart"></canvas> + </div> + <div class="stats"> + <p>Total Bets: <span id="total-bets">0</span></p> + <p>Average Guess: <span id="average-guess">0</span></p> + </div> + </section> +</main> +<footer> + <p>Made with ❤️ by the Kaldırdım Bet Team</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..fe06c12 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://kaldirdim-bet.scroll.pub +metaTags +editButton /edit.html +title Kaldırdım Bet - Guess the Count! +style.css +body.html +script.js \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..3ce3f67 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# kaldirdim-bet.scroll.pub +Website generated by DeepSeek from prompt: Generate a website that will take bet's on how many times 'kaldırdım' text been sent into 'Support' group in MS Teams, provide dummy statisctics with charts make it fun site \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..db946f4 --- /dev/null +++ b/script.js @@ -0,0 +1,51 @@ +document.addEventListener('DOMContentLoaded', function () { + const betForm = document.getElementById('bet-form'); + const totalBets = document.getElementById('total-bets'); + const averageGuess = document.getElementById('average-guess'); + const betChart = document.getElementById('bet-chart').getContext('2d'); + + let bets = []; + let chart; + + betForm.addEventListener('submit', function (event) { + event.preventDefault(); + const betValue = parseInt(document.getElementById('bet').value, 10); + bets.push(betValue); + updateStats(); + updateChart(); + betForm.reset(); + }); + + function updateStats() { + totalBets.textContent = bets.length; + const sum = bets.reduce((a, b) => a + b, 0); + const avg = (sum / bets.length).toFixed(2); + averageGuess.textContent = avg; + } + + function updateChart() { + if (chart) { + chart.destroy(); + } + chart = new Chart(betChart, { + type: 'bar', + data: { + labels: bets.map((_, i) => `Bet ${i + 1}`), + datasets: [{ + label: 'Bet Values', + data: bets, + backgroundColor: 'rgba(98, 0, 234, 0.6)', + borderColor: 'rgba(98, 0, 234, 1)', + borderWidth: 1 + }] + }, + options: { + scales: { + y: { + beginAtZero: true + } + } + } + }); + } +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..2e40e7c --- /dev/null +++ b/style.css @@ -0,0 +1,124 @@ +body { + font-family: 'Arial', sans-serif; + margin: 0; + padding: 0; + background-color: #f4f4f9; + color: #333; +} + +header { + background-color: #6200ea; + color: white; + padding: 20px; + text-align: center; +} + +header h1 { + margin: 0; + font-size: 2.5rem; +} + +header p { + margin: 10px 0 0; + font-size: 1.2rem; +} + +main { + padding: 20px; +} + +section { + margin-bottom: 30px; +} + +h2 { + color: #6200ea; + font-size: 2rem; + margin-bottom: 15px; +} + +form { + display: flex; + flex-direction: column; + align-items: center; +} + +label { + font-size: 1.2rem; + margin-bottom: 10px; +} + +input { + padding: 10px; + font-size: 1rem; + width: 100%; + max-width: 300px; + margin-bottom: 15px; + border: 1px solid #ccc; + border-radius: 5px; +} + +button { + padding: 10px 20px; + font-size: 1rem; + background-color: #6200ea; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; +} + +button:hover { + background-color: #3700b3; +} + +.chart-container { + max-width: 600px; + margin: 0 auto; +} + +.stats { + text-align: center; + margin-top: 20px; +} + +.stats p { + font-size: 1.2rem; + margin: 10px 0; +} + +footer { + background-color: #333; + color: white; + text-align: center; + padding: 10px; + position: fixed; + width: 100%; + bottom: 0; +} + +@media (max-width: 600px) { + header h1 { + font-size: 2rem; + } + + header p { + font-size: 1rem; + } + + h2 { + font-size: 1.5rem; + } + + input { + font-size: 0.9rem; + } + + button { + font-size: 0.9rem; + } + + .stats p { + font-size: 1rem; + } +} \ No newline at end of file