/* HermesCustom — Lukas' additions to obsidian-web-viewer * * Loaded by vault.html (one-line patch) AFTER the main script. Initializes * automatically via HermesCustom.init() at the bottom of this file. * * Features: * 1. Current-page highlighting in 3D Graph * 2. Click-to-navigate on 3D Graph nodes (Three.js raycasting) * 3. Responsive layout (graph collapses below 1024px, tree below 768px) * 4. URL-based navigation (?file=) * * Design notes: see docs/ARCHITECTURE.md * * IMPORTANT: This script runs AFTER obv's main script (which sets up the * layout). So our responsiveLayout() needs to apply classes/styles AFTER * obv's setup, and our CSS must win the specificity battle against obv's * inline styles + media queries. */ (function() { 'use strict'; window.HermesCustom = window.HermesCustom || {}; const HermesCustom = window.HermesCustom; // ============================================================ // Configuration // ============================================================ const BREAKPOINTS = { mobile: 768, // <768px tablet: 1024, // 768-1023px }; // ============================================================ // 1. CSS injection — high specificity to win against obv // ============================================================ /** * Inject responsive CSS into as a stylesheet (not