Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f525687
feat: inicia internalizacao utilizando next-intl
vinibalbino Oct 11, 2025
ec64368
refactor: remocao de duplicacao de pagina e de codigo
vinibalbino Oct 11, 2025
728f1db
feat: internalizacao do hero component feita
vinibalbino Oct 11, 2025
fb153c0
refactor: utiliza camel case corretamente
vinibalbino Oct 11, 2025
86543b9
feat: internacionalizacao do header
vinibalbino Oct 11, 2025
2551c10
Merge branch 'production' into feature/adiciona-internalizacao
vinibalbino Oct 11, 2025
8b2d421
feat: footer internacionalizado e correcoes em alguns dados
vinibalbino Oct 11, 2025
409a2fd
refactor: removido internalizacao nao utilizada
vinibalbino Oct 11, 2025
14fb9c0
feat: internalizacao da pagina termos de servico
vinibalbino Oct 11, 2025
e308122
fix: lint error
vinibalbino Oct 11, 2025
5cec66c
feat: gera metadata dado a localizacao da pagina, ingles ou portugues
vinibalbino Oct 11, 2025
5bbac88
docs: adiciona parte de internalizacao na docs de contribuidor
vinibalbino Oct 11, 2025
3df8186
feat: keywords internacionalizadas
vinibalbino Oct 11, 2025
088613b
refactor: remove console.log
vinibalbino Oct 11, 2025
54c9edf
Merge remote-tracking branch 'upstream/develop' into feature/adiciona…
vinibalbino Oct 11, 2025
f896cbc
feat: adiciona telefone a internalizacao
vinibalbino Oct 11, 2025
c70af75
feat: adiciona traducao nas arias-label do footer
vinibalbino Oct 11, 2025
c779a22
fix: nome correto no aria-label para email
vinibalbino Oct 11, 2025
c29e9d9
Merge pull request #2 from vinibalbino/feature/adiciona-internalizacao
vinibalbino Oct 11, 2025
c7df6f3
Merge remote-tracking branch 'upstream/develop' into HEAD
vinibalbino Oct 15, 2025
d044393
refactor: move folders/items to [locale] folder to use localization
vinibalbino Oct 15, 2025
bbdae9d
refactor: change to labels to match current headers
vinibalbino Oct 15, 2025
a2633d6
feat: add blog to localization
vinibalbino Oct 15, 2025
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
5 changes: 4 additions & 1 deletion README-CONTRIBUIDOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ Antes de começar, certifique-se de ter instalado:
diaum/
├── src/
│ ├── app/ # Páginas e rotas (Next.js App Router)
│ │ ├── [locale]/ # Páginas da aplicação que são localizadas
│ ├── components/ # Componentes React reutilizáveis
│ ├── locales/ # Textos de localização
│ ├── i18n/ # Configurações da localização como routing e definição de linguagem
│ ├── data/ # Dados e configurações
│ │ ├── siteDetails.ts
│ │ └── ...
Expand All @@ -49,7 +52,7 @@ diaum/

### Pastas Principais

- **`/src/app`**: Contém as páginas e rotas do site
- **`/src/app/[locale]`**: Contém as páginas e rotas do site
- **`/src/components`**: Componentes React modulares e reutilizáveis
- **`/src/data`**: Arquivos de configuração e dados do site
- **`/public`**: Assets estáticos (imagens, ícones, etc.)
Expand Down
6 changes: 5 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import createNextIntlPlugin from 'next-intl/plugin'

const withNextIntl = createNextIntlPlugin()

/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
Expand Down Expand Up @@ -30,4 +34,4 @@ const nextConfig = {
},
}

export default nextConfig
export default withNextIntl(nextConfig)
192 changes: 192 additions & 0 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"clsx": "^2.1.1",
"framer-motion": "^11.11.9",
"next": "^14.2.13",
"next-intl": "^4.3.12",
"react": "^18",
"react-dom": "^18",
"react-icons": "^5.3.0"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { notFound } from 'next/navigation'
import Image from 'next/image'
import { fetchBySlug, fetchPageBlocks, extractBlogPost } from '@/lib/notion'
import { NotionRenderer } from '../../../components/NotionRenderer'
import { NotionRenderer } from '@/components/NotionRenderer'
import { getLocale, getTranslations } from 'next-intl/server'

interface BlogPostPageProps {
params: {
Expand All @@ -16,11 +17,13 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
notFound()
}

const translation = await getTranslations('blog')
const locale = await getLocale()
const post = extractBlogPost(page)
const blocks = await fetchPageBlocks(page.id)

return (
<div className="min-h-screen bg-white">
<div className="min-h-screen bg-white mt-16">
<div className="max-w-4xl mx-auto px-4 py-16">
<nav className="mb-8">
<a
Expand All @@ -35,7 +38,7 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
d="M15 19l-7-7 7-7"
/>
</svg>
Voltar ao blog
{translation('labelLinks.goBackBlog')}
</a>
</nav>

Expand Down Expand Up @@ -69,7 +72,7 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {

<div className="flex items-center text-gray-600">
<time className="text-lg">
{new Date(post.publishedAt).toLocaleDateString('pt-BR', {
{new Date(post.publishedAt).toLocaleDateString(locale, {
year: 'numeric',
month: 'long',
day: 'numeric',
Expand Down Expand Up @@ -99,11 +102,11 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
</div>
)}
<div>
<p className="text-sm text-gray-600 mb-1">Escrito por</p>
<p className="text-sm text-gray-600 mb-1">{translation('article.writtenBy')}</p>
<p className="text-xl font-semibold text-gray-900">{post.author}</p>
<p className="text-sm text-gray-500 mt-1">
Publicado em{' '}
{new Date(post.publishedAt).toLocaleDateString('pt-BR', {
{translation('article.publishedAt')}{' '}
{new Date(post.publishedAt).toLocaleDateString(locale, {
year: 'numeric',
month: 'long',
day: 'numeric',
Expand Down
11 changes: 6 additions & 5 deletions src/app/blog/page.tsx → src/app/[locale]/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@ import Link from 'next/link'
import Image from 'next/image'
import { fetchPages, extractBlogPost } from '@/lib/notion'
import { PageObjectResponse } from '@notionhq/client/build/src/api-endpoints'
import { getTranslations } from 'next-intl/server'

export default async function BlogPage() {
const translation = await getTranslations('blog')

try {
const response = await fetchPages()
const posts = response.results
.filter((page): page is PageObjectResponse => page.object === 'page')
.map((page: PageObjectResponse) => extractBlogPost(page))

return (
<div className="min-h-screen bg-white">
<div className="min-h-screen bg-white mt-10">
<div className="max-w-4xl mx-auto px-4 py-16">
<div className="text-center mb-16">
<h1 className="text-4xl font-bold text-gray-900 mb-4">Blog</h1>
<p className="text-xl text-gray-600">
Artigos e insights sobre tecnologia e desenvolvimento
</p>
<p className="text-xl text-gray-600">{translation('headline')}</p>
</div>

<div className="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
Expand Down Expand Up @@ -88,7 +89,7 @@ export default async function BlogPage() {
href={`/blog/${post.slug}`}
className="text-blue-600 hover:text-blue-800 font-medium"
>
Ler mais →
{translation('labelLinks.readMore')}
</Link>
</div>
</div>
Expand Down
Loading