-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcms.html
More file actions
280 lines (253 loc) Β· 12.7 KB
/
cms.html
File metadata and controls
280 lines (253 loc) Β· 12.7 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CMS - Content Management System</title>
<link rel="stylesheet" href="cms.css">
<!-- TinyMCE CDN -->
<script src="https://cdn.tiny.cloud/1/7wk42y7r3oq3d5bg1qw7xzhaqjwwjoksdixzqh1ebiuin9p6/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
</head>
<body>
<!-- Header -->
<div class="header">
<div class="header-content">
<div class="logo">π CMS Portal</div>
<div class="nav-buttons">
<span id="user-email" style="color: #F9DC26; margin-right: 15px;"></span>
<button class="btn btn-danger" id="logout-btn" style="display: none;">Logout</button>
</div>
</div>
</div>
<div class="container">
<!-- Login Form -->
<div id="login-section" class="auth-container">
<div class="auth-form">
<h2>Login to CMS</h2>
<div id="login-alert"></div>
<form id="login-form">
<div class="form-group">
<label for="login-email">Email Address</label>
<input type="email" id="login-email" required>
</div>
<div class="form-group">
<label for="login-password">Password</label>
<input type="password" id="login-password" required>
</div>
<button type="submit" class="btn btn-primary" style="width: 100%;">Login</button>
</form>
<div class="auth-switch">
<p>Don't have an account? <a href="#" id="show-register">Register here</a></p>
</div>
</div>
</div>
<!-- Register Form -->
<div id="register-section" class="auth-container hidden">
<div class="auth-form">
<h2>Create Account</h2>
<div id="register-alert"></div>
<form id="register-form">
<div class="form-group">
<label for="reg-name">Full Name</label>
<input type="text" id="reg-name" required>
</div>
<div class="form-group">
<label for="reg-email">Email Address</label>
<input type="email" id="reg-email" required>
</div>
<div class="form-group">
<label for="reg-password">Password</label>
<input type="password" id="reg-password" required>
</div>
<div class="form-group">
<label for="reg-confirm">Confirm Password</label>
<input type="password" id="reg-confirm" required>
</div>
<button type="submit" class="btn btn-primary" style="width: 100%;">Create Account</button>
</form>
<div class="auth-switch">
<p>Already have an account? <a href="#" id="show-login">Login here</a></p>
</div>
</div>
</div>
<!-- Dashboard -->
<div id="dashboard-section" class="dashboard">
<div class="dashboard-header">
<h1 class="dashboard-title">Welcome to Content Management System</h1>
<div class="user-info">
<span id="user-role-display"></span> | <span id="user-name-display"></span>
</div>
</div>
<div class="dashboard-grid">
<div class="dashboard-card" onclick="showSection('blog-management')">
<div class="card-title">
<div class="card-icon">π</div>
Blog Management
</div>
<p>Create, edit, and manage blog posts with rich text editor</p>
<button class="btn btn-primary" style="margin-top: 15px;">Manage Posts</button>
</div>
<div class="dashboard-card" onclick="showSection('gallery-management')">
<div class="card-title">
<div class="card-icon">πΈ</div>
Gallery Management
</div>
<p>Upload and manage gallery images with categories</p>
<button class="btn btn-primary" style="margin-top: 15px;">Manage Gallery</button>
</div>
<div class="dashboard-card" id="payment-card" onclick="showSection('payment-summary')" style="display: none;">
<div class="card-title">
<div class="card-icon">π°</div>
Payment Summary
</div>
<p>View payment reports and financial data (Super Admin Only)</p>
<button class="btn btn-primary" style="margin-top: 15px;">View Payments</button>
</div>
</div>
</div>
<!-- Blog Management Section -->
<div id="blog-management" class="content-section">
<div class="section-header">
<h2 class="section-title">Blog Management</h2>
<div>
<button class="btn btn-secondary" onclick="showDashboard()">β Back to Dashboard</button>
<button class="btn btn-primary" onclick="showCreatePost()">Create New Post</button>
</div>
</div>
<!-- Create/Edit Post Form -->
<div id="post-form" class="hidden">
<h3 id="post-form-title">Create New Blog Post</h3>
<div id="post-alert"></div>
<form id="blog-post-form">
<div class="form-group">
<label for="post-title">Post Title</label>
<input type="text" id="post-title" required>
</div>
<div class="form-group">
<label for="post-excerpt">Excerpt (Short Description)</label>
<textarea id="post-excerpt" rows="3" style="width: 100%; padding: 10px; border: 2px solid #ddd; border-radius: 5px;"></textarea>
</div>
<div class="form-group">
<label for="post-content">Content</label>
<textarea id="post-content" class="editor-content"></textarea>
</div>
<div style="display: flex; gap: 10px; margin-top: 20px;">
<button type="submit" class="btn btn-primary">Save Post</button>
<button type="button" class="btn btn-secondary" onclick="cancelPost()">Cancel</button>
</div>
</form>
</div>
<!-- Posts List -->
<div id="posts-list">
<h3>Existing Blog Posts</h3>
<div id="posts-container">
<!-- Posts will be loaded here -->
</div>
</div>
</div>
<!-- Gallery Management Section -->
<div id="gallery-management" class="content-section">
<div class="section-header">
<h2 class="section-title">Gallery Management</h2>
<div style="display: flex; gap: 10px;">
<button class="btn btn-secondary" onclick="showDashboard()">β Back to Dashboard</button>
<button class="btn btn-primary" onclick="toggleUploadForm()">Upload Images</button>
</div>
</div>
<!-- Category Management -->
<div class="category-section">
<h3 style="color: #1D5050; margin-bottom: 15px;">π Manage Categories</h3>
<div class="category-form">
<div class="form-group" style="flex: 1; margin-bottom: 0;">
<label for="new-category">Create New Category</label>
<input type="text" id="new-category" placeholder="Enter category name">
</div>
<button class="btn btn-primary" onclick="addCategory()">Add Category</button>
</div>
<div class="category-list" id="category-list">
<!-- Categories will be loaded here -->
</div>
</div>
<!-- Upload Form -->
<div id="upload-form" class="upload-form">
<h3 style="color: #1D5050; margin-bottom: 15px;">π€ Upload Images</h3>
<div class="form-group">
<label for="upload-category">Select Category</label>
<select id="upload-category" required>
<option value="">Choose a category...</option>
</select>
</div>
<div class="upload-area" onclick="document.getElementById('gallery-upload').click()">
<input type="file" id="gallery-upload" multiple accept="image/*" style="display: none;">
<div style="font-size: 48px; color: #F9DC26; margin-bottom: 15px;">πΈ</div>
<h4 style="color: #1D5050; margin-bottom: 10px;">Upload Images</h4>
<p style="color: #666;">Click here or drag and drop images to upload</p>
</div>
<div style="display: flex; gap: 10px; margin-top: 15px;">
<button class="btn btn-primary" onclick="handleUpload()">Upload Selected Images</button>
<button class="btn btn-secondary" onclick="toggleUploadForm()">Cancel</button>
</div>
</div>
<div id="gallery-alert"></div>
<!-- Category Filter -->
<div class="category-filter">
<h3 style="color: #1D5050; margin-bottom: 15px;">π Filter by Category</h3>
<div class="category-list" id="filter-categories">
<div class="category-tag active" onclick="filterByCategory('all')">
All Images
</div>
</div>
</div>
<!-- Gallery Grid -->
<div class="gallery-grid" id="gallery-container">
<!-- Gallery images will be loaded here -->
</div>
</div>
</div>
<!-- Payment Summary Section -->
<div id="payment-summary" class="content-section">
<div class="section-header">
<h2 class="section-title">Payment Summary</h2>
<button class="btn btn-secondary" onclick="showDashboard()">β Back to Dashboard</button>
</div>
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px; margin-bottom: 20px;">
<h3 style="color: #1D5050;">Financial Overview</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 15px;">
<div style="background: white; padding: 20px; border-radius: 8px; text-align: center;">
<div style="font-size: 24px; font-weight: bold; color: #28a745;">β¦2,450,000</div>
<div style="color: #666;">Total Revenue</div>
</div>
<div style="background: white; padding: 20px; border-radius: 8px; text-align: center;">
<div style="font-size: 24px; font-weight: bold; color: #F9DC26;">125</div>
<div style="color: #666;">Total Transactions</div>
</div>
<div style="background: white; padding: 20px; border-radius: 8px; text-align: center;">
<div style="font-size: 24px; font-weight: bold; color: #1D5050;">β¦19,600</div>
<div style="color: #666;">Average Transaction</div>
</div>
</div>
</div>
<table class="payment-table">
<thead>
<tr>
<th>Date</th>
<th>Donor Name</th>
<th>Amount</th>
<th>Type</th>
<th>Status</th>
</tr>
</thead>
<tbody id="payment-table-body">
<!-- Payment data will be loaded here -->
</tbody>
</table>
</div>
</div>
<!-- Loading Indicator -->
<div id="loading-overlay" class="loading-overlay hidden">
<div class="loading-spinner"></div>
<div class="loading-text">Loading...</div>
</div>
<script src="cms.js"></script>
</body>
</html>