feat: Add subdirectory hosting support and fix asset path resolution
- Update README with comprehensive subdirectory hosting instructions and BASE_URL configuration guide - Convert absolute asset paths to relative paths in index.html for proper subdirectory deployment - Update all worker script imports to use relative paths instead of absolute paths - Fix favicon and image references to work correctly when hosted in nested directories - Normalize whitespace and formatting across worker files for consistency - Update vite.config.ts to properly handle BASE_URL configuration for subdirectory deployments - Ensure all tool pages and logic files maintain compatibility with subdirectory hosting - Enable BentoPDF to be deployed at any URL path (e.g., example.com/tools/bentopdf/) without breaking asset loading
This commit is contained in:
26
README.md
26
README.md
@@ -249,9 +249,33 @@ npm run package
|
||||
|
||||
# Serve the dist folder
|
||||
npx serve dist
|
||||
|
||||
The website can be accessible at: http://localhost:3000/
|
||||
|
||||
```
|
||||
|
||||
The website can be accessible at: ```http://localhost:3000/```
|
||||
**Subdirectory Hosting:**
|
||||
|
||||
BentoPDF can also be hosted from a subdirectory (e.g., `example.com/tools/bentopdf/`):
|
||||
|
||||
```bash
|
||||
|
||||
# Example:
|
||||
# 1. Build the app with the specific BASE_URL. BASE_URL must have a trailing and leading slash. The BASE_URL can be any url of your choice. Here we are using /tools/bentopdf/ as an example.
|
||||
|
||||
BASE_URL=/tools/bentopdf/ npm run build
|
||||
|
||||
# 2. Create the nested directory structure inside serve-test (or any folder of your choice for local testing. In case of production, create the nested directory structure inside the root directory)
|
||||
mkdir -p serve-test/tools/bentopdf
|
||||
|
||||
# 3. Copy all files from the 'dist' folder into that nested directory
|
||||
cp -r dist/* serve-test/tools/bentopdf/
|
||||
|
||||
# 4. Serve the 'serve-test' folder
|
||||
npx serve serve-test
|
||||
```
|
||||
|
||||
The website can be accessible at: ```http://localhost:3000/tools/bentopdf/```
|
||||
|
||||
The `npm run package` command creates a `dist-{version}.zip` file that you can use for self-hosting.
|
||||
|
||||
|
||||
16
index.html
16
index.html
@@ -5,11 +5,11 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>BentoPDF - The Privacy First PDF Toolkit</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/images/favicon.svg" />
|
||||
<link rel="icon" type="image/png" href="/images/favicon.png" />
|
||||
<link rel="apple-touch-icon" href="/images/favicon.png" />
|
||||
<link rel="icon" href="/favicon.ico" sizes="any" />
|
||||
<link href="/src/css/styles.css" rel="stylesheet" />
|
||||
<link rel="icon" type="image/svg+xml" href="images/favicon.svg" />
|
||||
<link rel="icon" type="image/png" href="images/favicon.png" />
|
||||
<link rel="apple-touch-icon" href="images/favicon.png" />
|
||||
<link rel="icon" href="favicon.ico" sizes="any" />
|
||||
<link href="src/css/styles.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body class="antialiased">
|
||||
@@ -502,7 +502,7 @@
|
||||
<!-- GDPR Compliance -->
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<div class="w-20 h-20 md:w-24 md:h-24 rounded-full bg-blue-600 flex items-center justify-center mb-4">
|
||||
<img src="/images/gdpr.svg" alt="GDPR compliance" class="w-full h-full" />
|
||||
<img src="images/gdpr.svg" alt="GDPR compliance" class="w-full h-full" />
|
||||
</div>
|
||||
<h3 class="text-lg md:text-xl font-bold text-white mb-3">
|
||||
GDPR compliance
|
||||
@@ -515,7 +515,7 @@
|
||||
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<div class="w-20 h-20 md:w-24 md:h-24 rounded-full bg-blue-600 flex items-center justify-center mb-4">
|
||||
<img src="/images/ccpa.svg" alt="CCPA compliance" class="w-full h-full" />
|
||||
<img src="images/ccpa.svg" alt="CCPA compliance" class="w-full h-full" />
|
||||
</div>
|
||||
<h3 class="text-lg md:text-xl font-bold text-white mb-3">
|
||||
CCPA compliance
|
||||
@@ -528,7 +528,7 @@
|
||||
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<div class="w-20 h-20 md:w-24 md:h-24 rounded-full bg-blue-600 flex items-center justify-center mb-4">
|
||||
<img src="/images/hipaa.svg" alt="HIPAA compliance" class="w-full h-full" />
|
||||
<img src="images/hipaa.svg" alt="HIPAA compliance" class="w-full h-full" />
|
||||
</div>
|
||||
<h3 class="text-lg md:text-xl font-bold text-white mb-3">
|
||||
HIPAA compliance
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
|
||||
function parsePageRange(rangeString, totalPages) {
|
||||
const pages = new Set();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
|
||||
self.onmessage = function (e) {
|
||||
const { command, files } = e.data;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
|
||||
function getAttachmentsFromPDFInWorker(fileBuffer, fileName) {
|
||||
try {
|
||||
const uint8Array = new Uint8Array(fileBuffer);
|
||||
|
||||
|
||||
let pdf;
|
||||
try {
|
||||
pdf = coherentpdf.fromMemory(uint8Array, '');
|
||||
@@ -40,8 +40,8 @@ function getAttachmentsFromPDFInWorker(fileBuffer, fileName) {
|
||||
|
||||
attachments.push({
|
||||
index: i,
|
||||
name: String(name),
|
||||
page: Number(page),
|
||||
name: String(name),
|
||||
page: Number(page),
|
||||
data: buffer
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -73,7 +73,7 @@ function getAttachmentsFromPDFInWorker(fileBuffer, fileName) {
|
||||
function editAttachmentsInPDFInWorker(fileBuffer, fileName, attachmentsToRemove) {
|
||||
try {
|
||||
const uint8Array = new Uint8Array(fileBuffer);
|
||||
|
||||
|
||||
let pdf;
|
||||
try {
|
||||
pdf = coherentpdf.fromMemory(uint8Array, '');
|
||||
@@ -89,28 +89,28 @@ function editAttachmentsInPDFInWorker(fileBuffer, fileName, attachmentsToRemove)
|
||||
coherentpdf.startGetAttachments(pdf);
|
||||
const attachmentCount = coherentpdf.numberGetAttachments();
|
||||
const attachmentsToKeep = [];
|
||||
|
||||
|
||||
for (let i = 0; i < attachmentCount; i++) {
|
||||
if (!attachmentsToRemove.includes(i)) {
|
||||
const name = coherentpdf.getAttachmentName(i);
|
||||
const page = coherentpdf.getAttachmentPage(i);
|
||||
const data = coherentpdf.getAttachmentData(i);
|
||||
|
||||
|
||||
const dataCopy = new Uint8Array(data.length);
|
||||
dataCopy.set(new Uint8Array(data));
|
||||
|
||||
attachmentsToKeep.push({
|
||||
name: String(name),
|
||||
page: Number(page),
|
||||
data: dataCopy
|
||||
|
||||
attachmentsToKeep.push({
|
||||
name: String(name),
|
||||
page: Number(page),
|
||||
data: dataCopy
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
coherentpdf.endGetAttachments();
|
||||
|
||||
coherentpdf.removeAttachedFiles(pdf);
|
||||
|
||||
|
||||
for (const attachment of attachmentsToKeep) {
|
||||
if (attachment.page === 0) {
|
||||
coherentpdf.attachFileFromMemory(attachment.data, attachment.name, pdf);
|
||||
@@ -119,7 +119,7 @@ function editAttachmentsInPDFInWorker(fileBuffer, fileName, attachmentsToRemove)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const modifiedBytes = coherentpdf.toMemory(pdf, false, true);
|
||||
coherentpdf.deletePdf(pdf);
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
|
||||
function extractAttachmentsFromPDFsInWorker(fileBuffers, fileNames) {
|
||||
try {
|
||||
const allAttachments = [];
|
||||
const totalFiles = fileBuffers.length;
|
||||
|
||||
|
||||
for (let i = 0; i < totalFiles; i++) {
|
||||
const buffer = fileBuffers[i];
|
||||
const fileName = fileNames[i];
|
||||
const uint8Array = new Uint8Array(buffer);
|
||||
|
||||
|
||||
let pdf;
|
||||
try {
|
||||
pdf = coherentpdf.fromMemory(uint8Array, '');
|
||||
@@ -73,7 +73,7 @@ function extractAttachmentsFromPDFsInWorker(fileBuffers, fileNames) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const response = {
|
||||
status: 'success',
|
||||
attachments: []
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
|
||||
self.onmessage = function (e) {
|
||||
const { command, files, jobs } = e.data;
|
||||
|
||||
@@ -4,38 +4,38 @@ export const categories = [
|
||||
name: 'Popular Tools',
|
||||
tools: [
|
||||
{
|
||||
href: '/src/pages/pdf-multi-tool.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/pdf-multi-tool.html',
|
||||
name: 'PDF Multi Tool',
|
||||
icon: 'pencil-ruler',
|
||||
subtitle: 'Merge, Split, Organize, Delete, Rotate, Add Blank Pages, Extract and Duplicate in an unified interface.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/merge-pdf.html',
|
||||
href: import.meta.env.BASE_URL + '/src/pages/merge-pdf.html',
|
||||
name: 'Merge PDF',
|
||||
icon: 'combine',
|
||||
subtitle: 'Combine multiple PDFs into one file. Preserves Bookmarks.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/split-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/split-pdf.html',
|
||||
name: 'Split PDF',
|
||||
icon: 'scissors',
|
||||
subtitle: 'Extract a range of pages into a new PDF.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/compress-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/compress-pdf.html',
|
||||
name: 'Compress PDF',
|
||||
icon: 'zap',
|
||||
subtitle: 'Reduce the file size of your PDF.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/edit-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/edit-pdf.html',
|
||||
name: 'PDF Editor',
|
||||
icon: 'pocket-knife',
|
||||
subtitle:
|
||||
'Annotate, highlight, redact, comment, add shapes/images, search, and view PDFs',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/jpg-to-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/jpg-to-pdf.html',
|
||||
name: 'JPG to PDF',
|
||||
icon: 'image-up',
|
||||
subtitle: 'Create a PDF from one or more JPG images.',
|
||||
@@ -76,7 +76,7 @@ export const categories = [
|
||||
name: 'Edit & Annotate',
|
||||
tools: [
|
||||
{
|
||||
href: '/src/pages/edit-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/edit-pdf.html',
|
||||
name: 'PDF Editor',
|
||||
icon: 'pocket-knife',
|
||||
subtitle:
|
||||
@@ -84,13 +84,13 @@ export const categories = [
|
||||
},
|
||||
{
|
||||
// id: 'bookmark-pdf',
|
||||
href: '/src/pages/bookmark.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/bookmark.html',
|
||||
name: 'Edit Bookmarks',
|
||||
icon: 'bookmark',
|
||||
subtitle: 'Add, edit, import, delete and extract PDF bookmarks.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/table-of-contents.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/table-of-contents.html',
|
||||
name: 'Table of Contents',
|
||||
icon: 'list',
|
||||
subtitle: 'Generate a table of contents page from PDF bookmarks.',
|
||||
@@ -138,7 +138,7 @@ export const categories = [
|
||||
subtitle: 'Draw, type, or upload your signature.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/add-stamps.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/add-stamps.html',
|
||||
name: 'Add Stamps',
|
||||
icon: 'stamp',
|
||||
subtitle: 'Add image stamps to your PDF using the annotation toolbar.',
|
||||
@@ -162,7 +162,7 @@ export const categories = [
|
||||
subtitle: 'Fill in forms directly in the browser. Also supports XFA forms.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/form-creator.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/form-creator.html',
|
||||
name: 'Create PDF Form',
|
||||
icon: 'file-input',
|
||||
subtitle: 'Create fillable PDF forms with drag-and-drop text fields.',
|
||||
@@ -185,7 +185,7 @@ export const categories = [
|
||||
subtitle: 'Convert JPG, PNG, WebP, BMP, TIFF, SVG, HEIC to PDF.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/jpg-to-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/jpg-to-pdf.html',
|
||||
name: 'JPG to PDF',
|
||||
icon: 'image-up',
|
||||
subtitle: 'Create a PDF from one or more JPG images.',
|
||||
@@ -233,7 +233,7 @@ export const categories = [
|
||||
subtitle: 'Convert a plain text file into a PDF.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/json-to-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/json-to-pdf.html',
|
||||
name: 'JSON to PDF',
|
||||
icon: 'file-code',
|
||||
subtitle: 'Convert JSON files to PDF format.',
|
||||
@@ -283,7 +283,7 @@ export const categories = [
|
||||
subtitle: 'Convert all colors to black and white.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/pdf-to-json.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/pdf-to-json.html',
|
||||
name: 'PDF to JSON',
|
||||
icon: 'file-code',
|
||||
subtitle: 'Convert PDF files to JSON format.',
|
||||
@@ -301,7 +301,7 @@ export const categories = [
|
||||
subtitle: 'Make a PDF searchable and copyable.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/merge-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/merge-pdf.html',
|
||||
name: 'Merge PDF',
|
||||
icon: 'combine',
|
||||
subtitle: 'Combine multiple PDFs into one file.',
|
||||
@@ -343,7 +343,7 @@ export const categories = [
|
||||
subtitle: 'View or remove attachments in your PDF.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/pdf-multi-tool.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/pdf-multi-tool.html',
|
||||
name: 'PDF Multi Tool',
|
||||
icon: 'pencil-ruler',
|
||||
subtitle: 'Full-featured PDF editor with page management.',
|
||||
@@ -438,7 +438,7 @@ export const categories = [
|
||||
name: 'Optimize & Repair',
|
||||
tools: [
|
||||
{
|
||||
href: '/src/pages/compress-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/compress-pdf.html',
|
||||
name: 'Compress PDF',
|
||||
icon: 'zap',
|
||||
subtitle: 'Reduce the file size of your PDF.',
|
||||
@@ -469,7 +469,7 @@ export const categories = [
|
||||
'Remove password protection and security restrictions associated with digitally signed PDF files.',
|
||||
},
|
||||
{
|
||||
href: '/src/pages/repair-pdf.html',
|
||||
href: import.meta.env.BASE_URL + 'src/pages/repair-pdf.html',
|
||||
name: 'Repair PDF',
|
||||
icon: 'wrench',
|
||||
subtitle: 'Recover data from corrupted or damaged PDF files.',
|
||||
|
||||
@@ -2,7 +2,7 @@ import { showLoader, hideLoader, showAlert } from '../ui';
|
||||
import { readFileAsArrayBuffer, downloadFile } from '../utils/helpers';
|
||||
import { state } from '../state';
|
||||
|
||||
const worker = new Worker('/workers/add-attachments.worker.js');
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/add-attachments.worker.js');
|
||||
|
||||
let attachments: File[] = [];
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ if (saveStampedBtn) {
|
||||
|
||||
if (backToToolsBtn) {
|
||||
backToToolsBtn.addEventListener('click', () => {
|
||||
window.location.href = '/'
|
||||
window.location.href = import.meta.env.BASE_URL
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ const alternateMergeState: AlternateMergeState = {
|
||||
pdfBytes: {},
|
||||
};
|
||||
|
||||
const alternateMergeWorker = new Worker('/workers/alternate-merge.worker.js');
|
||||
const alternateMergeWorker = new Worker(import.meta.env.BASE_URL + 'workers/alternate-merge.worker.js');
|
||||
|
||||
export async function setupAlternateMergeTool() {
|
||||
const optionsDiv = document.getElementById('alternate-merge-options');
|
||||
|
||||
@@ -1957,13 +1957,13 @@ async function extractExistingBookmarks(doc) {
|
||||
// Back to tools button
|
||||
if (backToToolsBtn) {
|
||||
backToToolsBtn.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
if (closeBtn) {
|
||||
closeBtn.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
if (backBtn) {
|
||||
backBtn.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { showLoader, hideLoader, showAlert } from '../ui.js';
|
||||
import { downloadFile, readFileAsArrayBuffer } from '../utils/helpers.js';
|
||||
import { state } from '../state.js';
|
||||
|
||||
const worker = new Worker('/workers/edit-attachments.worker.js');
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/edit-attachments.worker.js');
|
||||
|
||||
let allAttachments: Array<{ index: number; name: string; page: number; data: Uint8Array }> = [];
|
||||
let attachmentsToRemove: Set<number> = new Set();
|
||||
|
||||
@@ -45,7 +45,7 @@ function initializePage() {
|
||||
}
|
||||
|
||||
document.getElementById('back-to-tools')?.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ async function handleFiles(files: FileList) {
|
||||
URL.revokeObjectURL(currentPdfUrl);
|
||||
currentPdfUrl = null;
|
||||
}
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { state } from '../state.js';
|
||||
import { showAlert } from '../ui.js';
|
||||
import JSZip from 'jszip';
|
||||
|
||||
const worker = new Worker('/workers/extract-attachments.worker.js');
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/extract-attachments.worker.js');
|
||||
|
||||
interface ExtractAttachmentSuccessResponse {
|
||||
status: 'success';
|
||||
|
||||
@@ -1962,7 +1962,7 @@ downloadBtn.addEventListener('click', async () => {
|
||||
const backToToolsBtns = document.querySelectorAll('[id^="back-to-tools"]') as NodeListOf<HTMLButtonElement>
|
||||
backToToolsBtns.forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
window.location.href = '/'
|
||||
window.location.href = import.meta.env.BASE_URL
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ function initializePage() {
|
||||
}
|
||||
|
||||
document.getElementById('back-to-tools')?.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import JSZip from 'jszip'
|
||||
import { downloadFile, formatBytes, readFileAsArrayBuffer } from '../utils/helpers';
|
||||
import { initializeGlobalShortcuts } from '../utils/shortcuts-init.js';
|
||||
|
||||
const worker = new Worker(new URL('/workers/json-to-pdf.worker.js', import.meta.url));
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/json-to-pdf.worker.js');
|
||||
|
||||
let selectedFiles: File[] = []
|
||||
|
||||
@@ -148,7 +148,7 @@ worker.onmessage = async (e: MessageEvent) => {
|
||||
|
||||
if (backToToolsBtn) {
|
||||
backToToolsBtn.addEventListener('click', () => {
|
||||
window.location.href = '/'
|
||||
window.location.href = import.meta.env.BASE_URL
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ const mergeState: MergeState = {
|
||||
mergeSuccess: false,
|
||||
};
|
||||
|
||||
const mergeWorker = new Worker('/workers/merge.worker.js');
|
||||
const mergeWorker = new Worker(import.meta.env.BASE_URL + 'workers/merge.worker.js');
|
||||
|
||||
function initializeFileListSortable() {
|
||||
const fileList = document.getElementById('file-list');
|
||||
@@ -545,7 +545,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
if (backBtn) {
|
||||
backBtn.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ function initializeTool() {
|
||||
initializeGlobalShortcuts();
|
||||
|
||||
document.getElementById('close-tool-btn')?.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
|
||||
document.getElementById('upload-pdfs-btn')?.addEventListener('click', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import JSZip from 'jszip'
|
||||
import { downloadFile, formatBytes, readFileAsArrayBuffer } from '../utils/helpers';
|
||||
import { initializeGlobalShortcuts } from '../utils/shortcuts-init.js';
|
||||
|
||||
const worker = new Worker(new URL('/workers/pdf-to-json.worker.js', import.meta.url));
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/pdf-to-json.worker.js');
|
||||
|
||||
let selectedFiles: File[] = []
|
||||
|
||||
@@ -144,7 +144,7 @@ worker.onmessage = async (e: MessageEvent) => {
|
||||
|
||||
if (backToToolsBtn) {
|
||||
backToToolsBtn.addEventListener('click', () => {
|
||||
window.location.href = '/'
|
||||
window.location.href = import.meta.env.BASE_URL
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
if (backBtn) {
|
||||
backBtn.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
if (backBtn) {
|
||||
backBtn.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { downloadFile, formatBytes } from "../utils/helpers";
|
||||
import { initializeGlobalShortcuts } from "../utils/shortcuts-init.js";
|
||||
|
||||
|
||||
const worker = new Worker('/workers/table-of-contents.worker.js');
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/table-of-contents.worker.js');
|
||||
|
||||
let pdfFile: File | null = null;
|
||||
|
||||
@@ -199,7 +199,7 @@ worker.onerror = (error) => {
|
||||
|
||||
if (backToToolsBtn) {
|
||||
backToToolsBtn.addEventListener('click', () => {
|
||||
window.location.href = '/';
|
||||
window.location.href = import.meta.env.BASE_URL;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="/about.html" class="nav-link">About</a>
|
||||
<a href="/contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -53,10 +53,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="/about.html" class="mobile-nav-link">About</a>
|
||||
<a href="/contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -113,7 +113,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="./about.html" class="nav-link">About</a>
|
||||
<a href="./contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="../../about.html" class="nav-link">About</a>
|
||||
<a href="../../contact.html" class="nav-link">Contact</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -56,10 +56,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="./about.html" class="mobile-nav-link">About</a>
|
||||
<a href="./contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="../../about.html" class="mobile-nav-link">About</a>
|
||||
<a href="../../contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -421,7 +421,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -16,17 +16,17 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="./about.html" class="nav-link">About</a>
|
||||
<a href="./contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<div class="md:hidden flex items-center">
|
||||
@@ -51,10 +51,10 @@
|
||||
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="./about.html" class="mobile-nav-link">About</a>
|
||||
<a href="./contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -16,17 +16,17 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="./about.html" class="nav-link">About</a>
|
||||
<a href="./contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="../../about.html" class="nav-link">About</a>
|
||||
<a href="../../contact.html" class="nav-link">Contact</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<div class="md:hidden flex items-center">
|
||||
@@ -51,10 +51,10 @@
|
||||
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="./about.html" class="mobile-nav-link">About</a>
|
||||
<a href="./contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="../../about.html" class="mobile-nav-link">About</a>
|
||||
<a href="../../contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -121,7 +121,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="/about.html" class="nav-link">About</a>
|
||||
<a href="/contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -55,10 +55,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="/about.html" class="mobile-nav-link">About</a>
|
||||
<a href="/contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -327,7 +327,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -16,17 +16,17 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="./about.html" class="nav-link">About</a>
|
||||
<a href="./contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="../../about.html" class="nav-link">About</a>
|
||||
<a href="../../contact.html" class="nav-link">Contact</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<div class="md:hidden flex items-center">
|
||||
@@ -51,10 +51,10 @@
|
||||
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="./about.html" class="mobile-nav-link">About</a>
|
||||
<a href="./contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="../../about.html" class="mobile-nav-link">About</a>
|
||||
<a href="../../contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -150,7 +150,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="/about.html" class="nav-link">About</a>
|
||||
<a href="/contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -53,10 +53,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="/about.html" class="mobile-nav-link">About</a>
|
||||
<a href="/contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -113,7 +113,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -16,18 +16,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="./about.html" class="nav-link">About</a>
|
||||
<a href="./contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="../../about.html" class="nav-link">About</a>
|
||||
<a href="../../contact.html" class="nav-link">Contact</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -54,10 +54,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="./about.html" class="mobile-nav-link">About</a>
|
||||
<a href="./contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="../../about.html" class="mobile-nav-link">About</a>
|
||||
<a href="../../contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -170,7 +170,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
<span class="text-gray-400 ml-3 text-sm sm:text-base">PDF Multi Tool</span>
|
||||
</div>
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="/about.html" class="nav-link">About</a>
|
||||
<a href="/contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -53,10 +53,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="/about.html" class="mobile-nav-link">About</a>
|
||||
<a href="/contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -107,7 +107,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="./about.html" class="nav-link">About</a>
|
||||
<a href="./contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="../../about.html" class="nav-link">About</a>
|
||||
<a href="../../contact.html" class="nav-link">Contact</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -52,10 +52,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="./about.html" class="mobile-nav-link">About</a>
|
||||
<a href="./contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="../../about.html" class="mobile-nav-link">About</a>
|
||||
<a href="../../contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -132,7 +132,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -16,18 +16,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="./about.html" class="nav-link">About</a>
|
||||
<a href="./contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="../../about.html" class="nav-link">About</a>
|
||||
<a href="../../contact.html" class="nav-link">Contact</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -56,10 +56,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="./about.html" class="mobile-nav-link">About</a>
|
||||
<a href="./contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="../../about.html" class="mobile-nav-link">About</a>
|
||||
<a href="../../contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -243,7 +243,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" id="home-logo">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8" />
|
||||
<span class="text-white font-bold text-xl ml-2">
|
||||
<a href="/">BentoPDF</a>
|
||||
<a href="../../index.html">BentoPDF</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation -->
|
||||
<div class="hidden md:flex items-center space-x-8 text-white">
|
||||
<a href="/" class="nav-link">Home</a>
|
||||
<a href="../../index.html" class="nav-link">Home</a>
|
||||
<a href="/about.html" class="nav-link">About</a>
|
||||
<a href="/contact.html" class="nav-link">Contact</a>
|
||||
<a href="/" class="nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="nav-link">All Tools</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Hamburger Button -->
|
||||
@@ -55,10 +55,10 @@
|
||||
<!-- Mobile Menu Dropdown -->
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-gray-800 border-t border-gray-700">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 text-center">
|
||||
<a href="/" class="mobile-nav-link">Home</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">Home</a>
|
||||
<a href="/about.html" class="mobile-nav-link">About</a>
|
||||
<a href="/contact.html" class="mobile-nav-link">Contact</a>
|
||||
<a href="/" class="mobile-nav-link">All Tools</a>
|
||||
<a href="../../index.html" class="mobile-nav-link">All Tools</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -179,7 +179,7 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center md:text-left">
|
||||
<div class="mb-8 md:mb-0">
|
||||
<div class="flex items-center justify-center md:justify-start mb-4">
|
||||
<img src="../../public/images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<img src="../../images/favicon.svg" alt="Bento PDF Logo" class="h-10 w-10 mr-3" />
|
||||
<span class="text-xl font-bold text-white">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
|
||||
@@ -4,6 +4,7 @@ import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||
import { resolve } from 'path';
|
||||
|
||||
export default defineConfig(({ mode }) => ({
|
||||
base: process.env.BASE_URL || '/',
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
nodePolyfills({
|
||||
|
||||
Reference in New Issue
Block a user