cavin dot name Fractals, Arts, Programming & Rambles

Extra Options & Configuration

All optional behaviors are controlled cleanly from config.php without touching any code.

1. Multi-Mode HTML5 Canvas Banner

Enabled via 'banner' in config.php:

'banner' => [
    'enabled' => true,
    'default_mode' => 'lsystem', // 'attractor' | 'horizon' | 'lsystem' | 'clouds' | 'julia'
],

Visitors can switch modes live from the subtle pill in the bottom-right corner of the banner (saved in localStorage), shuffle presets with ↻, or pause/play at any time:

  • attractor: Real chaotic maps (De Jong, Pickover, Quadratic, Hénon) with multiple curated presets.
  • horizon: Moving 3D shaded fractal terrain mesh with directional lighting and water basins.
  • lsystem: True string-rewriting infinite-zoom Lindenmayer systems (Vine, Weed, Fern, Koch) swaying in a gentle wind.
  • clouds: Animated domain-warped multi-octave fractal clouds.
  • julia: Real-time morphing Julia set fractals using 180° symmetry optimization for smooth performance even on mobile.

All animations live as standalone plugins inside anims/ (anims/attractor.js, anims/horizon.js, anims/lsystem.js, anims/clouds.js, anims/julia.js) and are auto-discovered and lazy-loaded on demand. They automatically pause when scrolled out of view and respect the visitor's prefers-reduced-motion OS setting.

Adding a Custom Banner Animation (anims/)

Drop any new .js file into anims/ (for example anims/my_anim.js) and register it with window.CSEBanner.register(...):

window.CSEBanner.register({
  id: 'my_anim',            // Must match the filename (my_anim.js)
  label: 'My Animation',    // Button label (or provide getLabel())
  init(api) {               // Optional: called on start & resize
    // api.width, api.height, api.ctx, api.accent, api.rgba(), api.fbm()
  },
  step(api) {               // Called every animation frame
    api.ctx.clearRect(0, 0, api.width, api.height);
    // Draw onto api.ctx using api.rgba(alpha, shift) and api.mouse
  },
  nextVariant(api) {},      // Optional: called when user clicks ↻
});

No PHP or config changes are needed — the new animation appears automatically in the banner switcher!

2. Modern Visual Effects

Toggle each effect individually in config.php:

'effects' => [
    'parallax_hero' => true,     // Subtle scroll parallax on the header
    'scroll_reveal' => true,     // Smooth fade-and-rise on cards & gallery tiles
    'reading_progress' => true,  // Thin progress bar at top of articles
    'page_fade' => true,         // Gentle fade-in on navigation
    'card_hover' => true,        // Lift & highlight on folder cards
],

3. Comments & Layered Anti-Spam

Control inline comments (<!--CSE_COMMENTS-->) via 'inline_comments_mode':

  • 'enabled': Displays existing comments and accepts new submissions.
  • 'readonly': Displays archived comments only (no form).
  • 'disabled': Hides comments completely.

When enabled, submissions pass through five zero-dependency anti-spam layers: a hidden CSS honeypot field, a session CSRF token, an HMAC-signed submission time-trap (rejecting instant bot posts and expired replays), a server-side session math question, and a per-IP-hash rate limiter + link cap.

4. Traffic Statistics (Zero External CDNs)

  • Reads historical v1 statistics (stats/CSE_stats and YYYYMMDD_CSE_stats snapshots) seamlessly alongside new monthly JSON logs (stats/v2/YYYY-MM.json).
  • Visualizes monthly hits, unique visitors, bot share %, browser/OS donut charts, and Top 20 pages on /<lan>/CSE_detailStat/ using local inline SVG charts (assets/js/charts.js).

5. SEO, Sitemap & Legacy URL Rewriting

  • /sitemap.xml: Dynamically lists all public pages across every language with real file <lastmod> dates, automatically excluding CSE_lock folders.
  • Meta & OpenGraph Tags: Automatically generates <meta name="description">, og:title, og:description, and serves a crisp SVG favicon.
  • Legacy URL Rewriter (legacy_base_urls): Automatically rewrites old hardcoded internal URLs in historical articles to match the active domain and subdirectory at render time.

6. Protected phpinfo() Diagnostic

If 'enable_phpinfo' => true is set in config.php, a logged-in user whose account explicitly has 'phpinfo' => true in users.php can open /<lan>/CSE_phpinfo to inspect the server's PHP environment. All unauthenticated or non-authorized requests receive 403 Forbidden.