-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
94 lines (89 loc) · 5.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="theme-color" content="#ffffff" />
<meta http-equiv="Content-Language" content="en" />
<meta name="author" content="Aakash Dinkar" />
<meta name="description" content="Test your memory with this fun Memory Game! Flip cards to match pairs and improve your cognitive skills while enjoying a challenging gameplay experience." />
<meta name="keywords" content="Aakash Dinkar, Memory Game, card matching game, memory challenge, JavaScript games, web development project, cognitive skills, fun games, HTML CSS JavaScript" />
<!-- Favicon for browsers -->
<link rel="icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon.ico" type="image/x-icon">
<!-- Favicon for standard desktop browsers (16x16, 32x32) -->
<link rel="icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-32.png" sizes="32x32" type="image/png">
<link rel="icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-16.png" sizes="16x16" type="image/png">
<!-- Favicon for high-resolution desktop displays (64x64) -->
<link rel="icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-64.png" sizes="64x64" type="image/png">
<!-- Apple Touch Icons for iOS -->
<link rel="apple-touch-icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-180.png">
<link rel="apple-touch-icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-152.png">
<link rel="apple-touch-icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-120.png">
<link rel="apple-touch-icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-76.png">
<link rel="apple-touch-icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon.ico">
<!-- Favicon for Android devices -->
<link rel="icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-192.png" sizes="192x192" type="image/png">
<!-- Favicon for Windows tiles (optional) -->
<meta name="msapplication-TileImage" content="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-144.png">
<!-- Shortcut icon for backward compatibility with older browsers -->
<link rel="shortcut icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon.ico" type="image/x-icon">
<!-- Mask icon for Safari Pinned Tab (can be in SVG format, for better scaling) -->
<link rel="mask-icon" href="https://aakashdinkarh.github.io/static_assets/images/portfolio/site-icon/site-icon-32.png">
<meta property="og:title" content="Memory Game - Aakash Dinkar" />
<meta property="og:description" content="Test your memory with this fun Memory Game! Flip cards to match pairs and improve your cognitive skills while enjoying a challenging gameplay experience." />
<meta property="og:url" content="https://aakashdinkar.in/MemoryGame/" />
<meta property="og:image" content="https://aakashdinkarh.github.io/static_assets/images/portfolio/avif-images/meta-og-image.avif" />
<meta property="og:image" content="https://aakashdinkarh.github.io/static_assets/images/portfolio/webp-images/meta-og-image.webp" />
<meta property="og:image" content="https://aakashdinkarh.github.io/static_assets/images/portfolio/original-images/meta-og-image.jpeg" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Memory Game - Aakash Dinkar">
<meta name="twitter:title" content="Memory Game - Aakash Dinkar" />
<meta name="twitter:description" content="Test your memory with this fun Memory Game! Flip cards to match pairs and improve your cognitive skills while enjoying a challenging gameplay experience." />
<meta name="twitter:image" content="https://aakashdinkarh.github.io/static_assets/images/portfolio/avif-images/meta-og-image.avif" />
<meta name="twitter:image" content="https://aakashdinkarh.github.io/static_assets/images/portfolio/webp-images/meta-og-image.webp" />
<meta name="twitter:image" content="https://aakashdinkarh.github.io/static_assets/images/portfolio/original-images/meta-og-image.jpeg" />
<title>Memory Game - Aakash Dinkar</title>
<link rel="stylesheet" href="./style.css" />
<script>
const localStorageKey = '--saved--isDarkThemeEnabled';
function saveIsDarkThemeEnabledToLocalStorage(isDarkThemeEnabled) {
localStorage.setItem(localStorageKey, JSON.stringify(isDarkThemeEnabled));
}
function getIsDarkThemeEnabledFromLocalStorage() {
let isDarkThemeEnabled = true;
try {
const storedKeyResult = localStorage.getItem(localStorageKey);
isDarkThemeEnabled =
storedKeyResult != null ? JSON.parse(storedKeyResult) : true;
} catch {
isDarkThemeEnabled = true;
}
saveIsDarkThemeEnabledToLocalStorage(isDarkThemeEnabled);
return isDarkThemeEnabled;
}
</script>
</head>
<body>
<script>
document.body.classList.add(getIsDarkThemeEnabledFromLocalStorage() ? 'dark-theme' : 'light-theme');
</script>
<div class="container">
<h1>Memory Game</h1>
<button id="restart-btn">Restart Game</button>
<!-- theme slider *** START *** -->
<div class="theme-slider-container">
<label class="theme-slider">
<input type="checkbox" checked />
<div class="round slider"></div>
</label>
</div>
<!-- theme slider *** END *** -->
<br>
<br>
<p id="moves">Moves: 0</p>
<div id="gameBoard"></div>
<p id="gameWonMsg"></p>
</div>
<script src="./script.js"></script>
</body>
</html>