Number 1 is Fun!!!
About this app
A fun and interactive single page web app showcasing the fun side of the number 1!
Number 1 is Fun!!! Score: 0 1️⃣
Related apps
Put this on your site
Source
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Number 1 is Fun!!!</title>
<meta name="description" content="A fun and interactive single page web app showcasing the fun side of the number 1!">
<meta name="keywords" content="number one, fun, interactive, game, education">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap" rel="stylesheet">
<script type="text/javascript">
try {
$(document).ready(function() {
const saveLocal = (key, data) => localStorage.setItem(key, JSON.stringify(data));
const loadLocal = (key) => JSON.parse(localStorage.getItem(key));
// Initialize or load score
const SCORE_KEY = 'numberOneFunScore';
let score = loadLocal(SCORE_KEY) || 0;
const updateScoreDisplay = () => {
$('#score').text(score);
};
const incrementScore = () => {
score++;
saveLocal(SCORE_KEY, score);
updateScoreDisplay();
};
$('#number-one-btn').click(function() {
incrementScore();
$(this).addClass('animate__animated animate__bounce');
setTimeout(() => $(this).removeClass('animate__animated animate__bounce'), 1000);
});
// Initial score update
updateScoreDisplay();
});
} catch (error) {
throw error;
}
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet"/>
<style>
body {
background: linear-gradient(45deg, #f06, #ff9);
font-family: 'Fredoka One', cursive;
}
#main-container {
text-align: center;
padding-top: 50px;
}
#score-display {
font-size: 3rem;
color: #fff;
margin-bottom: 30px;
}
#number-one-btn {
font-size: 4rem;
line-height: 4rem;
width: 100px;
height: 100px;
margin: auto;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background-color: #fff;
color: #f06;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
cursor: pointer;
transition: transform 0.2s;
}
#number-one-btn:hover {
transform: scale(1.1);
}
.animate__animated.animate__bounce {
--animate-duration: 0.5s;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<div id="score-display">Score: <span id="score">0</span></div>
<div id="number-one-btn" role="button">1️⃣</div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!