-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
190 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
main{ | ||
width: 100%; | ||
height: 100vh; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import "./Main.css"; | ||
|
||
function Main() { | ||
return ( | ||
<main> | ||
<h2>Hello World</h2> | ||
</main> | ||
); | ||
} | ||
|
||
export default Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
nav{ | ||
max-width: 70px; | ||
color: white; | ||
background-color: rgb(12, 12, 20); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 10px 12px; | ||
user-select: none; | ||
border-top-right-radius: 8px; | ||
border-bottom-right-radius: 8px; | ||
transition: max-width .3s ease-in-out; | ||
} | ||
|
||
.sidebar-expanded{ | ||
max-width: 500px; | ||
transition: max-width .3s ease-in-out; | ||
} | ||
|
||
/* Target the child element of the nav */ | ||
nav > button { | ||
appearance: none; | ||
outline: none; | ||
border: none; | ||
position: relative; | ||
background-color: transparent; | ||
transition: background-color 0.3s linear; | ||
margin-bottom: 8px; | ||
padding: 0 10px; /* ((min-width) - svg width) / 2 to center */ | ||
border-radius: 8px; | ||
width: 100%; | ||
height: 46px; | ||
cursor: pointer; | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
overflow: hidden; | ||
} | ||
|
||
nav > button:hover{ | ||
transition: background-color 0.3s linear; | ||
background-color: rgb(227, 233, 245); | ||
} | ||
|
||
nav > button:hover svg{ | ||
transition: color .3s linear; | ||
color: rgb(12, 12, 20); | ||
} | ||
|
||
button > h2 { | ||
font-weight: 300; | ||
padding-left: 10px; | ||
opacity: 0; | ||
transition: opacity 1s; | ||
color: rgb(227, 233, 245); | ||
white-space: nowrap; | ||
} | ||
|
||
nav > button:hover h2{ | ||
transition: color .3s linear; | ||
color: rgb(12, 12, 20); | ||
} | ||
|
||
.sidebar-button-expanded{ | ||
opacity: 1; | ||
} | ||
|
||
.currentView{ | ||
background-color: rgb(33, 31, 51); | ||
} | ||
|
||
svg{ | ||
height: 26px; | ||
min-width: 26px; | ||
color: rgb(227, 233, 245);; | ||
transition: color .3s linear; | ||
} | ||
|
||
.settings{ | ||
margin: auto 0 0px 0 | ||
} | ||
|
||
.sponsor-icon{ | ||
color: rgb(226, 122, 122); | ||
} | ||
|
||
|
||
.sponsor:hover > .sponsor-icon{ | ||
color: rgb(182, 3, 3); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React, { useState } from "react"; | ||
import "./Sidebar.css"; | ||
|
||
//Import Icons | ||
import { FaHome } from "react-icons/fa"; | ||
import { GiHamburgerMenu } from "react-icons/gi"; | ||
import { RiSettings4Fill } from "react-icons/ri"; | ||
import { BiNews } from "react-icons/bi"; | ||
import { AiOutlineHeart } from "react-icons/ai"; | ||
import { BsCameraVideo } from "react-icons/bs"; | ||
import { FaHandshake } from "react-icons/fa"; | ||
|
||
const Sidebar = () => { | ||
//useState | ||
const [expandSidebar, setExpandSidebar] = useState(false); //TODO make this dependent on user settings | ||
//JSX | ||
return ( | ||
<nav className={`${expandSidebar && "sidebar-expanded"}`}> | ||
<button className='hamburger' onClick={() => setExpandSidebar(!expandSidebar)}> | ||
<GiHamburgerMenu className='hamburger-icon' /> | ||
<h2 className={`${expandSidebar && "sidebar-button-expanded"}`}>repeatio</h2> | ||
</button> | ||
<button className='home currentView'> | ||
<FaHome className='home-icon' /> | ||
<h2 className={`${expandSidebar && "sidebar-button-expanded"}`}>Home</h2> | ||
</button> | ||
<button className='tutorials'> | ||
<BsCameraVideo className='tutorials-icon' /> | ||
<h2 className={`${expandSidebar && "sidebar-button-expanded"}`}>Tutorials</h2> | ||
</button> | ||
<button className='sponsor highlighted'> | ||
<AiOutlineHeart className='sponsor-icon' /> | ||
<h2 className={`${expandSidebar && "sidebar-button-expanded"}`}>Support this Project</h2> | ||
</button> | ||
<button className='thanks'> | ||
<FaHandshake className='thanks-icon ' /> | ||
<h2 className={`${expandSidebar && "sidebar-button-expanded"}`}>Thank You</h2> | ||
</button> | ||
<button className='news'> | ||
<BiNews className='news-icon' /> | ||
<h2 className={`${expandSidebar && "sidebar-button-expanded"}`}>News</h2> | ||
</button> | ||
<button className='settings'> | ||
<RiSettings4Fill className='settings-icon' /> | ||
<h2 className={`${expandSidebar && "sidebar-button-expanded"}`}>Settings</h2> | ||
</button> | ||
</nav> | ||
); | ||
}; | ||
|
||
export default Sidebar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters