Skip to content

Commit

Permalink
feat: translations blog and case-studies pages
Browse files Browse the repository at this point in the history
  • Loading branch information
AldemirLucas committed Dec 4, 2024
1 parent 96854cc commit 36567b7
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 60 deletions.
16 changes: 8 additions & 8 deletions next/blog/en/test.md → next/blog/en/dev.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: Test
description: Test
title: Dev
description: Dev
date:
created: "2021-11-25T15:00:00"
authors:
- name: test
role: test
social: test
- name: Dev
role: Dev
social: Dev
thumbnail: /blog/analisando-a-frota-brasileira-com-a-bd/image_0.webp
categories: ["test"]
categories: ["Dev"]
medium_slug: >-
test
Dev
published: true
---

Test
Dev
16 changes: 8 additions & 8 deletions next/blog/es/test.md → next/blog/es/dev.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: Test
description: Test
title: Dev
description: Dev
date:
created: "2021-11-25T15:00:00"
authors:
- name: test
role: test
social: test
- name: Dev
role: Dev
social: Dev
thumbnail: /blog/analisando-a-frota-brasileira-com-a-bd/image_0.webp
categories: ["test"]
categories: ["Dev"]
medium_slug: >-
test
Dev
published: true
---

Test
Dev
9 changes: 7 additions & 2 deletions next/components/organisms/Blog/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ export function BlogGrid({ posts, category }) {
<Box width="100%" key={key}>
<Divider
display={index === 0 ? "none" : "flex"}
borderColor="#252A32"
borderWidth="2px"
borderWidth="0px"
margin="80px 0 24px"
borderTop="4px solid #252A32"
opacity="1"
/>
<Stack
spacing={0}
Expand Down Expand Up @@ -397,6 +398,8 @@ export function BlogGrid({ posts, category }) {
as="article"
key={index}
gridColumn={{ md: "span 2", xl: "span 3" }}
borderBottom={{base: "1px solid #DEDFE0", md: "none"}}
paddingBottom={{base: "24px", md: "none"}}
>
<LatestBlogCard key={post.slug} {...post} />
</GridItem>
Expand Down Expand Up @@ -440,6 +443,8 @@ export function BlogGrid({ posts, category }) {
as="article"
key={index}
gridColumn={{ md: "span 2", xl: "span 3" }}
borderBottom={{base: "1px solid #DEDFE0", md: "none"}}
paddingBottom={{base: "24px", md: "none"}}
>
<LatestBlogCard key={post.slug} {...post} />
</GridItem>
Expand Down
2 changes: 1 addition & 1 deletion next/components/organisms/Blog/Slug.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export function Header({ frontmatter, slug }) {

<Stack
width="100%"
flexDirection="row"
flexDirection={{base: "column", lg: "row"}}
spacing={0}
gap="40px"
>
Expand Down
19 changes: 19 additions & 0 deletions next/content/caseStudies/en/dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: "dev"
displayTitle: "Dev"
thumbnail: "https://storage.googleapis.com/basedosdados-website/estudos_de_caso/thumbnails/thumbnail_estudo_de_caso_flemann.png"
title: "Dev"
img: "https://storage.googleapis.com/basedosdados-website/estudos_de_caso/imagens/estudo_de_caso_flemann.png"
imgDescription: "Dev"
description: "Dev"
logo: {
img: "https://storage.googleapis.com/basedosdados-website/estudos_de_caso/logos/flemann.png",
width: 245,
height: 85
}
about: "Dev"
resume: "Dev"
sector: "Dev"
---

Você pode acessar as fontes originais dos dados clicando no botão de redirecionamento para o link externo à plataforma.
19 changes: 0 additions & 19 deletions next/content/caseStudies/en/test.md

This file was deleted.

19 changes: 19 additions & 0 deletions next/content/caseStudies/es/dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: "dev"
displayTitle: "Dev"
thumbnail: "https://storage.googleapis.com/basedosdados-website/estudos_de_caso/thumbnails/thumbnail_estudo_de_caso_flemann.png"
title: "Dev"
img: "https://storage.googleapis.com/basedosdados-website/estudos_de_caso/imagens/estudo_de_caso_flemann.png"
imgDescription: "Dev"
description: "Dev"
logo: {
img: "https://storage.googleapis.com/basedosdados-website/estudos_de_caso/logos/flemann.png",
width: 245,
height: 85
}
about: "Dev"
resume: "Dev"
sector: "Dev"
---

Você pode acessar as fontes originais dos dados clicando no botão de redirecionamento para o link externo à plataforma.
19 changes: 0 additions & 19 deletions next/content/caseStudies/es/test.md

This file was deleted.

1 change: 0 additions & 1 deletion next/pages/api/caseStudies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export async function getAllCaseStudies(locale = 'pt') {

export async function getCaseStudiesById(id, locale = 'pt') {
const caseStudiesDirRoot = path.join(root, `content/caseStudies/${locale}`);

const filepath = path.join(caseStudiesDirRoot, `${id}.md`);
return await fs.readFile(filepath, "utf-8");
}
Expand Down
2 changes: 1 addition & 1 deletion next/pages/blog/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function getStaticPaths() {
const allPosts = await getAllPosts();
return {
paths: allPosts.map(({ slug }) => ({ params: { slug } })),
fallback: false,
fallback: "blocking"
};
}

Expand Down
2 changes: 1 addition & 1 deletion next/pages/case-studies/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function getStaticPaths() {
paths: allCaseStudies.map(({ id }) => {
return {params: { id }}
}),
fallback: false
fallback: "blocking"
}
}

Expand Down

0 comments on commit 36567b7

Please sign in to comment.