aos.module in Animate On Scroll 8
Same filename and directory in other branches
Integration with AOS library.
File
aos.moduleView source
<?php
/**
* @file
* Integration with AOS library.
*/
/**
* Implements hook_help().
*/
function aos_help($path, $arg) {
switch ($path) {
case 'admin/help#aos':
return '<p>' . t('<a href="@aos" target="_blank">Animate On Scroll</a> is a small library to animate elements on your page as you scroll. It allows you to animate elements as you scroll down, and up. If you scroll back to top, elements will animate to it\'s previous state and are ready to animate again if you scroll down.', [
'@aos' => 'https://michalsnik.github.io/aos/',
]) . '</p>';
}
}
/**
* Implements hook_page_attachments().
*/
function aos_page_attachments(array &$attachments) {
// Attach AOS library to all pages.
$attachments['#attached']['library'][] = 'aos/aos_lib';
}
Functions
Name![]() |
Description |
---|---|
aos_help | Implements hook_help(). |
aos_page_attachments | Implements hook_page_attachments(). |