From 5727c54b1c81b4488e4e151ccadf3e9dec6978f7 Mon Sep 17 00:00:00 2001 From: Esenjin Date: Sun, 16 Feb 2025 21:52:54 +0100 Subject: [PATCH] ajout d'un bouton "retour en haut de page" --- assets/css/public.css | 32 ++++++++++++++++++++++++++++++++ chapitre.php | 25 +++++++++++++++++++++++++ index.php | 25 +++++++++++++++++++++++++ roman.php | 25 +++++++++++++++++++++++++ 4 files changed, 107 insertions(+) diff --git a/assets/css/public.css b/assets/css/public.css index e842b89..8df7c4d 100644 --- a/assets/css/public.css +++ b/assets/css/public.css @@ -467,6 +467,38 @@ body { color: var(--accent-primary); } +/* Bouton retour en haut */ +.scroll-top { + position: fixed; + bottom: 2rem; + right: 2rem; + background-color: var(--bg-tertiary); + color: var(--text-primary); + width: 3rem; + height: 3rem; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + text-decoration: none; + border: 1px solid var(--border-color); + opacity: 0; + visibility: hidden; + transition: all 0.3s ease; + cursor: pointer; + z-index: 100; +} + +.scroll-top.visible { + opacity: 1; + visibility: visible; +} + +.scroll-top:hover { + background-color: var(--accent-primary); + color: var(--text-tertiary); +} + /* Responsive */ @media (max-width: 1200px) { :root { diff --git a/chapitre.php b/chapitre.php index d66655c..da63e19 100644 --- a/chapitre.php +++ b/chapitre.php @@ -114,5 +114,30 @@ $config = Config::load();
← Retour à l'accueil | ← Retour au roman
+ + + + \ No newline at end of file diff --git a/index.php b/index.php index cb8e41b..e3f73f0 100644 --- a/index.php +++ b/index.php @@ -87,5 +87,30 @@ function formatDate($date) { + + + + \ No newline at end of file diff --git a/roman.php b/roman.php index bf070a6..9e5dd00 100644 --- a/roman.php +++ b/roman.php @@ -83,5 +83,30 @@ $config = Config::load(); ← Retour à l'accueil + + + + \ No newline at end of file