Skip to content

Commit

Permalink
fix(layout/Header): melhoria do Header
Browse files Browse the repository at this point in the history
  • Loading branch information
gepetojj committed Dec 22, 2023
1 parent d68bff8 commit ef6c874
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
12 changes: 11 additions & 1 deletion components/layout/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,17 @@ const FooterComponent: FC = () => {
</FooterTopic>
</div>
<span className="text-center text-sm font-medium mt-2">
{config.shortName} - {new Date().getFullYear()} - Todos os direitos reservados.
{config.shortName} - {new Date().getFullYear()} - Todos os direitos reservados.{" "}
<br />
Desenvolvido por{" "}
<a
href="http://www.github.com/gepetojj"
target="_blank"
rel="noopener noreferrer"
className="text-slate-800 hover:underline"
>
Gepetojj
</a>
</span>
</footer>
);
Expand Down
28 changes: 13 additions & 15 deletions components/layout/Header/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,25 @@ const HeaderLinkComponent: FC<HeaderLinkProps> = ({
if (showOnHover) {
return (
<div
className="flex justify-center items-start relative z-10"
className="flex justify-center items-start relative z-10 group"
onMouseEnter={toggleHover}
onMouseLeave={toggleHover}
>
<HeaderLinkBase as="button" isActive={isActive} isHovering={isHovering}>
{label}
</HeaderLinkBase>
<div
className={`flex flex-col justify-center items-center absolute w-fit px-3 py-2 top-12 rounded-sm
bg-gray-500/40 backdrop-blur-sm border border-gray-100/5 ease-linear transform origin-top duration-100 ${
isHovering ? "scale-100" : "scale-0"
}`}
>
{Children.toArray(children).map((option, index) => (
<div
key={`header-link-${index}`}
className="w-full text-center p-1 cursor-pointer hover:underline underline-offset-1"
>
{option}
</div>
))}
<div className="absolute ease-linear transform origin-top duration-100 scale-0 group-hover:scale-100">
<div className="scale-0 group-hover:scale-100 w-full h-12" />
<div className="flex flex-col justify-center items-center w-fit px-3 py-2 rounded-sm bg-gray-500/40 backdrop-blur-sm border border-gray-100/5">
{Children.toArray(children).map((option, index) => (
<div
key={`header-link-${index}`}
className="w-full text-center p-1 cursor-pointer hover:underline underline-offset-1"
>
{option}
</div>
))}
</div>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const HeaderComponent: FC = () => {
}, [push, data]);

return (
<header className="flex flex-col justify-center items-center bg-primary-main text-black-100 px-6 py-5 gap-4 lg:flex-row md:justify-between">
<header className="flex flex-col justify-center items-center bg-gradient-to-r from-primary-main to-[#8fd095] text-black-100 px-6 py-5 gap-4 lg:flex-row md:justify-between">
<div className="flex items-center">
<div className="flex items-center">
<Image
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ascla",
"description": "Website oficial da Academia Santanense de Ciências, Letras e Artes.",
"author": "Gepetojj <contato.gepetojj@gmail.com>",
"version": "1.10.9",
"version": "1.10.11",
"license": "GPL-3.0",
"scripts": {
"dev": "next dev",
Expand Down

0 comments on commit ef6c874

Please sign in to comment.