-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (92 loc) · 2.38 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
95
96
97
98
99
100
101
<html>
<style>
input[type="submit"] {
background-color: #3bfffc;
font-size: 15px;
border: 2px solid black;
color: black;
padding: 16px 32px;
text-decoration: none;
margin: 4px 2px;
cursor: pointer;
}
button {
background-color: #3bfffc;
font-size: 15px;
border: 2px solid black;
color: black;
padding: 16px 32px;
text-decoration: none;
margin: 4px 2px;
cursor: pointer;
}
body {
background-color: #b95ff5;
border: none;
color: black;
height: auto;
width: auto;
overflow: hidden;
padding:0;
margin:0;
}
img {
max-width: 10%;
height: auto;
padding:0;
margin:0;
}
textarea {
size: border-box;
font-size: 18px;
font-family: "Times New Roman", Times, serif;
resize: none;
margin-bottom: 8px;
background-color: white;
width: 675px;
height: 300px;
border: 7px solid black;
}
</style>
<title>Auto Ryhme Generator</title>
<body>
<div id="main">
<center>
<h1>Auto Rhyme Generator</h1>
<h4>Pulls Ryhmes from Ryhmezone.com and shows rhyme tables for all words</h4>
<h5><i>Copyright 2021 Jack Kelly</i></h5>
<form>
<textarea name="words" id="words">Enter up to 30 words seperated by commas.</textarea>
<br>
<input type="submit" role="button" aria-label="Find Rhymes" value="Find Rhymes">
</form>
<div id="loading">
</div>
<br>
</center>
</div>
<script>
const electron = require('electron');
const {
ipcRenderer
} = electron;
document.querySelector('form').addEventListener('submit', submitForm);
function submitForm(e) {
e.preventDefault();
var words = document.querySelector('#words').value;
ipcRenderer.send('words:add', words);
}
ipcRenderer.on('complete:success', function(e){
var loadingSection = document.querySelector('#loading');
loadingSection.innerHTML = "<image src=\"./images/complete.png\"><h3>Complete!</h3></h4><button onclick=\"showResults()\">View Results</button>";
});
ipcRenderer.on('progress:current', function(e){
var loadingSection = document.querySelector('#loading');
loadingSection.innerHTML = "<image src=\"./images/loading.gif\"><h3>Working....</h3>";
});
function showResults(){
ipcRenderer.send('show:results');
}
</script>
</body>
</html>