Files
PPve/index.html
T
Tomas Dvorak 1ba3b1d446 ff
2025-05-28 23:08:39 +02:00

351 lines
17 KiB
HTML

<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aplikační Rozcestník</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<style>
.card {
transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
</style>
<script>
// Load and display banner
async function loadBanner() {
try {
const response = await fetch('/api/banner');
if (!response.ok) return;
const banner = await response.json();
if (!banner.style || banner.style.isVisible === false) {
return;
}
const bannerContainer = document.getElementById('bannerContainer');
const bannerContent = document.getElementById('bannerContent');
if (!bannerContainer || !bannerContent) return;
// Apply styles to container
bannerContainer.style.borderRadius = (banner.style.borderRadius ? `${banner.style.borderRadius}px` : '8px');
// Apply styles to content
Object.assign(bannerContent.style, {
backgroundColor: banner.style.backgroundColor || '#f8d7da',
color: banner.style.textColor || '#721c24',
textAlign: banner.style.textAlign || 'center',
fontSize: banner.style.fontSize ? `${banner.style.fontSize}px` : '18px',
padding: banner.style.padding ? `${banner.style.padding}px` : '20px',
margin: banner.style.margin ? `${banner.style.margin}px 0` : '20px 0',
borderRadius: banner.style.borderRadius ? `${banner.style.borderRadius}px` : '8px',
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
display: 'block'
});
// Handle image
let content = banner.text || '';
if (banner.image) {
// Apply the same border radius to the image as to the container
const imageRadius = Math.max(parseInt(banner.style.borderRadius || '4'), 0);
// Determine image style based on position
let imageStyle = `max-width: 100%; max-height: 200px; border-radius: ${imageRadius}px;`;
let containerStyle = 'margin-bottom: 15px;';
// Get image position data
const imagePosition = banner.style.imagePosition || 'center';
const imageX = banner.style.imageX || '0';
const imageY = banner.style.imageY || '0';
console.log('Applying image position:', imagePosition, imageX, imageY);
switch(imagePosition) {
case 'left':
containerStyle += 'text-align: left; float: left; margin-right: 15px;';
break;
case 'right':
containerStyle += 'text-align: right; float: right; margin-left: 15px;';
break;
case 'custom':
containerStyle += 'position: relative;';
// For custom position, use absolute positioning to ensure exact placement
imageStyle += `position: absolute; left: ${imageX}px; top: ${imageY}px;`;
break;
default: // center
containerStyle += `text-align: ${banner.style.textAlign || 'center'};`;
}
content = `
<div style="${containerStyle}" class="banner-image-container">
<img src="${banner.image}" style="${imageStyle}">
</div>
${content}
`;
}
// Wrap in link if provided
if (banner.link) {
content = `<a href="${banner.link}" style="color: inherit; text-decoration: none; display: block;">${content}</a>`;
}
bannerContent.innerHTML = content;
bannerContainer.style.display = 'block';
} catch (error) {
console.error('Error loading banner:', error);
}
}
// Load banner when page loads
document.addEventListener('DOMContentLoaded', () => {
loadBanner();
// Move banner to the correct position after load
const bannerContainer = document.getElementById('bannerContainer');
const main = document.querySelector('main');
if (bannerContainer && main) {
main.insertBefore(bannerContainer, main.firstChild);
}
});
tailwind.config = {
theme: {
extend: {
colors: {
'brand-blue': '#004990',
'brand-light-blue': '#0072b0',
'brand-gray': '#f0f2f5'
}
}
}
}
</script>
</head>
<body class="bg-gray-100 min-h-screen">
<!-- Banner Container -->
<div id="bannerContainer" style="display: none; width: 100%; transition: all 0.3s ease; margin: 0 auto; max-width: 1200px; padding: 0 1rem;">
<div id="bannerContent" style="padding: 20px; text-align: center; border-radius: 8px; margin: 20px 0;"></div>
</div>
<nav class="bg-brand-blue text-white shadow-lg">
<div class="max-w-6xl mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-2">
<a href="http://webportal/index.html"><img src="http://pp-kunovice.cz/wp-content/uploads/2022/04/logo-retina-white.png" alt="Poppe Potthoff Logo" class="h-10"></a>
<div class="hidden md:block text-xl font-semibold">Poppe + Potthoff</div>
</div>
<!-- Mobile menu button -->
<div class="md:hidden">
<button id="mobile-menu-button" class="text-white focus:outline-none">
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>
<!-- Desktop menu -->
<div class="hidden md:flex space-x-6">
<a href="http://webportal/index.html" class="hover:text-brand-light-blue">Rozcestník</a>
<a href="http://webportal/evidence-aut" class="hover:text-brand-light-blue">Evidence aut</a>
<a href="http://ppc-app/pwkweb2/" class="hover:text-brand-light-blue">Obědy</a>
<a href="http://osticket/" class="hover:text-brand-light-blue">OSticket</a>
<a href="http://kanboard/" class="hover:text-brand-light-blue">Kanboard</a>
<a href="http://webportal/kontakt" class="hover:text-brand-light-blue">Kontakt</a>
</div>
</div>
<!-- Mobile menu -->
<div id="mobile-menu" class="hidden md:hidden px-2 pt-2 pb-3 space-y-1">
<a href="webportal/index.html" class="block px-3 py-2 rounded-md text-base font-medium hover:text-brand-light-blue">Rozcestník</a>
<a href="webportal/evidence-aut" class="block px-3 py-2 rounded-md text-base font-medium hover:text-brand-light-blue">Evidence aut</a>
<a href="http://ppc-app/pwkweb2/" class="block px-3 py-2 rounded-md text-base font-medium hover:text-brand-light-blue">Obědy</a>
<a href="http://osticket/" class="block px-3 py-2 rounded-md text-base font-medium hover:text-brand-light-blue">OSticket</a>
<a href="http://kanboard/" class="block px-3 py-2 rounded-md text-base font-medium hover:text-brand-light-blue">Kanboard</a>
<a href="webportal/kontakt" class="block px-3 py-2 rounded-md text-base font-medium hover:text-brand-light-blue">Kontakt</a>
</div>
</nav>
<script>
// Mobile menu toggle
const mobileMenuButton = document.getElementById('mobile-menu-button');
const mobileMenu = document.getElementById('mobile-menu');
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
});
</script>
<!-- Page Header -->
<div class="bg-gradient-to-r from-brand-blue to-brand-light-blue text-white py-6 mb-8">
<div class="max-w-6xl mx-auto px-4">
<h1 class="text-3xl font-bold">Poppe + Potthoff - Firemní Aplikace</h1>
<p class="text-gray-100 mt-2">Rychlý přístup ke všem důležitým systémům</p>
</div>
</div>
<main class="container mx-auto px-4 py-4">
<!-- Banner will be inserted here by JavaScript -->
<!-- Search -->
<div class="mb-8 max-w-xl mx-auto">
<div class="relative">
<input type="text" id="search" placeholder="Hledat aplikaci..." style="margin-bottom: 20px;"
class="w-full px-4 py-3 rounded-lg shadow-sm border-gray-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none">
<div class="absolute right-3 top-3 text-gray-400">
<i class="fas fa-search"></i>
</div>
</div>
</div>
<!-- Apps Grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<!-- 1. Car trips app -->
<div class="card bg-white rounded-xl shadow p-6 border-t-4 border-blue-600" data-name="zápis cest aut project">
<div class="rounded-full w-14 h-14 flex items-center justify-center bg-blue-100 text-blue-600 mb-4">
<i class="fas fa-car-side text-2xl"></i>
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">Záznam služebních jízd</h2>
<p class="text-gray-600 mb-4">Jednoduchý systém pro evidenci a správu jízd služebními vozidly.</p>
<a href="/evidence-aut" class="block text-center bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci
</a>
</div>
<!-- 2. Lunches -->
<div class="card bg-white rounded-xl shadow p-6 border-t-4 border-green-600" data-name="obědy obedy jídlo lunch">
<div class="rounded-full w-14 h-14 flex items-center justify-center bg-green-100 text-green-600 mb-4">
<i class="fas fa-utensils text-2xl"></i>
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">Objednávka obědů</h2>
<p class="text-gray-600 mb-4">Portál pro objednávku a přehled firemních obědů</p>
<a href="http://ppc-app/pwkweb2/" class="block text-center bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci
</a>
</div>
<!-- 3. OSTicket -->
<div class="card bg-white rounded-xl shadow p-6 border-t-4 border-orange-600" data-name="osticket pomoc podpora support ticket">
<div class="rounded-full w-14 h-14 flex items-center justify-center bg-orange-100 text-orange-600 mb-4">
<i class="fas fa-headset text-2xl"></i>
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">OSTicket</h2>
<p class="text-gray-600 mb-4">Systém technické podpory a hlášení problémů</p>
<a href="http://osticket/" class="block text-center bg-orange-600 hover:bg-orange-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci
</a>
</div>
<!-- 4. Canboard tasks -->
<div class="card bg-white rounded-xl shadow p-6 border-t-4 border-purple-600" data-name="canboard úkoly úkolníček tasks">
<div class="rounded-full w-14 h-14 flex items-center justify-center bg-purple-100 text-purple-600 mb-4">
<i class="fas fa-tasks text-2xl"></i>
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">Kanboard</h2>
<p class="text-gray-600 mb-4">Správa úkolů a projektů v přehledném kanban stylu</p>
<a href="http://kanboard/" class="block text-center bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci
</a>
</div>
</div>
<style>
/* Rounded border */
hr.rounded {
border-top: 2px solid #bbb;
border-radius: 5px;
margin-top: 20px;
margin-bottom: 20px;
}
</style>
<hr class="rounded">
<!-- Contact card - Subtle and full width -->
<div>
<div class="bg-gray-50 rounded-lg p-4 border border-gray-200">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="rounded-full w-10 h-10 flex items-center justify-center bg-gray-100 text-gray-500 mr-3">
<i class="fas fa-phone-alt"></i>
</div>
<div>
<h3 class="text-sm font-medium text-gray-700">Telefonní seznam</h3>
<p class="text-xs text-gray-500">Firemní kontakty a důležitá čísla</p>
</div>
</div>
<a href="http://webportal/kontakt" class="text-sm text-blue-600 hover:text-blue-800 hover:underline">
Otevřít
</a>
</div>
</div>
</div>
</main>
<footer class="bg-gray-800 text-gray-400 py-8 mt-12">
<div class="max-w-6xl mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- Company Info -->
<div>
<h3 class="text-white text-lg font-semibold mb-4">Poppe + Potthoff CZ</h3>
<p class="mb-2">IČO: 26902214</p>
<p class="mb-2">DIČ: CZ26902214</p>
<p class="mb-2">Schránka: gfrk5qy</p>
<p>Na Záhonech 1086, 686 04 Kunovice</p>
</div>
<!-- Quick Links -->
<div>
<h3 class="text-white text-lg font-semibold mb-4">Rychlé odkazy</h3>
<ul class="space-y-2">
<li><a href="http://webportal/" class="hover:text-white">Rozcestník</a></li>
<li><a href="http://webportal/evidence-aut" class="hover:text-white">Evidence aut</a></li>
<li><a href="http://ppc-app/pwkweb2/" class="hover:text-white">Objednávka obědů</a></li>
<li><a href="http://osticket/" class="hover:text-white">Technická podpora</a></li>
<li><a href="http://webportal/kontakt" class="hover:text-white">Kontakty</a></li>
</ul>
</div>
<!-- Copyright -->
<div class="md:text-right">
<img src="http://pp-kunovice.cz/wp-content/uploads/2022/04/logo-retina-white.png" alt="Poppe Potthoff Logo" class="h-10 mb-4 inline-block">
<p class="text-sm"> 2025 Poppe + Potthoff CZ</p>
<p class="text-xs mt-2">Všechna práva vyhrazena</p>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-6 text-center text-sm">
<p>Created by <a href="https://tdvorak.dev" class="text-blue-400 hover:text-blue-300">TDvorak</a></p>
</div>
</div>
</footer>
<script>
// Search functionality
const searchInput = document.getElementById('search');
const appCards = document.querySelectorAll('.card');
searchInput.addEventListener('input', function() {
const searchTerm = this.value.toLowerCase();
appCards.forEach(card => {
const cardName = card.getAttribute('data-name').toLowerCase();
const cardTitle = card.querySelector('h2').textContent.toLowerCase();
const cardDesc = card.querySelector('p').textContent.toLowerCase();
if (cardName.includes(searchTerm) || cardTitle.includes(searchTerm) || cardDesc.includes(searchTerm)) {
card.style.display = 'block';
} else {
card.style.display = 'none';
}
});
});
</script>
</body>
</html>