-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.html
124 lines (118 loc) · 3.59 KB
/
ui.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
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Karma QR Code Generator</title>
<style>
body {
font-family: 'Inter', sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f0f0;
color: #333;
}
.container {
background-color: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 18px;
margin-bottom: 20px;
text-align: center;
}
label {
display: block;
margin-bottom: 5px;
font-size: 12px;
color: #666;
}
textarea, input[type="text"] {
width: 100%;
padding: 8px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
box-sizing: border-box;
}
textarea {
height: 100px;
resize: vertical;
}
.color-inputs {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
.color-input {
width: 48%;
}
.checkbox {
margin-bottom: 15px;
}
button {
width: 100%;
padding: 10px;
background-color: #18A0FB;
color: white;
border: none;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #1089d4;
}
</style>
</head>
<body>
<div class="container">
<h1>Karma QR Code Generator</h1>
<label for="tableData">Enter table number and URL, separated by a comma (one per line):</label>
<textarea id="tableData" rows="10"></textarea>
<div class="color-inputs">
<div class="color-input">
<label for="fgColor">Foreground Color:</label>
<input type="color" id="fgColor" name="fgColor" value="#000000">
</div>
<div class="color-input">
<label for="bgColor">Background Color:</label>
<input type="color" id="bgColor" name="bgColor" value="#ffffff">
</div>
</div>
<label for="tablePrefix">Table Prefix:</label>
<input type="text" id="tablePrefix" name="tablePrefix">
<label for="tableSuffix">Table Suffix:</label>
<input type="text" id="tableSuffix" name="tableSuffix">
<div class="checkbox">
<input type="checkbox" id="transparentBg" name="transparentBg">
<label for="transparentBg">Transparent Background</label>
</div>
<button id="generate">Generate QR Codes</button>
</div>
<script>
document.getElementById('generate').onclick = () => {
const tableData = document.getElementById('tableData').value;
const fgColor = document.getElementById('fgColor').value;
const bgColor = document.getElementById('bgColor').value;
const tablePrefix = document.getElementById('tablePrefix').value;
const tableSuffix = document.getElementById('tableSuffix').value;
const transparentBg = document.getElementById('transparentBg').checked;
parent.postMessage({
pluginMessage: {
type: 'generate-qr-codes',
tableData,
fgColor,
bgColor,
tablePrefix,
tableSuffix,
transparentBg
}
}, '*');
};
</script>
</body>
</html>