diff --git a/SIMPLE_MODE.md b/SIMPLE_MODE.md index 2be1eb6..5a9873e 100644 --- a/SIMPLE_MODE.md +++ b/SIMPLE_MODE.md @@ -57,7 +57,20 @@ docker build --build-arg SIMPLE_MODE=true -t bentopdf-simple . docker run -p 3000:80 bentopdf-simple ``` -### Method 4: Using Environment Variables +### Method 4: Using npm Script (Easiest for Local Development) + +Use the built-in npm script that handles everything: + +```bash +npm run serve:simple +``` + +This command automatically: +- Sets `SIMPLE_MODE=true` +- Builds the project with Simple Mode enabled +- Serves the built files on `http://localhost:3000` + +### Method 5: Using Environment Variables Set the environment variable before building: @@ -69,7 +82,15 @@ npx serve dist -p 3000 ## 🧪 Testing Simple Mode Locally -### Method 1: Using Pre-built Image (Easiest) +### Method 1: Using npm Script (Easiest for Development) + +```bash +npm run serve:simple +``` + +This automatically builds and serves Simple Mode on `http://localhost:3000`. + +### Method 2: Using Pre-built Image (Easiest for Production) ```bash # Pull and run the Simple Mode image @@ -79,7 +100,7 @@ docker run -p 3000:80 bentopdf/bentopdf-simple:latest Open `http://localhost:3000` in your browser. -### Method 2: Build and Test Locally +### Method 3: Build and Test Locally ```bash # Build with simple mode @@ -91,7 +112,7 @@ npx serve dist -p 3000 Open `http://localhost:3000` in your browser. -### Method 3: Compare Both Modes +### Method 4: Compare Both Modes ```bash # Test Normal Mode diff --git a/package.json b/package.json index 762b0d0..48782ad 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "format": "prettier --write .", "release": "node scripts/release.js patch", "release:minor": "node scripts/release.js minor", - "release:major": "node scripts/release.js major" + "release:major": "node scripts/release.js major", + "serve:simple": "SIMPLE_MODE=true npm run build && npx serve dist -p 3000" }, "devDependencies": { "@testing-library/dom": "^10.4.1", diff --git a/src/js/main.ts b/src/js/main.ts index 47152f5..dc529e8 100644 --- a/src/js/main.ts +++ b/src/js/main.ts @@ -11,12 +11,29 @@ const init = () => { import.meta.url ).toString(); - // Handle simple mode - hide branding sections + // Handle simple mode - hide branding sections but keep logo and copyright if (__SIMPLE_MODE__) { const hideBrandingSections = () => { + // Hide navigation but keep logo const nav = document.querySelector('nav'); if (nav) { + // Hide the entire nav but we'll create a minimal one with just logo nav.style.display = 'none'; + + // Create a simple nav with just logo on the right + const simpleNav = document.createElement('nav'); + simpleNav.className = 'bg-gray-800 border-b border-gray-700 sticky top-0 z-30'; + simpleNav.innerHTML = ` +
+ © 2025 BentoPDF. All rights reserved. +
+