Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐ŸŽจ[Design] UI ๋Œ€๊ณต์‚ฌ ์‹œ์ž‘ - sidebar #80

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/components/Footer/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { Component } from 'react';
class Footer extends Component {
render() {
return (
<footer className="px-0 px-lg-3 bg-base-200 w-full h-20 pt-6 fixed bottom-0">
<footer className="px-0 px-lg-3 w-full h-20 pt-6 bottom-0">
<nav>
<p className="copyright text-center">
HANIUM-GONGANTS ยฉ 2022 COPYRIGHT
Expand Down
32 changes: 10 additions & 22 deletions client/src/components/Navbars/AdminNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,20 @@ function Header() {
};

return (
<div class="drawer-content flex flex-col">
<div class="w-full navbar bg-base-200 drop-shadow-lg">
{/* <div class="flex-none lg:hidden">
<label for="my-drawer-3" class="btn btn-square btn-ghost">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="inline-block w-6 h-6 stroke-current"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M4 6h16M4 12h16M4 18h16"
></path>
</svg>
</label>
</div> */}
<div class="flex-1 px-2 mx-2">
<div className="flex flex-col shadow-none bg-white">
<div className="w-full navbar bg-white shadow-none">
<div className="flex-1 px-2 mx-2">
<a href="/">
<img src={GongImg} style={{ width: '30px', float: 'left' }} />
GongAnts
<span
className="mx-1"
style={{ fontFamily: 'GmarketSansMedium', fontWeight: '700' }}
>
GongAnts
</span>
</a>
</div>
<div class="flex-none hidden lg:block">
<div className="flex-none hidden lg:block">
<span>
<label for="notification-modal" className="modal-button">
<NotificationsNoneIcon
Expand Down
18 changes: 15 additions & 3 deletions client/src/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ import React, { Component } from 'react';
import { useLocation, NavLink } from 'react-router-dom';

import { Nav } from 'react-bootstrap';
import { groundColor, whiteColor } from 'styles/color';

function Sidebar({ color, image, routes }) {
const location = useLocation();
const activeRoute = (routeName) => {
return location.pathname.indexOf(routeName) > -1 ? 'active' : '';
};
return (
<div>
<label for="my-drawer-2" class="drawer-overlay"></label>
<ul class="menu p-4 w-80 bg-base-100" style={{ height: '50vh' }}>
<div
className="w-full min-h-screen"
style={{ backgroundColor: groundColor }}
>
{/* <label for="my-drawer-2" class="drawer-overlay"></label> */}
<ul className="p-4 w-72" style={{ height: '50vh' }}>
{routes.map((prop, key) => {
if (!prop.redirect)
return (
Expand All @@ -22,6 +26,14 @@ function Sidebar({ color, image, routes }) {
: activeRoute(prop.layout + prop.path)
}
key={key}
style={{
width: '250px',
backgroundColor: whiteColor,
height: '65px',
marginTop: '16px',
borderRadius: '50px',
padding: '20px 25px',
}}
>
<NavLink to={prop.layout + prop.path} className="nav-link">
<i className={prop.icon} />
Expand Down
9 changes: 3 additions & 6 deletions client/src/layouts/Home/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ function Admin() {

return (
<>
<div className="wrapper relative">
<div
className="drawer"
style={{ boxShadow: '6px 4px 5px 3px #EAEEF1', padding: '0' }}
>
<div className="wrapper">
<div className="z-10 relative">
<AdminNavbar />
</div>
<div className="flex h-max mt-2" ref={mainPanel}>
<div className="flex h-max mt-2 absolute" ref={mainPanel}>
<div className="flex-initial h-max">
<Sidebar
color={color}
Expand Down
12 changes: 6 additions & 6 deletions client/src/styles/color.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const mainColor = "#560DF8";
export const baseColor = "#B2CAD5";
export const pointColor = "#2F6578";
export const serveColor = "#3E9BBB";

export const whiteColor = "#FFFFFF";
export const mainColor = '#560DF8';
export const baseColor = '#B2CAD5';
export const pointColor = '#2F6578';
export const serveColor = '#3E9BBB';
export const groundColor = '#404756';
export const whiteColor = '#FFFFFF';
9 changes: 8 additions & 1 deletion client/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@

@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@import "tailwindcss/utilities";

@font-face {
font-family: 'GmarketSansMedium';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/[email protected]/GmarketSansMedium.woff') format('woff');
font-weight: normal;
font-style: normal;
}
7 changes: 5 additions & 2 deletions client/src/views/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ function Dashboard() {

return (
<>
<div className="mt-5">
<RoomTable userName={userName} />
<div
className="pt-5 min-h-screen z-0"
style={{ backgroundColor: '#404756' }}
>
{/* <RoomTable userName={userName} /> */}
<TodoList />
<FriendsList />
</div>
Expand Down