62 lines
3.3 KiB
HTML
62 lines
3.3 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="fa" dir="rtl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}پرینتر لیبل{% endblock %}</title>
|
|
<link rel="icon" href="{% static 'lithium.png' %}" type="image/png">
|
|
<link rel="apple-touch-icon" href="{% static 'lithium.png' %}">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Vazirmatn:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="{% static 'slips/css/style.css' %}">
|
|
<script>
|
|
(function () {
|
|
var t = localStorage.getItem('slip_theme') || 'light';
|
|
document.documentElement.setAttribute('data-theme', t);
|
|
var lang = localStorage.getItem('slip_lang') || 'fa';
|
|
document.documentElement.lang = lang;
|
|
document.documentElement.dir = lang === 'fa' ? 'rtl' : 'ltr';
|
|
})();
|
|
</script>
|
|
{% block extra_head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<nav class="navbar">
|
|
<div class="nav-container">
|
|
<a href="{% url 'entry' %}" class="nav-logo">
|
|
<img class="logo-icon" src="{% static 'lithium.png' %}" alt="" width="32" height="32">
|
|
<span class="logo-text" data-i18n="app_title">پرینتر لیبل</span>
|
|
</a>
|
|
<div class="nav-links">
|
|
<a href="{% url 'entry' %}" class="nav-link {% block nav_entry_active %}{% endblock %}" data-i18n="data_entry">ثبت اطلاعات</a>
|
|
<a href="{% url 'print_queue' %}" class="nav-link {% block nav_print_active %}{% endblock %}" data-i18n="print_queue">صف چاپ</a>
|
|
</div>
|
|
<div class="nav-actions">
|
|
<div class="nav-setup">
|
|
<a href="{% url 'products' %}" class="nav-link {% block nav_products_active %}{% endblock %}" data-i18n="products">محصولات</a>
|
|
<a href="{% url 'calibrate' %}" class="nav-link" data-i18n="calibrate">کالیبراسیون</a>
|
|
</div>
|
|
<button id="theme-toggle" class="btn btn-ghost" type="button" onclick="toggleTheme()" aria-label="Toggle theme">
|
|
<span id="theme-label">🌙</span>
|
|
</button>
|
|
<button id="lang-toggle" class="btn btn-ghost" type="button" onclick="toggleLanguage()" aria-label="Toggle language">
|
|
<span id="lang-label" class="lang-label">
|
|
<svg class="lang-flag" viewBox="0 0 60 30" aria-hidden="true"><rect width="60" height="30" fill="#012169"/><path d="M0,0 60,30M60,0 0,30" stroke="#fff" stroke-width="6"/><path d="M0,0 60,30M60,0 0,30" stroke="#C8102E" stroke-width="2"/><path d="M30,0v30M0,15h60" stroke="#fff" stroke-width="10"/><path d="M30,0v30M0,15h60" stroke="#C8102E" stroke-width="6"/></svg>
|
|
EN
|
|
</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="main-content">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<script src="{% static 'slips/js/i18n.js' %}"></script>
|
|
{% block extra_scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|