-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from acend/changes
korrekturen studio wanner
- Loading branch information
Showing
18 changed files
with
247 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
export default function() { | ||
|
||
|
||
console.log('imageclouds' ); | ||
const imageclouds = document.querySelectorAll('.imagecloud'); | ||
|
||
|
||
if (!imageclouds) return; | ||
|
||
imageclouds.forEach(imagecloud => { | ||
const children = imagecloud.children; | ||
if (children.length > 0) { | ||
const randomChild = children[Math.floor(Math.random() * children.length)]; | ||
randomChild.classList.replace('d-none', 'd-flex'); | ||
|
||
setTimeout(() => { | ||
randomChild.dataset.scroll = 'in'; | ||
}, 200); | ||
|
||
|
||
} | ||
}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,7 @@ export default function() { | |
source: document.documentElement | ||
}) | ||
}); | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
export default function() { | ||
|
||
/** | ||
* Select all the messages | ||
* @type {NodeList} | ||
*/ | ||
const messages = document.querySelectorAll('.marquee__inner'); | ||
|
||
|
||
if (!messages) return; | ||
|
||
|
||
|
||
/** | ||
* The speed in time (in milliseconds) of a single pixel. | ||
* Changing this value will change the speed. | ||
* @type {number} | ||
*/ | ||
let timePerPixel = 3; | ||
|
||
/** | ||
* Width of the container. | ||
* Hardcoded for simplicity' sake. | ||
* @type {number} | ||
*/ | ||
const containerWidth = window.innerWidth; | ||
|
||
|
||
/** | ||
* For each message, calculate the duration based on the lenght of the message. | ||
* Then set the animation-duration of the animation. | ||
*/ | ||
messages.forEach(message => { | ||
const messageWidth = message.offsetWidth; | ||
const distance = messageWidth + containerWidth; | ||
const duration = timePerPixel * distance; | ||
|
||
message.style.setProperty('--speed', `${duration}ms`); | ||
}); | ||
|
||
|
||
/** | ||
* Update the duration of the animation based on the scroll speed. | ||
* | ||
let lastScrollY = window.scrollY; | ||
window.addEventListener('scroll', () => { | ||
let scrollSpeed = Math.abs(window.scrollY - lastScrollY); | ||
lastScrollY = window.scrollY; | ||
console.log(scrollSpeed); | ||
timePerPixel = 3 - (scrollSpeed / 100); | ||
messages.forEach(message => { | ||
const messageWidth = message.offsetWidth; | ||
const distance = messageWidth + containerWidth; | ||
const duration = timePerPixel * distance; | ||
message.style.setProperty('--speed', `${duration}ms`); | ||
}); | ||
}); | ||
*/ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ | |
} | ||
} | ||
|
||
.single.trainings & { | ||
&.full { | ||
position: relative; | ||
top: auto; | ||
right: auto; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,29 @@ draft: false | |
header: | ||
title: "Trainings" | ||
lead: "Wir eröffnen neue Zugänge zu Cloud Native und Open Source." | ||
img1 : "images/trainings/[email protected]" | ||
img2 : "images/trainings/[email protected]" | ||
img3 : "images/trainings/[email protected]" | ||
|
||
imagecloud: | ||
- img1: "images/trainings/[email protected]" | ||
img2: "images/trainings/[email protected]" | ||
img3: "images/trainings/[email protected]" | ||
|
||
- img1: "images/trainings/[email protected]" | ||
img2: "images/trainings/[email protected]" | ||
img3: "images/trainings/[email protected]" | ||
|
||
- img1: "images/trainings/[email protected]" | ||
img2: "images/trainings/[email protected]" | ||
img3: "images/trainings/[email protected]" | ||
|
||
- img1: "images/trainings/[email protected]" | ||
img2: "images/trainings/[email protected]" | ||
img3: "images/trainings/[email protected]" | ||
|
||
- img1: "images/trainings/[email protected]" | ||
img2: "images/trainings/[email protected]" | ||
img3: "images/trainings/[email protected]" | ||
|
||
|
||
|
||
filtertitle: "Das passende Training für dich" | ||
categories: | ||
|
Oops, something went wrong.