Files
semantica/docs/js/version-selector.js
T
KaifAhmad1 89a64a483b docs: enhance documentation structure and notebook formatting
- Update mkdocs.yml navigation to use new cookbook index
- Create comprehensive docs/cookbook.md index
- Refactor Welcome_to_Semantica.ipynb to use Markdown cells
- Enhance markdown formatting in Your_First_Knowledge_Graph.ipynb and Financial_Data_Integration.ipynb
- Update custom.css and version-selector.js for better styling
- Populate modules.md, concepts.md, and getting-started.md with detailed content
2025-11-23 14:17:36 +05:30

33 lines
1.1 KiB
JavaScript

document.addEventListener("DOMContentLoaded", function () {
// Target the header title
var headerTitle = document.querySelector(".md-header__title");
if (headerTitle) {
// Create the container for the version selector
var versionContainer = document.createElement("div");
versionContainer.className = "version-scroll-container";
// Define versions
var versions = [
{ name: "0.0.1", url: "#", current: true }
];
// Create the scrollable list
var versionList = document.createElement("div");
versionList.className = "version-list";
versions.forEach(function (version) {
var versionLink = document.createElement("a");
versionLink.className = "version-tag" + (version.current ? " active" : "");
versionLink.href = version.url;
versionLink.textContent = version.name;
versionList.appendChild(versionLink);
});
versionContainer.appendChild(versionList);
// Insert after the header title
headerTitle.parentNode.insertBefore(versionContainer, headerTitle.nextSibling);
}
});