├── src ├── components │ ├── events │ │ ├── Events.css │ │ └── Events.jsx │ ├── about │ │ ├── About.css │ │ └── About.js │ ├── footer │ │ ├── Footer.css │ │ └── Footer.js │ ├── blogs │ │ ├── Blogs.css │ │ └── Blogs.jsx │ ├── buttons │ │ ├── SubmitButton.jsx │ │ └── SpinnerButton.jsx │ ├── topbar │ │ ├── header │ │ │ ├── Header.css │ │ │ └── Header.jsx │ │ ├── TopBar.css │ │ └── TopBar.jsx │ ├── texteditor │ │ └── TextEditor.jsx │ ├── posts │ │ ├── Posts.css │ │ └── Posts.jsx │ ├── topbarDropDown │ │ ├── TopbarDropDown.jsx │ │ └── DropDownElements.jsx │ ├── cards │ │ ├── Card.js │ │ └── card.css │ ├── post │ │ ├── Post.jsx │ │ └── Post.css │ ├── sidebar │ │ ├── SideBar.css │ │ └── SideBar.jsx │ ├── singlepost │ │ ├── SinglePost.css │ │ └── SinglePost.jsx │ ├── algoders │ │ ├── AlgodersHome.jsx │ │ └── AlgodersHome.css │ ├── contactSection │ │ ├── ContactSection.css │ │ └── ContactSection.jsx │ ├── joinus │ │ ├── Mentor.js │ │ └── Join.jsx │ ├── team │ │ └── Team.jsx │ └── contact │ │ ├── contact.jsx │ │ └── contact.css ├── index.css ├── pages │ ├── home │ │ ├── Home.css │ │ └── Home.jsx │ ├── singlePost │ │ ├── singlepostpage.css │ │ └── SinglePostPage.jsx │ ├── about │ │ ├── about.css │ │ └── About.js │ ├── write │ │ ├── write.css │ │ └── Write.jsx │ ├── login │ │ ├── Login.css │ │ └── Login.jsx │ ├── register │ │ ├── Register.css │ │ └── Register.jsx │ └── settings │ │ ├── Settings.css │ │ └── Settings.jsx ├── assets │ ├── what.png │ ├── close.png │ ├── logo.jpeg │ ├── benefits.png │ ├── benefits1.png │ ├── community.png │ ├── collaborate.png │ ├── collaborate1.png │ ├── reciprocate.png │ ├── reciprocate1.png │ ├── opportunities.png │ └── opportunities1.png ├── validations │ └── UserValidation.js ├── index.js ├── firebase │ └── firebase.js ├── context │ ├── Actions.js │ ├── Context.js │ └── Reducer.js └── App.js ├── public ├── style.css ├── favicon.ico └── index.html ├── postcss.config.js ├── .gitignore ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── pull_request_template.md ├── LICENSE ├── package.json ├── contribution.md ├── README.md └── CODE-OF-CONDUCT.md /src/components/events/Events.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/events/Events.jsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | overflow-x: hidden; 3 | } -------------------------------------------------------------------------------- /src/components/about/About.css: -------------------------------------------------------------------------------- 1 | p{ 2 | line-height: 40px; 3 | } -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /src/pages/home/Home.css: -------------------------------------------------------------------------------- 1 | .home { 2 | display: flex; 3 | background-color: #001329; 4 | } 5 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/assets/what.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/what.png -------------------------------------------------------------------------------- /src/assets/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/close.png -------------------------------------------------------------------------------- /src/assets/logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/logo.jpeg -------------------------------------------------------------------------------- /src/assets/benefits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/benefits.png -------------------------------------------------------------------------------- /src/assets/benefits1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/benefits1.png -------------------------------------------------------------------------------- /src/assets/community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/community.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src/assets/collaborate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/collaborate.png -------------------------------------------------------------------------------- /src/assets/collaborate1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/collaborate1.png -------------------------------------------------------------------------------- /src/assets/reciprocate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/reciprocate.png -------------------------------------------------------------------------------- /src/assets/reciprocate1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/reciprocate1.png -------------------------------------------------------------------------------- /src/assets/opportunities.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/opportunities.png -------------------------------------------------------------------------------- /src/assets/opportunities1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohityadav0903/Algoders-Community/HEAD/src/assets/opportunities1.png -------------------------------------------------------------------------------- /src/pages/singlePost/singlepostpage.css: -------------------------------------------------------------------------------- 1 | .single { 2 | display: flex; 3 | background-color: #001329; 4 | color: white; 5 | } 6 | -------------------------------------------------------------------------------- /src/components/footer/Footer.css: -------------------------------------------------------------------------------- 1 | .instagram{ 2 | margin-right: 0; 3 | } 4 | 5 | .usefulLinks a{ 6 | padding-left: 10px; 7 | } -------------------------------------------------------------------------------- /src/components/blogs/Blogs.css: -------------------------------------------------------------------------------- 1 | .blogs { 2 | background-color: #001329; 3 | height: 50vh; 4 | } 5 | 6 | .puffLoader { 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | padding-top: 1rem; 11 | } 12 | -------------------------------------------------------------------------------- /src/components/blogs/Blogs.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Posts from '../posts/Posts'; 3 | import './Blogs.css' 4 | 5 | 6 | const Blogs = () => { 7 | return ( 8 |
9 | 10 |
11 | ); 12 | }; 13 | 14 | export default Blogs; 15 | -------------------------------------------------------------------------------- /src/components/buttons/SubmitButton.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const SubmitButton = (props) => { 4 | return ( 5 | 8 | ); 9 | }; 10 | 11 | export default SubmitButton; 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /src/pages/about/about.css: -------------------------------------------------------------------------------- 1 | .heading1{ 2 | color: white; 3 | background-color:rgba(24,23,22); 4 | display:flex; 5 | justify-content: space-around; 6 | font-size: 48px; 7 | } 8 | .one{ 9 | background-color: rgba(24,23,22); 10 | display:flex; 11 | justify-content: space-around; 12 | flex-wrap: wrap; 13 | align-content: space-around; 14 | } 15 | .two{ 16 | padding-top:3em; 17 | } 18 | -------------------------------------------------------------------------------- /src/pages/singlePost/SinglePostPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import SideBar from '../../components/sidebar/SideBar'; 3 | import SinglePost from '../../components/singlepost/SinglePost'; 4 | import './singlepostpage.css'; 5 | 6 | const SinglePostPage = () => { 7 | return
8 | 9 | {/* */} 10 |
; 11 | }; 12 | 13 | export default SinglePostPage; 14 | -------------------------------------------------------------------------------- /src/validations/UserValidation.js: -------------------------------------------------------------------------------- 1 | import * as yup from "yup"; 2 | export const userSchema = yup.object().shape({ 3 | name: yup.string(). required(), 4 | email: yup.string().email().required(), 5 | password: yup.string().min(4).max(10). required(), 6 | }); 7 | 8 | export const userUpdateSchema = yup.object().shape({ 9 | email: yup.string().email().required(), 10 | password: yup.string().min(4).max(10). required(), 11 | }); -------------------------------------------------------------------------------- /src/pages/home/Home.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import AlgodersHome from '../../components/algoders/AlgodersHome'; 3 | import About from '../../components/about/About'; 4 | import Team from '../../components/team/Team'; 5 | import Join from '../../components/joinus/Join' 6 | import './Home.css'; 7 | const Home = () => { 8 | return <> 9 | 10 | 11 | 12 | 13 | 14 | ; 15 | }; 16 | 17 | export default Home; 18 | -------------------------------------------------------------------------------- /src/components/buttons/SpinnerButton.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const SpinnerButton = (props) => { 4 | return ( 5 | 18 | ); 19 | }; 20 | 21 | export default SpinnerButton; -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | import {BrowserRouter} from 'react-router-dom'; 6 | import { ContextProvider } from './context/Context'; 7 | import { SnackbarProvider } from 'notistack'; 8 | 9 | 10 | ReactDOM.render( 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ,document.getElementById('root')); 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/components/topbar/header/Header.css: -------------------------------------------------------------------------------- 1 | .header { 2 | margin-top: 60px; 3 | } 4 | 5 | .headerTitles { 6 | display: flex; 7 | flex-direction: column; 8 | align-items: center; 9 | font-family: "Lora", serif; 10 | color: #444; 11 | } 12 | 13 | .headerTitleSm { 14 | position: absolute; 15 | top: 18%; 16 | font-size: 20px; 17 | } 18 | 19 | .headerTitleLg { 20 | position: absolute; 21 | top: 20%; 22 | font-size: 100px; 23 | } 24 | 25 | .headerImg { 26 | width: 100%; 27 | height: 450px; 28 | margin-top: 80px; 29 | object-fit: cover; 30 | } -------------------------------------------------------------------------------- /src/firebase/firebase.js: -------------------------------------------------------------------------------- 1 | import firebase from 'firebase/compat/app'; 2 | import 'firebase/compat/storage'; 3 | 4 | const firebaseConfig = { 5 | apiKey: "AIzaSyC5o0C12uFBqEONedk-x_RbMMlow5gfGeE", 6 | authDomain: "algoders-community-image-saver.firebaseapp.com", 7 | projectId: "algoders-community-image-saver", 8 | storageBucket: "algoders-community-image-saver.appspot.com", 9 | messagingSenderId: "175202292765", 10 | appId: "1:175202292765:web:7d2191340c1a6d716ea2f4" 11 | }; 12 | firebase.initializeApp(firebaseConfig); 13 | const storage = firebase.storage(); 14 | export {storage,firebase as default}; -------------------------------------------------------------------------------- /src/components/topbar/header/Header.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "react"; 2 | import "./Header.css"; 3 | 4 | const Header = () => { 5 | return ( 6 |
7 |
8 | React and Node 9 | Blog 10 |
11 | 16 |
17 | ); 18 | }; 19 | 20 | export default Header; 21 | -------------------------------------------------------------------------------- /src/components/texteditor/TextEditor.jsx: -------------------------------------------------------------------------------- 1 | import React, { useRef } from "react"; 2 | import JoditEditor from "jodit-react"; 3 | 4 | const config = { 5 | buttons: ["bold", "italic", "link", "unlink", "underline", "source"], 6 | }; 7 | 8 | const TextEditor = ({ initialValue, getValue }) => { 9 | const editor = useRef(null); 10 | 11 | return ( 12 | getValue(newContent)} 18 | onChange={(newContent) => getValue(newContent)} 19 | /> 20 | ); 21 | }; 22 | 23 | export default TextEditor; -------------------------------------------------------------------------------- /src/context/Actions.js: -------------------------------------------------------------------------------- 1 | export const LoginStart = (userCredentials) => ({ 2 | type: "LOGIN_START", 3 | }); 4 | 5 | export const LoginSuccess = (user) => ({ 6 | type: "LOGIN_SUCCESS", 7 | payload: user, 8 | }); 9 | 10 | export const LoginFailure = () => ({ 11 | type: "LOGIN_FAILURE", 12 | }); 13 | 14 | export const Logout = () => ({ 15 | type: "LOGOUT", 16 | }); 17 | 18 | export const UpdateStart = (userCredentials) => ({ 19 | type: "UPDATE_START", 20 | }); 21 | 22 | export const UpdateSuccess = (user) => ({ 23 | type: "UPDATE_SUCCESS", 24 | payload: user, 25 | }); 26 | 27 | export const UpdateFailure = () => ({ 28 | type: "UPDATE_FAILURE", 29 | }); -------------------------------------------------------------------------------- /src/components/posts/Posts.css: -------------------------------------------------------------------------------- 1 | .posts{ 2 | flex: 12; 3 | display: flex; 4 | flex-wrap: wrap; 5 | justify-content: center; 6 | } 7 | a:hover{ 8 | text-decoration: none; 9 | } 10 | .AllBlog{ 11 | display: flex; 12 | justify-content:center; 13 | align-items:center; 14 | 15 | transform: translateY(4px); 16 | } 17 | .Blog-But{ 18 | display: flex; 19 | justify-content:center; 20 | align-items:center; 21 | border-radius: 15px; 22 | font-weight:bolder; 23 | font-size: 20px; 24 | background-color: white; 25 | outline: none; 26 | border: none; 27 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.722); 28 | } 29 | .Blog-But:active{ 30 | position: relative; 31 | top:4px; 32 | box-shadow: none; 33 | } 34 | .Arrow{ 35 | font-size: 30px; 36 | margin: 4px 0 0; 37 | font-weight:bolder; 38 | } -------------------------------------------------------------------------------- /src/context/Context.js: -------------------------------------------------------------------------------- 1 | import { createContext, useEffect, useReducer } from "react"; 2 | import Reducer from "./Reducer"; 3 | 4 | const INITIAL_STATE = { 5 | user: JSON.parse(localStorage.getItem("user")) || null, 6 | isFetching: false, 7 | error: false, 8 | }; 9 | 10 | export const Context = createContext(INITIAL_STATE); 11 | 12 | export const ContextProvider = ({ children }) => { 13 | const [state, dispatch] = useReducer(Reducer, INITIAL_STATE); 14 | 15 | useEffect(() => { 16 | localStorage.setItem("user", JSON.stringify(state.user)); 17 | }, [state.user]); 18 | 19 | return ( 20 | 28 | {children} 29 | 30 | ); 31 | }; -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | 27 | 28 | **Smartphone (please complete the following information):** 29 | - Device: [e.g. iPhone6] 30 | - OS: [e.g. iOS8.1] 31 | - Browser [e.g. stock browser, safari] 32 | - Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /src/components/topbarDropDown/TopbarDropDown.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import DropDownElements from './DropDownElements'; 3 | import { Link } from 'react-router-dom'; 4 | import '../topbar/TopBar.css' 5 | const TopbarDropDown = () => { 6 | 7 | return <> 8 | {/*
  • 9 | 10 | Categories 11 | 12 |
      13 | 14 |
    15 |
  • */} 16 | 20 | ; 21 | }; 22 | 23 | export default TopbarDropDown; 24 | -------------------------------------------------------------------------------- /src/components/cards/Card.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./card.css"; 3 | import What from "../../assets/collaborate1.png"; 4 | function Card(props) { 5 | return ( 6 | <> 7 |
    8 |
    9 | {/* "https://th.bing.com/th/id/OIP.YRXVJb9uDspJlnhTjxdArAHaHa?pid=ImgDet&rs=1" */} 10 | 11 |
    12 |
    13 |
    {props.heading}
    14 |
    15 | {/* normal : It is the normal font-weight. It is the same as 400, the default numeric-value for boldness. 16 | bold : It is the bold font-weight. It is the same as 700. 17 | bolder : It sets the font-weight bolder than the */} 18 | {props.body} 19 |
    20 |
    21 |
    22 | 23 | ); 24 | } 25 | 26 | export default Card; 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Mohit yadav 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/context/Reducer.js: -------------------------------------------------------------------------------- 1 | const Reducer = (state, action) => { 2 | switch (action.type) { 3 | case "LOGIN_START": 4 | return { 5 | user: null, 6 | isFetching: true, 7 | error: false, 8 | }; 9 | case "LOGIN_SUCCESS": 10 | return { 11 | user: action.payload, 12 | isFetching: false, 13 | error: false, 14 | }; 15 | case "LOGIN_FAILURE": 16 | return { 17 | user: null, 18 | isFetching: false, 19 | error: true, 20 | }; 21 | case "UPDATE_START": 22 | return { 23 | ...state, 24 | isFetching:true 25 | }; 26 | case "UPDATE_SUCCESS": 27 | return { 28 | user: action.payload, 29 | isFetching: false, 30 | error: false, 31 | }; 32 | case "UPDATE_FAILURE": 33 | return { 34 | user: state.user, 35 | isFetching: false, 36 | error: true, 37 | }; 38 | case "LOGOUT": 39 | return { 40 | user: null, 41 | isFetching: false, 42 | error: false, 43 | }; 44 | default: 45 | return state; 46 | } 47 | }; 48 | 49 | export default Reducer; -------------------------------------------------------------------------------- /src/components/topbarDropDown/DropDownElements.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import { Link } from "react-router-dom"; 3 | import axios from "axios"; 4 | import { ThreeDots } from "react-loader-spinner"; 5 | 6 | const DropDownElements = () => { 7 | const [cats, setCats] = useState([]); 8 | const [exec, setExec] = useState(false); 9 | 10 | const getCats = async () => { 11 | const response = await axios.get( 12 | "https://algoders-backend.vercel.app/api/categories" 13 | ); 14 | console.log(response); 15 | setCats(response.data); 16 | setExec(true); 17 | }; 18 | useEffect(() => { 19 | getCats(); 20 | }, []); 21 | return ( 22 | <> 23 | {exec ? ( 24 | cats.map((cat) => ( 25 |
  • 26 | 31 | {cat.name} 32 | 33 |
  • 34 | )) 35 | ) : ( 36 |
    37 | 43 |
    44 | )} 45 | 46 | ); 47 | }; 48 | 49 | export default DropDownElements; 50 | -------------------------------------------------------------------------------- /src/components/post/Post.jsx: -------------------------------------------------------------------------------- 1 | import React,{useEffect} from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import parse from 'html-react-parser'; 4 | import './Post.css' 5 | import Aos from "aos"; 6 | import "aos/dist/aos.css"; 7 | 8 | function Post({ post }) { 9 | useEffect(()=>{ 10 | Aos.init({duration:3000}) 11 | }) 12 | console.log(parse(post.desc)) 13 | const postDesc = parse(post.desc); 14 | return
    15 | {/* {post.photo && } */} 16 |
    17 |
    18 | {post.categories.map((cat) => {cat})} 19 |
    20 | {post.title} 21 | {new Date(post.createdAt).toDateString()} 22 | {post.username} 23 | 24 | 25 | {/* {console.log(post.desc.substring(0,100))} */} 26 | {/*

    {postDesc}

    */} 27 |
    28 |
    29 | } 30 | 31 | export default Post; 32 | -------------------------------------------------------------------------------- /src/components/cards/card.css: -------------------------------------------------------------------------------- 1 | .card { 2 | display: flex; 3 | flex-direction: row; 4 | border: 1px black solid; 5 | justify-content: space-between; 6 | width: 36em; 7 | height: 12em; 8 | align-items: center; 9 | color: white; 10 | background-color: rgba(24, 23, 22); 11 | /* position:absolute; */ 12 | border-radius: 10px; 13 | /* margin-left: 10px; 14 | margin-top: 20px; */ 15 | border: 3px solid rgb(94, 93, 92); 16 | transition: 1s; 17 | } 18 | .card:hover { 19 | display: flex; 20 | flex-direction: row; 21 | border: 1px black solid; 22 | justify-content: space-between; 23 | width: 36em; 24 | height: 12em; 25 | align-items: center; 26 | color: white; 27 | background-color: rgb(68, 66, 62); 28 | /* position:absolute; */ 29 | border-radius: 10px; 30 | /* margin-left: 10px; 31 | margin-top: 20px; */ 32 | border: 3px solid rgb(94, 93, 92); 33 | transform: translateY(-6px); 34 | cursor: pointer; 35 | } 36 | .text { 37 | height: 10em; 38 | /* background-color:rgb(31, 182, 31); */ 39 | display: flex; 40 | flex-direction: column; 41 | justify-content: flex-start; 42 | border-radius: 10px; 43 | } 44 | .heading { 45 | padding-top: 5px; 46 | font-weight: 700; 47 | font-size: 25px; 48 | } 49 | .body { 50 | font-weight: 100; 51 | font-size: 17px; 52 | } 53 | 54 | .card-img { 55 | width: 9em; 56 | padding-right: 2em; 57 | } 58 | -------------------------------------------------------------------------------- /src/pages/write/write.css: -------------------------------------------------------------------------------- 1 | .write { 2 | padding-top: 50px; 3 | background-color: #001329; 4 | } 5 | 6 | .writeImg { 7 | align-items: center; 8 | border-radius: 10px; 9 | object-fit: cover; 10 | } 11 | .jodit-status-bar { 12 | visibility: collapse; 13 | } 14 | .jodit-container { 15 | display: flex; 16 | min-width: 600px; 17 | min-height: 600px; 18 | flex-direction: column; 19 | } 20 | .jodit-container textarea { 21 | width: 600px; 22 | } 23 | 24 | .writeForm { 25 | position: relative; 26 | display: flex; 27 | justify-content: center; 28 | flex-direction: column; 29 | align-items: center; 30 | } 31 | 32 | .writeFormGroup { 33 | display: flex; 34 | align-items: center; 35 | justify-content: center; 36 | flex-direction: column; 37 | } 38 | 39 | .writeIcon { 40 | margin: 20px; 41 | width: 25px; 42 | height: 25px; 43 | font-size: 20px; 44 | border: 1px solid; 45 | border-radius: 50%; 46 | color: white; 47 | display: flex; 48 | align-items: center; 49 | justify-content: center; 50 | cursor: pointer; 51 | } 52 | 53 | .writeInput { 54 | font-size: 30px; 55 | border: none; 56 | padding: 20px; 57 | width: 70vw; 58 | } 59 | 60 | .writeInput::placeholder { 61 | color: rgb(189, 185, 185); 62 | font-weight: 400; 63 | } 64 | 65 | .writeInput:focus { 66 | outline-style: none; 67 | } 68 | 69 | .writeText { 70 | width: 70vw; 71 | 72 | font-family: inherit; 73 | font-size: 20px; 74 | } 75 | -------------------------------------------------------------------------------- /src/components/sidebar/SideBar.css: -------------------------------------------------------------------------------- 1 | .sidebar { 2 | flex: 3; 3 | height: fit-content; 4 | margin: 20px; 5 | padding-bottom: 30px; 6 | background-color: #fdfbfb; 7 | border-radius: 10px; 8 | display: flex; 9 | flex-direction: column; 10 | align-items: center; 11 | } 12 | 13 | .sidebarItem { 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | } 18 | 19 | .sidebarTitle { 20 | margin: 10px; 21 | padding: 5px; 22 | width: 80%; 23 | border-top: solid 1px #a7a4a4; 24 | border-bottom: solid 1px #a7a4a4; 25 | text-align: center; 26 | font-family: "Varela Round", sans-serif; 27 | font-size: 12px; 28 | line-height: 19px; 29 | color: #222222; 30 | font-weight: 600; 31 | } 32 | 33 | .sidebarItem > img { 34 | margin-top: 15px; 35 | width: 250px; 36 | height: 250px; 37 | } 38 | 39 | .sidebarItem > p { 40 | padding: 30px; 41 | } 42 | 43 | .sidebarList { 44 | list-style-type: none; 45 | margin-bottom: 30px; 46 | } 47 | 48 | .sidebarListItem { 49 | display: inline-block; 50 | width: 50%; 51 | margin-top: 15px; 52 | cursor: pointer; 53 | } 54 | 55 | .sidebarSocial { 56 | margin-top: 15px; 57 | width: 250px; 58 | display: flex; 59 | align-items: center; 60 | justify-content: center; 61 | } 62 | 63 | .sidebarIcon { 64 | font-size: 16px; 65 | margin-left: 10px; 66 | } -------------------------------------------------------------------------------- /src/components/sidebar/SideBar.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import axios from 'axios'; 4 | import './SideBar.css'; 5 | 6 | function SideBar() { 7 | const [cats, setCats] = useState([]); 8 | const getCats = async () => { 9 | const response = await axios.get('https://algoders-backend.vercel.app/api/categories'); 10 | console.log(response); 11 | setCats(response.data); 12 | } 13 | useEffect(() => { 14 | getCats(); 15 | },[]); 16 | return
    17 |
    18 | CATEGORIES 19 |
      20 | {cats.map((cat) => ( 21 | 22 |
    • {cat.name}
    • 23 | 24 | ))} 25 |
    26 |
    27 |
    28 | FOLLOW US 29 |
    30 | 31 | 32 | 33 | 34 |
    35 |
    36 |
    ; 37 | } 38 | 39 | export default SideBar; 40 | -------------------------------------------------------------------------------- /src/components/posts/Posts.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Post from "../post/Post"; 3 | import { useLocation } from "react-router-dom"; 4 | import { useEffect, useState } from "react"; 5 | import axios from "axios"; 6 | import "./Posts.css"; 7 | import { Puff } from "react-loader-spinner"; 8 | import { Link } from 'react-router-dom'; 9 | const Posts = () => { 10 | const { search } = useLocation(); 11 | const [posts, setPosts] = useState([]); 12 | const [exec, setExec] = useState(false); 13 | 14 | const fetchPosts = async () => { 15 | const response = await axios.get( 16 | "https://algoders-backend.vercel.app/api/posts" + search 17 | ); 18 | console.log(response); 19 | setPosts(response.data); 20 | setExec(true); 21 | }; 22 | useEffect(() => { 23 | fetchPosts(); 24 | }, [search]); 25 | return ( 26 |
    27 |
    28 | {exec ? ( 29 | posts.map((post) => ) 30 | ) : ( 31 |
    32 | 33 |
    34 | )} 35 |
    36 |
    37 | {/* http://localhost:3000/blogs */} 38 | {window.location.href !== "https://www.algoderscommunity.tech/blogs" ? ( 39 |
    40 | 41 |
    42 | ) : ( 43 |
    44 | )} 45 |
    46 |
    47 | ); 48 | }; 49 | 50 | export default Posts; 51 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Related Issue 2 | - Mention issue for which this pull request is a part of (please mention issue number # ) 3 | 4 | ## Proposed Changes 5 | - Change 1 6 | - Chnage 2 7 | 8 | ## Additional Info 9 | - Any additional information or context 10 | 11 | ## Checklist 12 | 13 | 14 | 15 | - [ ] ✅ My code follows the code style of this project. 16 | - [ ] 📝 My change requires a change to the documentation. 17 | - [ ] 🎀 I have updated the documentation accordingly. 18 | - [ ] 👀 I have read the [**CONTRIBUTING**](https://github.com/mohityadav0903/Algoders-Community/blob/main/contribution.md) document. 19 | - [ ] 🌟 ed the repo 20 | 21 | 22 | - [ ] Bug fix (non-breaking change which fixes an issue) 23 | - [ ] New feature (non-breaking change which adds functionality) 24 | - [ ] Breaking change (fix or feature that would cause existing functionality to change) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | ## Output Screenshots 40 | | Screenshot #1 | Screenshot #2 | 41 | | ----------- | ----------- | 42 | | Title goes here | Title goes here | 43 | | Image goes here | Image goes here | 44 | -------------------------------------------------------------------------------- /src/pages/login/Login.css: -------------------------------------------------------------------------------- 1 | .login-container { 2 | 3 | background-color: #001329; 4 | 5 | background-color: black; 6 | 7 | display: flex; 8 | height: 80vh; 9 | justify-content: center; 10 | align-items: center; 11 | } 12 | .login { 13 | text-align: center; 14 | width: 450px; 15 | } 16 | .login-title { 17 | color: white; 18 | font-size: 30px; 19 | } 20 | .login-form { 21 | margin-top: 15px; 22 | display: flex; 23 | flex-direction: column; 24 | gap: 20px; 25 | padding: 20px; 26 | } 27 | .input { 28 | width: 100%; 29 | line-height: 2.5; 30 | padding: 5px 10px; 31 | font-size: 18px; 32 | border-radius: 10px; 33 | border: 1.5px solid gray; 34 | outline: none; 35 | background: transparent; 36 | color: #ffffff; 37 | } 38 | .input:focus { 39 | background-color: transparent; 40 | border: 1.5px solid #0b5ed7; 41 | } 42 | .input-container { 43 | display: flex; 44 | align-items: center; 45 | justify-content: end; 46 | width: 100%; 47 | } 48 | .input-wrap { 49 | width: 100%; 50 | display: flex; 51 | flex-direction: column; 52 | align-items: flex-start; 53 | } 54 | .input-password { 55 | position: relative; 56 | } 57 | .input-container i { 58 | position: absolute; 59 | margin-right: 4px; 60 | width: 37px; 61 | padding: 3px; 62 | } 63 | .form-text { 64 | text-align: left; 65 | } 66 | .login-footer p { 67 | font-size: 18px; 68 | margin-bottom: 0; 69 | line-height: 1.5; 70 | color: rgb(189, 189, 189); 71 | } 72 | .login-error { 73 | margin-top: 10px; 74 | } 75 | .login-footer p a { 76 | font-weight: 600; 77 | } 78 | .login-button { 79 | padding: 10px; 80 | width: 150px; 81 | border: none; 82 | background-color: #0b5ed7; 83 | color: white; 84 | font-size: 18px; 85 | font-weight: 600; 86 | border-radius: 10px; 87 | margin-top: 15px; 88 | } 89 | -------------------------------------------------------------------------------- /src/components/singlepost/SinglePost.css: -------------------------------------------------------------------------------- 1 | 2 | .singlePostWrapper { 3 | padding: 20px; 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | } 8 | 9 | .singlepostImg { 10 | border-radius: 5px; 11 | align-self: center; 12 | } 13 | 14 | .singlePostTitle { 15 | text-align: center; 16 | margin: 10px; 17 | font-family: "Lora", serif; 18 | font-size: 28px; 19 | color: white; 20 | } 21 | 22 | .singlePostTitleInput { 23 | margin: 10px; 24 | font-family: "Lora", serif; 25 | font-size: 28px; 26 | text-align: center; 27 | border: none; 28 | color: gray; 29 | border-bottom: 1px solid lightgray; 30 | } 31 | 32 | .singlePostTitleInput:focus { 33 | outline: none; 34 | } 35 | 36 | .singlePostEdit { 37 | float: right; 38 | font-size: 16px; 39 | } 40 | 41 | .singlePostIcon { 42 | margin-left: 10px; 43 | cursor: pointer; 44 | } 45 | 46 | .singlePostIcon:first-child { 47 | color: teal; 48 | } 49 | 50 | .singlePostIcon:last-child { 51 | color: tomato; 52 | } 53 | 54 | .singlePostInfo { 55 | margin-bottom: 20px; 56 | display: flex; 57 | justify-content: space-between; 58 | font-size: 16px; 59 | font-family: "Varela Round", sans-serif; 60 | color: #b39656; 61 | } 62 | 63 | .singlePostDesc { 64 | color: white; 65 | font-size: 18px; 66 | line-height: 25px; 67 | } 68 | 69 | .singlePostDesc::first-letter { 70 | margin-left: 20px; 71 | font-size: 30px; 72 | font-weight: 600; 73 | } 74 | 75 | .singlePostDescInput { 76 | border: none; 77 | color: #666; 78 | font-size: 18px; 79 | line-height: 25px; 80 | } 81 | 82 | .singlePostDescInput:focus { 83 | outline: none; 84 | } 85 | .singlePostButton { 86 | width: 100px; 87 | border: none; 88 | background-color: teal; 89 | padding: 5px; 90 | color: white; 91 | border-radius: 5px; 92 | cursor: pointer; 93 | align-self: flex-end; 94 | margin-top: 20px; 95 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react_blog_app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "engines": { 6 | "node": "16.x" 7 | }, 8 | "dependencies": { 9 | "@emotion/react": "^11.8.1", 10 | "@emotion/styled": "^11.8.1", 11 | "@mui/icons-material": "^5.4.4", 12 | "@mui/material": "^5.4.4", 13 | "@testing-library/jest-dom": "^5.16.1", 14 | "@testing-library/react": "^12.1.2", 15 | "@testing-library/user-event": "^13.5.0", 16 | "@tinymce/tinymce-react": "^3.13.0", 17 | "aos": "^2.3.4", 18 | "axios": "^0.25.0", 19 | "bootstrap": "^5.2.2", 20 | "firebase": "^9.6.5", 21 | "formik": "^2.2.9", 22 | "html-react-parser": "^1.4.8", 23 | "jodit-react": "^1.1.22", 24 | "notistack": "^2.0.8", 25 | "react": "^17.0.2", 26 | "react-bootstrap": "^2.5.0", 27 | "react-dom": "^17.0.2", 28 | "react-icons": "^4.3.1", 29 | "react-loader-spinner": "^6.0.0-0", 30 | "react-responsive-carousel": "^3.2.23", 31 | "react-router-dom": "^6.2.1", 32 | "react-scripts": "^5.0.0", 33 | "react-scroll": "^1.8.5", 34 | "web-vitals": "^2.1.4", 35 | "yup": "^0.32.11" 36 | }, 37 | "scripts": { 38 | "start": "react-scripts start", 39 | "build": "react-scripts build", 40 | "test": "react-scripts test", 41 | "eject": "react-scripts eject" 42 | }, 43 | "eslintConfig": { 44 | "extends": [ 45 | "react-app", 46 | "react-app/jest" 47 | ] 48 | }, 49 | "browserslist": { 50 | "production": [ 51 | ">0.2%", 52 | "not dead", 53 | "not op_mini all" 54 | ], 55 | "development": [ 56 | "last 1 chrome version", 57 | "last 1 firefox version", 58 | "last 1 safari version" 59 | ] 60 | }, 61 | "devDependencies": { 62 | "autoprefixer": "^10.4.2", 63 | "install": "^0.13.0", 64 | "npm": "^8.4.0", 65 | "postcss": "^8.4.5" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import Home from "./pages/home/Home"; 2 | import About from "./pages/about/About"; 3 | // import Card from "./components/cards/Card"; 4 | 5 | import TopBar from "./components/topbar/TopBar"; 6 | import Footer from "./components/footer/Footer"; 7 | import Contact from "./components/contact/contact"; 8 | import Blogs from "./components/blogs/Blogs"; 9 | import ContactSection from "./components/contactSection/ContactSection"; 10 | 11 | import SinglePostPage from "./pages/singlePost/SinglePostPage"; 12 | import Write from "./pages/write/Write"; 13 | import Settings from "./pages/settings/Settings"; 14 | import Login from "./pages/login/Login"; 15 | import Register from "./pages/register/Register"; 16 | import Mentor from "./components/joinus/Mentor"; 17 | import { Routes, Route } from "react-router-dom"; 18 | import { useContext, useEffect } from "react"; 19 | import { Context } from "./context/Context"; //header 26 | 27 | {/* */} 28 | 29 | 30 | } /> 31 | } /> 32 | } /> 33 | } /> 34 | : } /> 35 | : } /> 36 | : } /> 37 | : } /> 38 | } /> 39 | } /> 40 | 41 | 42 |