-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.html
More file actions
211 lines (177 loc) · 4.57 KB
/
Copy pathdashboard.html
File metadata and controls
211 lines (177 loc) · 4.57 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
---
layout: default
title: "Dashboard"
permalink: /dashboard/
---
<section id="dashboard">
<h1>Welcome to Your LLmachine Dashboard</h1>
<p class="subtext">Manage your activity, explore resources, and stay productive with personalized tools and insights.</p>
<div class="dashboard-grid">
<div class="dashboard-card wide">
<h3>Your Recent Projects</h3>
<ul id="recent-projects"></ul>
<button onclick="clearRecentProjects()" class="card-button danger">Clear All</button>
</div>
<div class="dashboard-card">
<h3>Home</h3>
<p>Return to the main site to explore features and services.</p>
<a href="/" class="card-button">Go to Home</a>
</div>
<div class="dashboard-card">
<h3>Profile</h3>
<p>Manage your account details and user information.</p>
<button onclick="alert('Profile feature coming soon!')" class="card-button">View Profile</button>
</div>
<div class="dashboard-card">
<h3>Settings</h3>
<p>Customize your experience and adjust preferences.</p>
<button onclick="alert('Settings feature coming soon!')" class="card-button">Open Settings</button>
</div>
<div class="dashboard-card">
<h3>Log Out</h3>
<p>Securely sign out of your account.</p>
<button class="card-button logout" onclick="logoutUser()">Log Out</button>
</div>
</div>
</section>
<script>
function logoutUser() {
alert("You have been logged out.");
localStorage.removeItem("userLoggedIn");
window.location.href = "/";
}
function storeRecentProject(title, url) {
const history = JSON.parse(localStorage.getItem("recentProjects") || "[]");
const updated = [{ title, url }, ...history.filter(p => p.url !== url)];
localStorage.setItem("recentProjects", JSON.stringify(updated.slice(0, 10)));
}
function removeRecentProject(url) {
const projects = JSON.parse(localStorage.getItem("recentProjects") || "[]");
const filtered = projects.filter(p => p.url !== url);
localStorage.setItem("recentProjects", JSON.stringify(filtered));
showRecentProjects();
}
function clearRecentProjects() {
localStorage.removeItem("recentProjects");
showRecentProjects();
}
function showRecentProjects() {
const container = document.getElementById("recent-projects");
const items = JSON.parse(localStorage.getItem("recentProjects") || "[]");
if (!items.length) {
container.innerHTML = "<li>No recent activity yet.</li>";
return;
}
container.innerHTML = items.map(p => `
<li>
<a href="${p.url}" target="_blank" title="Open project">${p.title}</a>
<button onclick="removeRecentProject('${p.url}')" title="Remove">❌</button>
</li>
`).join("");
}
document.addEventListener("DOMContentLoaded", showRecentProjects);
</script>
<style>
#dashboard {
padding: 40px 20px;
text-align: center;
background-color: #1f1f1f;
color: #f0f0f0;
}
#dashboard h1 {
font-size: 2.2em;
color: #4CAF50;
}
.subtext {
color: #ccc;
margin-bottom: 30px;
font-size: 1.1em;
}
.dashboard-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 25px;
max-width: 1000px;
margin: auto;
}
.dashboard-card {
background-color: #2c2c2c;
border-radius: 10px;
padding: 25px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
transition: transform 0.3s ease;
}
.dashboard-card:hover {
transform: translateY(-5px);
}
.dashboard-card.wide {
grid-column: span 2;
}
.dashboard-card h3 {
margin-top: 0;
color: #00BFFF;
}
.dashboard-card p {
color: #ccc;
font-size: 0.95em;
}
.card-button {
display: inline-block;
margin-top: 15px;
padding: 10px 18px;
font-weight: bold;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
text-decoration: none;
cursor: pointer;
transition: background 0.3s;
}
.card-button:hover {
background-color: #3e8e41;
}
.card-button.logout {
background-color: #e74c3c;
}
.card-button.logout:hover {
background-color: #c0392b;
}
.card-button.danger {
background-color: #555;
margin-top: 10px;
}
.card-button.danger:hover {
background-color: #777;
}
#recent-projects {
list-style: none;
padding: 0;
margin-top: 10px;
text-align: left;
}
#recent-projects li {
background: #333;
padding: 10px;
border-radius: 6px;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
align-items: center;
}
#recent-projects a {
color: #4FC3F7;
font-weight: bold;
text-decoration: none;
}
#recent-projects a:hover {
text-decoration: underline;
}
#recent-projects button {
background: none;
border: none;
color: #ff4d4d;
font-size: 1.1em;
cursor: pointer;
}
</style>