-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommunity.html
More file actions
executable file
·1015 lines (927 loc) · 39.8 KB
/
Copy pathcommunity.html
File metadata and controls
executable file
·1015 lines (927 loc) · 39.8 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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Community — PawsConnect</title>
<link href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap" rel="stylesheet"/>
<style>
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
:root {
--forest: #1a3a2a;
--moss: #2d5a3d;
--leaf: #4a8c5c;
--sage: #7ab893;
--mist: #c8e6d0;
--cream: #f5f0e8;
--paper: #fdfdf8;
--warm: #f9f4ec;
--sun: #e8a020;
--text: #1a2a1e;
--mid: #3d5a45;
--light: #6b8f74;
--sky: #e8f4f0;
}
html { scroll-behavior:smooth; }
body {
font-family:'DM Sans', sans-serif;
background:var(--paper);
color:var(--text);
overflow-x:hidden;
}
/* subtle grain */
body::after {
content:''; position:fixed; inset:0;
pointer-events:none; z-index:999;
background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
opacity:0.4;
}
/* ── NAV ── */
nav {
position:fixed; top:0; left:0; right:0; z-index:200;
padding:1.1rem 4rem;
display:flex; align-items:center; justify-content:space-between;
background:rgba(253,253,248,0.9);
backdrop-filter:blur(14px);
border-bottom:1px solid rgba(74,140,92,0.1);
transition:box-shadow 0.3s;
}
.nav-logo { display:flex; align-items:center; gap:0.55rem; text-decoration:none; }
.paw-icon {
width:36px; height:36px; background:var(--leaf);
border-radius:50% 50% 50% 20%;
display:flex; align-items:center; justify-content:center;
font-size:1.1rem; transform:rotate(-15deg); transition:transform 0.3s;
}
.nav-logo:hover .paw-icon { transform:rotate(5deg) scale(1.1); }
.nav-logo span { font-family:'Lora', serif; font-size:1.4rem; color:var(--forest); font-weight:600; }
.nav-logo span em { font-style:italic; color:var(--leaf); }
.nav-links { display:flex; gap:2rem; list-style:none; align-items:center; }
.nav-links a {
text-decoration:none; color:var(--mid);
font-size:0.88rem; font-weight:400;
position:relative; transition:color 0.2s;
}
.nav-links a::after {
content:''; position:absolute; bottom:-3px; left:0;
width:0; height:2px; background:var(--leaf);
transition:width 0.3s; border-radius:2px;
}
.nav-links a:hover { color:var(--forest); }
.nav-links a:hover::after, .nav-links a.active::after { width:100%; }
.nav-links a.active { color:var(--leaf); }
.nav-cta {
background:var(--forest); color:var(--paper) !important;
padding:0.5rem 1.3rem; border-radius:100px;
transition:background 0.2s !important;
}
.nav-cta::after { display:none !important; }
.nav-cta:hover { background:var(--leaf) !important; }
/* ── HERO BANNER ── */
.hero-banner {
padding: 7rem 4rem 3.5rem;
background: linear-gradient(175deg, #1a3a2a 0%, #2d5a3d 55%, #3d7a50 100%);
position: relative; overflow: hidden; text-align: center;
}
/* animated leaves */
.leaf-float {
position:absolute; font-size:1.5rem;
opacity:0.12; pointer-events:none;
animation: leafDrift linear infinite;
}
@keyframes leafDrift {
from { transform: translateY(100vh) rotate(0deg); opacity:0; }
10% { opacity:0.15; }
90% { opacity:0.12; }
to { transform: translateY(-10vh) rotate(360deg); opacity:0; }
}
/* soft radial glow */
.hero-banner::before {
content:'';
position:absolute; inset:0;
background: radial-gradient(ellipse 70% 60% at 50% 80%, rgba(122,184,147,0.18) 0%, transparent 70%);
}
.banner-inner { position:relative; z-index:1; max-width:680px; margin:0 auto; }
.banner-tag {
display:inline-flex; align-items:center; gap:0.5rem;
background:rgba(255,255,255,0.1);
border:1px solid rgba(255,255,255,0.15);
color:var(--mist); font-size:0.75rem; font-weight:500;
letter-spacing:0.08em; text-transform:uppercase;
padding:0.4rem 1rem; border-radius:100px;
margin-bottom:1.5rem;
}
.banner-title {
font-family:'Lora', serif;
font-size:clamp(2.2rem, 5vw, 3.8rem);
color:#fdfdf8; line-height:1.2; margin-bottom:1rem;
}
.banner-title em { font-style:italic; color:var(--sage); }
.banner-sub {
font-size:1rem; color:rgba(200,230,208,0.85);
font-weight:300; line-height:1.8; max-width:520px;
margin:0 auto 2rem;
}
.banner-actions { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }
.btn-light {
background:var(--paper); color:var(--forest);
padding:0.8rem 2rem; border-radius:100px;
font-size:0.92rem; font-weight:500;
border:none; cursor:pointer; transition:all 0.25s;
display:inline-flex; align-items:center; gap:0.5rem;
font-family:'DM Sans', sans-serif; text-decoration:none;
}
.btn-light:hover { background:var(--mist); transform:translateY(-2px); }
.btn-ghost {
background:transparent; color:var(--mist);
padding:0.8rem 2rem; border-radius:100px;
font-size:0.92rem; font-weight:500;
border:1.5px solid rgba(255,255,255,0.25);
cursor:pointer; transition:all 0.25s;
display:inline-flex; align-items:center; gap:0.5rem;
font-family:'DM Sans', sans-serif; text-decoration:none;
}
.btn-ghost:hover { border-color:var(--sage); color:var(--sage); transform:translateY(-2px); }
/* ── NATURE GUIDELINES STRIP ── */
.guidelines-strip {
background:var(--warm);
border-bottom:1px solid rgba(74,140,92,0.1);
padding:1rem 4rem;
display:flex; align-items:center; gap:0; flex-wrap:wrap;
justify-content:center;
}
.guideline-pill {
display:flex; align-items:center; gap:0.4rem;
font-size:0.78rem; color:var(--mid); font-weight:400;
padding:0.4rem 1rem; border-right:1px solid var(--mist);
}
.guideline-pill:last-child { border-right:none; }
.guideline-pill .pill-icon { font-size:0.9rem; }
.guideline-pill.no { color:#b45309; }
/* ── MAIN LAYOUT ── */
.page-body {
max-width:1100px; margin:0 auto;
padding:3rem 4rem;
display:grid;
grid-template-columns:1fr 280px;
gap:3rem;
align-items:start;
}
/* ── FEED ── */
.feed-col {}
.feed-header {
display:flex; align-items:center; justify-content:space-between;
margin-bottom:2rem; flex-wrap:wrap; gap:1rem;
}
.feed-title {
font-family:'Lora', serif;
font-size:1.4rem; color:var(--forest); font-weight:600;
}
.feed-title em { font-style:italic; color:var(--leaf); }
.category-tabs { display:flex; gap:0.4rem; flex-wrap:wrap; }
.tab-btn {
padding:0.4rem 0.9rem; border-radius:100px;
font-size:0.78rem; font-weight:500;
border:1.5px solid var(--mist);
background:var(--warm); color:var(--mid);
cursor:pointer; transition:all 0.2s;
font-family:'DM Sans', sans-serif;
}
.tab-btn:hover { border-color:var(--sage); color:var(--forest); }
.tab-btn.active { background:var(--forest); color:var(--paper); border-color:var(--forest); }
/* ── EMPTY FEED STATE ── */
.feed-empty {
display:flex; flex-direction:column; align-items:center;
text-align:center; padding:4rem 2rem;
animation:fadeUp 0.6s ease;
}
.empty-ring {
width:160px; height:160px;
border-radius:50%;
background:linear-gradient(135deg, var(--sky), var(--mist));
display:flex; align-items:center; justify-content:center;
font-size:4rem; margin-bottom:2rem;
position:relative;
animation:gentleBob 5s ease-in-out infinite;
}
@keyframes gentleBob { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-8px);} }
.empty-ring::before {
content:'';
position:absolute; inset:-10px;
border-radius:50%;
border:1.5px dashed var(--sage); opacity:0.5;
animation:spin 25s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg);} }
.feed-empty h2 {
font-family:'Lora', serif;
font-size:1.8rem; color:var(--forest); margin-bottom:0.7rem;
}
.feed-empty h2 em { font-style:italic; color:var(--leaf); }
.feed-empty p {
font-size:0.95rem; color:var(--mid);
font-weight:300; line-height:1.8;
max-width:420px; margin-bottom:2rem;
}
/* ── POST CARD (for when posts exist) ── */
.post-card {
background:var(--paper);
border:1.5px solid rgba(74,140,92,0.1);
border-radius:20px; overflow:hidden;
margin-bottom:1.5rem;
transition:box-shadow 0.3s;
animation:fadeUp 0.5s ease both;
}
.post-card:hover { box-shadow:0 8px 32px rgba(26,58,42,0.08); }
.post-header {
display:flex; align-items:center; gap:0.8rem;
padding:1rem 1.3rem;
}
.post-avatar {
width:38px; height:38px; border-radius:50%;
background:var(--mist); display:flex; align-items:center;
justify-content:center; font-size:1rem;
font-weight:600; color:var(--moss); flex-shrink:0;
}
.post-meta { flex:1; }
.post-name { font-size:0.88rem; font-weight:500; color:var(--forest); }
.post-loc { font-size:0.75rem; color:var(--light); font-weight:300; }
.post-category {
font-size:0.7rem; font-weight:600;
padding:0.2rem 0.6rem; border-radius:100px;
letter-spacing:0.04em;
}
.cat-wildlife { background:#dcfce7; color:#166534; }
.cat-pet { background:#fef9c3; color:#854d0e; }
.cat-rescue { background:#fce7f3; color:#9d174d; }
.cat-art { background:#ede9fe; color:#5b21b6; }
.cat-learn { background:#dbeafe; color:#1e40af; }
.post-image {
width:100%; max-height:400px; object-fit:cover;
background:linear-gradient(135deg, var(--sky), var(--mist));
display:block;
}
.post-image-placeholder {
width:100%; height:280px;
background:linear-gradient(135deg, var(--sky), var(--mist));
display:flex; align-items:center; justify-content:center; font-size:4rem;
}
.post-body { padding:1rem 1.3rem 1.3rem; }
.post-caption {
font-size:0.92rem; color:var(--text);
line-height:1.7; font-weight:300; margin-bottom:0.8rem;
}
.post-tags { display:flex; gap:0.4rem; flex-wrap:wrap; margin-bottom:1rem; }
.ptag {
font-size:0.72rem; background:var(--mist); color:var(--moss);
padding:0.2rem 0.55rem; border-radius:100px; font-weight:500;
}
.gps-stamp {
display:inline-flex; align-items:center; gap:0.35rem;
font-size:0.7rem; color:var(--light); font-weight:300;
background:var(--warm); border:1px solid var(--mist);
padding:0.2rem 0.6rem; border-radius:100px;
}
.post-actions {
display:flex; align-items:center; gap:1rem;
padding-top:0.8rem; border-top:1px solid var(--mist);
}
.action-btn {
display:flex; align-items:center; gap:0.35rem;
font-size:0.8rem; color:var(--light);
background:none; border:none; cursor:pointer;
font-family:'DM Sans', sans-serif;
transition:color 0.2s; padding:0;
}
.action-btn:hover { color:var(--leaf); }
.action-btn.liked { color:var(--leaf); }
/* ── SIDEBAR ── */
.sidebar { position:sticky; top:110px; display:flex; flex-direction:column; gap:1.5rem; }
.side-card {
background:var(--warm);
border:1.5px solid rgba(74,140,92,0.1);
border-radius:20px; padding:1.5rem;
}
.side-card h4 {
font-family:'Lora', serif;
font-size:1rem; color:var(--forest); margin-bottom:1rem;
}
/* guidelines card */
.guidelines-list { display:flex; flex-direction:column; gap:0.7rem; }
.g-item {
display:flex; gap:0.6rem; align-items:flex-start;
font-size:0.8rem; color:var(--mid); font-weight:300; line-height:1.5;
}
.g-dot {
width:20px; height:20px; border-radius:50%;
flex-shrink:0; display:flex; align-items:center;
justify-content:center; font-size:0.65rem; margin-top:1px;
}
.g-dot.yes { background:var(--mist); color:var(--moss); }
.g-dot.no { background:#fce7f3; color:#9d174d; }
/* share mood card */
.mood-card { background:var(--forest); }
.mood-card h4 { color:var(--mist); }
.mood-card p { font-size:0.82rem; color:rgba(200,230,208,0.7); font-weight:300; line-height:1.6; margin-bottom:1.2rem; }
.mood-btn {
width:100%; padding:0.7rem;
background:var(--sage); color:var(--forest);
border:none; border-radius:12px;
font-family:'DM Sans', sans-serif;
font-size:0.85rem; font-weight:600;
cursor:pointer; transition:opacity 0.2s;
}
.mood-btn:hover { opacity:0.88; }
/* categories reference */
.cat-list { display:flex; flex-direction:column; gap:0.5rem; }
.cat-row {
display:flex; align-items:center; gap:0.7rem;
padding:0.5rem 0.7rem; border-radius:10px;
cursor:pointer; transition:background 0.2s;
}
.cat-row:hover { background:var(--mist); }
.cat-emoji { font-size:1.1rem; }
.cat-info {}
.cat-name { font-size:0.82rem; font-weight:500; color:var(--forest); }
.cat-desc { font-size:0.72rem; color:var(--light); font-weight:300; }
/* ── POST MODAL ── */
.modal-overlay {
position:fixed; inset:0; z-index:500;
background:rgba(26,58,42,0.55);
backdrop-filter:blur(8px);
display:none; align-items:center; justify-content:center; padding:2rem;
}
.modal-overlay.open { display:flex; }
.modal {
background:var(--paper);
border-radius:28px; padding:2.5rem;
width:100%; max-width:540px;
max-height:92vh; overflow-y:auto;
animation:modalIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
position:relative;
}
@keyframes modalIn {
from { opacity:0; transform:scale(0.92) translateY(16px); }
to { opacity:1; transform:scale(1) translateY(0); }
}
.modal-close {
position:absolute; top:1.5rem; right:1.5rem;
width:34px; height:34px;
background:var(--warm); border:none; border-radius:50%;
font-size:0.9rem; cursor:pointer; color:var(--mid);
display:flex; align-items:center; justify-content:center;
transition:background 0.2s;
}
.modal-close:hover { background:var(--mist); }
.modal-tag {
display:inline-block;
background:var(--mist); color:var(--moss);
font-size:0.72rem; font-weight:600; letter-spacing:0.08em;
text-transform:uppercase; padding:0.3rem 0.8rem; border-radius:100px; margin-bottom:0.8rem;
}
.modal h2 {
font-family:'Lora', serif; font-size:1.7rem;
color:var(--forest); margin-bottom:0.4rem;
}
.modal h2 em { font-style:italic; color:var(--leaf); }
.modal > p {
font-size:0.85rem; color:var(--mid); font-weight:300;
line-height:1.7; margin-bottom:1.5rem;
}
/* nature pledge box */
.pledge-box {
background:linear-gradient(135deg, rgba(74,140,92,0.08), rgba(122,184,147,0.05));
border:1.5px solid rgba(74,140,92,0.15);
border-radius:14px; padding:1rem 1.2rem; margin-bottom:1.5rem;
}
.pledge-box h5 { font-size:0.8rem; font-weight:600; color:var(--moss); margin-bottom:0.6rem; }
.pledge-item {
display:flex; align-items:flex-start; gap:0.5rem;
font-size:0.78rem; color:var(--mid); font-weight:300;
line-height:1.5; margin-bottom:0.3rem;
}
.pledge-item .pi { flex-shrink:0; width:16px; text-align:center; }
.pledge-item.no { color:#b45309; }
/* form elements */
.form-row { margin-bottom:1.1rem; }
.form-row label {
display:block; font-size:0.8rem; font-weight:500;
color:var(--forest); margin-bottom:0.4rem;
}
.form-row label span { color:var(--light); font-weight:300; font-size:0.74rem; }
.form-row input,
.form-row select,
.form-row textarea {
width:100%; padding:0.65rem 0.9rem;
border:1.5px solid var(--mist); border-radius:12px;
background:var(--warm); font-family:'DM Sans', sans-serif;
font-size:0.88rem; color:var(--text); outline:none;
transition:border-color 0.2s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color:var(--sage); }
.form-row textarea { resize:vertical; min-height:80px; }
/* category selector */
.cat-selector { display:grid; grid-template-columns:1fr 1fr; gap:0.5rem; }
.cat-option {
border:1.5px solid var(--mist); border-radius:12px;
padding:0.7rem 0.8rem; cursor:pointer; transition:all 0.2s;
display:flex; align-items:center; gap:0.5rem;
background:var(--warm);
}
.cat-option:hover { border-color:var(--sage); }
.cat-option.selected { border-color:var(--leaf); background:rgba(74,140,92,0.08); }
.cat-option input { display:none; }
.cat-option .opt-icon { font-size:1.1rem; }
.cat-option .opt-text { font-size:0.8rem; color:var(--forest); font-weight:500; }
.cat-option .opt-sub { font-size:0.7rem; color:var(--light); font-weight:300; }
/* photo area */
.photo-area {
border:2px dashed var(--sage); border-radius:16px;
padding:1.5rem; text-align:center; cursor:pointer;
transition:all 0.3s; background:var(--warm); position:relative;
}
.photo-area:hover { border-color:var(--leaf); background:var(--sky); }
.photo-area.has-photo { border-style:solid; border-color:var(--leaf); padding:0; overflow:hidden; }
.photo-area .pa-icon { font-size:2rem; margin-bottom:0.4rem; }
.photo-area h5 { font-size:0.88rem; font-weight:500; color:var(--forest); margin-bottom:0.3rem; }
.photo-area p { font-size:0.75rem; color:var(--light); font-weight:300; line-height:1.5; }
#photoPreviewImg { width:100%; max-height:300px; object-fit:cover; display:none; border-radius:14px; }
/* GPS row */
.gps-row {
display:flex; align-items:center; gap:0.6rem;
background:var(--warm); border:1.5px solid var(--mist);
border-radius:12px; padding:0.6rem 0.9rem;
font-size:0.78rem; color:var(--mid); font-weight:300;
}
.gps-dot { width:8px; height:8px; border-radius:50%; background:var(--sage); }
.gps-dot.found { background:#4ade80; animation:blink 1.2s ease-in-out infinite; }
.gps-dot.error { background:#f87171; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.2;} }
/* camera option */
.or-divider {
text-align:center; font-size:0.75rem; color:var(--light);
margin:0.6rem 0; position:relative;
}
.or-divider::before, .or-divider::after {
content:''; position:absolute;
top:50%; width:45%; height:1px; background:var(--mist);
}
.or-divider::before { left:0; }
.or-divider::after { right:0; }
#liveCamera { display:none; flex-direction:column; gap:0.5rem; }
#liveCamera.show { display:flex; }
#liveCameraFeed { width:100%; border-radius:12px; }
.capture-live-btn {
width:100%; padding:0.65rem;
background:var(--leaf); color:white; border:none;
border-radius:12px; font-family:'DM Sans', sans-serif;
font-size:0.85rem; cursor:pointer; transition:background 0.2s;
}
.capture-live-btn:hover { background:var(--forest); }
.toggle-camera-btn {
width:100%; padding:0.55rem;
background:transparent; color:var(--mid);
border:1.5px solid var(--mist); border-radius:12px;
font-family:'DM Sans', sans-serif; font-size:0.8rem;
cursor:pointer; transition:all 0.2s; margin-top:0.3rem;
}
.toggle-camera-btn:hover { border-color:var(--sage); color:var(--forest); }
/* submit btn */
.submit-btn {
width:100%; padding:0.85rem;
background:var(--forest); color:white; border:none;
border-radius:14px; font-family:'DM Sans', sans-serif;
font-size:0.95rem; font-weight:500; cursor:pointer;
transition:background 0.2s; margin-top:1rem;
}
.submit-btn:hover { background:var(--leaf); }
/* success */
.success-screen {
display:none; flex-direction:column; align-items:center;
text-align:center; gap:1rem; padding:1rem 0;
}
.success-screen.show { display:flex; animation:fadeUp 0.5s ease; }
.success-icon {
width:72px; height:72px; background:var(--mist);
border-radius:50%; display:flex; align-items:center;
justify-content:center; font-size:2.2rem;
}
.success-screen h3 { font-family:'Lora', serif; font-size:1.5rem; color:var(--forest); }
.success-screen p { font-size:0.87rem; color:var(--mid); font-weight:300; line-height:1.7; max-width:360px; }
/* ── ANIMATIONS ── */
@keyframes fadeUp {
from { opacity:0; transform:translateY(18px); }
to { opacity:1; transform:translateY(0); }
}
/* ── RESPONSIVE ── */
@media (max-width:900px) {
nav { padding:1rem 2rem; }
.hero-banner { padding:6rem 2rem 3rem; }
.guidelines-strip { padding:0.8rem 1.5rem; }
.page-body { grid-template-columns:1fr; padding:2rem; }
.sidebar { position:static; }
}
@media (max-width:600px) {
nav { padding:1rem 1.5rem; }
.nav-links { display:none; }
.hero-banner { padding:5.5rem 1.5rem 2.5rem; }
.guidelines-strip { display:none; }
.page-body { padding:1.5rem; }
.cat-selector { grid-template-columns:1fr; }
}
</style>
</head>
<body>
<!-- floating leaves -->
<div class="leaf-float" style="left:8%;animation-duration:18s;animation-delay:0s">🍃</div>
<div class="leaf-float" style="left:22%;animation-duration:24s;animation-delay:4s">🌿</div>
<div class="leaf-float" style="left:55%;animation-duration:20s;animation-delay:8s">🍀</div>
<div class="leaf-float" style="left:75%;animation-duration:16s;animation-delay:2s">🍃</div>
<div class="leaf-float" style="left:90%;animation-duration:22s;animation-delay:6s">🌱</div>
<!-- NAVBAR -->
<nav id="navbar">
<a href="/" class="nav-logo">
<div class="paw-icon">🐾</div>
<span>Paws<em>Connect</em></span>
</a>
<ul class="nav-links">
<li><a href="/">Home</a></li>
<li><a href="/marketplace">Marketplace</a></li>
<li><a href="/community" class="active">Community</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="#" class="nav-cta">Join Free</a></li>
</ul>
</nav>
<!-- HERO BANNER -->
<div class="hero-banner">
<div class="banner-inner">
<div class="banner-tag">🌿 A gentle space</div>
<h1 class="banner-title">
Nature doesn't hurry,<br/>
yet <em>everything connects</em>
</h1>
<p class="banner-sub">
Share a moment you witnessed — a bird on your windowsill, a rescued stray,
a drawing you made, a fact that moved you. No noise. No performance.
Just genuine love for the living world.
</p>
<div class="banner-actions">
<button class="btn-light" onclick="openModal()">🌿 Share a Moment</button>
<a href="#feed" class="btn-ghost">Browse the feed ↓</a>
</div>
</div>
</div>
<!-- GUIDELINES STRIP -->
<div class="guidelines-strip">
<div class="guideline-pill"><span class="pill-icon">✅</span> Real animals, real moments</div>
<div class="guideline-pill"><span class="pill-icon">✅</span> Wildlife & nature sightings</div>
<div class="guideline-pill"><span class="pill-icon">✅</span> Rescue & care stories</div>
<div class="guideline-pill"><span class="pill-icon">✅</span> Animal art & drawings</div>
<div class="guideline-pill"><span class="pill-icon">✅</span> Conservation knowledge</div>
<div class="guideline-pill no"><span class="pill-icon">🚫</span> No selling (use Marketplace)</div>
<div class="guideline-pill no"><span class="pill-icon">🚫</span> No hate, cruelty, negativity</div>
<div class="guideline-pill no"><span class="pill-icon">🚫</span> No AI-generated images</div>
</div>
<!-- PAGE BODY -->
<div class="page-body" id="feed">
<!-- FEED -->
<div class="feed-col">
<div class="feed-header">
<h2 class="feed-title">Recent <em>moments</em></h2>
<div class="category-tabs">
<button class="tab-btn active" onclick="setTab(this)">All</button>
<button class="tab-btn" onclick="setTab(this)">🌿 Wildlife</button>
<button class="tab-btn" onclick="setTab(this)">🐾 Pets</button>
<button class="tab-btn" onclick="setTab(this)">🆘 Rescue</button>
<button class="tab-btn" onclick="setTab(this)">🎨 Art</button>
<button class="tab-btn" onclick="setTab(this)">📖 Learn</button>
</div>
</div>
<!-- EMPTY STATE -->
<div class="feed-empty">
<div class="empty-ring">🌿</div>
<h2>The forest is <em>quiet</em> for now</h2>
<p>
No moments shared yet — and that means yours will be the first.<br/><br/>
Did you spot a bird this morning? See something beautiful outside?
Have an animal that makes your day? That's exactly what belongs here.
</p>
<button class="btn-light" style="background:var(--forest);color:white;" onclick="openModal()">
🌿 Share the first moment
</button>
</div>
<!-- posts will be injected here by JS/Firebase later -->
<div id="postsContainer"></div>
</div>
<!-- SIDEBAR -->
<aside class="sidebar">
<!-- share CTA -->
<div class="side-card mood-card">
<h4>Have a moment to share?</h4>
<p>A sighting, a rescue, a drawing, a fact — if it's genuine and connects you to nature, it belongs here.</p>
<button class="mood-btn" onclick="openModal()">🌿 Share a moment</button>
</div>
<!-- categories -->
<div class="side-card">
<h4>What can you share?</h4>
<div class="cat-list">
<div class="cat-row">
<span class="cat-emoji">🌿</span>
<div class="cat-info">
<div class="cat-name">Wildlife Sightings</div>
<div class="cat-desc">Birds, insects, reptiles, wild animals</div>
</div>
</div>
<div class="cat-row">
<span class="cat-emoji">🐾</span>
<div class="cat-info">
<div class="cat-name">Your Pets</div>
<div class="cat-desc">Daily life, quirks, cute moments</div>
</div>
</div>
<div class="cat-row">
<span class="cat-emoji">🆘</span>
<div class="cat-info">
<div class="cat-name">Rescue Stories</div>
<div class="cat-desc">Found, helped, or rehomed animals</div>
</div>
</div>
<div class="cat-row">
<span class="cat-emoji">🎨</span>
<div class="cat-info">
<div class="cat-name">Art & Drawings</div>
<div class="cat-desc">Hand-drawn, painted, any medium</div>
</div>
</div>
<div class="cat-row">
<span class="cat-emoji">📖</span>
<div class="cat-info">
<div class="cat-name">Learn & Conserve</div>
<div class="cat-desc">Facts, guides, conservation news</div>
</div>
</div>
</div>
</div>
<!-- guidelines -->
<div class="side-card">
<h4>Community guidelines</h4>
<div class="guidelines-list">
<div class="g-item"><span class="g-dot yes">✓</span> Share real, genuine moments only</div>
<div class="g-item"><span class="g-dot yes">✓</span> Respect all living beings in your posts</div>
<div class="g-item"><span class="g-dot yes">✓</span> Credit others if sharing their content</div>
<div class="g-item"><span class="g-dot yes">✓</span> Add location so others can discover</div>
<div class="g-item"><span class="g-dot no">✕</span> No cruelty, harm or animal distress</div>
<div class="g-item"><span class="g-dot no">✕</span> No selling — use the Marketplace</div>
<div class="g-item"><span class="g-dot no">✕</span> No AI-generated images</div>
<div class="g-item"><span class="g-dot no">✕</span> No hate speech or negativity</div>
<div class="g-item"><span class="g-dot no">✕</span> 3 community flags → admin review</div>
</div>
</div>
</aside>
</div>
<!-- ── SHARE MODAL ── -->
<div class="modal-overlay" id="modalOverlay" onclick="handleOverlayClick(event)">
<div class="modal">
<button class="modal-close" onclick="closeModal()">✕</button>
<div id="formContent">
<div class="modal-tag">Share a Moment</div>
<h2>What did <em>nature</em> show you?</h2>
<p>A genuine moment from your world. No filters needed, no performance required — just the real thing.</p>
<div class="pledge-box">
<h5>🌿 Nature pledge — what belongs here</h5>
<div class="pledge-item"><span class="pi">✅</span> Real photos or hand-made art only</div>
<div class="pledge-item"><span class="pi">✅</span> Anything that connects you to the living world</div>
<div class="pledge-item no"><span class="pi">🚫</span> No AI-generated images — spotted and removed</div>
<div class="pledge-item no"><span class="pi">🚫</span> No selling content — redirect to Marketplace</div>
<div class="pledge-item no"><span class="pi">🚫</span> No cruelty or animal harm</div>
</div>
<div class="form-row">
<label>Category <span>* what kind of moment is this?</span></label>
<div class="cat-selector" id="catSelector">
<label class="cat-option" onclick="selectCat(this)">
<input type="radio" name="category" value="wildlife"/>
<span class="opt-icon">🌿</span>
<div><div class="opt-text">Wildlife</div><div class="opt-sub">Spotted in the wild</div></div>
</label>
<label class="cat-option" onclick="selectCat(this)">
<input type="radio" name="category" value="pet"/>
<span class="opt-icon">🐾</span>
<div><div class="opt-text">Pet Moment</div><div class="opt-sub">Your animal companion</div></div>
</label>
<label class="cat-option" onclick="selectCat(this)">
<input type="radio" name="category" value="rescue"/>
<span class="opt-icon">🆘</span>
<div><div class="opt-text">Rescue Story</div><div class="opt-sub">Found or helped</div></div>
</label>
<label class="cat-option" onclick="selectCat(this)">
<input type="radio" name="category" value="art"/>
<span class="opt-icon">🎨</span>
<div><div class="opt-text">Art / Drawing</div><div class="opt-sub">Your own creation</div></div>
</label>
<label class="cat-option" onclick="selectCat(this)" style="grid-column:1/-1">
<input type="radio" name="category" value="learn"/>
<span class="opt-icon">📖</span>
<div><div class="opt-text">Learn & Conserve</div><div class="opt-sub">A fact, guide, or conservation story</div></div>
</label>
</div>
</div>
<div class="form-row">
<label>Your story <span>* describe what happened, what you felt</span></label>
<textarea id="caption" placeholder="e.g. Found this little sparrow outside my window this morning, couldn't stop watching it for an hour…" rows="3"></textarea>
</div>
<div class="form-row">
<label>Photo <span>upload from gallery, or use live camera below</span></label>
<div class="photo-area" id="photoArea" onclick="document.getElementById('photoFileInput').click()">
<div class="pa-icon">📷</div>
<h5>Tap to choose a photo</h5>
<p>JPG or PNG · Your own real photo only<br/>AI-generated images are not allowed</p>
<img id="photoPreviewImg" alt="preview"/>
</div>
<input type="file" id="photoFileInput" accept="image/*" style="display:none" onchange="previewPhoto(this)"/>
<div class="or-divider">or take it live with GPS</div>
<button class="toggle-camera-btn" onclick="toggleLiveCamera()">📍 Use GPS Live Camera instead</button>
<div id="liveCamera">
<video id="liveCameraFeed" autoplay playsinline></video>
<button class="capture-live-btn" onclick="captureLive()">📸 Capture Now</button>
<canvas id="liveCanvas" style="display:none"></canvas>
</div>
</div>
<div class="gps-row">
<span class="gps-dot" id="gpsDot2"></span>
<span id="gpsText2">Location will be attached when you submit</span>
</div>
<div class="form-row" style="margin-top:1rem">
<label>Location <span>city or area — helps others discover local wildlife</span></label>
<input type="text" id="location" placeholder="e.g. Mrugavani Park, Hyderabad"/>
</div>
<div class="form-row">
<label>Tags <span>optional — helps with discovery</span></label>
<input type="text" id="tags" placeholder="e.g. kingfisher, birds, Hussain Sagar"/>
</div>
<div class="form-row">
<label>
<input type="checkbox" id="pledgeCheck" style="margin-right:0.5rem"/>
I confirm this is my genuine moment — real, kind, and connected to nature 🌿
</label>
</div>
<button class="submit-btn" onclick="submitPost()">Share with the community →</button>
</div>
<!-- Success -->
<div class="success-screen" id="successScreen">
<div class="success-icon">🌿</div>
<h3>Moment shared!</h3>
<p>
Your post is under a quick review to make sure it meets our nature guidelines.
Once approved, it'll appear in the community feed for everyone to discover.
</p>
<p style="font-size:0.78rem;color:var(--light)">Thank you for keeping this space genuine 🐾</p>
<button class="btn-light" style="background:var(--forest);color:white;margin-top:0.5rem" onclick="closeModal()">
Back to community
</button>
</div>
</div>
</div>
<script>
// navbar shadow
window.addEventListener('scroll', () => {
document.getElementById('navbar').style.boxShadow =
window.scrollY > 30 ? '0 4px 20px rgba(26,58,42,0.08)' : 'none';
});
// tabs
function setTab(el) {
document.querySelectorAll('.tab-btn').forEach(t => t.classList.remove('active'));
el.classList.add('active');
}
// category select
function selectCat(el) {
document.querySelectorAll('.cat-option').forEach(o => o.classList.remove('selected'));
el.classList.add('selected');
}
// photo preview
function previewPhoto(input) {
const file = input.files[0];
if (!file) return;
const reader = new FileReader();
reader.onload = e => {
const img = document.getElementById('photoPreviewImg');
const area = document.getElementById('photoArea');
img.src = e.target.result;
img.style.display = 'block';
area.classList.add('has-photo');
area.querySelector('.pa-icon').style.display = 'none';
area.querySelector('h5').style.display = 'none';
area.querySelector('p').style.display = 'none';
};
reader.readAsDataURL(file);
}
// GPS
let gpsData = null;
function initGPS2() {
const dot = document.getElementById('gpsDot2');
const txt = document.getElementById('gpsText2');
if (!navigator.geolocation) { dot.className='gps-dot error'; txt.textContent='GPS not supported'; return; }
navigator.geolocation.getCurrentPosition(
pos => {
gpsData = { lat: pos.coords.latitude.toFixed(5), lng: pos.coords.longitude.toFixed(5) };
dot.classList.add('found');
txt.textContent = `📍 ${gpsData.lat}°N, ${gpsData.lng}°E — attached to your post`;
},
() => { dot.className='gps-dot error'; txt.textContent='Location permission denied — optional but recommended'; }
);
}
// live camera
let liveStream = null;
async function toggleLiveCamera() {
const cam = document.getElementById('liveCamera');
if (cam.classList.contains('show')) {
cam.classList.remove('show');
if (liveStream) { liveStream.getTracks().forEach(t => t.stop()); liveStream = null; }
return;
}
try {
liveStream = await navigator.mediaDevices.getUserMedia({ video:{ facingMode:'environment' } });
document.getElementById('liveCameraFeed').srcObject = liveStream;
cam.classList.add('show');
initGPS2();
} catch(e) {
alert('Camera permission needed for live GPS capture.');
}
}
function captureLive() {
const video = document.getElementById('liveCameraFeed');
const canvas = document.getElementById('liveCanvas');
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
const ctx = canvas.getContext('2d');
ctx.drawImage(video, 0, 0);
const now = new Date().toLocaleString('en-IN');
ctx.fillStyle = 'rgba(0,0,0,0.5)';
ctx.fillRect(0, canvas.height - 44, canvas.width, 44);
ctx.fillStyle = '#fff';
ctx.font = '13px DM Sans, sans-serif';
const stamp = gpsData ? `📍 ${gpsData.lat}°N, ${gpsData.lng}°E • ${now}` : `⚠️ No GPS • ${now}`;
ctx.fillText(stamp, 10, canvas.height - 16);
const dataURL = canvas.toDataURL('image/jpeg', 0.9);
const img = document.getElementById('photoPreviewImg');
const area = document.getElementById('photoArea');
img.src = dataURL;
img.style.display = 'block';
area.classList.add('has-photo');
if (area.querySelector('.pa-icon')) area.querySelector('.pa-icon').style.display = 'none';
if (area.querySelector('h5')) area.querySelector('h5').style.display = 'none';
if (area.querySelector('p')) area.querySelector('p').style.display = 'none';
if (liveStream) { liveStream.getTracks().forEach(t => t.stop()); liveStream = null; }
document.getElementById('liveCamera').classList.remove('show');
}
// modal
function openModal() {
document.getElementById('modalOverlay').classList.add('open');
document.body.style.overflow = 'hidden';
initGPS2();
}
function closeModal() {
document.getElementById('modalOverlay').classList.remove('open');
document.body.style.overflow = '';
if (liveStream) { liveStream.getTracks().forEach(t => t.stop()); liveStream = null; }
document.getElementById('liveCamera').classList.remove('show');
}
function handleOverlayClick(e) {
if (e.target === document.getElementById('modalOverlay')) closeModal();
}
// submit
function submitPost() {
if (!document.getElementById('pledgeCheck').checked) {
alert('Please confirm your post is a genuine nature moment before sharing.');
return;
}
const cat = document.querySelector('input[name="category"]:checked');
if (!cat) {
alert('Please choose a category for your post.');
return;
}
// Save post to Firestore
const post = {
category: cat.value,
caption: document.getElementById('caption')?.value || '',
location: document.getElementById('location')?.value || '',
tags: document.getElementById('tags')?.value || '',
gps: gpsData || null,
status: 'pending',
postedAt: new Date().toISOString(),