/** * TinyTorch Version Badge * * Adds a version badge to the footer that links to the GitHub releases page. * Version is read from a data attribute or defaults to checking package version. */ document.addEventListener('DOMContentLoaded', function() { // Try to get version from meta tag first (set during build) const versionMeta = document.querySelector('meta[name="tinytorch-version"]'); const version = versionMeta ? versionMeta.content : '0.1.9'; // Find the footer const footer = document.querySelector('.footer'); if (!footer) return; // Create version badge container const versionContainer = document.createElement('div'); versionContainer.className = 'tinytorch-version-badge'; versionContainer.innerHTML = ` v${version} `; // Add to footer footer.appendChild(versionContainer); });