interface updated

This commit is contained in:
2025-05-05 16:32:10 +03:00
parent b2912064b5
commit fb582be590
4 changed files with 58 additions and 43 deletions

View File

@@ -677,3 +677,17 @@ body.dark-mode .export-description {
text-align: left; text-align: left;
border: 1px solid #ddd; /* Add borders to table cells */ border: 1px solid #ddd; /* Add borders to table cells */
} }
.go-to-main-etichete-btn {
background-color: #28a745; /* Green background */
color: #fff; /* White text */
padding: 10px 20px;
border-radius: 5px;
text-decoration: none;
margin-left: 10px;
transition: background-color 0.3s ease;
}
.go-to-main-etichete-btn:hover {
background-color: #218838; /* Darker green on hover */
}

View File

@@ -26,6 +26,9 @@
</div> </div>
<div class="right-header"> <div class="right-header">
<button id="theme-toggle" class="theme-toggle">Change to dark theme</button> <button id="theme-toggle" class="theme-toggle">Change to dark theme</button>
{% if request.endpoint in ['main.upload_data', 'main.print_module', 'main.label_templates', 'main.create_template'] %}
<a href="{{ url_for('main.etichete') }}" class="btn go-to-main-etichete-btn">Main Page Etichete</a>
{% endif %}
<a href="{{ url_for('main.dashboard') }}" class="btn go-to-dashboard-btn">Go to Dashboard</a> <a href="{{ url_for('main.dashboard') }}" class="btn go-to-dashboard-btn">Go to Dashboard</a>
{% if 'user' in session %} {% if 'user' in session %}
<span class="user-info">You are logged in as {{ session['user'] }}</span> <span class="user-info">You are logged in as {{ session['user'] }}</span>

View File

@@ -3,26 +3,34 @@
{% block title %}Create Template{% endblock %} {% block title %}Create Template{% endblock %}
{% block content %} {% block content %}
<div class="card-container" style="display: flex; gap: 20px;">
<!-- Left Column --> <!-- Left Column -->
<div class="left-column" style="flex: 1; display: flex; flex-direction: column; gap: 20px;"> <div class="left-column" style="flex: 1; max-width: 33%;">
<!-- Card 1: Dimensions -->
<div class="dashboard-card"> <div class="dashboard-card">
<h3>Dimensions</h3> <h3>Template Settings</h3>
<p>Set the dimensions of the label template:</p> <p>Set the dimensions and retrieve database headers for the label template:</p>
<!-- Dimensions Section -->
<div>
<h4>Dimensions</h4>
<form id="dimensions-form"> <form id="dimensions-form">
<div style="margin-bottom: 10px;">
<label for="label-width">Width (mm):</label> <label for="label-width">Width (mm):</label>
<input type="number" id="label-width" name="label_width" required> <input type="number" id="label-width" name="label_width" required>
</div>
<div style="margin-bottom: 10px;">
<label for="label-height">Height (mm):</label> <label for="label-height">Height (mm):</label>
<input type="number" id="label-height" name="label_height" required> <input type="number" id="label-height" name="label_height" required>
</div>
<button type="button" id="set-dimensions-btn" class="btn">Set Dimensions</button> <button type="button" id="set-dimensions-btn" class="btn">Set Dimensions</button>
</form> </form>
</div> </div>
<!-- Card 2: Get Database Headers --> <hr style="margin: 20px 0;">
<div class="dashboard-card">
<h3>Get Database Headers</h3> <!-- Get Database Headers Section -->
<div>
<h4>Get Database Headers</h4>
<p>Retrieve column names from a selected database table:</p> <p>Retrieve column names from a selected database table:</p>
<button type="button" id="get-tables-btn" class="btn">Get Database Tables</button> <button type="button" id="get-tables-btn" class="btn">Get Database Tables</button>
<div id="tables-container" style="margin-top: 10px;"> <div id="tables-container" style="margin-top: 10px;">
@@ -33,10 +41,10 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- Right Column --> <!-- Right Column -->
<div class="right-column" style="flex: 1;"> <div class="right-column" style="flex: 2;">
<!-- Card 3: Interactive Label Preview -->
<div class="dashboard-card"> <div class="dashboard-card">
<h3>Interactive Label Preview</h3> <h3>Interactive Label Preview</h3>
<p>Preview the label with selected headers:</p> <p>Preview the label with selected headers:</p>

View File

@@ -3,29 +3,19 @@
{% block title %}Label Templates{% endblock %} {% block title %}Label Templates{% endblock %}
{% block content %} {% block content %}
<div class="">
<div class="card-container"> <div class="card-container">
<h1>Manage Label Templates</h1> <div class="card">
<p>This page will allow users to manage and configure label templates.</p>
<!-- Card: List of Label Templates -->
<div class="dashboard-card">
<h3>List of Label Templates</h3> <h3>List of Label Templates</h3>
<p>Below is the list of existing label templates:</p> <ul class="user-list">
<ul id="template-list"> {% for template in templates %}
<!-- Example template items --> <li data-template-id="{{ template.id }}">
<li> <span class="template-name">{{ template.name }}</span>
<span>Template 1</span>
<button class="btn edit-btn">Edit</button>
<button class="btn delete-btn">Delete</button>
</li>
<li>
<span>Template 2</span>
<button class="btn edit-btn">Edit</button> <button class="btn edit-btn">Edit</button>
<button class="btn delete-btn">Delete</button> <button class="btn delete-btn">Delete</button>
</li> </li>
{% endfor %}
</ul> </ul>
<button id="create-template-btn" class="btn">Create New Template</button> <button id="create-template-btn" class="btn create-btn">Create New Template</button>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}