Files
PPve/index.html
T
Tomas Dvorak 0f66afa994 d
2025-05-29 08:28:22 +02:00

392 lines
19 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');
// Handle image
let content = '';
if (banner.image) {
const imagePosition = banner.style.imagePosition || 'right';
const imageWidth = banner.style.imageWidth || 300;
const imageHeight = banner.style.imageHeight || 200;
// Create image element with styles
const imgStyle = `
max-width: 100%;
height: auto;
width: ${imageWidth}px;
max-height: ${imageHeight}px;
object-fit: contain;
border-radius: ${banner.style.borderRadius || '0'}px;
${imagePosition === 'left' ? 'float: left; margin-right: 20px;' : ''}
${imagePosition === 'right' ? 'float: right; margin-left: 20px;' : ''}
${imagePosition === 'center' ? 'display: block; margin: 0 auto;' : ''}
`;
// Create image container
let imgContainer = `
<div class="banner-image-container" style="
display: inline-block;
max-width: 100%;
margin-bottom: 10px;
">
<img
src="${banner.image}"
style="${imgStyle}"
alt="Banner obrázek"
class="banner-image"
>
</div>`;
// Wrap image with link if URL is provided
if (banner.link) {
imgContainer = `
<a href="${banner.link}" target="_blank" style="text-decoration: none;">
${imgContainer}
</a>`;
}
// Create text content with styles
const textStyle = `
font-size: ${banner.style.fontSize || '16px'};
color: ${banner.style.textColor || '#000'};
text-align: ${banner.style.textAlign || 'left'};
margin: 0;
padding: 10px 0;
line-height: 1.5;
`;
const textElement = `
<div class="banner-text" style="${textStyle}">
${banner.text || ''}
</div>`;
// Create container with proper layout
content = `
<div class="banner-content" style="
${banner.style.backgroundColor ? `background-color: ${banner.style.backgroundColor};` : ''}
${banner.style.padding ? `padding: ${banner.style.padding}px;` : 'padding: 20px;'}
overflow: hidden;
display: flex;
flex-direction: ${imagePosition === 'bottom' ? 'column' : 'row'};
align-items: center;
gap: 20px;
border-radius: ${banner.style.borderRadius || '8px'};
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
">
${imagePosition === 'left' || imagePosition === 'top' ? imgContainer : ''}
<div style="flex: 1;">
${textElement}
</div>
${imagePosition === 'right' || imagePosition === 'bottom' ? imgContainer : ''}
</div>`;
} else {
// No image, just show text
content = `
<div class="banner-content" style="
${banner.style.backgroundColor ? `background-color: ${banner.style.backgroundColor};` : ''}
${banner.style.padding ? `padding: ${banner.style.padding}px;` : 'padding: 20px;'}
display: flex;
align-items: center;
justify-content: center;
min-height: 100px;
border-radius: ${banner.style.borderRadius || '8px'};
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
">
<div class="banner-text" style="
text-align: ${banner.style.textAlign || 'center'};
color: ${banner.style.textColor || '#666'};
font-size: ${banner.style.fontSize || '16px'};
">
${banner.text || 'Žádný text banneru'}
</div>
</div>`;
}
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>