Compare commits
30 Commits
@ -0,0 +1,62 @@
|
||||
kind: pipeline
|
||||
name: hugo build and deploy
|
||||
type: docker
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
trigger:
|
||||
branch:
|
||||
- prod
|
||||
|
||||
steps:
|
||||
|
||||
# BUILD
|
||||
- name: build hugo site
|
||||
image: hugomods/hugo:0.111.3
|
||||
settings:
|
||||
hugo_version: 0.111.3
|
||||
extended: true
|
||||
validate: true
|
||||
config: config.toml
|
||||
content: content
|
||||
output: ./public
|
||||
commands:
|
||||
- hugo --minify
|
||||
|
||||
# PUSH FILES TO SERVER
|
||||
- name: deploy files on server
|
||||
image: drillster/drone-rsync
|
||||
settings:
|
||||
hosts: ["92.243.16.7"]
|
||||
target: /var/www/html/ltqf
|
||||
source: public/*
|
||||
user:
|
||||
from_secret: RSYNC_USER
|
||||
key:
|
||||
from_secret: RSYNC_HOST_KEY
|
||||
|
||||
# SEND MAIL NOTIF
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
settings:
|
||||
from.address: contact@legaragenumerique.fr
|
||||
host: mail.gandi.net
|
||||
port: 465
|
||||
debug: true
|
||||
username: contact@legaragenumerique.fr
|
||||
password:
|
||||
from_secret: MAIL_PASSWORD
|
||||
recipients: [ contact@legaragenumerique.fr ]
|
||||
subject: >
|
||||
[{{ build.status }}]
|
||||
{{ repo.owner }}/{{ repo.name }}
|
||||
body: >
|
||||
📝 {{repo.name}} / {{commit.branch}} - {{commit.message}} <br />
|
||||
{{#success build.status}}
|
||||
✅ succeeded for 👷♂️ build {{build.number}}
|
||||
{{else}}
|
||||
🛑 failed for 👷♂️ build {{build.number}}
|
||||
{{/success}}
|
||||
<br /><img src='https://www.legaragenumerique.fr/wp-content/uploads/2019/10/logo-web-garage_numerique.png'/>
|
||||
when:
|
||||
status: [ success, failure ]
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,25 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
let currentIndex = 0;
|
||||
const items = document.querySelectorAll('.newscarousel .newscarousel-item');
|
||||
const totalItems = items.length;
|
||||
|
||||
function moveToNextItem() {
|
||||
currentIndex = (currentIndex + 1) % totalItems;
|
||||
updateCarousel();
|
||||
}
|
||||
|
||||
function updateCarousel() {
|
||||
items.forEach((item, index) => {
|
||||
item.classList.remove('is-block');
|
||||
item.classList.add('is-hidden');
|
||||
if (index === currentIndex) {
|
||||
item.classList.remove('is-hidden')
|
||||
item.classList.add('is-block');
|
||||
}
|
||||
});
|
||||
}
|
||||
const interval = 5000; // 3000ms = 3 seconds
|
||||
setInterval(moveToNextItem, interval);
|
||||
|
||||
updateCarousel();
|
||||
});
|
@ -0,0 +1,39 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
let currentIndex = 0;
|
||||
const items = document.querySelectorAll('.carousel-item');
|
||||
const totalItems = items.length;
|
||||
|
||||
items.forEach((item, index) => {
|
||||
if ( index !== 0 ) {
|
||||
item.classList.add('is-invisible')
|
||||
item.style.transform = "translateX(100%)";
|
||||
} else {
|
||||
item.classList.add('is-block')
|
||||
};
|
||||
item.style.transition = "transform 2s ease";
|
||||
});
|
||||
|
||||
function moveToNextItem() {
|
||||
currentIndex = (currentIndex + 1) % totalItems;
|
||||
updateCarousel();
|
||||
}
|
||||
|
||||
function updateCarousel() {
|
||||
items.forEach((item, index) => {
|
||||
if (index === currentIndex) {
|
||||
item.classList.remove('is-invisible');
|
||||
item.classList.add('is-block');
|
||||
item.style.transform = "translateX(0)";
|
||||
} else if (currentIndex === 0 && index === totalItems - 1) {
|
||||
item.style.transform = "translateX(-100%)";
|
||||
} else if (index === currentIndex -1) {
|
||||
item.style.transform = "translateX(-100%)";
|
||||
} else {
|
||||
item.classList.remove('is-block');
|
||||
item.classList.add('is-invisible');
|
||||
item.style.transform = "translateX(100%)";
|
||||
}
|
||||
})
|
||||
}
|
||||
setInterval(moveToNextItem, 4000);
|
||||
});
|
@ -0,0 +1,66 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var slider = document.querySelector('#galerie');
|
||||
var items = slider.querySelectorAll('picture');
|
||||
let itemWidth = items[0].offsetWidth;
|
||||
let currentIndex = 0;
|
||||
|
||||
function moveItems() {
|
||||
currentIndex = (currentIndex + 1);
|
||||
let translationVector;
|
||||
let transientTranslationVector;
|
||||
let modIndex;
|
||||
modIndex = currentIndex % items.length;
|
||||
items.forEach((item, index) => {
|
||||
//item.style.visibility = "visible";
|
||||
if (modIndex < 2) {
|
||||
if (index <= items.length + modIndex - 2) {
|
||||
if ((index == items.length + modIndex - 2) && (currentIndex >= items.length)) {
|
||||
console.log("hide it");
|
||||
item.classList.add("goR");
|
||||
//item.style.visibility = "hidden";
|
||||
transientTranslationVector = (modIndex - 1) * -1 * itemWidth;
|
||||
item.style.transition = 'none';
|
||||
item.style.transform = `translateX(${transientTranslationVector}px)`;
|
||||
item.offsetHeight;
|
||||
item.style.transition = '';
|
||||
item.classList.remove("goR");
|
||||
// setTimeout(function() {
|
||||
// item.classList.remove("goR")
|
||||
// }, 100)
|
||||
}
|
||||
translationVector = modIndex * -1 * itemWidth;
|
||||
} else {
|
||||
translationVector = items.length * -1 * itemWidth;
|
||||
}
|
||||
} else {
|
||||
if (index <= modIndex - 2){
|
||||
if (index == modIndex - 2) {
|
||||
item.classList.add("goR");
|
||||
//item.style.visibility = "hidden"
|
||||
transientTranslationVector = (items.length + 1 - modIndex) * itemWidth;
|
||||
item.style.transition = 'none';
|
||||
item.style.transform = `translateX(${transientTranslationVector}px)`;
|
||||
item.offsetHeight;
|
||||
item.style.transition = '';
|
||||
item.classList.remove("goR");
|
||||
// setTimeout(function() {
|
||||
// item.classList.remove("goR")
|
||||
// }, 100)
|
||||
}
|
||||
translationVector = (items.length - modIndex) * itemWidth;
|
||||
} else {
|
||||
translationVector = modIndex * -1 * itemWidth;
|
||||
}
|
||||
};
|
||||
//translationVector = itemWidth * modIndex * -1;
|
||||
console.log(translationVector);
|
||||
item.style.transform = `translateX(${translationVector}px)`;
|
||||
// setTimeout(function() {
|
||||
// item.style.transform = `translateX(${translationVector}px)`;
|
||||
// }, 100)
|
||||
});
|
||||
}
|
||||
if (items.length > 3){
|
||||
setInterval(moveItems, 5000); // Move items every 5 seconds
|
||||
}
|
||||
});
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,11 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
{{ $bulmaCSS := resources.Get "css/bulma.min.css" | resources.ToCSS }}
|
||||
<!--<link rel="preload" href="{{ $bulmaCSS.RelPermalink }}" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="{{ $bulmaCSS.RelPermalink }}"></noscript>-->
|
||||
<link rel="stylesheet" href="{{ $bulmaCSS.RelPermalink }}">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Advent+Pro:wght@100;200;300;400;500;600;700&family=Lato:wght@300;400;700;900&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Advent+Pro:wght@100;200;300;400;500;600;700&family=Lato:wght@300;400;700;900&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link href="https://fonts.googleapis.com/css2?family=Advent+Pro:wght@100;200;300;400;500;600;700&family=Lato:wght@300;400;700;900&display=swap"></noscript>
|
||||
|
||||
|
Loading…
Reference in New Issue