Optimax "animated-scroller" - Question | JoomShaper

Optimax "animated-scroller"

A

ALLFIZZ

Template 11 months ago

Hello Hello I currently use the template "Wimble" in version 2.0.0. I would like to use the animation at the bottom of the "let’s work" homepage. I see that the css is "animated-scroller" and that the files used are: "main.js", "responsive.scss", "theme.scss" and that there is a file "custom.sql" to install. Can you help me to integrate it and use it in the "Wimble" template that I have set up? Thank you very much

IN FRENCH Bonjour J'utilise actuellement le template "Wimble" en version 2.0.0. Je souhaiterais utiliser l'animation au bas de la page d'accueil "let’s work". Je vois que le css est "animated-scroller" et que les fichiers utilisé sont : "main.js", "responsive.scss", "theme.scss" et qu'il y a un fichier "custom.sql" à l'installation. Pouvez-vous m'aider pour l'intégrer et l'utiliser au template "Wimble" que j'ai mis en place ? Mille mercis

0
3 Answers
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 11 months ago #174327

Hello ALLFIZZ,

Thank you for reaching out to us. With the template and SP Page Builder, you have full flexibility to customize your design as desired, and our technical team is available to assist with any technical issues. However, please note that we do not provide personal customization or development support.

As a helpful starting point, I'm giving you for this time only. However, please note that our support policy does not cover customization requests, so I kindly ask you not to request customization assistance in the future. Thank you for your understanding.

Step 1: Use a Raw HTML addon and use below html code

<div class='animated-scroller'>
<p><a href="/index.php/pages/contact">let’s work</a></p>
<p><a href="/index.php/pages/contact">let’s work</a></p>
<p><a href="/index.php/pages/contact">let’s work</a></p>
<p><a href="/index.php/pages/contact">let’s work</a></p>
<p><a href="/index.php/pages/contact">let’s work</a></p>
<p><a href="/index.php/pages/contact">let’s work</a></p>
<p><a href="/index.php/pages/contact">let’s work</a></p>
</div>

make sure to change the page url according to your needs.

Step 2: Please add the following CSS code to your Template Options -> Custom Code -> Custom CSS

.animated-scroller {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 80px;
    white-space: nowrap;
}

.animated-scroller p {
    font-size: 56px;
    line-height: 1;
    color: #000;
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    position: relative;
}

.animated-scroller p:hover {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}

.animated-scroller p:before {
    content: '\f005';
    font-family: 'Font Awesome 5 Free';
    font-size: 40px;
    position: absolute;
    top: 10px;
    left: -45px;
}

.animated-scroller a {
    color: black;
}

Step 3: Please add the following Javascript code to your Template Options -> Custom Code -> Custom Javascript

jQuery(function ($) {

    // Infinite Scrolling
    const articlesScroller = document.querySelector('.animated-scroller')
    if (articlesScroller) {
        let currentLeftValue = 0
        let interval = null
        const gap = 80 // Define the gap

        function animationStart() {
            interval = setInterval(animationLoop, 10)
        }

        function animationStop() {
            clearInterval(interval)
        }

        articlesScroller.addEventListener('mouseover', animationStop)
        articlesScroller.addEventListener('mouseout', animationStart)

        function animationLoop() {
            const firstListItem =
                articlesScroller.querySelector('p:first-child')
            const rightSideOfFirstItem =
                firstListItem.getBoundingClientRect().right

            if (rightSideOfFirstItem < 0) {
                articlesScroller.appendChild(firstListItem)
                currentLeftValue += firstListItem.clientWidth + gap
            }

            articlesScroller.style.marginLeft = `${currentLeftValue}px`
            currentLeftValue--
        }

        animationStart()
    }
})
0
A
ALLFIZZ
Accepted Answer
11 months ago #174333

Hello, first of all thank you for your hyper fast return. Then, indeed I am sorry for my question, it is true that I had not thought and paid attention. Note for the future I fully understand. Again sorry and thank you again for your help.

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 11 months ago #174423

You are welcome. Please marked the issue as solved.

0