Spaces:
Sleeping
Sleeping
| <html> | |
| <head> | |
| <title>Smart Asset QR System</title> | |
| <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h2>🏢 Smart Asset QR Generator</h2> | |
| {% if error %} | |
| <p style="color:red;">{{ error }}</p> | |
| {% endif %} | |
| <form action="/generate" method="POST" enctype="multipart/form-data"> | |
| <input type="text" name="data" placeholder="Enter Asset ID (Example: NIELIT/CH-RPR/20XX/XX-XX)" required> | |
| <label>QR Color</label> | |
| <input type="color" name="fill_color" value="#000000"> | |
| <label>Background Color</label> | |
| <input type="color" name="back_color" value="#ffffff"> | |
| <label>QR Size</label> | |
| <select name="size"> | |
| <option value="8">Small</option> | |
| <option value="10">Medium</option> | |
| <option value="12">Large</option> | |
| </select> | |
| <button type="submit">Generate QR</button> | |
| </form> | |
| {% if qr_image %} | |
| <hr> | |
| <h3>Generated QR</h3> | |
| <img src="{{ url_for('static', filename=qr_image) }}" width="200"> | |
| <br><br> | |
| <a href="{{ url_for('static', filename=qr_image) }}" download="asset_qr.png"> | |
| <button>⬇ Download QR</button> | |
| </a> | |
| <h3>Asset Details</h3> | |
| <p><strong>Asset ID:</strong> {{ asset["Asset ID"] }}</p> | |
| <p><strong>Type:</strong> {{ asset["Asset Type"] }}</p> | |
| <p><strong>Name:</strong> {{ asset["Asset Name"] }}</p> | |
| <p><strong>Allotted To:</strong> {{ asset["Allotted To"] }}</p> | |
| <p><strong>Department:</strong> {{ asset["Department"] }}</p> | |
| <p><strong>Room Number:</strong> {{ asset["Room Number"] }}</p> | |
| {% endif %} | |
| </div> | |
| </body> | |
| </html> |