-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
115 lines (97 loc) · 5.17 KB
/
index.html
File metadata and controls
115 lines (97 loc) · 5.17 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pyscript Memory</title>
<!-- Recommended meta tags -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- PyScript CSS -->
<link rel="stylesheet" href="https://pyscript.net/releases/2024.1.1/core.css">
<!-- Additional Stylesheet -->
<link rel="stylesheet" href="./styles.css">
<!-- This script tag bootstraps PyScript -->
<script type="module" src="https://pyscript.net/releases/2024.1.1/core.js"></script>
</head>
<body>
<!-- Next line displays a terminal to check for print statements in development -->
<!-- <script type="py" src="./main.py" config="./pyscript.json" terminal></script>-->
<script type="py" src="./main.py" config="./pyscript.json"></script>
<script type="module">
const loading = document.getElementById('loading');
addEventListener('py:ready', () => loading.close());
loading.showModal();
</script>
<div class="frame">
<section class="memory-game">
<modal id="win-banner" class="win-modal" py-click="close_win_banner">
<form method="dialog" class="win-modal">
<button class="win-modal">OK</button>
</form>
</modal>
<h1 class="title" style="color: #f0ab3c">Memory - Pyscript</h1>
<div id="01" class="memory-card" py-click="flip_card" data-framework="react">
<img class="front-face" src="img/react.svg" alt="React">
<img id="js-badge" class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="02" class="memory-card" py-click="flip_card" data-framework="react">
<img class="front-face" src="img/react.svg" alt="React">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="03" class="memory-card" py-click="flip_card" data-framework="angular">
<img class="front-face" src="img/angular.svg" alt="Angular">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="04" class="memory-card" py-click="flip_card" data-framework="angular">
<img class="front-face" src="img/angular.svg" alt="Angular">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="05" class="memory-card" py-click="flip_card" data-framework="ember">
<img class="front-face" src="img/ember.svg" alt="Ember">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="06" class="memory-card" py-click="flip_card" data-framework="ember">
<img class="front-face" src="img/ember.svg" alt="Ember">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="07" class="memory-card" py-click="flip_card" data-framework="vue">
<img class="front-face" src="img/vue.svg" alt="Vue">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="08" class="memory-card" py-click="flip_card" data-framework="vue">
<img class="front-face" src="img/vue.svg" alt="Vue">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="09" class="memory-card" py-click="flip_card" data-framework="backbone">
<img class="front-face" src="img/backbone.svg" alt="Backbone">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="10" class="memory-card" py-click="flip_card" data-framework="backbone">
<img class="front-face" src="img/backbone.svg" alt="Backbone">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="11" class="memory-card" py-click="flip_card" data-framework="aurelia">
<img class="front-face" src="img/aurelia.svg" alt="Aurelia">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
<div id="12" class="memory-card" py-click="flip_card" data-framework="aurelia">
<img class="front-face" src="img/aurelia.svg" alt="Aurelia">
<img class="back-face" src="img/js-badge.svg" alt="Memory Card">
</div>
</section>
<section class="footer">
<div class="modal">
<dialog id="modal-dialog" class="modal" open>
<p class="modal-content">Setting up game, press ok when ready</p>
<form method="dialog">
<button class="modal-content">OK</button>
</form>
</dialog>
</div>
<h1 class="score">Score: <span id="current-score"></span></h1>
<h1 class="score">Best Score: <span id="best-score"></span></h1>
<button class="button" role="button" py-click="reset" style="background: green;">Reset Game</button>
<button class="button" role="button" py-click="clear_best_score">Reset Best Score</button>
</section>
</div>
</body>
</html>