Skip to content

Commit 2faaeca

Browse files
authored
Merge pull request #1 from helpdeveloper/home-page
Home page
2 parents cee900e + 1fc7484 commit 2faaeca

5 files changed

Lines changed: 347 additions & 18 deletions

File tree

public/images/logo-2.png

20.2 KB
Loading

src/app/blog/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { BlogCard } from '../components/BlogCard';
44
import { Navbar } from '../components/Navbar';
55
import { SearchBar } from '../components/SearchBar';
6-
import { useEffect, useState, useMemo } from 'react';
6+
import { useEffect, useState, useMemo, useCallback } from 'react';
77

88
interface Gist {
99
id: string;
@@ -159,7 +159,7 @@ export default function Blog() {
159159
}
160160
};
161161

162-
const loadAllGists = async () => {
162+
const loadAllGists = useCallback(async () => {
163163
try {
164164
let currentPage = 1;
165165
let hasMore = true;
@@ -179,11 +179,11 @@ export default function Blog() {
179179
setError(err instanceof Error ? err.message : 'Erro ao carregar os gists');
180180
setLoading(false);
181181
}
182-
};
182+
}, []);
183183

184184
useEffect(() => {
185185
loadAllGists();
186-
}, []);
186+
}, [loadAllGists]);
187187

188188
const filteredGists = useMemo(() => {
189189
if (!searchTerm) return gists;
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"use client";
2+
3+
import React from "react";
4+
import Link from "next/link";
5+
6+
export const Footer: React.FC = () => {
7+
const currentYear = new Date().getFullYear();
8+
9+
return (
10+
<footer className="bg-gray-800 text-white py-8 mt-12">
11+
<div className="container mx-auto px-4">
12+
<div className="flex flex-col md:flex-row justify-between items-center">
13+
<div className="mb-4 md:mb-0">
14+
<h2 className="text-2xl font-bold">HelpDev</h2>
15+
<p className="text-gray-400 mt-2">Compartilhando conhecimento em desenvolvimento de software desde 2013</p>
16+
</div>
17+
18+
<div className="flex flex-col md:flex-row gap-8">
19+
<div>
20+
<h3 className="text-lg font-semibold mb-2">Links</h3>
21+
<ul className="space-y-1">
22+
<li><Link href="/" className="text-gray-400 hover:text-white transition-colors">Home</Link></li>
23+
<li><Link href="/about" className="text-gray-400 hover:text-white transition-colors">Sobre</Link></li>
24+
<li><Link href="/articles" className="text-gray-400 hover:text-white transition-colors">Artigos</Link></li>
25+
<li><Link href="/projects" className="text-gray-400 hover:text-white transition-colors">Projetos</Link></li>
26+
<li><Link href="/blog" className="text-gray-400 hover:text-white transition-colors">Blog</Link></li>
27+
</ul>
28+
</div>
29+
30+
<div>
31+
<h3 className="text-lg font-semibold mb-2">Social</h3>
32+
<ul className="space-y-1">
33+
<li><a href="https://github.com/gbzarelli" className="text-gray-400 hover:text-white transition-colors" target="_blank" rel="noopener noreferrer">GitHub</a></li>
34+
<li><a href="https://twitter.com/gbzarelli" className="text-gray-400 hover:text-white transition-colors" target="_blank" rel="noopener noreferrer">Twitter</a></li>
35+
<li><a href="https://www.linkedin.com/in/guilherme-biff-zarelli/" className="text-gray-400 hover:text-white transition-colors" target="_blank" rel="noopener noreferrer">LinkedIn</a></li>
36+
</ul>
37+
</div>
38+
</div>
39+
</div>
40+
41+
<div className="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400">
42+
<p>&copy; {currentYear} HelpDev. Todos os direitos reservados. Site online desde 2013.</p>
43+
</div>
44+
</div>
45+
</footer>
46+
);
47+
};
48+
49+
export default Footer;
50+

src/app/layout.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import type { Metadata } from "next";
1+
import type { Metadata, Viewport } from "next";
22
import { Inter } from "next/font/google";
33
import "./globals.css";
4+
import Footer from "./components/Footer";
45

56
const inter = Inter({ subsets: ["latin"] });
67

@@ -58,22 +59,26 @@ export const metadata: Metadata = {
5859
"max-snippet": -1,
5960
},
6061
},
61-
viewport: {
62-
width: "device-width",
63-
initialScale: 1,
64-
maximumScale: 1,
65-
},
6662
category: "technology",
6763
};
6864

65+
export const viewport: Viewport = {
66+
width: "device-width",
67+
initialScale: 1,
68+
maximumScale: 1,
69+
};
70+
6971
export default function RootLayout({
7072
children,
7173
}: {
7274
children: React.ReactNode
7375
}) {
7476
return (
7577
<html lang="pt-BR">
76-
<body className={inter.className}>{children}</body>
78+
<body className={inter.className} suppressHydrationWarning>
79+
{children}
80+
<Footer />
81+
</body>
7782
</html>
7883
);
7984
}

0 commit comments

Comments
 (0)