-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:TYPO3incubator/surfcamp-team6
- Loading branch information
Showing
31 changed files
with
422 additions
and
144 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import './scss/global.scss' | ||
import './js/modal.js' | ||
import './js/theme-settings.js' | ||
import './js/animations.js' | ||
import './js/accordion.js' |
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,19 @@ | ||
import { animateCountUp } from './counter-animation' | ||
|
||
const numbersCe = document.querySelector('[data-el="numbers"]'); | ||
const numbers = numbersCe.querySelectorAll('[data-el="number"]') | ||
|
||
const observer = new IntersectionObserver((entries) => { | ||
entries.forEach((entry) => { | ||
if (entry.isIntersecting) { | ||
observer.disconnect() | ||
if (numbers.length) { | ||
numbers.forEach((number) => { | ||
animateCountUp(number, 2500) | ||
}) | ||
} | ||
} | ||
}) | ||
}, { threshold: 0.2 }); | ||
|
||
observer.observe(numbersCe) |
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,34 @@ | ||
export const animateCountUp = (el, animationDuration) => { | ||
// How long you want the animation to take, in ms | ||
// Calculate how long each ‘frame’ should last if we want to update the animation 60 times per second | ||
const frameDuration = 1000 / 60; | ||
// Use that to calculate how many frames we need to complete the animation | ||
const totalFrames = Math.round( animationDuration / frameDuration ); | ||
// An ease-out function that slows the count as it progresses | ||
const easeOutQuad = t => t * ( 2 - t ); | ||
|
||
let frame = 0; | ||
const countTo = parseInt( el.innerHTML, 10 ); | ||
// Start the animation running 60 times per second | ||
const counter = setInterval( () => { | ||
frame++; | ||
// Calculate our progress as a value between 0 and 1 | ||
// Pass that value to our easing function to get our | ||
// progress on a curve | ||
const progress = easeOutQuad( frame / totalFrames ); | ||
// Use the progress value to calculate the current count | ||
const currentCount = Math.round( countTo * progress ); | ||
|
||
// If the current count has changed, update the element | ||
if ( parseInt( el.innerHTML, 10 ) !== currentCount ) { | ||
el.innerHTML = currentCount; | ||
} | ||
|
||
// If we’ve reached our last frame, stop the animation | ||
if ( frame === totalFrames ) { | ||
clearInterval( counter ); | ||
} | ||
}, frameDuration ); | ||
}; | ||
|
||
|
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
32 changes: 29 additions & 3 deletions
32
local_packages/success/Configuration/Sets/SetsPromotion/settings.yaml
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 |
---|---|---|
@@ -1,3 +1,29 @@ | ||
foo: | ||
bar: | ||
baz: 99 | ||
ui: | ||
theme: "light" | ||
layout: | ||
radius: "3px" | ||
rotate: "0" | ||
pagebg: "white" | ||
footerbg: "secondary" | ||
font: | ||
text: "roboto" | ||
heading: "roboto-mono" | ||
light: | ||
color: | ||
primary: "rgb(255, 135, 0)" | ||
secondary: "rgb(71, 128, 113)" | ||
light: "rgb(163, 208, 196)" | ||
primarytext: "var(--color-whitetext)" | ||
secondarytext: "var(--color-blacktext)" | ||
lighttext: "var(--color-whitetext)" | ||
dark: | ||
color: | ||
|
||
info: | ||
owner: | ||
name: "TYPO3 Surfcamp" | ||
imprint: "https://typo3.org/legal-notice" | ||
dataPrivacy: "https://typo3.org/privacy-policy" | ||
footer: | ||
maxCols: '3' | ||
pageId: 0 |
32 changes: 29 additions & 3 deletions
32
local_packages/success/Configuration/Sets/Whitepaper/settings.yaml
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 |
---|---|---|
@@ -1,3 +1,29 @@ | ||
foo: | ||
bar: | ||
baz: 99 | ||
ui: | ||
theme: "light" | ||
layout: | ||
radius: "0px" | ||
rotate: "0" | ||
pagebg: "white" | ||
footerbg: "white" | ||
font: | ||
text: "lato" | ||
heading: "roboto-slab" | ||
light: | ||
color: | ||
primary: "rgb(255, 135, 0)" | ||
secondary: "rgb(81, 81, 81)" | ||
light: "rgb(255, 217, 173)" | ||
primarytext: "white" | ||
secondarytext: "white" | ||
lighttext: "black" | ||
dark: | ||
color: | ||
|
||
info: | ||
owner: | ||
name: "TYPO3 GmbH" | ||
imprint: "https://typo3.org/legal-notice" | ||
dataPrivacy: "https://typo3.org/privacy-policy" | ||
footer: | ||
maxCols: '3' | ||
pageId: 0 |
1 change: 1 addition & 0 deletions
1
local_packages/success/Configuration/Sets/_LandingPage/TypoScript/config.typoscript
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 @@ | ||
config.htmlTag.attributes.class = {$ui.scrollBehaviour} |
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
Oops, something went wrong.