From 849b698a091853cfeb8ffb85b9cd807efc283a98 Mon Sep 17 00:00:00 2001 From: RealET <real3t@gmail.com> Date: Wed, 28 Sep 2022 23:07:17 +0200 Subject: [PATCH] =?UTF-8?q?feat=20:=20autre=20m=C3=A9thode=20avec=20js=20p?= =?UTF-8?q?our=20le=20bouton=20retour=20top=20Retour=20sur=2021ad2b89f425c?= =?UTF-8?q?cbf267632f9fc32467e576a97e1=20qui=20n'=C3=A9tait=20finalement?= =?UTF-8?q?=20pas=20optimum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- javascripts.js.html | 9 ++++ noisettes/footer/footer.html | 5 ++- noisettes/footer/footer_modeedito.html | 5 +-- stylessoyezcreateurs.css.html | 60 +++++++++++--------------- 4 files changed, 38 insertions(+), 41 deletions(-) diff --git a/javascripts.js.html b/javascripts.js.html index f358dffb..74cb9b7f 100644 --- a/javascripts.js.html +++ b/javascripts.js.html @@ -219,6 +219,15 @@ function myInitPages() { // Surligner l'evenement en cours var id_anchor = location.hash.substr(1); //Get the word after the hash from the url if (id_anchor) jQuery('#'+id_anchor).addClass('highlight_anchor'); // ajoute la classe highlight_anchor à l'element autour de l'ancre + + // retourtop + jQuery(window).scroll(function () { + if (jQuery(this).scrollTop() > 300) { + jQuery('.retourtop').fadeIn(); + } else { + jQuery('.retourtop').fadeOut(); + } + }); [(#CONFIG{soyezcreateurs/native_tooltips}|=={on}|non) jQuery(function() { jQuery( document ).tooltip({ diff --git a/noisettes/footer/footer.html b/noisettes/footer/footer.html index 3e76fb8c..b6a76916 100644 --- a/noisettes/footer/footer.html +++ b/noisettes/footer/footer.html @@ -12,8 +12,11 @@ ] <INCLURE{fond=noisettes/footer/#GET{noisettefooter},env}> <//B_TheRub> -</div><!-- id="contenu" --> +</div><!-- id="contenu" --> <INCLURE{fond=noisettes/footer/footer_pied,env}> +<div class="retourtop"> + <a class="retourtop-link triadeA" href="[(#SELF|trim{'/'})]#[(#ENV{titretop}|sinon{<:soyezcreateurs:sommaire|sc_nettoyer_marqueur:>})]" title="<:soyezcreateurs:retourtop:>" aria-label="<:soyezcreateurs:retourtop:>"><svg class="svg-icon"><use xlink:href="#icon-chevron-thin-up"></use></svg><span class="hide"><:soyezcreateurs:retourtop:></span></a> +</div> [<script src="(#PRODUIRE{fond=javascripts.js})" type="text/javascript"></script>] [(#PLUGIN{SIDR}|oui) [<script src="(#CHEMIN{javascript/jquery.sidr.js}|timestamp)" type="text/javascript"></script>] diff --git a/noisettes/footer/footer_modeedito.html b/noisettes/footer/footer_modeedito.html index 49b192ec..3983ec1d 100644 --- a/noisettes/footer/footer_modeedito.html +++ b/noisettes/footer/footer_modeedito.html @@ -1,7 +1,4 @@ - <div class="retourtop"> - <a class="retourtop-link" href="[(#SELF|trim{'/'})]#[(#ENV{titretop}|sinon{<:soyezcreateurs:sommaire|sc_nettoyer_marqueur:>})]" title="<:soyezcreateurs:retourtop:>" aria-label="<:soyezcreateurs:retourtop:>"><svg class="svg-icon"><use xlink:href="#icon-chevron-thin-up"></use></svg><span class="hide"><:soyezcreateurs:retourtop:></span></a> - </div> -</div><!-- id="content" --> + </div><!-- id="content" --> </div><!-- id="wrapper" --> <nav><div id="navigation" class="equilibre stackable"> <h1 class="nocontent offscreen">Menu de la section</h1> diff --git a/stylessoyezcreateurs.css.html b/stylessoyezcreateurs.css.html index f17c9903..20fd829c 100644 --- a/stylessoyezcreateurs.css.html +++ b/stylessoyezcreateurs.css.html @@ -25,7 +25,6 @@ * a:focus-visible { outline: 3px dashed rgba(80,80,80,0.68); outline-offset: 4px; - background: transparent; } .offscreen { position: absolute; @@ -467,41 +466,30 @@ a[href*="mailto"]:hover { cursor:url("data:image/png;base64,iVBORw0KGgoAAAANSUhE a:active { color: #GET{c_active}; } .retourtop { - position: absolute; - top: 100vh; - right: 0; - bottom: 0; - width: 0; - pointer-events: none; -} - -.retourtop-link { - position: fixed; - position: sticky; - pointer-events: all; - top: calc(100vh - 3rem); - display: inline-block; - text-decoration: none; - font-size: 2rem; - line-height: 3rem; - text-align: center; - width: 3rem; - height: 3rem; - translate: -3rem; - border-radius: 50% 0 0 50%; - padding: 0.25rem; - box-shadow: inset 2px 0px 16px 0px rgb(0 0 0 / 14%); - color: #666; - background-color: rgb(255 255 255 / 60%); - transition: transform 80ms ease-in; -} -.retourtop-link:hover, .retourtop-link:focus { - transform: scale(1.1); - background-color: rgb(255 255 255 / 100%); -} -.retourtop-link:focus { - outline: none; - box-shadow: 0 0 0 3px #4e85c0; + display: inline-block; + clear: both; + position: sticky; + float: right; + bottom: 2rem; + right: 2rem; + width: fit-content; + color: #ffffff; + text-align: center; + font-size: 2rem; + font-weight: bold; + text-decoration: none; + border-right: none; + opacity: .8; + filter: alpha(opacity=80); + transition: opacity 500ms ease-out; + z-index: 99999; +} +.retourtop a { + padding: 1rem; + border: 1px solid transparent; +} +.portailcognac .retourtop a[href]:focus { + background-color: [(#GET{c_triadea}|couleur_extreme|=={000000}|?{#000000,#FFFFFF})]!important; } /*************** STRUCTURE - GENERAL */ -- GitLab