Skip to content

Commit

Permalink
feat(chat): add footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Nov 10, 2024
1 parent c3c096e commit 7bb9b81
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 2 deletions.
8 changes: 8 additions & 0 deletions apps/chat/src/i18n/packs/i18n-lang-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,12 @@ export const I18N_PACK_EN = deepmerge(I18N_FORWARDED_EN_PACK, {
start: 'Start chat',
selectModel: 'AI Model',
},
footer: {
copyright: 'Open Source AI Platform',
madeWith: 'Made with',
withAI: 'with AI',
github: 'GitHub',
blog: 'Blog',
docs: 'Documentation',
},
});
8 changes: 8 additions & 0 deletions apps/chat/src/i18n/packs/i18n-lang-pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,12 @@ export const I18N_PACK_PL: I18nLangPack = deepmerge(I18N_FORWARDED_PL_PACK, {
start: 'Rozpocznij czat',
selectModel: 'Model AI',
},
footer: {
copyright: 'Platforma AI Open Source',
madeWith: 'Stworzone z',
withAI: 'z AI',
github: 'GitHub',
blog: 'Blog',
docs: 'Dokumentacja',
},
});
60 changes: 60 additions & 0 deletions apps/chat/src/layouts/footer/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { UkIcon } from '@llm/ui';
import { useI18n } from '~/i18n';

export function Footer() {
const t = useI18n().pack.footer;

return (
<footer className="py-12 w-full">
<div className="mx-auto px-4 container">
<div className="flex flex-col items-center gap-6 text-sm">
<div className="text-gray-400">
©
{' '}
{new Date().getFullYear()}
{' '}
DashHub.
{' '}
{t.copyright}
{' '}
{' '}
{t.madeWith}
<span className="mx-1">❤️</span>
{t.withAI}
</div>

<div className="flex items-center gap-8">
<a
href="https://github.com/DashHub-ai/DashHub"
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 text-gray-400 hover:text-gray-500"
>
<UkIcon icon="github" size={16} />
{t.github}
</a>
<a
href="https://blog.dashhub.ai"
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 text-gray-400 hover:text-gray-500"
>
<UkIcon icon="newspaper" size={16} />
{t.blog}
</a>
<a
href="https://docs.dashhub.ai"
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 text-gray-400 hover:text-gray-500"
>
<UkIcon icon="book" size={16} />
{t.docs}
</a>
</div>
</div>
</div>
</footer>
);
}
1 change: 1 addition & 0 deletions apps/chat/src/layouts/footer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './footer';
6 changes: 4 additions & 2 deletions apps/chat/src/layouts/page-with-navigation.layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import type { PropsWithChildren } from 'react';

import { Footer } from './footer';
import { Navigation } from './navigation';

export function PageWithNavigationLayout({ children }: PropsWithChildren) {
return (
<main className="hidden flex-col md:flex min-h-screen bg-gray-50">
<main className="md:flex flex-col hidden bg-gray-50 min-h-screen">
<Navigation />
<div className="flex-1 space-y-8 p-4 pt-6 container mx-auto">
<div className="flex-1 space-y-8 mx-auto p-4 pt-6 container">
{children}
</div>
<Footer />
</main>
);
}

0 comments on commit 7bb9b81

Please sign in to comment.