-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
146 lines (141 loc) · 5.83 KB
/
Copy pathindex.html
File metadata and controls
146 lines (141 loc) · 5.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./style.css" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=Pompiere&family=Raleway:ital,wght@0,100..900;1,100..900&family=Rubik+80s+Fade&display=swap"
rel="stylesheet"
/>
<title>Blog</title>
</head>
<body>
<header>
<nav class="navbar bg-body-tertiary position-relative">
<div
class="container-fluid d-flex justify-content-center position-relative"
>
<h1 class="m-0">Blog</h1>
<button
class="btn btn-light position-absolute end-0 me-3"
id="create-post"
data-bs-toggle="modal"
data-bs-target="#createPostModal"
>
Create Post
</button>
</div>
</nav>
</header>
<main class="main mt-4 w-100">
<!-- Blog Posts Display Area -->
<div class="container mt-4" id="blog-post">
<span class="text-center text-muted d-block">
There are no posts yet — please create one by pressing
<strong>Create Post</strong>.
</span>
</div>
</main>
<!-- Modal -->
<div
class="modal fade"
id="createPostModal"
tabindex="-1"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title w-100 text-center">
Create New Post
</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<!-- actual blog post -->
<form id="postForm">
<div class="mb-3">
<label for="titleInput" class="form-label"
>Title</label
>
<input
type="text"
class="form-control"
id="titleInput"
name="title"
placeholder="Enter title here"
/>
<span
class="title-error text-danger"
id="titleError"
></span>
</div>
<div class="mb-3">
<label for="contentInput" class="form-label"
>Content</label
>
<textarea
class="form-control"
id="contentInput"
name="content"
rows="5"
placeholder="Enter content here"
></textarea>
<span
class="content-error text-danger"
id="contentError"
></span>
</div>
</form>
</div>
<!-- saving and closing buttons for the modal -->
<div class="modal-footer justify-content-center">
<button
type="button"
class="btn btn-secondary"
data-bs-dismiss="modal"
>
Cancel
</button>
<button
type="button"
class="btn btn-primary"
id="savePostBtn"
>
Save Post
</button>
</div>
</div>
</div>
</div>
<footer class="">
<button id="theme-toggle" class="btn">
<i id="theme-icon" class="bi bi-sun-fill"></i>
</button>
</footer>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI"
crossorigin="anonymous"
></script>
<script src="./index.js"></script>
</body>
</html>