-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
190 lines (177 loc) · 7.13 KB
/
Copy pathindex.html
File metadata and controls
190 lines (177 loc) · 7.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<title>Setly Beta</title>
<link rel="icon" href="images/Favicon.png" type="image/png">
<style>
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');
* {font-family: 'Vazirmatn', sans-serif; margin: 0; padding: 0; box-sizing: border-box;}
body {background: var(--bg); color: var(--text); transition: background 0.3s, color 0.3s;}
:root { --bg: #f4f4f4; --text: #333; --card: white; --primary: #4caf50; }
.dark { --bg: #121212; --text: #f4f4f4; --card: #1e1e1e; }
header, footer {background: var(--card); padding: 1rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}
main {padding: 1rem;}
.card {background: var(--card); padding: 1rem; margin: 0.5rem 0; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; animation: fadeIn 0.3s ease;}
@keyframes fadeIn {from{opacity:0; transform: translateY(10px);} to{opacity:1; transform:translateY(0);}}
button {padding: 0.5rem 1rem; border: none; border-radius: 6px; cursor: pointer; margin: 0 0.2rem; transition: background 0.3s;}
button:hover {opacity: 0.9;}
.primary {background: var(--primary); color: white;}
.danger {background: crimson; color: white;}
#notif {position: fixed; top: -50px; left: 50%; transform: translateX(-50%); background: #4caf50; color: white; padding: 0.7rem 1.5rem; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.3); opacity: 0; transition: all 0.4s;}
#notif.show {top: 20px; opacity: 1;}
.hidden {display: none;}
.tools button {font-size: 0.9rem;}
/* --- UI جدید صفحه لاگین --- */
#login-page {
height: 100vh;
background: linear-gradient(135deg, #4f8df5, #6ca8ff);
display: flex;
justify-content: center;
align-items: center;
}
.login-card {
background: white;
padding: 2rem;
border-radius: 15px;
box-shadow: 0 8px 20px rgba(0,0,0,0.2);
width: 300px;
text-align: center;
animation: fadeIn 0.4s ease;
}
.login-card h1 {
margin-bottom: 1.5rem;
color: #4f8df5;
}
.login-card input {
width: 100%;
padding: 0.7rem;
margin: 0.5rem 0;
border: 1px solid #ccc;
border-radius: 8px;
outline: none;
font-size: 1rem;
}
.login-card button {
width: 100%;
padding: 0.7rem;
margin-top: 0.5rem;
background: #4f8df5;
color: white;
border: none;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
}
.login-card button:hover {
background: #3a76d6;
}
</style>
</head>
<body>
<div id="notif">اوکی!</div>
<!-- صفحه لاگین -->
<div id="login-page">
<div class="login-card">
<h1>Setly Intro</h1>
<input id="username" placeholder="نام کاربری"><br>
<input id="password" type="password" placeholder="رمز عبور"><br>
<button class="primary" onclick="login()">ورود</button>
</div>
</div>
<!-- داشبورد -->
<div id="dashboard" class="hidden">
<header>
<h1>داشبورد</h1>
<div>
<button onclick="toggleTheme()">🌓</button>
<button class="danger" onclick="logout()">خروج</button>
</div>
</header>
<main>
<div>
<input id="task-input" placeholder="تسک جدید...">
<input id="task-time" type="time">
<button class="primary" onclick="addTask()">افزودن</button>
</div>
<div class="tools" style="margin:10px 0;">
<button onclick="formatText('bold')">B</button>
<button onclick="formatText('underline')">U</button>
<button onclick="highlight()">هایلایت</button>
<button onclick="addLink()">🔗</button>
<input type="file" id="file-upload">
</div>
<div id="task-list"></div>
<h3>انجام شدهها</h3>
<div id="done-list"></div>
</main>
<footer>
<div>
<a href="https://t.me/Errorerrrr" target="_blank" title="تلگرام"><img src="https://upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg" width="24"></a>
<a href="https://github.com/f2codes" target="_blank" title="گیتهاب"><img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="24"></a>
</div>
<span>© 2025 Setly</span>
</footer>
</div>
<script>
// تم ذخیره شده
if(localStorage.getItem('theme') === 'dark') document.body.classList.add('dark');
function toggleTheme(){
document.body.classList.toggle('dark');
localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light');
}
function login(){
let u = document.getElementById('username').value;
let p = document.getElementById('password').value;
if(u === 'admin' && p === '1234'){
document.getElementById('login-page').classList.add('hidden');
document.getElementById('dashboard').classList.remove('hidden');
showNotif("خوش آمدید!");
} else alert('نام کاربری یا رمز اشتباه است!');
}
function logout(){
document.getElementById('dashboard').classList.add('hidden');
document.getElementById('login-page').classList.remove('hidden');
showNotif("خارج شدید!");
}
function addTask(){
let txt = document.getElementById('task-input').value.trim();
let time = document.getElementById('task-time').value;
if(!txt) return;
let div = document.createElement('div');
div.className = 'card';
div.contentEditable = true;
div.innerHTML = `${txt} ${time ? '('+time+')':''} <div><button onclick="doneTask(this)">✔</button> <button class="danger" onclick="deleteTask(this)">🗑</button></div>`;
document.getElementById('task-list').appendChild(div);
document.getElementById('task-input').value = '';
document.getElementById('task-time').value = '';
showNotif("تسک اضافه شد!");
}
function doneTask(btn){
let task = btn.closest('.card');
document.getElementById('done-list').appendChild(task);
showNotif("تسک انجام شد!");
}
function deleteTask(btn){
btn.closest('.card').remove();
showNotif("حذف شد!");
}
function showNotif(msg){
let notif = document.getElementById('notif');
notif.textContent = msg;
notif.classList.add('show');
setTimeout(()=> notif.classList.remove('show'), 3000);
}
function formatText(cmd){
document.execCommand(cmd);
}
function highlight(){
document.execCommand('backColor', false, 'yellow');
}
function addLink(){
let url = prompt('آدرس لینک را وارد کنید:');
if(url) document.execCommand('createLink', false, url);
}
</script>
</body>
</html>