Files
django/templates/base.html

39 lines
2.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% load static %}
<!doctype html>
<html lang="fa" dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}مدرسه‌یار{% endblock %}</title>
<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=Vazirmatn:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
<div class="app-shell">
{% if user.is_authenticated %}
<aside class="sidebar">
<a class="brand" href="{% url 'dashboard' %}">
<span class="brand-mark">م</span>
<span><strong>مدرسه‌یار</strong><small>مدیریت هوشمند مدرسه</small></span>
</a>
<nav class="main-nav">
<a class="nav-link {% if request.resolver_match.url_name == 'dashboard' %}active{% endif %}" href="{% url 'dashboard' %}"><span>▦</span> داشبورد</a>
<a class="nav-link {% if request.resolver_match.url_name == 'student_add' %}active{% endif %}" href="{% url 'student_add' %}"><span>+</span> ثبت دانش‌آموز</a>
</nav>
<div class="sidebar-footer">
<div class="profile-mini"><span class="avatar">{{ user.username|first|upper }}</span><span><b>{{ user.username }}</b><small>مدیر مدرسه</small></span></div>
<form action="{% url 'logout' %}" method="post">{% csrf_token %}<button class="logout-link" type="submit">خروج از حساب <span>↪</span></button></form>
</div>
</aside>
{% endif %}
<main class="main-content {% if not user.is_authenticated %}full-content{% endif %}">
{% if messages %}<div class="messages">{% for message in messages %}<div class="message {{ message.tags }}">{{ message }}</div>{% endfor %}</div>{% endif %}
{% block content %}{% endblock %}
</main>
</div>
<script src="{% static 'js/app.js' %}"></script>
</body>
</html>