mirror of
https://github.com/rudy3333/eversync.git
synced 2025-07-04 18:16:01 +00:00
146 lines
No EOL
5.3 KiB
HTML
146 lines
No EOL
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Eversync</title>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
|
{% load static %}
|
|
<link rel="icon" href="{% static 'favicon.ico' %}">
|
|
<link rel="stylesheet" href="{% static 'index-style.css' %}">
|
|
<link rel="stylesheet" href="{% static 'register-style.css' %}" ">
|
|
{% block scripts %}
|
|
{% include "sentry_replay.html" %}
|
|
{% endblock %}
|
|
|
|
|
|
<style>
|
|
.container {
|
|
display: flex;
|
|
gap: 30px;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.welcome-box {
|
|
flex: 0 0 250px;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
max-width: 250px;
|
|
}
|
|
|
|
.task-box {
|
|
flex: 1;
|
|
}
|
|
|
|
.task {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.task form {
|
|
display: inline;
|
|
}
|
|
|
|
@media (max-width: 700px) {
|
|
.container {
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.welcome-box {
|
|
flex: none;
|
|
width: auto;
|
|
max-width: 90vw;
|
|
margin: 0 0 20px 0;
|
|
padding: 15px;
|
|
}
|
|
|
|
.task-box {
|
|
width: 100%;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="header">
|
|
<div class="header-content">
|
|
<a href="/">
|
|
<img src="{% static 'eversync2.png' %}" alt="Eversync Logo" style="height: 80px; margin-right: 10px; display: flex; align-items: center; gap: 5px;">
|
|
</a>
|
|
<a href="/" class="logo">eversync</a>
|
|
<div class="nav-links" style="position: relative;">
|
|
<div class="dropdown">
|
|
<button class="dropdown-toggle" style="background: none; border: none; color: white; font-size: 16px; cursor: pointer;">
|
|
Welcome, {{ user.username }} <i class="fas fa-caret-down"></i>
|
|
</button>
|
|
<div class="dropdown-menu" style="display: none; position: absolute; right: 0; background-color: #333; border: 1px solid #444; border-radius: 4px; padding: 10px; width: 184px;">
|
|
<form action="{% url 'manage' %}" method="post" style="margin: 0;">
|
|
{% csrf_token %}
|
|
<button type="submit" class="logout-button" style="background-color: transparent; color: white; border: none; cursor: pointer;">Manage Account</button>
|
|
</form>
|
|
<form action="{% url 'logoutz' %}" method="post" style="margin: 0;">
|
|
{% csrf_token %}
|
|
<button type="submit" class="logout-button" style="background-color: transparent; color: white; border: none; cursor: pointer;">Log Out</button>
|
|
</form>
|
|
<button id="themeToggle" class="logout-button" style="background-color: transparent; color: white; border: none; cursor: pointer;">Toggle Dark Mode</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="register-box task-box">
|
|
<h2>My Tasks</h2>
|
|
<a href="{% url 'add_task' %}">
|
|
<button>Add Task</button>
|
|
</a>
|
|
{% for task in tasks %}
|
|
<div class="task">
|
|
<div>
|
|
<form method="POST" action="{% url 'task_complete' task.id %}" style="display: inline;">
|
|
{% csrf_token %}
|
|
<input type="checkbox" class="pretty-checkbox" onchange="this.form.submit()" {% if task.completed %}checked{% endif %}>
|
|
</form>
|
|
{{ task.title }}
|
|
</div>
|
|
<form method="POST" action="{% url 'delete_task' task.id %}">
|
|
{% csrf_token %}
|
|
<button type="submit">Delete</button>
|
|
</form>
|
|
</div>
|
|
{% empty %}
|
|
<p>No tasks yet.</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
const toggle = document.querySelector('.dropdown-toggle');
|
|
const menu = document.querySelector('.dropdown-menu');
|
|
toggle.addEventListener('click', function () {
|
|
menu.style.display = menu.style.display === 'block' ? 'none' : 'block';
|
|
});
|
|
});
|
|
const toggle = document.getElementById("themeToggle");
|
|
const root = document.documentElement;
|
|
|
|
if (localStorage.getItem("theme") === "dark") {
|
|
root.classList.add("dark");
|
|
}
|
|
|
|
toggle.addEventListener("click", () => {
|
|
root.classList.toggle("dark");
|
|
if (root.classList.contains("dark")) {
|
|
localStorage.setItem("theme", "dark");
|
|
} else {
|
|
localStorage.setItem("theme", "light");
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |