Skip to content
Merged

Icons #277

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
10 changes: 10 additions & 0 deletions frontend/react-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ajv": "^8.17.1",
"ajv-keywords": "^5.1.0",
"jquery": "^3.7.1",
"lucide-react": "^0.486.0",
"react": "^18.3.1",
"react-cookie": "^7.2.2",
"react-dom": "^18.3.1",
Expand Down
34 changes: 20 additions & 14 deletions frontend/react-app/src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
import {useCookies} from 'react-cookie'
import { useCookies } from 'react-cookie'
import { Home, ListTodo, UserCircle, Settings, ListCheck, ListChecks, ShieldAlert, ShieldUser } from "lucide-react";

function Header(){
const [cookies] = useCookies(['userInfo'])
return(

<div>
<h1 className ="inner-header">
<ul className ='list'>
<li className ="logo list"><span><a href="/home">Whatever we Call this</a></span></li>
<li><span><a href="/home">Home</a></span></li>
<li><span><a href="/my-tasks">Tasks</a></span></li>
<li><span><a href="/profile">Profile</a></span></li>
{cookies.userInfo.role === 'admin' && (<li><span><a href="/admin-panel">Admin Controls</a></span></li>)}
</ul>
</h1>
</div>

<div>
<h1 className="inner-header">
<div className="logo" >
<a href="/home">Taskly</a>
</div>

<ul className ='icon-nav'>
<li><a href="/home" title="Home"><Home/></a></li>
<li><a href="/my-tasks" title="My Tasks"><ListChecks/></a></li>
<li><a href="/profile" title="Profile"><UserCircle/></a></li>

{cookies.userInfo.role === 'admin' && (
<li><a href="/admin-panel" title="Admin Controls"><ShieldUser /></a></li>)}
</ul>
</h1>
</div>
);
}

export default Header
44 changes: 37 additions & 7 deletions frontend/react-app/src/css/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,63 @@
text-decoration: none;
}

h1.inner-header{
h1.inner-header {
align-self: start;
margin: 0;
font-family: Calibri;
width: 100%;
padding: 1% 5%;;
height: auto;
min-height: 10%;
overflow: visible;
padding-top: 1%;
padding-bottom: 1%;
background-color: #2d2644;
display: flex;
align-items: center;
justify-content: space-between;
}

li{
.logo {
color: #fefcfd;
font-weight: bold;
margin-left: 30px;
}

.logo a {
color: #fefcfd;
}

ul.icon-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 10px;
}

ul.icon-nave li {
list-style: none;
margin-left: 24px;
}

ul.icon-nav svg {
width: 24px;
height: 24px;
stroke-width: 2.5;
}

li {
list-style: none;
display: inline-block;
}
li a{

li a {
color: #bfcde0;
font-size: calc(20%+2vw);
font-weight: bold;
margin-right: 25px;
}
li.logo a{

li.logo a {
margin-right: 60px;
font-size: calc(30%+2vw);
color: #fefcfd;
}