Veltro Theme Documentation
Global Scripts & Interactions
src/layouts/components/widgets/GlobalScripts.astro initializes Veltro’s shared client behavior.
It handles:
- selected Preline components, including accordions, collapse, overlays, selects, tabs, and tooltips
- Lenis smooth scrolling and page-jump keyboard shortcuts
- AOS initialization for marked content on non-mobile viewports
- the cursor follower
- section-title motion
- sticky sidebars
- horizontal scrolling and theme-specific hover interactions
The serialized client config is exposed as window.__veltroThemeConfig and contains the settings.smoothScroll and settings.cursor blocks.
Smooth Scroll
[settings.smoothScroll]enable = truerespectReducedMotion = trueduration = 1.1wheelMultiplier = 1keyboardShortcuts = truekeyboardDuration = 0.9Lenis is disabled on coarse pointers and when reduced motion is requested and respected.
Cursor
[settings.cursor]enable = truesize = 20hoverSize = 70opacity = 0.5borderWidth = 2followRatio = 0.15The cursor is automatically disabled on touch and coarse-pointer devices.
Heavier behavior is loaded during idle time or after the first relevant interaction. Header dropdown and overlay modules initialize directly in Header.astro so mobile navigation is available immediately.