@knowcode/doc-builder 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,100 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta name="description" content="Documentation site built with @knowcode/doc-builder">
7
+ <title>Test Documentation - Documentation</title>
8
+
9
+ <!-- Fonts -->
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
11
+
12
+ <!-- Icons -->
13
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
14
+
15
+ <!-- Mermaid -->
16
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
17
+
18
+ <!-- Styles -->
19
+ <link rel="stylesheet" href="/css/notion-style.css">
20
+
21
+ <!-- Favicon -->
22
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📚</text></svg>">
23
+ </head>
24
+ <body>
25
+ <!-- Header -->
26
+ <header class="header">
27
+ <div class="header-content">
28
+ <a href="/index.html" class="logo">Documentation</a>
29
+
30
+ <div class="header-actions">
31
+ <div class="deployment-info">
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.5">Last updated: Jul 21, 2025, 10:46 AM UTC</span>
33
+ </div>
34
+
35
+
36
+
37
+ <button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
38
+ <i class="fas fa-moon"></i>
39
+ </button>
40
+
41
+ <button id="menu-toggle" class="menu-toggle" aria-label="Toggle menu">
42
+ <i class="fas fa-bars"></i>
43
+ </button>
44
+ </div>
45
+ </div>
46
+ </header>
47
+
48
+ <!-- Preview Banner -->
49
+ <div id="preview-banner" class="preview-banner">
50
+ <div class="banner-content">
51
+ <i class="fas fa-exclamation-triangle banner-icon"></i>
52
+ <span class="banner-text">This documentation is a preview version - some content may be incomplete</span>
53
+ <button id="dismiss-banner" class="banner-dismiss" aria-label="Dismiss banner">
54
+ <i class="fas fa-times"></i>
55
+ </button>
56
+ </div>
57
+ </div>
58
+
59
+ <!-- Breadcrumbs -->
60
+ <nav class="breadcrumbs" id="breadcrumbs">
61
+ <!-- Breadcrumbs will be generated by JavaScript -->
62
+ </nav>
63
+
64
+ <!-- Main Content -->
65
+ <div class="main-wrapper">
66
+ <!-- Sidebar -->
67
+ <aside class="sidebar">
68
+ <div class="sidebar-header">
69
+ <div class="filter-box">
70
+ <input type="text" placeholder="Filter items..." class="filter-input" id="nav-filter">
71
+ <i class="fas fa-search filter-icon"></i>
72
+ </div>
73
+ </div>
74
+ <nav class="navigation">
75
+
76
+ <div class="nav-section" data-level="0">
77
+ <a class="nav-title expanded" href="/README.html" >
78
+ <i class="fas fa-home"></i> Documentation
79
+ </a>
80
+ <div class="nav-content" >
81
+ <a href="/README.html" class="nav-item active" data-tooltip="This is a test document to verify the doc-builder version tooltip."><i class="fas fa-file-alt"></i> Overview</a></div></div>
82
+ </nav>
83
+ <div class="resize-handle"></div>
84
+ </aside>
85
+
86
+ <!-- Content Area -->
87
+ <main class="content">
88
+ <div class="content-inner">
89
+ <h1>Test Documentation</h1>
90
+ <p>This is a test document to verify the doc-builder version tooltip.</p>
91
+
92
+ </div>
93
+ </main>
94
+ </div>
95
+
96
+ <!-- Scripts -->
97
+ <script src="/js/main.js"></script>
98
+
99
+ </body>
100
+ </html>
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Simple Client-Side Authentication for Documentation
3
+ * This runs on every page load to check authentication
4
+ *
5
+ * IMPORTANT: This is a basic authentication system suitable for
6
+ * protecting documentation from casual access. For production
7
+ * use with sensitive data, implement server-side authentication.
8
+ */
9
+
10
+ (function() {
11
+ 'use strict';
12
+
13
+ // Skip auth check on login and logout pages
14
+ const currentPage = window.location.pathname;
15
+ if (currentPage === '/login.html' || currentPage === '/logout.html' || currentPage.includes('login') || currentPage.includes('logout')) {
16
+ return;
17
+ }
18
+
19
+ // Check if user is authenticated
20
+ function isAuthenticated() {
21
+ const authToken = getCookie('doc-auth');
22
+ if (!authToken) return false;
23
+
24
+ try {
25
+ // Simple token validation - just check if it exists and has expected format
26
+ // The actual validation happens server-side (or in login page for static sites)
27
+ const decoded = atob(authToken);
28
+ return decoded && decoded.includes(':');
29
+ } catch (error) {
30
+ return false;
31
+ }
32
+ }
33
+
34
+ // Get cookie value
35
+ function getCookie(name) {
36
+ const value = `; ${document.cookie}`;
37
+ const parts = value.split(`; ${name}=`);
38
+ if (parts.length === 2) return parts.pop().split(';').shift();
39
+ return null;
40
+ }
41
+
42
+ // Redirect to login if not authenticated
43
+ function redirectToLogin() {
44
+ const currentUrl = window.location.pathname + window.location.search;
45
+ const loginUrl = '/login.html' + (currentUrl !== '/' ? '?redirect=' + encodeURIComponent(currentUrl) : '');
46
+ window.location.href = loginUrl;
47
+ }
48
+
49
+ // Check authentication on page load
50
+ if (!isAuthenticated()) {
51
+ redirectToLogin();
52
+ }
53
+
54
+ // Add logout functionality to logout buttons
55
+ document.addEventListener('DOMContentLoaded', function() {
56
+ const logoutLinks = document.querySelectorAll('a[href*="logout"]');
57
+ logoutLinks.forEach(link => {
58
+ link.addEventListener('click', function(e) {
59
+ e.preventDefault();
60
+ // Clear auth cookie
61
+ document.cookie = 'doc-auth=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
62
+ window.location.href = '/logout.html';
63
+ });
64
+ });
65
+ });
66
+
67
+ })();