-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
81 lines (74 loc) · 2.06 KB
/
Copy pathindex.html
File metadata and controls
81 lines (74 loc) · 2.06 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>QA Test task page</title>
<style>
body {
font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
}
h1 {
text-align: center;
}
.body-wrapper {
width: 430px;
margin: 0 auto;
}
.rules-block li {
margin-bottom: 5px;
}
.tah-item {
width: 430px;
margin: 0 auto 25px;
height: 115px;
position: relative;
padding: 16px;
background: #fff;
overflow: hidden;
cursor: text;
border: 1px solid #b5b5b5;
}
.tah-placeholder {
margin-bottom: 10px;
}
.tah-word-invalid {
color: #FF5A57;
font-weight: bold;
}
.tah-word-valid {
color: #02ED86;
}
.success-message {
display: none;
}
.textarea-wrapper[state="done"] .success-message {
display: block;
}
</style>
</head>
<body>
<div class="body-wrapper">
<h1>QA Test task page</h1>
<div class="rules-block">
<h4>Rules:</h4>
<ul>
<li>Case insensitive comparison.</li>
<li>Punctuation marks are required.</li>
<li>There're validation triggers: Backspace pressed, Space pressed, Typed the same or more letters of written and required word, Blur/focus of the textarea.</li>
<li>At least one whitespace between words is required (but might be more than one). Whitespace are also allowed in the beginning and the end of the text.</li>
<li>Copy and paste is allowed.</li>
</ul>
</div>
<div class="textarea-wrapper">
<textarea name="textarea-item" id="textarea-item" cols="30" rows="10"></textarea>
<div class="success-message">The textarea has passed.</div>
</div>
</div>
<script>
window.TEXT_TO_VALIDATE = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias enim harum minima praesentium quaerat quod.';
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="./libs/tah.js"></script>
<script src="app.js"></script>
</body>
</html>