-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
216 lines (191 loc) · 7.22 KB
/
Copy pathindex.html
File metadata and controls
216 lines (191 loc) · 7.22 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Display Clock With JavaScript | نمایش ساعت با جاوا اسکریپت</title>
<meta name="description" content="Display Live Clock With JavaScript | نمایش ساعت با جاوا اسکریپت"/>
<!-- Vazirmatn & Inter Fonts -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/vazirmatn-font-face.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap">
<style>
/*
Developed by Amin Arjmand
Site: aminarjmand.com | GitHub: @sibche2013
*/
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Inter', 'Vazirmatn', sans-serif;
background: radial-gradient(circle at 50% 50%, #2e3440 0%, #1a1c23 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #eceff4;
gap: 20px;
}
.board {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
padding: 30px 40px;
text-align: center;
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
max-width: 400px;
width: 90%;
}
h1 {
font-size: 1.8rem;
font-weight: 600;
margin-bottom: 10px;
background: linear-gradient(45deg, #88c0d0, #81a1c1);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
p {
font-size: 0.9rem;
color: #d8dee9;
margin-bottom: 25px;
opacity: 0.8;
}
.clock {
width: 100%;
padding: 15px;
font-family: 'Inter', sans-serif;
font-size: 2.2rem;
font-weight: 600;
color: #88c0d0;
background: rgba(136, 192, 208, 0.1);
border: 1px solid rgba(136, 192, 208, 0.2);
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
outline: none;
}
.clock:hover {
background: rgba(136, 192, 208, 0.2);
box-shadow: 0 0 15px rgba(136, 192, 208, 0.3);
transform: scale(1.02);
}
.clock.stopped {
color: #bf616a;
background: rgba(191, 97, 106, 0.1);
border-color: rgba(191, 97, 106, 0.2);
}
.clock.stopped:hover {
background: rgba(191, 97, 106, 0.2);
box-shadow: 0 0 15px rgba(191, 97, 106, 0.3);
}
.backTo {
font-family: inherit;
font-size: 0.9rem;
padding: 10px 20px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 30px;
color: #d8dee9;
cursor: pointer;
transition: all 0.2s ease;
}
.backTo:hover {
background: rgba(255, 255, 255, 0.1);
color: #ffffff;
}
</style>
</head>
<body>
<div class="board">
<h1>Live Clock</h1>
<p>Click on the clock to Pause / Resume</p>
<button class="clock" onclick="toggleClock();" id="cas">00:00:00</button>
</div>
<button class="backTo" onclick="history.back();">← Back To Previous Page</button>
<script src="JsClock.js"></script>
<div class="floating-nav-container">
<a href="https://demo.aminarjmand.com" class="floating-btn btn-back-home" title="برگشت به داشبورد / Back to Dashboard">
🏠 <span class="nav-text">صفحه مخازن</span>
</a>
<a href="#" id="dynamic-github-btn" target="_blank" class="floating-btn btn-github-repo" title="مشاهده مخزن گیتهاب / View GitHub Repo">
🐙 <span class="nav-text">گیتهاب مخزن</span>
</a>
</div>
<style>
/* استایل دکمههای شناور */
.floating-nav-container {
position: fixed;
bottom: 25px;
left: 25px;
display: flex;
flex-direction: column;
gap: 12px;
z-index: 99999;
direction: rtl; /* برای هماهنگی متن فارسی */
}
.floating-btn {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 18px;
border-radius: 50px;
color: #ffffff !important;
text-decoration: none !important;
font-family: 'Vazirmatn', sans-serif;
font-size: 0.85rem;
font-weight: bold;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-back-home {
background: linear-gradient(135deg, #2c3e50, #34495e);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-github-repo {
background: linear-gradient(135deg, #24292e, #4c5157);
border: 1px solid rgba(255, 255, 255, 0.1);
}
/* افکت هوور */
.floating-btn:hover {
transform: translateY(-4px) scale(1.03);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
/* واکنشگرایی برای موبایل (مخفی کردن متن برای شلوغ نشدن صفحه) */
@media (max-width: 480px) {
.floating-nav-container {
bottom: 15px;
left: 15px;
gap: 8px;
}
.floating-btn {
padding: 12px;
border-radius: 50%;
}
.floating-btn .nav-text {
display: none; /* در موبایل فقط آیکونها نمایش داده میشوند */
}
}
</style>
<script>
// اسکریپت هوشمند برای تشخیص خودکار نام مخزن و ساخت لینک گیتهاب
(function() {
const pathSegments = window.location.pathname.split('/').filter(segment => segment !== "");
// اگر پروژه در سابفولدر بود نام آن را میگیرد، در غیر این صورت نام پیشفرض را خالی میگذارد
const repoName = pathSegments.length > 0 ? pathSegments[0] : "";
const githubBtn = document.getElementById('dynamic-github-btn');
if (repoName) {
// ساخت اتوماتیک لینک گیتهاب با هماهنگی دامین دمو
githubBtn.href = "https://github.com/sibche2013/" + repoName;
} else {
// اگر به هر دلیلی در روت اصلی دمو بود، به پروفایل گیتهاب لینک میشود
githubBtn.href = "https://github.com/sibche2013";
}
})();
</script>
</body>
</html>