refactor: extract navbar and footer into reusable handlebars partials

- Replace duplicated navbar markup across all HTML pages with {{> navbar }} partial
- Replace duplicated footer markup across all HTML pages with {{> footer }} partial
- Add TypeScript type definitions for vite-plugin-handlebars integration
- Update vite.config.ts to support handlebars partial compilation
- Update tsconfig.json to include handlebars type definitions
- Update nginx.conf for proper static file serving with partials
- Update translation files for de, pt, tr, vi, and zh-TW locales
- Reduce code duplication and improve maintainability across 13+ HTML pages
- Ensure consistent navbar and footer behavior across the entire application
This commit is contained in:
alam00000
2026-01-13 15:13:57 +05:30
parent d9045efcb0
commit 446b399be2
25 changed files with 665 additions and 3115 deletions

View File

@@ -68,28 +68,7 @@
<body class="antialiased bg-gray-900">
<!-- Navigation -->
<nav class="bg-gray-800 border-b border-gray-700 sticky top-0 z-30">
<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="/images/favicon.svg"
alt="BentoPDF Logo"
class="h-8 w-8"
/>
<span class="text-white font-bold text-xl ml-2">
<a href="/">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="/tools.html" class="nav-link text-indigo-400">All Tools</a>
</div>
</div>
</div>
</nav>
{{> navbar }}
<!-- Hero -->
<section class="container mx-auto px-4 py-12">
@@ -178,11 +157,7 @@
</section>
<!-- Footer -->
<footer class="mt-16 border-t-2 border-gray-700 py-8">
<div class="container mx-auto px-4 text-center text-gray-400">
<p>&copy; 2026 BentoPDF. All rights reserved.</p>
</div>
</footer>
{{> footer }}
<script type="module" src="/src/js/utils/lucide-init.ts"></script>
<script type="module" src="/src/version.ts"></script>