-
Notifications
You must be signed in to change notification settings - Fork 0
/
community.html
132 lines (120 loc) · 3.97 KB
/
community.html
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
<!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="css/community.css" />
<link rel="stylesheet" href="css/navbar.css" />
<title>Community</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css"
rel="stylesheet"
/>
</head>
<body>
<!-- Modal -->
<div
class="modal fade"
id="textareaModal"
tabindex="-1"
aria-labelledby="textareaModalLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="textareaModalLabel">
Create post
</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id="imageForm">
<label for="caption"></label>
<textarea
class="form-control"
id="caption"
rows="3"
placeholder="Share your insights..."
></textarea>
<label for="image"></label>
<input
type="file"
class="form-control-file"
id="image"
accept="image/*"
required
/>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
<button type="submit" data-bs-dismiss="modal" class="btn btn-primary">Upload</button>
</form>
</div>
</div>
</div>
</div>
<div class="container">
<h4 class="mt-3 mb-0">Community</h4>
<!-- Form to trigger the modal -->
<div class="mx-3 my-0">
<label for="caption"></label>
<!-- Trigger the modal on textarea click -->
<textarea
class="form-control"
id="caption"
rows="2"
placeholder="Share your insights..."
data-toggle="modal"
data-target="#textareaModal"
></textarea>
</div>
</div>
<div class="container mt-3 mb-0">
<h4>Posts</h4>
<div class="image-container" id="imageContainer"></div>
</div>
<!--Footer-->
<nav class="navbar fixed-bottom navbar-expand-lg navbar-dark">
<div class="container">
<a class="navbar-brand" href="community.html">
<i class="bi bi-people"></i>
</a>
<a class="navbar-brand" href="journal.html">
<i class="bi bi-list-task"></i>
</a>
<a class="navbar-brand" href="newcrop.html">
<i class="bi bi-house-door"></i>
</a>
<a class="navbar-brand" href="weather.html">
<i class="bi bi-cloud-sun"></i>
</a>
</div>
</nav>
<!-- Firebase JavaScript SDK -->
<script src="https://www.gstatic.com/firebasejs/9.6.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.6.0/firebase-storage-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.6.0/firebase-firestore-compat.js"></script>
<script src="js/community.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>