Skip to content

config.js ​

js/config.js holds the settings every page shares: how fast the animations run, when a section starts its entrance, the keys of the contact form's spam check and of the Google Map. Every page loads it, so a value changed here changes the whole site. No build is needed: save the file and reload the page.

How to access ​

HTML/js/config.js

js
window.velumConfig = {
  /** Animation speed: 1 is normal, 2 twice as fast, 0.5 half as fast */
  speed: 1,
  …
  googleMapsLoadMode: 'auto',
}

The settings ​

Each setting has a comment above it in the file that says what it takes. In short:

SettingWhat it doesDefault
speedAnimation speed: 1 is normal, 2 twice as fast, 0.5 half as fast1
revealTriggerPointWhere a section starts its entrance as it scrolls in: 0 at the bottom edge of the screen, 1 at the top0.15
maskStyleThe edge of the curtains and masks over pictures and sliders: 'curved' or 'straight''curved'
hoverLiftCards and pictures lift when hovered: true or falsetrue
respectReducedMotionFollow the visitor's "reduce motion" system setting: true or falsetrue
prefetchFetch a page before its link is clicked: false, 'hover', 'viewport' (as links scroll into view) or 'tap'false
timeoutHow long a page may take to arrive, in milliseconds, before the browser loads it instead20000
turnstileSiteKeyThe site key of Cloudflare Turnstile, the contact form's spam check: Contact form''
googleMapsKeyThe Google Maps key of the map in contacts-classic.html: Google Map''
googleMapsLoadModeWhen the map loads: 'auto' as it scrolls into view, or 'click' after the visitor presses its Load map button'auto'

The features themselves, the cursor or the AJAX transitions, are not switched here: a feature is turned off by removing its line from a page's head, see Turn a feature off.

Changing a setting ​

▶️ Step 1. ​

Change the value after the setting's name, and keep the comma at the end of the line. Text goes in single quotes, numbers and true / false without them. Here the animations run a quarter faster and the masks have straight edges:

js
  /** Animation speed: 1 is normal, 2 twice as fast, 0.5 half as fast */
  speed: 1.25,
  …
  /** The edge of the curtains and masks over pictures and sliders: 'curved' or 'straight' */
  maskStyle: 'straight',

▶️ Step 2. ​

Save the file and reload a page.

A setting left out of the file, or given a value of the wrong kind, keeps its default. A wrong value also prints a line in the browser's console that names the setting and what it takes, such as Velum: "speed" in js/config.js must be a number above 0. Using 1.: see Troubleshooting.

Next: Turn a feature off.