-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
125 lines (97 loc) · 5.27 KB
/
index.html
File metadata and controls
125 lines (97 loc) · 5.27 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blog Post</title>
<link rel="stylesheet" href="./css/output.css">
</head>
<body>
<div class="container m-auto h-screen p-4 w-screen">
<section id="heading" class="mx-auto text-center">
<h1 class="font-bold text-4xl p-4">Simple Blog Manager</h1>
<h3 class="font-medium text-2xl p-2 px-6">Moden Blog Post Management</h3>
</section>
<section id="main-body" class="flex h-[80%] space-x-3.5">
<!-- Blog Listing Side Bar -->
<div class="w-2/6 bg-amber-100 h-5/5 rounded-3xl p-4 flex flex-col">
<h4 class="font-medium">Blog Posts</h4>
<h5 id="postsCount" class="font-light mx-3">
<!-- The number of posts will be dynamically added here -->
</h5>
<hr class="mx-2 my-1">
<!-- Posts listing -->
<div id="postsOuter" class="flex-grow overflow-y-scroll">
<div id="postsList" class="space-y-3">
<!-- Posts will be dynamically added here -->
</div>
</div>
<!-- Empty State -->
<div id="emptyState" class="text-center py-16">
<div class="p-4 bg-gray-100 mx-auto mb-4 flex items-center justify-center">
<i data-lucide="library" class="w-2 h-2 text-gray-400"></i>
</div>
<h3 class="text-xl font-semibold text-gray-900 mb-2">You have 0 Posts</h3>
<p class="text-gray-600">Add your first post to get started managing your blog</p>
</div>
</div>
<!-- Blog Post Viewing Section -->
<div id="outPutDiv" class="w-4/6 bg-amber-200 h-5/5 rounded-3xl p-4">
<!-- A post will be viewed in here -->
</div>
</section>
<div id="outerDialog" class="fixed inset-0 z-40 bg-indigo-950/96 hidden items-center justify-center">
<div id="postDialog"
class="bg-amber-100 rounded-4xl text-center shadow-lg max-w-[55%] w-auto pt-6 px-2 pb-1 mt-35 mx-auto">
<div class="flex bg-blue-500 justify-between">
<span>Header of Dialog </span><a onclick="closeDialog()" class="underline cursor-pointer"
type="">Close</a>
</div>
<!-- Dialog Content -->
<div>
<!-- Dialog Content Inside -->
<form id="postForm" onsubmit="addPost">
<!-- insert hidden input field to hold the post-id variable -->
<input type="hidden" id="post-id" name="post-id">
<div class="innerDiv">
<div class="flex justify-between">
<label for="Title">Image URL</label>
<input placeholder="Image URL" name="post-image" id="post-image"
class="w-[60%] px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="flex justify-between">
<label for="Title">Post Title</label>
<input placeholder="The Title" name="post-title" id="post-title"
class="w-[60%] px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="flex justify-between">
<label for="Title">Post Content</label>
<textarea name="post-content" placeholder="ENTER CONTENT HERE"
class="px-4 py-2 border w-[60%] border-gray-300 rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-blue-500"
id="post-content" rows="10"></textarea>
</div>
<div class="flex justify-between">
<label for="Author">Author Full Name</label>
<input type="text" placeholder="FirstName SurName" name="post-author"
class="w-[60%] px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
id="post-author">
</div>
<div>
<button type="submit" onclick="closeDialog()"
class="bg-blue-600 text-white m-2 px-3 py-1 rounded text-sm">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<footer class="justify-center flex p-3 relative">
<span>Copyright © Edwin Mwaniki 2025</span>
</footer>
</div>
</body>
<script type="module" src="./src/index.js"></script>
<script>
</script>
</html>