Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ next-env.d.ts

# AI
CLAUDE.md
.cursor

# Personal files
gptPrompt.md
Expand Down
5 changes: 5 additions & 0 deletions apps/lab/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ const config = {

themeConfig: {
image: 'img/lab-social-card.jpg',
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
title: 'Lab',
logo: {
Expand Down
2 changes: 1 addition & 1 deletion apps/portfolio/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default async function LocaleLayout({
<NextIntlClientProvider messages={messages}>
<Providers>
<Navigation />
<main>{children}</main>
<main className="pt-16">{children}</main>
Comment thread
GMNAPI marked this conversation as resolved.
<Footer />
</Providers>
</NextIntlClientProvider>
Expand Down
8 changes: 4 additions & 4 deletions apps/portfolio/src/shared/components/layout/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { fadeInUp } from '@/shared/utils/motion';
export function Navigation() {
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
const [mounted, setMounted] = useState(false);
const { theme, setTheme } = useTheme();
const { theme, resolvedTheme, setTheme } = useTheme();

// Prevent hydration mismatch by only rendering theme icon after mount
useEffect(() => {
Expand Down Expand Up @@ -63,7 +63,7 @@ export function Navigation() {
};

const toggleTheme = () => {
setTheme(theme === 'dark' ? 'light' : 'dark');
setTheme(resolvedTheme === 'dark' ? 'light' : 'dark');
};

const localeOptions = useMemo(
Expand Down Expand Up @@ -97,7 +97,7 @@ export function Navigation() {

return (
<m.nav
className="sticky top-0 z-40 w-full backdrop-blur-sm bg-background/95 border-b border-border"
className="fixed inset-x-0 top-0 z-40 w-full backdrop-blur-sm bg-background/95 border-b border-border"
aria-label={tNavigation('ariaLabel')}
initial={{ y: -48, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
Expand Down Expand Up @@ -177,7 +177,7 @@ export function Navigation() {
className="inline-flex items-center justify-center rounded-md font-mono font-medium transition-colors px-3 py-2 bg-transparent text-foreground hover:bg-background-secondary w-10 h-10"
aria-label={tNavigation('theme.toggle')}
>
{mounted ? (theme === 'dark' ? '☀️' : '🌙') : null}
{mounted ? (resolvedTheme === 'dark' ? '☀️' : '🌙') : null}
</button>

{/* Mobile Menu Button */}
Expand Down
6 changes: 4 additions & 2 deletions apps/portfolio/src/shared/constants/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* used in Navigation and Footer components.
*/

import { personalInfo } from './personal';

export interface NavSection {
key: 'home' | 'about' | 'projects' | 'contact';
sectionId: string;
Expand Down Expand Up @@ -35,8 +37,8 @@ export const NAV_SECTIONS: NavSection[] = [
];

export const SOCIAL_LINK_URLS = {
github: 'https://github.com/usuario',
linkedin: 'https://linkedin.com/in/usuario',
github: personalInfo.social.github,
linkedin: personalInfo.social.linkedin,
} as const;

export type SocialLinkKey = keyof typeof SOCIAL_LINK_URLS;
7 changes: 5 additions & 2 deletions apps/portfolio/tests/shared/components/layout/Footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ describe('Footer Component', () => {
it('should have correct href for GitHub link', () => {
renderFooter();
const githubLink = screen.getByRole('link', { name: /github/i });
expect(githubLink).toHaveAttribute('href', 'https://github.com/usuario');
expect(githubLink).toHaveAttribute('href', 'https://github.com/GMNAPI');
});

it('should have correct href for LinkedIn link', () => {
renderFooter();
const linkedinLink = screen.getByRole('link', { name: /linkedin/i });
expect(linkedinLink).toHaveAttribute('href', 'https://linkedin.com/in/usuario');
expect(linkedinLink).toHaveAttribute(
'href',
'https://www.linkedin.com/in/angel-hidalgo-barreiro'
);
});

it('should open social links in new tab', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ describe('Navigation Component', () => {
});

describe('Styles', () => {
it('should have sticky positioning', () => {
it('should have fixed positioning', () => {
renderNavigation();
const nav = screen.getByRole('navigation');
expect(nav).toHaveClass('sticky');
expect(nav).toHaveClass('fixed');
});

it('should have proper z-index', () => {
Expand Down Expand Up @@ -316,6 +316,7 @@ describe('Navigation Component', () => {

mockUseTheme.mockReturnValue({
theme: 'light',
resolvedTheme: 'light',
setTheme: mockSetTheme,
});

Expand All @@ -332,6 +333,7 @@ describe('Navigation Component', () => {

mockUseTheme.mockReturnValue({
theme: 'dark',
resolvedTheme: 'dark',
setTheme: mockSetTheme,
});

Expand Down
Loading