Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
logo on header
Browse files Browse the repository at this point in the history
  • Loading branch information
khylpe committed Apr 28, 2024
1 parent cff5802 commit 5c03895
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions frontend/src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@

import { Layout, Menu, Avatar, Spin } from "antd"
import { Layout, Menu, Avatar, Spin, Tooltip } from "antd"
import { FileDoneOutlined, FolderOpenOutlined, StarOutlined, PlusCircleOutlined, UserOutlined, LogoutOutlined, DashboardOutlined, UnorderedListOutlined } from '@ant-design/icons';
import { useUser } from "@/providers/userProvider";
import { useState, useEffect } from "react";
import useLogout from "@/utils/logout";
import { usePathname } from "next/navigation";
import Link from "next/link";
const { Header: AntdHeader } = Layout;
import Image from 'next/image';
import logo from "/public/logo.png"
const { Sider } = Layout;

export default function Header({ collapsed, setCollapsed }: { collapsed: Boolean, setCollapsed: (collapsed: boolean) => void }) {
const { user } = useUser();
Expand Down Expand Up @@ -103,15 +106,37 @@ export default function Header({ collapsed, setCollapsed }: { collapsed: Boolean
[headerItems[headerItems.length - 0], headerItems[headerItems.length - 1]];

return (
<AntdHeader className="site-layout-background" style={{
<AntdHeader style={{
padding: 0,
position: 'sticky',
top: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between', // Utilisez cette propriété pour aligner les éléments à gauche et à droite
zIndex: 5,
background: 'white'

}}>
{collapsed && (
<div style={
{
borderBottomWidth: 1,
borderBottomStyle: 'solid',
borderBottomColor: 'rgba(5, 5, 5, 0.06)',
}
}
className="w-fit h-full">
<Tooltip title="(Re)Sources Relationnelles - Ministère des solidarités et de la santé ">
<Image
draggable={false}
className='rounded-none pl-8 py-2'
src={logo}
alt="Logo du ministère des solidarités et de la santé"
width={95}
height={110}
/>
</Tooltip>
</div>)}
<Menu
mode="horizontal"
items={headerItems.slice(0, -2)} // Tous les éléments sauf les deux derniers
Expand Down

0 comments on commit 5c03895

Please sign in to comment.