Compare commits

...

2 Commits

Author SHA1 Message Date
Antoine M
b5b8571b08 CHORE Updating deployment to deploy on production
All checks were successful
continuous-integration/drone/push Build is passing
2025-09-30 15:25:52 +02:00
Antoine M
04767c1e3f FEATURE Implementing scroll top component 2025-09-30 15:18:36 +02:00
6 changed files with 26 additions and 1 deletions

View File

@ -30,6 +30,9 @@ steps:
environment:
DEV_SERVER_PATH:
from_secret: dev_server_path
PROD_SERVER_PATH:
from_secret: prod_server_path
commands:
- cd carhop__carhop-theme__DEV
- rsync -avhp -e 'ssh -p 1982' ./ $DEV_SERVER_PATH:~/carhop/wordpress/wp-content/themes/carhop --delete --exclude 'node_modules' --exclude 'Makefile' --exclude '.git' --exclude '.env' --exclude '.env_prod' --exclude '.env_dev'
- rsync -avhp -e 'ssh' ./ $PROD_SERVER_PATH:~/sites/carhop.be/wp-content/themes/carhop --delete --exclude 'node_modules' --exclude 'Makefile' --exclude '.git' --exclude '.env' --exclude '.env_prod' --exclude '.env_dev'

View File

@ -0,0 +1,7 @@
button#scroll-top {
@apply fixed lg:bottom-8 lg:right-12 bottom-4 right-4 bg-white border-2 border-solid border-primary text-primary rounded-full p-4 z-50;
img {
@apply h-6 w-6;
}
}

View File

@ -0,0 +1,3 @@
<svg width="37" height="19" viewBox="0 0 37 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M35.5 18.15L18.9689 2.00003L1.5 18.15" stroke="#136F63" stroke-width="2"/>
</svg>

After

Width:  |  Height:  |  Size: 187 B

View File

@ -1,7 +1,8 @@
import menuInit from './header';
import initFooterShapes from './footer';
import handleScrollTop from './utilities/scroll-top';
window.addEventListener('load', function () {
// menuInit();
initFooterShapes();
handleScrollTop();
});

View File

@ -0,0 +1,8 @@
export default function handleScrollTop() {
const scrollTopButton = document.getElementById('scroll-top');
if (!scrollTopButton) return;
scrollTopButton.addEventListener('click', () => {
window.scrollTo({ top: 0, behavior: 'smooth' });
});
}

View File

@ -0,0 +1,3 @@
<button id="scroll-top" class="animate-hover-top">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/resources/img/elements/carhop-arrow-up.svg" alt="Remonter en haut de la page">
</button>