-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
113 lines (105 loc) · 3.74 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
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EZ Donation Text Generator</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: auto;
background-image: url('ez_background.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
padding: 20px;
}
.container {
background-color: rgba(255, 255, 255, 0.9);
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.logo {
display: block;
margin: 0 auto 20px;
width: 150px;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
font-weight: bold;
}
input[type="text"], input[type="email"], textarea {
width: 100%;
padding: 8px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
padding: 10px 15px;
background-color: #28a745;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #218838;
}
#copyButton {
margin-top: 10px;
background-color: #007bff;
}
#copyButton:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<img src="ez_logo.png" alt="Logo" class="logo">
<h1>EZ Donation Text Generator</h1>
<form id="donationForm">
<div class="form-group">
<label for="characterName">Character Name</label>
<input type="text" id="characterName" name="characterName" placeholder="Enter character's name" required>
</div>
<div class="form-group">
<label for="email">Your Email Address</label>
<input type="email" id="email" name="email" placeholder="Enter your email address" required>
</div>
<div class="form-group">
<label for="comment">Comments (optional)</label>
<textarea id="comment" name="comment" rows="4" placeholder="Write your comment here (optional)"></textarea>
</div>
<button type="button" onclick="generateText()">Generate Text</button>
<button type="button" id="copyButton" onclick="copyToClipboard()">Copy to Clipboard</button>
</form>
<h2>Generated Text</h2>
<div id="output" style="white-space: pre-wrap;"></div>
</div>
<script>
function generateText() {
const characterName = document.getElementById("characterName").value;
const email = document.getElementById("email").value;
const comment = document.getElementById("comment").value || "No comments"; // Provide default text if comments are empty
// Format the output text
const output = `EZ Server :: Character: ${characterName} E-Mail: ${email} Comments: ${comment}`;
document.getElementById("output").textContent = output;
}
function copyToClipboard() {
const outputText = document.getElementById("output").textContent;
navigator.clipboard.writeText(outputText).then(() => {
alert("Text copied to clipboard!");
}).catch(err => {
alert("Failed to copy text: " + err);
});
}
</script>
</body>
</html>