Compare commits
2 Commits
bb5d011d3b
...
b5b8571b08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5b8571b08 | ||
|
|
04767c1e3f |
|
|
@ -30,6 +30,9 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
DEV_SERVER_PATH:
|
DEV_SERVER_PATH:
|
||||||
from_secret: dev_server_path
|
from_secret: dev_server_path
|
||||||
|
PROD_SERVER_PATH:
|
||||||
|
from_secret: prod_server_path
|
||||||
commands:
|
commands:
|
||||||
- cd carhop__carhop-theme__DEV
|
- 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 -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'
|
||||||
|
|
|
||||||
7
resources/css/components/scroll-top.css
Normal file
7
resources/css/components/scroll-top.css
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
3
resources/img/elements/carhop-arrow-up.svg
Normal file
3
resources/img/elements/carhop-arrow-up.svg
Normal 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 |
|
|
@ -1,7 +1,8 @@
|
||||||
import menuInit from './header';
|
import menuInit from './header';
|
||||||
import initFooterShapes from './footer';
|
import initFooterShapes from './footer';
|
||||||
|
import handleScrollTop from './utilities/scroll-top';
|
||||||
window.addEventListener('load', function () {
|
window.addEventListener('load', function () {
|
||||||
// menuInit();
|
// menuInit();
|
||||||
initFooterShapes();
|
initFooterShapes();
|
||||||
|
handleScrollTop();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
8
resources/js/utilities/scroll-top.ts
Normal file
8
resources/js/utilities/scroll-top.ts
Normal 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' });
|
||||||
|
});
|
||||||
|
}
|
||||||
3
template-parts/utils/scroll-top.php
Normal file
3
template-parts/utils/scroll-top.php
Normal 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>
|
||||||
Loading…
Reference in New Issue
Block a user