UI: make floating share buttons stop at the end of the article
This commit is contained in:
@@ -73,10 +73,9 @@ export default async function BlogPostPage({ params }: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article className="bg-gray-50 min-h-screen py-12 relative">
|
<article className="bg-gray-50 min-h-screen py-12 relative overflow-x-clip">
|
||||||
{/* Injection du style de force pour le texte */}
|
{/* Injection du style de force pour le texte */}
|
||||||
<style dangerouslySetInnerHTML={{ __html: noBreakStyle }} />
|
<style dangerouslySetInnerHTML={{ __html: noBreakStyle }} />
|
||||||
<BlogShareButtons title={post.title} />
|
|
||||||
|
|
||||||
<div className="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div className="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
{/* Navigation */}
|
{/* Navigation */}
|
||||||
@@ -86,7 +85,14 @@ export default async function BlogPostPage({ params }: Props) {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="bg-white rounded-xl shadow-sm p-6 md:p-10 border border-gray-100">
|
<div className="bg-white rounded-xl shadow-sm p-6 md:p-10 border border-gray-100 relative">
|
||||||
|
|
||||||
|
{/* Conteneur pour les boutons flottants (s'arrête à la fin de l'article) */}
|
||||||
|
<div className="absolute top-0 bottom-0 right-4 lg:-right-16 pointer-events-none z-50 h-full">
|
||||||
|
<div className="sticky top-auto bottom-4 lg:top-1/2 lg:-translate-y-1/2 lg:bottom-auto pointer-events-auto pt-24 lg:pt-0">
|
||||||
|
<BlogShareButtons title={post.title} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{/* Image d'en-tête */}
|
{/* Image d'en-tête */}
|
||||||
<div className="w-full h-64 md:h-80 relative mb-8 rounded-lg overflow-hidden">
|
<div className="w-full h-64 md:h-80 relative mb-8 rounded-lg overflow-hidden">
|
||||||
<img
|
<img
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default function BlogShareButtons({ title }: Props) {
|
|||||||
if (!url) return null;
|
if (!url) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed bottom-4 right-4 lg:top-1/2 lg:right-8 lg:-translate-y-1/2 lg:bottom-auto flex flex-col gap-3 z-50">
|
<div className="flex flex-row lg:flex-col gap-3 z-50">
|
||||||
<a
|
<a
|
||||||
href={shareLinks.facebook}
|
href={shareLinks.facebook}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
Reference in New Issue
Block a user