-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
127 lines (119 loc) · 5.93 KB
/
index.html
File metadata and controls
127 lines (119 loc) · 5.93 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
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
125
126
127
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Barcode Label Designer & Printer</title>
<link rel="stylesheet" href="styles.css">
<script src="https://cdn.jsdelivr.net/npm/jsbarcode@3.11.5/dist/JsBarcode.all.min.js"></script>
</head>
<body>
<div class="container">
<header>
<h1>🏷️ Barcode Label Designer</h1>
<p>Design and print custom barcode labels for your ERP system</p>
</header>
<div class="main-content">
<!-- Login Section -->
<div id="loginSection" class="section">
<div class="login-form">
<h2>Login</h2>
<input type="text" id="username" placeholder="Username" required>
<input type="password" id="password" placeholder="Password" required>
<button onclick="login()" class="btn-primary">Login</button>
</div>
</div>
<!-- Main Application -->
<div id="appSection" class="section hidden">
<div class="sidebar">
<h3>Label Fields</h3>
<div class="field-inputs">
<div class="input-group">
<label>Product Code *</label>
<input type="text" id="productCode" placeholder="Enter product code">
</div>
<div class="input-group">
<label>Product Name</label>
<input type="text" id="productName" placeholder="Enter product name">
</div>
<div class="input-group">
<label>Price</label>
<input type="text" id="price" placeholder="Enter price">
</div>
<div class="input-group">
<label>Batch Number</label>
<input type="text" id="batchNumber" placeholder="Enter batch number">
</div>
<div class="input-group">
<label>Expiry Date</label>
<input type="date" id="expiryDate">
</div>
<div class="input-group">
<label>Custom Field 1</label>
<input type="text" id="customField1" placeholder="Custom field">
</div>
<div class="input-group">
<label>Custom Field 2</label>
<input type="text" id="customField2" placeholder="Custom field">
</div>
</div>
<h3>Layout Settings</h3>
<div class="layout-controls">
<div class="input-group">
<label>Font Size</label>
<select id="fontSize">
<option value="8">8px</option>
<option value="10" selected>10px</option>
<option value="12">12px</option>
<option value="14">14px</option>
</select>
</div>
<div class="input-group">
<label>Barcode Height</label>
<select id="barcodeHeight">
<option value="30">30px</option>
<option value="40" selected>40px</option>
<option value="50">50px</option>
<option value="60">60px</option>
</select>
</div>
<div class="input-group">
<label>Show Product Code Text</label>
<input type="checkbox" id="showBarcodeText" checked>
</div>
</div>
<div class="action-buttons">
<button onclick="generatePreview()" class="btn-primary">Generate Preview</button>
<button onclick="printLabel()" class="btn-success">Print Label</button>
<button onclick="saveTemplate()" class="btn-secondary">Save Template</button>
<button onclick="loadTemplate()" class="btn-secondary">Load Template</button>
</div>
</div>
<div class="preview-area">
<h3>Label Preview (3.5cm × 2.5cm)</h3>
<div class="label-preview" id="labelPreview">
<div class="preview-placeholder">
Enter product details and click "Generate Preview"
</div>
</div>
<div class="print-options">
<h4>Print Options</h4>
<div class="print-controls">
<label>Copies: <input type="number" id="copies" value="1" min="1" max="100"></label>
<label>
<input type="checkbox" id="thermalMode" checked> Thermal Printer Mode
</label>
</div>
</div>
<div class="zpl-output">
<h4>ZPL Output (for Zebra Printer)</h4>
<textarea id="zplCode" readonly placeholder="ZPL code will appear here..."></textarea>
<button onclick="copyZPL()" class="btn-secondary">Copy ZPL</button>
</div>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>