summaryrefslogtreecommitdiff
path: root/templates/layouts/main.django
diff options
context:
space:
mode:
authorBobby <[email protected]>2025-12-24 17:17:15 +0530
committerBobby <[email protected]>2025-12-24 17:17:15 +0530
commitd5ea2aa824eee4b7e2d169d21da0107d057e7bc6 (patch)
treee608fea8cf91d6915b7b6ce5eb46896dbdc2ad79 /templates/layouts/main.django
parentb77d75f05fb2059389c05f6c01484e0cd12e796e (diff)
downloadlain-d5ea2aa824eee4b7e2d169d21da0107d057e7bc6.tar.xz
lain-d5ea2aa824eee4b7e2d169d21da0107d057e7bc6.zip
feat: Implement API endpoints for email details and actions, and refactor email preview for client-side rendering with Shadow DOM.
Diffstat (limited to 'templates/layouts/main.django')
-rw-r--r--templates/layouts/main.django55
1 files changed, 7 insertions, 48 deletions
diff --git a/templates/layouts/main.django b/templates/layouts/main.django
index 2ca45fd..af46e27 100644
--- a/templates/layouts/main.django
+++ b/templates/layouts/main.django
@@ -1,55 +1,14 @@
-{% extends 'layouts/generic.django' %} {% block body %}
+{% extends 'layouts/generic.django' %}
+
+{% block body %}
{% include 'partials/navbar.django' %}
<main>
{% block content %}
{% endblock %}
</main>
-{% endblock %} {% block scripts %}
- <script>
- document.addEventListener('DOMContentLoaded', function () {
- // Handle dropdown clicks
- document.querySelectorAll('.options-subitem > a').forEach(function (item) {
- item.addEventListener('click', function (e) {
- e.preventDefault()
- const parent = this.parentElement
-
- if (parent.classList.contains('disabled')) {
- return
- }
-
- document.querySelectorAll('.options-subitem.open').forEach(function (other) {
- if (other !== parent) {
- other.classList.remove('open')
- }
- })
-
- parent.classList.toggle('open')
- })
- })
-
- document.addEventListener('click', function (e) {
- if (!e.target.closest('.options-subitem')) {
- document.querySelectorAll('.options-subitem.open').forEach(function (item) {
- item.classList.remove('open')
- })
- }
- })
-
- // Toggle search filters
- const toggleBtn = document.getElementById('toggle-filters')
- const filters = document.getElementById('search-filters')
-
- if (toggleBtn && filters) {
- toggleBtn.addEventListener('click', function (e) {
- e.preventDefault()
- if (filters.style.display === 'none') {
- filters.style.display = 'block'
- } else {
- filters.style.display = 'none'
- }
- })
- }
- })
- </script>
+{% endblock %}
+
+{% block scripts %}
+ <script src="{% static 'js/dropdown.js' %}"></script>
{% endblock %}