Skip to content

Commit 93533bd

Browse files
committed
refactor: new header title
1 parent 349dde2 commit 93533bd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/layouts/BaseLayout.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ import { getAllPersonTags } from '@/helpers/people';
88
import '@/styles/global.css';
99
1010
export interface Propos {
11-
pageTitle: string;
11+
pageTitle?: string;
1212
tags?: string[];
1313
type?: string;
1414
pageFindFilter?: string;
1515
}
1616
1717
const { pageTitle, tags, type, pageFindFilter } = Astro.props;
18-
console.log(pageFindFilter);
18+
1919
const allTags = tags ? await getAllPersonTags() : [];
20+
21+
const headerTitle = pageTitle ? `IFPB | ${pageTitle}` : 'IFPB Code';
2022
---
2123

2224
<html lang="pt-BR">
@@ -28,7 +30,7 @@ const allTags = tags ? await getAllPersonTags() : [];
2830
<link href="/projects/pagefind/pagefind-ui.css" rel="stylesheet" />
2931
<script src="/projects/pagefind/pagefind-ui.js" type="text/javascript"
3032
></script>
31-
<title>{pageTitle ?? 'IFPB Code'}</title>
33+
<title>{headerTitle}</title>
3234
</head>
3335
<body class="relative bg-gray-100">
3436
<NavBar />

src/pages/people/[person].astro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,12 @@ const { person, projects } = Astro.props;
4343
const subjects = projects
4444
.filter((projects) => isSubjectProject(projects))
4545
.map((project) => getSubjectByProject(project));
46-
47-
const pageTitle = `${person.data.name.full}`;
4846
---
4947

5048

5149
<PersonUtil />
5250

53-
<BaseLayout pageTitle={pageTitle} pageFindFilter="tipo:Pessoas">
51+
<BaseLayout pageTitle={person.data.name.full} pageFindFilter="tipo:Pessoas">
5452
<div
5553
class="flex gap-5 flex-col md:flex-row items-center md:justify-center md:items-start"
5654
>

src/pages/people/page/[page].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ export async function getStaticPaths({ paginate }) {
3333
const { page, index, tags } = Astro.props;
3434
---
3535

36-
<BaseLayout pageTitle="IFPB" type="people" tags={tags}>
36+
<BaseLayout pageTitle="Pessoas" type="people" tags={tags}>
3737
<PersonGrid page={page} type="people" index={index} />
3838
</BaseLayout>

0 commit comments

Comments
 (0)