diff --git a/README.md b/README.md
index 8f61b6e..1362df8 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ https://user-images.githubusercontent.com/43780137/158059050-481ffa30-e415-4156-
As the name suggests, this project is a clone of a famous Q/A website for professional and enthusiast programmers built solely by me using a completely different stack.
-This repo consists of the Frontend code of the project, the backend code is in __[Stackoverflow-Clone-Backend](https://github.com/Mayank0255/Stackoverflow-Clone-Backend)__
+This repo consists of the Frontend code of the project, the backend code is in __[Devcomm-Backend](https://github.com/Mayank0255/Stackoverflow-Clone-Backend)__
## My Tech Stack (MERN)
@@ -38,8 +38,8 @@ There are two ways to setup the project: manually or using the Dockerfile. Read
1. Open your local CLI -
```
- mkdir Stackoverflow-Clone
- cd Stackoverflow-Clone
+ mkdir Devcomm
+ cd Devcomm
```
2. Setup the backend code -
@@ -65,7 +65,7 @@ There are two ways to setup the project: manually or using the Dockerfile. Read
- Run the index `npm start`.
-3. Open a new CLI terminal and goto the root `Stackoverflow-Clone` folder you created in the first step.
+3. Open a new CLI terminal and goto the root `Devcomm` folder you created in the first step.
4. Setup the Frontend code -
- Clone the code & install the modules-
diff --git a/package.json b/package.json
index 455ecf2..9e3cc9e 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,10 @@
"dependencies": {
"@emotion/react": "^11.8.1",
"@emotion/styled": "^11.8.1",
+ "@fortawesome/fontawesome-svg-core": "^6.2.0",
+ "@fortawesome/free-regular-svg-icons": "^6.2.0",
+ "@fortawesome/free-solid-svg-icons": "^6.2.0",
+ "@fortawesome/react-fontawesome": "^0.2.0",
"@mui/icons-material": "^5.5.0",
"@mui/material": "^5.5.0",
"@stackoverflow/stacks-icons": "^2.25.1",
diff --git a/public/IconLogo.svg b/public/IconLogo.svg
new file mode 100644
index 0000000..f0efc5e
--- /dev/null
+++ b/public/IconLogo.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/public/index.html b/public/index.html
index 493325b..7be6622 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,7 +2,7 @@
-
+
- CLONE Stack Overflow - Where Developers Learn, Share, & Build Careers
+ Devcomm - Where Developers Learn, Share, & Build Careers
{
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
};
diff --git a/src/Router.jsx b/src/Router.jsx
index 37adc7a..01f017c 100644
--- a/src/Router.jsx
+++ b/src/Router.jsx
@@ -1,28 +1,17 @@
import React from 'react';
import { Route } from 'react-router-dom';
-import LayoutWrapper from './components/organisms/LayoutWrapper/LayoutWrapper.component';
+import RightSideBar from './components/organisms/RightSideBar/RightSideBar.component';
import usePageTitle from './hooks/usePageTitle';
-export const LayoutRoute = ({ title, children, ...props }) => {
- usePageTitle(title);
-
- return (
-
-
- {children}
-
-
- )
-}
-
-export const BaseRoute = ({ title, children, ...props }) => {
+export const PrivateRoute = ({ title, withRightSideBar = true, children, ...props }) => {
usePageTitle(title);
return (
{children}
+ {withRightSideBar && }
)
}
diff --git a/src/assets/IconLogo.svg b/src/assets/IconLogo.svg
new file mode 100644
index 0000000..f0efc5e
--- /dev/null
+++ b/src/assets/IconLogo.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/TextLogo.svg b/src/assets/TextLogo.svg
new file mode 100644
index 0000000..db36cd0
--- /dev/null
+++ b/src/assets/TextLogo.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/PageTitle/PageTitle.component.jsx b/src/components/PageTitle/PageTitle.component.jsx
index 2ff7475..9f8d977 100644
--- a/src/components/PageTitle/PageTitle.component.jsx
+++ b/src/components/PageTitle/PageTitle.component.jsx
@@ -3,7 +3,7 @@ import Helmet from 'react-helmet';
const PageTitle = ({title}) => {
let defaultTitle =
- 'CLONE Stack Overflow - Where Developers Learn, Share, & Build Careers';
+ 'Devcomm - Where Developers Learn, Share, & Build Careers';
return (
diff --git a/src/components/atoms/box.atom.jsx b/src/components/atoms/box.atom.jsx
index 2226bf2..685ccd1 100644
--- a/src/components/atoms/box.atom.jsx
+++ b/src/components/atoms/box.atom.jsx
@@ -8,6 +8,7 @@ import {
typography,
border,
background,
+ shadow,
} from 'styled-system';
export const Box = styled.div`
@@ -21,6 +22,9 @@ export const Box = styled.div`
${typography}
${border}
${background}
+ ${shadow}
+ transform: ${({ transform = 'none' }) => transform};
+ visibility: ${({ visibility = 'visible' }) => visibility};
`;
export const FlexBox = styled(Box)`
diff --git a/src/components/atoms/circle.atom.jsx b/src/components/atoms/circle.atom.jsx
new file mode 100644
index 0000000..7f0be0c
--- /dev/null
+++ b/src/components/atoms/circle.atom.jsx
@@ -0,0 +1,15 @@
+import { Box } from './box.atom';
+import styled from '@emotion/styled';
+
+const Circle = styled(Box)`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: ${({ radius = '5px' }) => `calc(${radius} * 2)`};
+ width: ${({ radius = '5px' }) => `calc(${radius} * 2)`};
+ border-radius: 50%;
+ border: ${({ border = '0' }) => border};
+ cursor: ${({ cursor = 'pointer' }) => cursor};
+`;
+
+export default Circle;
diff --git a/src/components/atoms/icon.atom.jsx b/src/components/atoms/icon.atom.jsx
new file mode 100644
index 0000000..c9a1701
--- /dev/null
+++ b/src/components/atoms/icon.atom.jsx
@@ -0,0 +1,24 @@
+import styled from '@emotion/styled';
+import {
+ space,
+ color,
+ layout,
+ position,
+ typography,
+ textAlign,
+} from 'styled-system';
+
+const Icon = styled.span`
+ font-family: 'Wasabi';
+ &:before {
+ content: ${({ unicode }) => `'\\${unicode}'`};
+ }
+ ${space}
+ ${color}
+ ${layout}
+ ${position}
+ ${typography}
+ ${textAlign}
+`;
+
+export default Icon;
diff --git a/src/components/atoms/image.atom.jsx b/src/components/atoms/image.atom.jsx
new file mode 100644
index 0000000..9463f56
--- /dev/null
+++ b/src/components/atoms/image.atom.jsx
@@ -0,0 +1,24 @@
+import styled from '@emotion/styled';
+import {
+ space,
+ color,
+ layout,
+ flexbox,
+ position,
+ typography,
+ border,
+ background,
+ shadow,
+} from 'styled-system';
+
+export const Image = styled.img`
+ ${space}
+ ${color}
+ ${layout}
+ ${flexbox}
+ ${position}
+ ${typography}
+ ${border}
+ ${background}
+ ${shadow}
+`
\ No newline at end of file
diff --git a/src/components/atoms/link.atom.jsx b/src/components/atoms/link.atom.jsx
new file mode 100644
index 0000000..47b1f76
--- /dev/null
+++ b/src/components/atoms/link.atom.jsx
@@ -0,0 +1,26 @@
+import styled from '@emotion/styled';
+import {
+ space,
+ color,
+ layout,
+ flexbox,
+ position,
+ typography,
+ border,
+ background,
+ shadow,
+} from 'styled-system';
+
+import {Link} from 'react-router-dom';
+
+export const CustomLink = styled(Link)`
+ ${space}
+ ${color}
+ ${layout}
+ ${flexbox}
+ ${position}
+ ${typography}
+ ${border}
+ ${background}
+ ${shadow}
+`
\ No newline at end of file
diff --git a/src/components/molecules/Search/SearchBox.component.jsx b/src/components/molecules/Search/SearchBox.component.jsx
new file mode 100644
index 0000000..22decdb
--- /dev/null
+++ b/src/components/molecules/Search/SearchBox.component.jsx
@@ -0,0 +1,40 @@
+import React from 'react';
+
+import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons'
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+
+import { FlexBox } from '../../atoms/box.atom';
+import { blue } from '../../../themes';
+
+import { SearchInput } from './styles';
+
+const SearchBox = ({
+ formBg = `${blue._50}26`,
+ value,
+ handleSubmit,
+ ...props
+}) => {
+ return (
+
+
+
+
+ )
+};
+
+export default SearchBox;
diff --git a/src/components/molecules/Search/SearchForm.component.jsx b/src/components/molecules/Search/SearchForm.component.jsx
new file mode 100644
index 0000000..d27d6ac
--- /dev/null
+++ b/src/components/molecules/Search/SearchForm.component.jsx
@@ -0,0 +1,16 @@
+import React from 'react';
+
+import SearchBox from './SearchBox.component';
+
+const SearchForm = ({ handleSubmit = () => {}, ...props }) => {
+ return (
+
+ )
+}
+
+export default SearchForm;
\ No newline at end of file
diff --git a/src/components/molecules/Search/styles.js b/src/components/molecules/Search/styles.js
new file mode 100644
index 0000000..04412ab
--- /dev/null
+++ b/src/components/molecules/Search/styles.js
@@ -0,0 +1,12 @@
+import styled from '@emotion/styled';
+
+import { blue } from '../../../themes';
+
+export const SearchInput = styled.input`
+ background: ${({ bg = 'transparent' }) => bg} !important;
+ border: ${({ border = 'transparent' }) => border} !important;
+ box-shadow: ${({ boxShadow = 'none' }) => boxShadow} !important;
+ color: ${({ color = blue._50 }) => color} !important;
+ width: ${({ width = '100%' }) => width} !important;
+ font-weight: ${({ fontWeight = 500 }) => fontWeight} !important;
+`
\ No newline at end of file
diff --git a/src/components/molecules/SearchBox/SearchBox.component.jsx b/src/components/molecules/SearchBox/SearchBox.component.jsx
deleted file mode 100644
index d2480d4..0000000
--- a/src/components/molecules/SearchBox/SearchBox.component.jsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import React, {Fragment} from 'react';
-import {ReactComponent as Search} from '../../../assets/Search.svg';
-
-const SearchBox = ({
- placeholder,
- value,
- name,
- handleSubmit,
- handleChange,
- pt,
- px,
- width,
-}) => {
- return (
-
-
-
- );
-};
-
-export default SearchBox;
diff --git a/src/components/molecules/SearchBox/SearchBox.styles.scss b/src/components/molecules/SearchBox/SearchBox.styles.scss
deleted file mode 100644
index 945b8ce..0000000
--- a/src/components/molecules/SearchBox/SearchBox.styles.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-.search-frame {
- width: 220px;
- //float: right;
-}
-
-.search-box:focus {
- border-color: #2b5f8a;
- box-shadow: 0 0 0 4px #378ad326;
- color: #fff;
- outline: 0;
-}
\ No newline at end of file
diff --git a/src/components/organisms/AuthForm/AuthForm.styles.scss b/src/components/organisms/AuthForm/AuthForm.styles.scss
index c477f18..2cde21e 100644
--- a/src/components/organisms/AuthForm/AuthForm.styles.scss
+++ b/src/components/organisms/AuthForm/AuthForm.styles.scss
@@ -5,7 +5,7 @@
margin-left: auto;
margin-right: auto;
margin-bottom: 24px;
- background-color: #2d2d2d;
+ background-color: #2548A7;
border-radius: 7px;
box-sizing: inherit;
display: block;
diff --git a/src/components/organisms/Footer/Footer.component.jsx b/src/components/organisms/Footer/Footer.component.jsx
deleted file mode 100644
index 39d4463..0000000
--- a/src/components/organisms/Footer/Footer.component.jsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import React, { Fragment } from "react";
-
-import {ReactComponent as GitHub} from "../../../assets/GitHub.svg";
-import {ReactComponent as Database} from "../../../assets/Database.svg";
-
-import './Footer.styles.scss';
-
-const Footer = () => {
- return
-
-
-};
-
-export default Footer;
\ No newline at end of file
diff --git a/src/components/organisms/Footer/Footer.styles.scss b/src/components/organisms/Footer/Footer.styles.scss
deleted file mode 100644
index 29d84a2..0000000
--- a/src/components/organisms/Footer/Footer.styles.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-.footer {
- height: 300px;
- display: flex;
- justify-content: center;
- padding-top: 32px;
- background-color: #232629;
-
- .socials {
- display: flex;
- justify-content: space-between;
- width: 120px;
-
- .social-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- }
-}
\ No newline at end of file
diff --git a/src/components/organisms/Header/Header.component.jsx b/src/components/organisms/Header/Header.component.jsx
index ee7bbcd..2a68a70 100644
--- a/src/components/organisms/Header/Header.component.jsx
+++ b/src/components/organisms/Header/Header.component.jsx
@@ -1,34 +1,50 @@
-import React, {Fragment, useState} from 'react';
-import {Link, useHistory} from 'react-router-dom';
+import React from 'react';
+import { Link, useHistory } from 'react-router-dom';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
-import { logout } from '../../../redux/auth/auth.actions';
-import {ReactComponent as Search} from '../../../assets/Search.svg';
-import {ReactComponent as Logo} from '../../../assets/LogoMd.svg';
-import {ReactComponent as SmallLogo} from '../../../assets/LogoGlyphMd.svg';
import Spinner from '../../molecules/Spinner/Spinner.component';
import LinkButton from '../../molecules/LinkButton/LinkButton.component';
import MobileSideBar from '../../organisms/MobileSideBar/MobileSideBar.component';
+import { Box, FlexBox } from '../../atoms/box.atom';
+import SearchForm from '../../molecules/Search/SearchForm.component';
+
+import { logout } from '../../../redux/auth/auth.actions';
+
+import { Image } from '../../atoms/image.atom';
+import { CustomLink } from '../../atoms/link.atom';
+import IconLogo from '../../../assets/IconLogo.svg';
+import TextLogo from '../../../assets/TextLogo.svg';
+import { blue } from '../../../themes';
import './Header.styles.scss';
const Header = ({auth: {isAuthenticated, loading, user}, logout}) => {
let history = useHistory();
- const [searchState, setSearchState] = useState(false);
const authLinks = (
-
+
{loading || user === null ? (
) : (
-
-
+
-
+
)}
{
type={'s-btn__filled'}
handleClick={logout}
/>
-
- );
-
- const authTabs = (
-
-
- Products
-
-
- );
-
- const guestTabs = (
-
-
- Products
-
-
- Customers
-
-
- Use cases
-
-
+
);
const guestLinks = (
-
+
-
+
);
- const SearchBar = () => {
- return (
-
- );
- }
-
-
- return loading ? (
- ''
- ) : (
-
-
-
-
-
-
-
-
-
-
- {!loading && (
- {isAuthenticated ? authTabs : guestTabs}
- )}
-
-
-
-
- setSearchState(!searchState)} />
+
+
{!loading && (
- {isAuthenticated ? authLinks : guestLinks}
+
+ {isAuthenticated ? authLinks : guestLinks}
+
)}
-
-
- {searchState && }
-
+
+
+
);
};
diff --git a/src/components/organisms/Header/Header.styles.scss b/src/components/organisms/Header/Header.styles.scss
index 57b4843..9be3cd6 100644
--- a/src/components/organisms/Header/Header.styles.scss
+++ b/src/components/organisms/Header/Header.styles.scss
@@ -1,277 +1,12 @@
-.navbar {
- height: 63px;
- border-top: 3px solid #f48024;
- padding: 3px 3px 0 0;
- box-shadow: 5px 2px rgba(0,0,0,0.1);
- z-index: 1000;
- background-color: #3d3d3d;
- display: flex;
- justify-content: space-between;
-}
-
-.fixed-top {
- position: fixed;
- top: 0;
- right: 0;
- left: 0;
-}
-
-.s-navigation {
- padding: 2px 2px;
-}
-
-.s-navigation .not-selected {
- color: #c4c8cc;
-
- &:hover {
- background-color: #404345;
- color: #f2f2f3;
- text-decoration: none;
- outline: none;
- }
-}
-
-* {
- box-sizing: border-box;
-}
-
-.navbar-brand {
- margin-left: 90px;
- padding-left: 16px;
- padding-right: 16px;
- margin-right: 0;
-
- &:hover {
- background-color: #404345;
- }
-}
-
-.btns {
- margin-right: 140px;
- display: flex;
- justify-content: center;
- align-items: center;
-
- .logo {
- width: 32px;
- border-radius: 3px;
- margin-right: 9px;
- }
-}
-
-.btn-sm {
- padding: 5px 10px;
-}
-
-.btn-outline-primary {
- background-color: #e1ecf4;
- color: #39739d;
- border-color: #7aa7c7;
-}
-
-.btn-outline-primary:hover {
- color: #2c5777;
- background-color: #b3d3ea;
- border-color: #7aa7c7;
-}
-
-.bar-items {
- font-size: 14px;
- color: rgba(0, 0, 0, 0.6);
- margin: 0 10px;
-}
-
-.px12 {
- padding-left: 12px !important;
- padding-right: 12px !important;
-}
-
-.header-brand-div {
- display: flex;
- align-items: center;
-}
-
-.header-search-div {
- display: flex;
- justify-content: flex-end;
- align-items: center
-}
-
-.glyph-logo {
- display: none;
-}
-
-.search-icon {
- display: none;
- filter: invert(1);
-
- &:hover {
- cursor: pointer;
- }
-}
-
-.small-search {
- width: 98vw;
- position: fixed;
- top: 69px;
- left: 5px;
- border-radius: 8px;
-}
-
-.small-search-form {
- position: fixed;
- display: flex;
- z-index: 1000;
- padding: 2rem;
- justify-content: center;
- align-items: center;
- width: 100vw;
- background-color: #00000042;
- box-shadow: 2px 2px 8px 3px gray;
-}
-
-.small-search-icon {
- position: fixed;
- top: 80px;
- right: 5%;
-}
-
-.s-input__search{
- margin-top: 10px;
-}
-.s-input-icon {
- margin-top: -2px;
-}
-
// Side Navbar
.hamburger {
display: none;
}
-///////////////
-
-@media(max-width: 1280px) {
- .navbar-brand {
- margin-left: 60px;
- }
-}
-
-@media(max-width: 1200px) {
- .btns {
- margin-right: 30px;
- }
-}
-
-@media (max-width:986px) {
- .navbar-brand {
- margin-left: 20px ;
- }
- .btns {
- margin-right: 20px;
- }
-}
-
-@media (max-width: 877px){
- .navbar-brand {
- margin-left: 0;
- }
- .header-brand-div {
- justify-content: flex-start;
- padding: 0 1.5rem;
- }
- .header-search-div {
- justify-content: space-around;
- }
- .searchbar {
- display: none;
- }
- .search-icon {
- display: block;
- margin-right: 1rem;
- position: absolute;
- left: 77%;
- top: 30%;
- }
-
- .btns {
- margin-right: 20px;
- }
- .s-input__search {
- max-width: 250px;
- }
-}
-
-
-@media (max-width: 715px) {
- .glyph-logo {
- display: block;
- }
- .full-logo {
- display: none;
- }
- .search-icon {
- display: block;
- position: relative;
- left: 15%;
- top: 30%;
- }
-}
-
@media (max-width: 560px) {
- .glyph-logo {
- display: block;
- }
- .full-logo {
- display: none;
- }
- .s-navigation .s-navigation--item {
- display: none;
-
- &:first-of-type {
- display: inline;
- }
- }
- .search-icon {
- display: block;
- position: relative;
- left: 5%;
- top: 30%;
- }
.hamburger {
display: block;
padding-top: 6px;
}
- .header-search-div, .header-brand-div {
- transform: scale(0.8);
- }
-}
-
-@media (max-width: 420px) {
- .glyph-logo{
- display: none;
- }
- .s-navigation .s-navigation--item {
- &:first-of-type {
- margin-left: -4.7rem;
- }
- }
- .search-icon {
- display: block;
- position: relative;
- left: 5%;
- top: 30%;
- }
-}
-
-@media (max-width: 390px) {
- .navbar {
- padding: 0;
- }
-}
-
-@media (max-width: 345px) {
- .glyph-logo {
- display: none;
- }
}
\ No newline at end of file
diff --git a/src/components/organisms/LayoutWrapper/LayoutWrapper.component.jsx b/src/components/organisms/LayoutWrapper/LayoutWrapper.component.jsx
deleted file mode 100644
index f560528..0000000
--- a/src/components/organisms/LayoutWrapper/LayoutWrapper.component.jsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import React, {Fragment} from 'react';
-
-import SideBar from './SideBar/SideBar.component';
-import RightSideBar from './RightSideBar/RightSideBar.component';
-import Footer from "../Footer/Footer.component";
-
-const LayoutWrapper = ({ children }) => {
- return (
-
-
-
-
- );
-};
-
-export default LayoutWrapper;
diff --git a/src/components/organisms/LayoutWrapper/SideBar/SideBar.component.jsx b/src/components/organisms/LayoutWrapper/SideBar/SideBar.component.jsx
deleted file mode 100644
index 3c0972d..0000000
--- a/src/components/organisms/LayoutWrapper/SideBar/SideBar.component.jsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react';
-
-import SideBarItem from "./SideBarItem.component";
-import { SideBarData } from "./SideBarData";
-
-import './SideBar.styles.scss';
-
-const SideBar = () => (
-
-
-
-
-
-
PUBLIC
- {SideBarData.map(({ link, icon, text}, index) => (
-
- ))}
-
-
-
-
-);
-
-export default SideBar;
diff --git a/src/components/organisms/LayoutWrapper/SideBar/SideBar.styles.scss b/src/components/organisms/LayoutWrapper/SideBar/SideBar.styles.scss
deleted file mode 100644
index cf03d18..0000000
--- a/src/components/organisms/LayoutWrapper/SideBar/SideBar.styles.scss
+++ /dev/null
@@ -1,79 +0,0 @@
-.side-bar-container {
- width: 17%;
- min-width: 206px;
- flex-shrink: 0;
- z-index: 1;
- box-shadow: 0 0 0 rgba(12,13,14,0.05);
- transition: box-shadow ease-in-out .1s,transform ease-in-out .1s;
- position: relative !important;
- background-color: #3d3d3d;
-
- .side-bar-tabs {
- float: right;
- margin-top:25px;
-
- .public-tabs {
- margin-bottom: 12px;
- }
-
- .nav-link {
- text-decoration: none;
- color: #c4c8cc;
-
- li {
- font-size: 13px;
-
- .menu-list-icon {
- min-width: 21px !important;
- }
-
- .menu-list-text {
- margin: 0 !important;
- }
- }
- }
-
- .home-link {
- li {
- border-right: 3px;
- margin-bottom: 12px;
- }
- }
-
- .icon-link {
- li {
- border-right: 3px solid transparent;
- width: 160px;
-
- .menu-list-btn {
- padding-left: 8px;
- }
- }
- }
-
- .title {
- font-size: 12px;
- padding-left: 8px;
- margin-bottom: 5px;
- }
-
- .active {
- li {
- font-weight: bold;
- background: #2d2d2d;
- color: #f2f2f3;
- border-right: 3px solid #f48024;
- }
-
- .menu-list-text > span {
- font-weight: 700;
- }
- }
- }
-}
-
-@media (max-width: 768px) {
- .side-bar-container {
- display: none;
- }
-}
diff --git a/src/components/organisms/LayoutWrapper/SideBar/SideBarData.js b/src/components/organisms/LayoutWrapper/SideBar/SideBarData.js
deleted file mode 100644
index 2303e5e..0000000
--- a/src/components/organisms/LayoutWrapper/SideBar/SideBarData.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import { ReactComponent as GlobalIcon } from '../../../../assets/Globe.svg';
-
-export const SideBarData = [
- {
- link: '/questions',
- icon: ,
- text: 'Questions',
- },
- {
- link: '/tags',
- text: 'Tags',
- },
- {
- link: '/users',
- text: 'Users',
- },
- {
- link: '/jobs',
- text: 'Jobs',
- }
-]
\ No newline at end of file
diff --git a/src/components/organisms/LayoutWrapper/SideBar/SideBarItem.component.jsx b/src/components/organisms/LayoutWrapper/SideBar/SideBarItem.component.jsx
deleted file mode 100644
index 7f02e00..0000000
--- a/src/components/organisms/LayoutWrapper/SideBar/SideBarItem.component.jsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import React, { Fragment } from 'react';
-import { NavLink } from 'react-router-dom';
-
-import { ListItem, ListItemButton, ListItemIcon, ListItemText } from '@mui/material';
-
-import './SideBar.styles.scss';
-
-const SideBarItem = ({ link, icon, text, isHome }) => {
- return (
-
- {isHome ?
- :
-
- }
-
- )
-};
-
-const HomeItem = ({ link, text }) => (
-
-
-
-
-
-
-
-)
-
-const DefaultItem = ({ link, icon, text }) => (
-
-
-
-
- {icon}
-
-
-
-
-
-)
-
-SideBarItem.defaultProps = {
- isHome: false,
-};
-
-export default SideBarItem;
diff --git a/src/components/organisms/Pagination/Pagination.component.jsx b/src/components/organisms/Pagination/Pagination.component.jsx
index 66327ee..b27b073 100644
--- a/src/components/organisms/Pagination/Pagination.component.jsx
+++ b/src/components/organisms/Pagination/Pagination.component.jsx
@@ -1,6 +1,8 @@
import React, { Fragment } from "react";
import { Pagination as MuiPagination, PaginationItem } from "@mui/material";
+import { blue } from "../../../themes";
+
const Pagination = ({
page,
itemList,
@@ -17,7 +19,14 @@ const Pagination = ({
onChange={handlePaginationChange}
style={{ float: 'right', margin: '0 13px 16px 0' }}
renderItem={(item) => (
-
+
)}
/>
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/RightSideBar.component.jsx b/src/components/organisms/RightSideBar/RightSideBar.component.jsx
similarity index 100%
rename from src/components/organisms/LayoutWrapper/RightSideBar/RightSideBar.component.jsx
rename to src/components/organisms/RightSideBar/RightSideBar.component.jsx
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/RightSideBar.styles.scss b/src/components/organisms/RightSideBar/RightSideBar.styles.scss
similarity index 100%
rename from src/components/organisms/LayoutWrapper/RightSideBar/RightSideBar.styles.scss
rename to src/components/organisms/RightSideBar/RightSideBar.styles.scss
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/SideBarWidget/SideBarWidget.component.jsx b/src/components/organisms/RightSideBar/SideBarWidget/SideBarWidget.component.jsx
similarity index 100%
rename from src/components/organisms/LayoutWrapper/RightSideBar/SideBarWidget/SideBarWidget.component.jsx
rename to src/components/organisms/RightSideBar/SideBarWidget/SideBarWidget.component.jsx
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/SideBarWidget/SideBarWidget.styles.scss b/src/components/organisms/RightSideBar/SideBarWidget/SideBarWidget.styles.scss
similarity index 100%
rename from src/components/organisms/LayoutWrapper/RightSideBar/SideBarWidget/SideBarWidget.styles.scss
rename to src/components/organisms/RightSideBar/SideBarWidget/SideBarWidget.styles.scss
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/SideBarWidget/SideBarWidgetData.js b/src/components/organisms/RightSideBar/SideBarWidget/SideBarWidgetData.js
similarity index 97%
rename from src/components/organisms/LayoutWrapper/RightSideBar/SideBarWidget/SideBarWidgetData.js
rename to src/components/organisms/RightSideBar/SideBarWidget/SideBarWidgetData.js
index 2711e43..ab4da42 100644
--- a/src/components/organisms/LayoutWrapper/RightSideBar/SideBarWidget/SideBarWidgetData.js
+++ b/src/components/organisms/RightSideBar/SideBarWidget/SideBarWidgetData.js
@@ -1,6 +1,6 @@
import React from "react";
-import { ReactComponent as EditLogo } from "../../../../../assets/Edit.svg";
+import { ReactComponent as EditLogo } from "../../../../assets/Edit.svg";
export const SideBarWidgetData = [
{
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidget.component.jsx b/src/components/organisms/RightSideBar/TagsWidget/TagsWidget.component.jsx
similarity index 94%
rename from src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidget.component.jsx
rename to src/components/organisms/RightSideBar/TagsWidget/TagsWidget.component.jsx
index 6e5641b..1ad789a 100644
--- a/src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidget.component.jsx
+++ b/src/components/organisms/RightSideBar/TagsWidget/TagsWidget.component.jsx
@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
import PropTypes from 'prop-types';
import {Link} from 'react-router-dom';
-import {getTags} from '../../../../../redux/tags/tags.actions';
+import {getTags} from '../../../../redux/tags/tags.actions';
import TagsWidgetItem from "./TagsWidgetItem.component";
import './TagsWidget.styles.scss';
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidget.styles.scss b/src/components/organisms/RightSideBar/TagsWidget/TagsWidget.styles.scss
similarity index 100%
rename from src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidget.styles.scss
rename to src/components/organisms/RightSideBar/TagsWidget/TagsWidget.styles.scss
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidgetItem.component.jsx b/src/components/organisms/RightSideBar/TagsWidget/TagsWidgetItem.component.jsx
similarity index 87%
rename from src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidgetItem.component.jsx
rename to src/components/organisms/RightSideBar/TagsWidget/TagsWidgetItem.component.jsx
index 459d33d..87ff788 100644
--- a/src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidgetItem.component.jsx
+++ b/src/components/organisms/RightSideBar/TagsWidget/TagsWidgetItem.component.jsx
@@ -1,6 +1,6 @@
import React, {Fragment} from "react";
-import TagBadge from "../../../../molecules/TagBadge/TagBadge.component";
+import TagBadge from "../../../molecules/TagBadge/TagBadge.component";
import './TagsWidgetItem.styles.scss';
diff --git a/src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidgetItem.styles.scss b/src/components/organisms/RightSideBar/TagsWidget/TagsWidgetItem.styles.scss
similarity index 100%
rename from src/components/organisms/LayoutWrapper/RightSideBar/TagsWidget/TagsWidgetItem.styles.scss
rename to src/components/organisms/RightSideBar/TagsWidget/TagsWidgetItem.styles.scss
diff --git a/src/components/organisms/SideBar/SideBar.component.jsx b/src/components/organisms/SideBar/SideBar.component.jsx
new file mode 100644
index 0000000..0cf3b79
--- /dev/null
+++ b/src/components/organisms/SideBar/SideBar.component.jsx
@@ -0,0 +1,64 @@
+import React, { useState } from 'react';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { faAngleLeft } from '@fortawesome/free-solid-svg-icons'
+
+import SideBarItem from "./SideBarItem.component";
+import { SideBarData } from "./SideBarData";
+import { FlexBoxColumn } from '../../atoms/box.atom';
+import Circle from '../../atoms/circle.atom';
+
+import { SidebarContainer } from './styles'
+import { blue } from '../../../themes';
+
+const SideBar = () => {
+ const [open, setOpen] = useState(true);
+
+ const toggleSidebar = () => {
+ setOpen(!open);
+ };
+
+ return (
+
+
+
+
+
+
+ {SideBarData.map(({ link, icon, text}, index) => (
+
+ ))}
+
+
+
+
+ )
+};
+
+export default SideBar;
diff --git a/src/components/organisms/SideBar/SideBarData.js b/src/components/organisms/SideBar/SideBarData.js
new file mode 100644
index 0000000..da90d70
--- /dev/null
+++ b/src/components/organisms/SideBar/SideBarData.js
@@ -0,0 +1,29 @@
+import { faHouse, faCircleQuestion, faTags, faIdCard, faBuilding } from '@fortawesome/free-solid-svg-icons'
+
+export const SideBarData = [
+ {
+ link: '/home',
+ icon: faHouse,
+ text: 'Home',
+ },
+ {
+ link: '/questions',
+ icon: faCircleQuestion,
+ text: 'Questions',
+ },
+ {
+ link: '/tags',
+ icon: faTags,
+ text: 'Tags',
+ },
+ {
+ link: '/users',
+ icon: faIdCard,
+ text: 'Users',
+ },
+ {
+ link: '/jobs',
+ icon: faBuilding,
+ text: 'Jobs',
+ }
+]
\ No newline at end of file
diff --git a/src/components/organisms/SideBar/SideBarItem.component.jsx b/src/components/organisms/SideBar/SideBarItem.component.jsx
new file mode 100644
index 0000000..a5da24d
--- /dev/null
+++ b/src/components/organisms/SideBar/SideBarItem.component.jsx
@@ -0,0 +1,48 @@
+import React from 'react';
+import { NavLink } from 'react-router-dom';
+
+import { Box, FlexBox } from '../../atoms/box.atom';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { blue } from '../../../themes';
+import { SidebarBox } from './styles'
+
+import './styles.scss'
+
+const SideBarItem = ({ link, icon, text, open }) => {
+ return (
+
+
+
+
+
+
+ {text}
+
+
+
+ )
+};
+
+export default SideBarItem;
diff --git a/src/components/organisms/SideBar/styles.js b/src/components/organisms/SideBar/styles.js
new file mode 100644
index 0000000..206eca9
--- /dev/null
+++ b/src/components/organisms/SideBar/styles.js
@@ -0,0 +1,14 @@
+import styled from '@emotion/styled';
+import { FlexBox, FlexBoxColumn } from '../../atoms/box.atom';
+
+import { blue } from '../../../themes';
+
+export const SidebarContainer = styled(FlexBoxColumn)`
+ transition-duration: 300ms;
+`
+
+export const SidebarBox = styled(FlexBox)`
+ &:hover {
+ background-color: ${blue._50}26;
+ }
+`
\ No newline at end of file
diff --git a/src/components/organisms/SideBar/styles.scss b/src/components/organisms/SideBar/styles.scss
new file mode 100644
index 0000000..94a9aeb
--- /dev/null
+++ b/src/components/organisms/SideBar/styles.scss
@@ -0,0 +1,3 @@
+.active > div {
+ background-color: #eff6ff26;
+}
\ No newline at end of file
diff --git a/src/modules/AllTagsPage/AllTagsPage.component.jsx b/src/modules/AllTagsPage/AllTagsPage.component.jsx
index cf19896..dea37ed 100644
--- a/src/modules/AllTagsPage/AllTagsPage.component.jsx
+++ b/src/modules/AllTagsPage/AllTagsPage.component.jsx
@@ -6,7 +6,7 @@ import handleSorting from '../../utils/handleSorting';
import TagPanel from './TagPanel/TagPanel.component';
import Spinner from '../../components/molecules/Spinner/Spinner.component';
-import SearchBox from '../../components/molecules/SearchBox/SearchBox.component';
+import SearchBox from '../../components/molecules/Search/SearchBox.component';
import ButtonGroup from '../../components/molecules/ButtonGroup/ButtonGroup.component';
import Pagination from "../../components/organisms/Pagination/Pagination.component";
@@ -48,8 +48,7 @@ const AllTagsPage = ({getTags, tag: {tags, loading}}) => {
{
{
if (isAuthenticated) {
- return ;
+ return ;
}
return (
@@ -20,7 +19,6 @@ const Login = ({isAuthenticated}) => {
-
);
};
diff --git a/src/modules/NotFound/NotFound.component.jsx b/src/modules/NotFound/NotFound.component.jsx
index 617cf9c..05c9473 100644
--- a/src/modules/NotFound/NotFound.component.jsx
+++ b/src/modules/NotFound/NotFound.component.jsx
@@ -38,7 +38,7 @@ const NotFound = () => {
It seems like we couldn't find the page you were looking for
-
+
Back to home page
diff --git a/src/modules/NotFound/NotFound.styles.scss b/src/modules/NotFound/NotFound.styles.scss
index 0eeebb0..9f898ad 100644
--- a/src/modules/NotFound/NotFound.styles.scss
+++ b/src/modules/NotFound/NotFound.styles.scss
@@ -163,7 +163,7 @@ html, body {
.box__eye-left {
width: 12px;
height: 12px;
- background: #2d2d2d;
+ background: #2548A7;
border-radius: 50%;
margin: 0 10px;
position: absolute;
@@ -172,7 +172,7 @@ html, body {
.box__eye-right {
width: 12px;
height: 12px;
- background: #2d2d2d;
+ background: #2548A7;
border-radius: 50%;
margin: 0 10px;
position: absolute;
@@ -198,7 +198,7 @@ html, body {
&:nth-child(2n) {
top: -12px;
margin: 0 -0px;
- border-top: 15px solid #2d2d2d;
+ border-top: 15px solid #2548A7;
background: transparent;
}
}
diff --git a/src/modules/PostForm/AskWidget/AskWidget.styles.scss b/src/modules/PostForm/AskWidget/AskWidget.styles.scss
index ccd837d..a75e9c6 100644
--- a/src/modules/PostForm/AskWidget/AskWidget.styles.scss
+++ b/src/modules/PostForm/AskWidget/AskWidget.styles.scss
@@ -20,7 +20,7 @@
.widget-content {
display: block !important;
- background-color: #2d2d2d !important;
+ background-color: #2548A7 !important;
padding: 16px 15px 0 15px;
border-top: 1px solid #404345;
color: #242729;
diff --git a/src/modules/PostForm/PostForm.component.jsx b/src/modules/PostForm/PostForm.component.jsx
index 481f216..1285453 100644
--- a/src/modules/PostForm/PostForm.component.jsx
+++ b/src/modules/PostForm/PostForm.component.jsx
@@ -6,7 +6,6 @@ import PropTypes from 'prop-types';
import Spinner from '../../components/molecules/Spinner/Spinner.component';
import AskWidget from './AskWidget/AskWidget.component';
import AskForm from './AskForm/AskForm.component';
-import Footer from "../../components/organisms/Footer/Footer.component";
import './PostForm.styles.scss';
@@ -38,7 +37,6 @@ const PostForm = ({auth: {isAuthenticated, loading}}) => {
-
);
};
diff --git a/src/modules/ProfilePage/ExternalUserDetails/ExternalUserDetails.component.jsx b/src/modules/ProfilePage/ExternalUserDetails/ExternalUserDetails.component.jsx
index b34d02e..74ad199 100644
--- a/src/modules/ProfilePage/ExternalUserDetails/ExternalUserDetails.component.jsx
+++ b/src/modules/ProfilePage/ExternalUserDetails/ExternalUserDetails.component.jsx
@@ -20,12 +20,12 @@ const ExternalUserDetails = () => (
-
+
- Stack Overflow
+ Devcomm
diff --git a/src/modules/ProfilePage/UserSection/AvatarCard/AvatarCard.styles.scss b/src/modules/ProfilePage/UserSection/AvatarCard/AvatarCard.styles.scss
index 4ed02d8..02ea3d1 100644
--- a/src/modules/ProfilePage/UserSection/AvatarCard/AvatarCard.styles.scss
+++ b/src/modules/ProfilePage/UserSection/AvatarCard/AvatarCard.styles.scss
@@ -11,7 +11,7 @@
margin-bottom: 16px;
border: 1px solid #4a4e51 !important;
border-radius: 3px;
- background-color: #2d2d2d;
+ background-color: #2548A7;
.avatar {
width: 164px;
diff --git a/src/modules/QuestionsPage/QuestionsPage.component.jsx b/src/modules/QuestionsPage/QuestionsPage.component.jsx
index 8508179..f2e731b 100644
--- a/src/modules/QuestionsPage/QuestionsPage.component.jsx
+++ b/src/modules/QuestionsPage/QuestionsPage.component.jsx
@@ -9,7 +9,7 @@ import LinkButton from '../../components/molecules/LinkButton/LinkButton.compone
import PostItem from '../../components/molecules/PostItem/PostItem.component';
import Spinner from '../../components/molecules/Spinner/Spinner.component';
import ButtonGroup from '../../components/molecules/ButtonGroup/ButtonGroup.component';
-import SearchBox from '../../components/molecules/SearchBox/SearchBox.component';
+import SearchForm from '../../components/molecules/Search/SearchForm.component';
import Pagination from "../../components/organisms/Pagination/Pagination.component";
import './QuestionsPage.styles.scss';
@@ -50,7 +50,7 @@ const QuestionsPage = ({getPosts, post: {posts, loading}}) => {
Results for {searchQuery}
-
+
) : (
''
diff --git a/src/modules/Register/Caption/Caption.component.jsx b/src/modules/Register/Caption/Caption.component.jsx
index 6578ce5..171b420 100644
--- a/src/modules/Register/Caption/Caption.component.jsx
+++ b/src/modules/Register/Caption/Caption.component.jsx
@@ -12,7 +12,7 @@ const Caption = () => {
return (
-
Join the Stack Overflow community
+
Join the devcomm community
@@ -43,11 +43,11 @@ const Caption = () => {
- Use the power of Stack Overflow inside your organization.
+ Use the power of Devcomm inside your organization.
Try a{' '}
- free trial of Stack Overflow for Teams
+ free trial of Devcomm for Teams
.
diff --git a/src/modules/Register/Register.component.jsx b/src/modules/Register/Register.component.jsx
index 7f1e4ac..076a5ba 100644
--- a/src/modules/Register/Register.component.jsx
+++ b/src/modules/Register/Register.component.jsx
@@ -6,13 +6,12 @@ import {setAlert} from '../../redux/alert/alert.actions';
import Caption from './Caption/Caption.component';
import AuthForm from '../../components/organisms/AuthForm/AuthForm.component';
-import Footer from "../../components/organisms/Footer/Footer.component";
import './Register.styles.scss';
const Register = ({isAuthenticated}) => {
if (isAuthenticated) {
- return
;
+ return
;
}
return (
@@ -25,7 +24,6 @@ const Register = ({isAuthenticated}) => {
-
);
};
diff --git a/src/themes.js b/src/themes.js
new file mode 100644
index 0000000..12aafba
--- /dev/null
+++ b/src/themes.js
@@ -0,0 +1,119 @@
+export const white = '#FFFFFF';
+export const black = '#000000';
+
+export const slate = {
+ _50: '#f8fafc',
+}
+
+export const grey = {
+ _50: '#f9fafb',
+}
+
+export const neutral = {
+ _50: '#fafafa',
+}
+
+export const blue = {
+ _50: '#eff6ff',
+ _100: '#dbeafe',
+ _200: '#bfdbfe',
+ _300: '#93c5fd',
+ _400: '#60a5fa',
+ _500: '#3b82f6',
+ _600: '#2563eb',
+ _700: '#1d4ed8',
+ _800: '#1e40af',
+ _900: '#1e3a8a',
+ _1000: '#18338c',
+ _1100: '#152d7a'
+}
+
+export const red = {
+ _300: '#fca5a5',
+ _400: '#f87171',
+ _500: '#ef4444',
+}
+
+export const orange = {
+ _300: '#fdba74',
+ _400: '#fb923c',
+ _500: '#f97316',
+}
+
+export const amber = {
+ _300: '#fcd34d',
+ _400: '#fbbf24',
+ _500: '#f59e0b',
+}
+
+export const yellow = {
+ _300: '#fde047',
+ _400: '#facc15',
+ _500: '#eab308',
+}
+
+export const lime = {
+ _300: '#bef264',
+ _400: '#a3e635',
+ _500: '#84cc16',
+}
+
+export const green = {
+ _300: '#86efac',
+ _400: '#4ade80',
+ _500: '#22c55e',
+}
+
+export const emerald = {
+ _300: '#6ee7b7',
+ _400: '#34d399',
+ _500: '#10b981',
+}
+
+export const teal = {
+ _300: '#5eead4',
+ _400: '#2dd4bf',
+ _500: '#14b8a6',
+}
+
+export const cyan = {
+ _300: '#67e8f9',
+ _400: '#22d3ee',
+ _500: '#06b6d4',
+}
+
+export const indigo = {
+ _300: '#a5b4fc',
+ _400: '#818cf8',
+ _500: '#6366f1',
+}
+
+export const violet = {
+ _300: '#c4b5fd',
+ _400: '#a78bfa',
+ _500: '#8b5cf6',
+}
+
+export const purple = {
+ _300: '#d8b4fe',
+ _400: '#c084fc',
+ _500: '#a855f7',
+}
+
+export const fuchsia = {
+ _300: '#f0abfc',
+ _400: '#e879f9',
+ _500: '#d946ef',
+}
+
+export const pink = {
+ _300: '#f9a8d4',
+ _400: '#f472b6',
+ _500: '#ec4899',
+}
+
+export const rose = {
+ _300: '#fda4af',
+ _400: '#fb7185',
+ _500: '#f43f5e',
+}