Skip to content

Commit

Permalink
Ajout d'un bouton pour retourner a la page d'accueil (#44)
Browse files Browse the repository at this point in the history
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Amélioration du footer: ajout de liens fonctionnels

* ajout d'un boutton dans CompnentDetails pour retourner a la page d'accueil

* chore: remove unnecessary component definition

You were just adding a back-to-home button, didn't need to define a new
component for our "library".

* refac: move the back-to-home to `page.tsx`

You were displaying the `back-to-home` button in `ComponentDetails`
 where it was being displayed multiple times.

---------

Co-authored-by: Moussa Alkaly BADJI <89929592+Alkaly02@users.noreply.github.com>
Co-authored-by: Abdoulaye NDOYE <pa.ndoye@outlook.fr>
  • Loading branch information
3 people authored Oct 30, 2024
1 parent 2c8873a commit 79ccdeb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
7 changes: 6 additions & 1 deletion app/components/[componentName]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { serialize } from 'next-mdx-remote/serialize'
import RemoteMdxWrapper from "@/components/Mdx/RemoteMdxWrapper";
import RenderHTMLFiles from '@/components/galsenUiComponents/RenderHTMLFiles';
import H1 from "@/components/Mdx/H1";
import Link from "next/link";


type PageProps = {
Expand Down Expand Up @@ -36,7 +37,11 @@ export default async function Page({ params }: PageProps) {
return (
<main className="">
<section className="px-4 py-16 sm:max-w-7xl sm:mx-auto">

<Link href="/" passHref>
<button className="py-2 px-4 mb-3 bg-blue-500 text-white rounded hover:bg-blue-600">
Back to Home
</button>
</Link>
<RemoteMdxWrapper
mdxSource={mdxSource}
mdxScope={mdxScope}
Expand Down
17 changes: 11 additions & 6 deletions components/TheFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ export default function TheFooter() {
<footer className="mt-14 border-t border-neutral-100">
<div className="px-4 py-5 flex flex-col gap-2 items-center justify-between sm:max-w-7xl sm:mx-auto sm:flex-row md:py-8">
<span>&copy; Galsen UI. Tous droits réservés</span>
<ul className="inline-flex items-center gap-2">
{/* TODO: add correct links */}
<li className="text-sm">Facebook</li>
<li className="text-sm">Twitter</li>
<li className="text-sm">Github</li>
</ul>
<ul className="inline-flex items-center gap-4">
<li className="text-sm">
<a href="https://www.facebook.com/watch/galsendev221/" target="_blank" rel="noopener noreferrer" className="hover:text-blue-600">Facebook</a>
</li>
<li className="text-sm">
<a href="https://x.com/galsendev221" target="_blank" rel="noopener noreferrer" className="hover:text-blue-400">Twitter</a>
</li>
<li className="text-sm">
<a href="https://github.com/GalsenDev221/" target="_blank" rel="noopener noreferrer" className="hover:text-gray-600">Github</a>
</li>
</ul>
</div>
</footer>
);
Expand Down
17 changes: 17 additions & 0 deletions public/components/galsen-ui-footer-links/1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<footer class="mt-14 border-t border-neutral-100">
<div class="px-4 py-5 flex flex-col gap-2 items-center justify-between sm:max-w-7xl sm:mx-auto sm:flex-row md:py-8">
<span>&copy; Galsen UI. Tous droits réservés</span>
<ul class="inline-flex items-center gap-4">
<li class="text-sm">
<a href="https://www.facebook.com/watch/galsendev221/" target="_blank" rel="noopener noreferrer" class="hover:text-blue-600">Facebook</a>
</li>
<li class="text-sm">
<a href="https://x.com/galsendev221" target="_blank" rel="noopener noreferrer" class="hover:text-blue-400">Twitter</a>
</li>
<li class="text-sm">
<a href="https://github.com/GalsenDev221/" target="_blank" rel="noopener noreferrer" class="hover:text-gray-600">Github</a>
</li>
</ul>
</div>
</footer>

0 comments on commit 79ccdeb

Please sign in to comment.