From 408839c24b71531ed3c35bf04383fd5cd9ea697d Mon Sep 17 00:00:00 2001 From: biplav Date: Tue, 8 Aug 2023 16:24:52 +0530 Subject: [PATCH 1/9] faq page #1208 --- src/index.css | 40 ++++++++++++++ src/pages/NotFound.jsx | 121 ++++++++++++++++++++++++----------------- 2 files changed, 110 insertions(+), 51 deletions(-) diff --git a/src/index.css b/src/index.css index 6dbcb2a69..25df7b585 100644 --- a/src/index.css +++ b/src/index.css @@ -601,3 +601,43 @@ input { .postColumn { background-color: var(--dark-post-bg); } + +.faq{ + display: flex; + justify-content: center; + } + .faqTitle{ + font-size: 50px; + margin-bottom: 20px; + } + .faqSubtitle{ + display: flex; + font-size: 20px; + justify-content: center; + + } + /* .accordion{ + display: flex; + justify-content: center; + } + .accordion-header{ + font-size: 20px; + font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; + } + + .accordion { + border: 1px solid #ccc; + margin-bottom: 10px; + } */ + + /* Accordion Header */ + .accordion-header { + background-color: #f1f1f1; + padding: 10px; + cursor: pointer; + } + + /* Accordion Content */ + .accordion-content { + padding: 10px; + } \ No newline at end of file diff --git a/src/pages/NotFound.jsx b/src/pages/NotFound.jsx index 88e3ab876..7a9a397c9 100644 --- a/src/pages/NotFound.jsx +++ b/src/pages/NotFound.jsx @@ -1,59 +1,78 @@ import { Box, Button, Container, Typography } from "@mui/material"; +import KeyboardBackspaceIcon from "@mui/icons-material/KeyboardBackspace"; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import Grid from "@mui/material/Grid"; -import { Link } from "react-router-dom"; -import React from "react"; +import { Link, useNavigate } from "react-router-dom"; +import React, { useState } from "react"; +import about from "../../../dummygram/src/assets/about-us.png"; export default function Error() { + const navigate = useNavigate(); + + const accordionData = [ + { title: "What is Dummygram", content: "Dummygram is a social media platform that allows users to share photos, videos, and stories with their followers. " }, + { title: "How To Upload Images ", content: "Click on Post on left side menu and then click on upload Images" }, + { title: "How To See Other User Profile ", content: "Click on Post Profile Avatar Image" }, + { title: "How To Logout ", content: "Click on your profile in side menu you will get DropDown click on logout" }, + // Add more sections as needed + ]; + + const Accordion = ({ title, content }) => { + const [isOpen, setIsOpen] = useState(false); + + const toggleAccordion = () => { + setIsOpen(!isOpen); + }; + + return ( + <> +
+
+
+ {title} +
+ {isOpen &&
{content}
} +
+
+ + ); + }; + return ( - - - - - - 404 - - - The page you're looking for doesn't exist. - - - - - - - error image +
+ +
+ +
navigate("/dummygram")} + > + Back to Home +
+ +
+
+

Dummygram Frequently Asked Question

+

+ Have a question in mind? We've got the answers! +

+
+
+ +
+ {accordionData.map((section, index) => ( + <> + - - - - + + ))} +
+ ); -} +} \ No newline at end of file From d46606ab275b1a5e6bc1887343acba29f602852c Mon Sep 17 00:00:00 2001 From: biplav Date: Tue, 8 Aug 2023 17:48:42 +0530 Subject: [PATCH 2/9] Faq-page-added #1208 --- src/index.css | 25 +++++++++++++++++++++++++ src/pages/NotFound.jsx | 10 +++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/index.css b/src/index.css index 25df7b585..6a628907d 100644 --- a/src/index.css +++ b/src/index.css @@ -616,6 +616,8 @@ input { justify-content: center; } + + /* .accordion{ display: flex; justify-content: center; @@ -640,4 +642,27 @@ input { /* Accordion Content */ .accordion-content { padding: 10px; + } + + .accordionTitle{ + width:70%; + border: 1px solid black; + } + + @media only screen and (max-width: 460px) { + .faqTitle{ + font-size: 20px; + margin-bottom: 20px; + width: 300px; + margin-left: auto; + margin-right: auto; + } + .faqSubtitle{ + font-size: 15px; + width: 300px; + margin-left: auto; + margin-right: auto; + } + + } \ No newline at end of file diff --git a/src/pages/NotFound.jsx b/src/pages/NotFound.jsx index 7a9a397c9..731a38021 100644 --- a/src/pages/NotFound.jsx +++ b/src/pages/NotFound.jsx @@ -11,10 +11,10 @@ export default function Error() { const navigate = useNavigate(); const accordionData = [ - { title: "What is Dummygram", content: "Dummygram is a social media platform that allows users to share photos, videos, and stories with their followers. " }, - { title: "How To Upload Images ", content: "Click on Post on left side menu and then click on upload Images" }, - { title: "How To See Other User Profile ", content: "Click on Post Profile Avatar Image" }, - { title: "How To Logout ", content: "Click on your profile in side menu you will get DropDown click on logout" }, + { title: "What is Dummygram ?", content: "Dummygram is a social media platform that allows users to share photos, videos, and stories with their followers. " }, + { title: "How To Upload Images ?", content: "Click on Post on left side menu and then click on upload Images" }, + { title: "How To See Other User Profile", content: "Click on Post Profile Avatar Image" }, + { title: "How To Logout", content: "Click on your profile in side menu you will get DropDown click on logout" }, // Add more sections as needed ]; @@ -28,7 +28,7 @@ export default function Error() { return ( <>
-
+
{title}
From 1ccc4c0cbbde4862bfa0decaa70300f06017462c Mon Sep 17 00:00:00 2001 From: biplav Date: Wed, 9 Aug 2023 23:45:55 +0530 Subject: [PATCH 3/9] feat: #1208 --- src/pages/NotFound.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/NotFound.jsx b/src/pages/NotFound.jsx index 731a38021..92c0012b5 100644 --- a/src/pages/NotFound.jsx +++ b/src/pages/NotFound.jsx @@ -5,7 +5,8 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import Grid from "@mui/material/Grid"; import { Link, useNavigate } from "react-router-dom"; import React, { useState } from "react"; -import about from "../../../dummygram/src/assets/about-us.png"; +import Faq from "../assets/preview.webp"; + export default function Error() { const navigate = useNavigate(); @@ -42,7 +43,7 @@ export default function Error() { return ( <>
- +
Date: Thu, 10 Aug 2023 01:00:01 +0530 Subject: [PATCH 4/9] feat: #1197 --- src/index.css | 35 +++++++++++++++++++++++++++++++++-- src/pages/NotFound.jsx | 8 ++++++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/index.css b/src/index.css index e3bd75dab..8312001e3 100644 --- a/src/index.css +++ b/src/index.css @@ -649,18 +649,49 @@ input { /* Accordion Header */ .accordion-header { background-color: #f1f1f1; - padding: 10px; + padding: 20px; cursor: pointer; } /* Accordion Content */ .accordion-content { padding: 10px; + padding-top: 40px; + padding-bottom: 40px; + background-color: #eee; + box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + margin-bottom: 40px; + } + .accordionTrue{ + margin-top: 20px; } .accordionTitle{ width:70%; - border: 1px solid black; + } + + .accordion { + background-color: #eee; + color: #444; + cursor: pointer; + padding: 18px; + width: 100%; + border: none; + text-align: left; + outline: none; + font-size: 15px; + transition: 0.4s; + } + + .active, .accordion:hover { + background-color: #ccc; + } + + .panel { + padding: 0 18px; + display: none; + background-color: white; + overflow: hidden; } @media only screen and (max-width: 460px) { diff --git a/src/pages/NotFound.jsx b/src/pages/NotFound.jsx index 92c0012b5..53f3cc9a7 100644 --- a/src/pages/NotFound.jsx +++ b/src/pages/NotFound.jsx @@ -30,9 +30,13 @@ export default function Error() { <>
-
+ {/*
+
*/} +
+ +
+ {isOpen &&
{content}
}
From 7d32678bd27eef3ca13234b95bf5b7f8381f539d Mon Sep 17 00:00:00 2001 From: narayan soni Date: Fri, 11 Aug 2023 02:31:56 +0530 Subject: [PATCH 5/9] fix: helpcenter page --- src/App.jsx | 10 ++++ .../HelpCenter/index.jsx} | 46 ++++++++++++------- src/pages/NotFound/index.jsx | 1 + src/pages/index.js | 2 + 4 files changed, 43 insertions(+), 16 deletions(-) rename src/pages/{NotFound.jsx => FooterPages/HelpCenter/index.jsx} (63%) diff --git a/src/App.jsx b/src/App.jsx index c5956cb62..1c03a3620 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -31,6 +31,7 @@ const NotFound = React.lazy(() => import("./pages/NotFound")); const Contributors = React.lazy(() => import("./pages/FooterPages/ContributorPage"), ); +const HelpCenter = React.lazy(() => import("./pages/FooterPages/HelpCenter")); // ------------------------------------- Components ------------------------------------------------ const Notifications = React.lazy(() => import("./components/Notification")); const SideBar = React.lazy(() => import("./components/SideBar")); @@ -222,6 +223,15 @@ function App() { } /> + + + + } + /> + -
+
{/*
*/} -
- {isOpen &&
{content}
} + {isOpen &&
{content}
}
@@ -67,7 +81,7 @@ export default function Error() {
-
+
{accordionData.map((section, index) => ( <> ); -} \ No newline at end of file +} diff --git a/src/pages/NotFound/index.jsx b/src/pages/NotFound/index.jsx index 492eac306..e6aa278f0 100644 --- a/src/pages/NotFound/index.jsx +++ b/src/pages/NotFound/index.jsx @@ -1,4 +1,5 @@ import "./index.css"; + import { Box, Button, Container, Typography } from "@mui/material"; import Grid from "@mui/material/Grid"; diff --git a/src/pages/index.js b/src/pages/index.js index ca6109195..63da496c3 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -3,6 +3,7 @@ import ChatPage from "./Chat"; import Contributor from "./FooterPages/ContributorPage"; import Feedback from "./FooterPages/Feedback"; import Guidelines from "./FooterPages/Guidelines"; +import HelpCenter from "./FooterPages/HelpCenter"; import LoginScreen from "./Login"; import PostView from "./PostView"; import Profile from "./Profile"; @@ -14,6 +15,7 @@ export { Contributor, Feedback, Guidelines, + HelpCenter, LoginScreen, PostView, Profile, From dc50860dd0ad48db83d6e28226a23b23ed938754 Mon Sep 17 00:00:00 2001 From: narayan soni Date: Fri, 11 Aug 2023 02:35:13 +0530 Subject: [PATCH 6/9] fix: styles --- src/index.css | 96 ---------------------- src/pages/FooterPages/HelpCenter/index.css | 79 ++++++++++++++++++ src/pages/FooterPages/HelpCenter/index.jsx | 2 + 3 files changed, 81 insertions(+), 96 deletions(-) create mode 100644 src/pages/FooterPages/HelpCenter/index.css diff --git a/src/index.css b/src/index.css index 8312001e3..ff7000ef4 100644 --- a/src/index.css +++ b/src/index.css @@ -615,99 +615,3 @@ input { .postColumn { background-color: var(--dark-post-bg); } - -.faq{ - display: flex; - justify-content: center; - } - .faqTitle{ - font-size: 50px; - margin-bottom: 20px; - } - .faqSubtitle{ - display: flex; - font-size: 20px; - justify-content: center; - - } - - - /* .accordion{ - display: flex; - justify-content: center; - } - .accordion-header{ - font-size: 20px; - font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; - } - - .accordion { - border: 1px solid #ccc; - margin-bottom: 10px; - } */ - - /* Accordion Header */ - .accordion-header { - background-color: #f1f1f1; - padding: 20px; - cursor: pointer; - } - - /* Accordion Content */ - .accordion-content { - padding: 10px; - padding-top: 40px; - padding-bottom: 40px; - background-color: #eee; - box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); - margin-bottom: 40px; - } - .accordionTrue{ - margin-top: 20px; - } - - .accordionTitle{ - width:70%; - } - - .accordion { - background-color: #eee; - color: #444; - cursor: pointer; - padding: 18px; - width: 100%; - border: none; - text-align: left; - outline: none; - font-size: 15px; - transition: 0.4s; - } - - .active, .accordion:hover { - background-color: #ccc; - } - - .panel { - padding: 0 18px; - display: none; - background-color: white; - overflow: hidden; - } - - @media only screen and (max-width: 460px) { - .faqTitle{ - font-size: 20px; - margin-bottom: 20px; - width: 300px; - margin-left: auto; - margin-right: auto; - } - .faqSubtitle{ - font-size: 15px; - width: 300px; - margin-left: auto; - margin-right: auto; - } - - - } \ No newline at end of file diff --git a/src/pages/FooterPages/HelpCenter/index.css b/src/pages/FooterPages/HelpCenter/index.css new file mode 100644 index 000000000..10797965f --- /dev/null +++ b/src/pages/FooterPages/HelpCenter/index.css @@ -0,0 +1,79 @@ +.faq { + display: flex; + justify-content: center; +} +.faqTitle { + font-size: 50px; + margin-bottom: 20px; +} +.faqSubtitle { + display: flex; + font-size: 20px; + justify-content: center; +} + +/* Accordion Header */ +.accordion-header { + background-color: #f1f1f1; + padding: 20px; + cursor: pointer; +} + +/* Accordion Content */ +.accordion-content { + padding: 10px; + padding-top: 40px; + padding-bottom: 40px; + background-color: #eee; + box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), + 0 8px 10px -6px rgb(0 0 0 / 0.1); + margin-bottom: 40px; +} +.accordionTrue { + margin-top: 20px; +} + +.accordionTitle { + width: 70%; +} + +.accordion { + background-color: #eee; + color: #444; + cursor: pointer; + padding: 18px; + width: 100%; + border: none; + text-align: left; + outline: none; + font-size: 15px; + transition: 0.4s; +} + +.active, +.accordion:hover { + background-color: #ccc; +} + +.panel { + padding: 0 18px; + display: none; + background-color: white; + overflow: hidden; +} + +@media only screen and (max-width: 460px) { + .faqTitle { + font-size: 20px; + margin-bottom: 20px; + width: 300px; + margin-left: auto; + margin-right: auto; + } + .faqSubtitle { + font-size: 15px; + width: 300px; + margin-left: auto; + margin-right: auto; + } +} diff --git a/src/pages/FooterPages/HelpCenter/index.jsx b/src/pages/FooterPages/HelpCenter/index.jsx index b5b0863c7..56e6d709c 100644 --- a/src/pages/FooterPages/HelpCenter/index.jsx +++ b/src/pages/FooterPages/HelpCenter/index.jsx @@ -1,3 +1,5 @@ +import "./index.css"; + import React, { useState } from "react"; import Faq from "../../../assets/preview.webp"; From fbde6224d077404c5dc5722c36fbcdb95650a729 Mon Sep 17 00:00:00 2001 From: narayan soni Date: Fri, 11 Aug 2023 02:43:10 +0530 Subject: [PATCH 7/9] fix: routes and accordion --- src/App.jsx | 66 ++++++------- src/pages/FooterPages/HelpCenter/index.jsx | 102 ++++++++++----------- 2 files changed, 83 insertions(+), 85 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 1c03a3620..abc426ced 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -194,43 +194,43 @@ function App() { } /> } /> - - - - - } - /> + + + + } + /> - - - - } - /> + + + + } + /> - - - - } - /> + + + + } + /> - - - - } - /> + + + + } + /> + { - const [isOpen, setIsOpen] = useState(false); - - const toggleAccordion = () => { - setIsOpen(!isOpen); - }; - - return ( - <> -
-
- {/*
-
*/} - -
+const accordionData = [ + { + title: "What is Dummygram ?", + content: + "Dummygram is a social media platform that allows users to share photos, videos, and stories with their followers. ", + }, + { + title: "How To Upload Images ?", + content: "Click on Post on left side menu and then click on upload Images", + }, + { + title: "How To See Other User Profile", + content: "Click on Post Profile Avatar Image", + }, + { + title: "How To Logout", + content: + "Click on your profile in side menu you will get DropDown click on logout", + }, + // Add more sections as needed +]; - {isOpen &&
{content}
} -
-
- - ); - }; +export default function HelpCenter() { + const navigate = useNavigate(); return ( <> @@ -97,3 +68,30 @@ export default function Error() { ); } + +const Accordion = ({ title, content }) => { + const [isOpen, setIsOpen] = useState(false); + + const toggleAccordion = () => { + setIsOpen(!isOpen); + }; + + return ( + <> +
+
+ {/*
+
*/} + +
+ {isOpen &&
{content}
} +
+
+ + ); +}; From 847b0f676a02fa6f4f852a049f9390fd25358392 Mon Sep 17 00:00:00 2001 From: narayan soni Date: Fri, 11 Aug 2023 02:49:21 +0530 Subject: [PATCH 8/9] fix: accordian indexing --- src/pages/FooterPages/HelpCenter/index.jsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pages/FooterPages/HelpCenter/index.jsx b/src/pages/FooterPages/HelpCenter/index.jsx index 862c48f7a..33b9ecbca 100644 --- a/src/pages/FooterPages/HelpCenter/index.jsx +++ b/src/pages/FooterPages/HelpCenter/index.jsx @@ -8,19 +8,23 @@ import { useNavigate } from "react-router-dom"; const accordionData = [ { + key: 1, title: "What is Dummygram ?", content: "Dummygram is a social media platform that allows users to share photos, videos, and stories with their followers. ", }, { + key: 2, title: "How To Upload Images ?", content: "Click on Post on left side menu and then click on upload Images", }, { + key: 3, title: "How To See Other User Profile", content: "Click on Post Profile Avatar Image", }, { + key: 4, title: "How To Logout", content: "Click on your profile in side menu you will get DropDown click on logout", @@ -55,15 +59,15 @@ export default function HelpCenter() {
- {accordionData.map((section, index) => ( - <> + {accordionData.map((section) => { + return ( - - ))} + ); + })}
); From 53d31ba4f09ca0e1f03e1ee78af093aae0809031 Mon Sep 17 00:00:00 2001 From: narayan soni Date: Fri, 11 Aug 2023 02:51:32 +0530 Subject: [PATCH 9/9] refactor: caption --- src/components/Caption.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Caption.jsx b/src/components/Caption.jsx index 5b9732cd6..6f419eaac 100644 --- a/src/components/Caption.jsx +++ b/src/components/Caption.jsx @@ -19,7 +19,7 @@ export default function Caption({ caption }) { const isUrl = (part) => urlRegex.test(part); // Render each part of the caption - const renderCaptionParts = () => { + const RenderCaptionParts = () => { return parts.map((part, index) => { if (isUrl(part)) { // If the part is a URL, render it as a clickable link. @@ -35,5 +35,5 @@ export default function Caption({ caption }) { }); }; - return <>{renderCaptionParts()}; + return ; }