enhance Simple Mode with logo branding and npm script to serve SIMPLE_MODE
This commit is contained in:
@@ -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 = `
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-start items-center h-16">
|
||||
<div class="flex-shrink-0 flex items-center">
|
||||
<img src="images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8">
|
||||
<span class="text-white font-bold text-xl ml-2">BentoPDF</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
document.body.insertBefore(simpleNav, document.body.firstChild);
|
||||
}
|
||||
|
||||
const heroSection = document.getElementById('hero-section');
|
||||
@@ -51,9 +68,25 @@ const init = () => {
|
||||
supportSection.style.display = 'none';
|
||||
}
|
||||
|
||||
// Hide footer but keep copyright
|
||||
const footer = document.querySelector('footer');
|
||||
if (footer) {
|
||||
footer.style.display = 'none';
|
||||
|
||||
const simpleFooter = document.createElement('footer');
|
||||
simpleFooter.className = 'mt-16 border-t-2 border-gray-700 py-8';
|
||||
simpleFooter.innerHTML = `
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex items-center mb-4">
|
||||
<img src="images/favicon.svg" alt="Bento PDF Logo" class="h-8 w-8 mr-2">
|
||||
<span class="text-white font-bold text-lg">BentoPDF</span>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm">
|
||||
© 2025 BentoPDF. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(simpleFooter);
|
||||
}
|
||||
|
||||
const sectionDividers = document.querySelectorAll('.section-divider');
|
||||
@@ -61,7 +94,7 @@ const init = () => {
|
||||
(divider as HTMLElement).style.display = 'none';
|
||||
});
|
||||
|
||||
document.title = 'PDF Tools';
|
||||
document.title = 'BentoPDF - PDF Tools';
|
||||
|
||||
const toolsHeader = document.getElementById('tools-header');
|
||||
if (toolsHeader) {
|
||||
@@ -79,7 +112,7 @@ const init = () => {
|
||||
|
||||
const app = document.getElementById('app');
|
||||
if (app) {
|
||||
app.style.paddingTop = '2rem';
|
||||
app.style.paddingTop = '1rem';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user