-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.html
81 lines (63 loc) · 2.42 KB
/
input.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome Page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js" defer></script>
</head>
<body>
<main class="fade">
<div class = "page-container">
<div class="container-xxbig">
<div class="container-small">
<h1>It's not an existed hanzi...</h1>
<p class="paragraphs">But now you get the chance to define your unique creation! Your definition will be added to our digital archive and shared with other audiences.
And you’ll be able to see what others' made later.
</p>
</div>
<div class="container-xbig">
<div class = "capturedImg">
<img id = 'captured-image' alt = 'captured image'>
</div>
<div class='container-med'>
<form id = 'form'>
<div class='input-group'>
<label for='user-name'></label>
<input type='text' id='user-name' name="name" placeholder="enter your name (not the hanzi's name) here.">
</div>
<div class="input-group">
<label for = 'user-message'> </label>
<textarea id ='user-message' name="message" placeholder="Craft your Hanzi's story: what does it represent?"></textarea>
</div>
</div>
</div>
</div>
</div>
<button type ='submit' id="submit" class = 'button orange'>Submit</button>
</form>
<button id="toDetection2" class = 'button grey' >Play Again</button>
</main>
<footer>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Retrieve image data URL from local storage or global variable
const imageDataUrl = localStorage.getItem('image');
if (imageDataUrl) {
const imageElement = document.getElementById('captured-image');
if (imageElement) {
imageElement.src = imageDataUrl;
imageElement.style.display = 'block'; // Display the image
}
}
});
if(toDetection2){
toDetection2.addEventListener('click',()=>{
window.location.href = 'assembleNew.html';
})
}
</script>
</body>
</html>