Compare commits
No commits in common. "ai-dev" and "master" have entirely different histories.
@ -1,66 +0,0 @@
|
||||
|
||||
:root {
|
||||
--primary-color: #007BFF;
|
||||
--secondary-color: #6C757D;
|
||||
--background-color: #F8F9FA;
|
||||
--surface-color: #FFFFFF;
|
||||
--accent-color: #FFC107;
|
||||
--font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-family);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background: linear-gradient(90deg, var(--primary-color), #0056b3);
|
||||
}
|
||||
|
||||
.category-tabs .nav-link {
|
||||
color: var(--secondary-color);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.category-tabs .nav-link.active {
|
||||
color: var(--primary-color);
|
||||
border-bottom: 2px solid var(--primary-color);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.product-card {
|
||||
border-radius: 0.5rem;
|
||||
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.product-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.product-card img {
|
||||
border-top-left-radius: 0.5rem;
|
||||
border-top-right-radius: 0.5rem;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.product-price {
|
||||
color: var(--primary-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.loader {
|
||||
border: 4px solid #f3f3f3;
|
||||
border-radius: 50%;
|
||||
border-top: 4px solid var(--primary-color);
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
@ -1,98 +0,0 @@
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const categoriesContainer = document.getElementById('category-tabs');
|
||||
const productsContainer = document.getElementById('product-list');
|
||||
const loader = document.getElementById('loader');
|
||||
|
||||
let allProducts = [];
|
||||
let allGroups = [];
|
||||
|
||||
const fetchMockData = async () => {
|
||||
try {
|
||||
const [groupsRes, productsRes] = await Promise.all([
|
||||
fetch('data/grupos.json'),
|
||||
fetch('data/produtos.json')
|
||||
]);
|
||||
allGroups = await groupsRes.json();
|
||||
allProducts = await productsRes.json();
|
||||
return { groups: allGroups, products: allProducts };
|
||||
} catch (error) {
|
||||
console.error('Error fetching mock data:', error);
|
||||
productsContainer.innerHTML = '<p class="text-danger">Failed to load menu data.</p>';
|
||||
return { groups: [], products: [] };
|
||||
}
|
||||
};
|
||||
|
||||
const renderCategories = (groups) => {
|
||||
if (!categoriesContainer) return;
|
||||
categoriesContainer.innerHTML = '';
|
||||
const nav = document.createElement('ul');
|
||||
nav.className = 'nav nav-tabs category-tabs';
|
||||
|
||||
const allTab = document.createElement('li');
|
||||
allTab.className = 'nav-item';
|
||||
allTab.innerHTML = `<a class="nav-link active" href="#" data-group-id="all">All</a>`;
|
||||
nav.appendChild(allTab);
|
||||
|
||||
groups.forEach(group => {
|
||||
const tab = document.createElement('li');
|
||||
tab.className = 'nav-item';
|
||||
tab.innerHTML = `<a class="nav-link" href="#" data-group-id="${group.GRUPCODIGO}">${group.GRUPNOME}</a>`;
|
||||
nav.appendChild(tab);
|
||||
});
|
||||
categoriesContainer.appendChild(nav);
|
||||
|
||||
nav.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
if (e.target.tagName === 'A') {
|
||||
nav.querySelector('.active').classList.remove('active');
|
||||
e.target.classList.add('active');
|
||||
const groupId = e.target.getAttribute('data-group-id');
|
||||
renderProducts(allProducts, groupId);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const renderProducts = (products, groupId = 'all') => {
|
||||
if (!productsContainer) return;
|
||||
productsContainer.innerHTML = '';
|
||||
const filteredProducts = groupId === 'all'
|
||||
? products
|
||||
: products.filter(p => p.PRODGRUPO == groupId);
|
||||
|
||||
if (filteredProducts.length === 0) {
|
||||
productsContainer.innerHTML = '<p class="text-muted">No products found in this category.</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
filteredProducts.forEach(product => {
|
||||
const col = document.createElement('div');
|
||||
col.className = 'col-md-4 col-lg-3 mb-4';
|
||||
const card = `
|
||||
<div class="card product-card h-100">
|
||||
<img src="${product.PRODFOTO || 'https://via.placeholder.com/400x300.png?text=No+Image'}" class="card-img-top" alt="${product.PRODNOME}">
|
||||
<div class="card-body d-flex flex-column">
|
||||
<h5 class="card-title">${product.PRODNOME}</h5>
|
||||
<p class="card-text text-muted">${product.OBS || ''}</p>
|
||||
<div class="mt-auto d-flex justify-content-between align-items-center">
|
||||
<span class="product-price">R$ ${product.PRODPRECOVENDA.toFixed(2)}</span>
|
||||
<button class="btn btn-primary btn-sm">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
col.innerHTML = card;
|
||||
productsContainer.appendChild(col);
|
||||
});
|
||||
};
|
||||
|
||||
const init = async () => {
|
||||
loader.style.display = 'block';
|
||||
const { groups, products } = await fetchMockData();
|
||||
loader.style.display = 'none';
|
||||
renderCategories(groups);
|
||||
renderProducts(products);
|
||||
};
|
||||
|
||||
init();
|
||||
});
|
||||
@ -1,23 +0,0 @@
|
||||
|
||||
[
|
||||
{
|
||||
"GRUPCODIGO": 14,
|
||||
"GRUPNOME": "BONIFICAÇÃO",
|
||||
"GRUPCODORDENACAO": 14
|
||||
},
|
||||
{
|
||||
"GRUPCODIGO": 16,
|
||||
"GRUPNOME": "BRINDES",
|
||||
"GRUPCODORDENACAO": 16
|
||||
},
|
||||
{
|
||||
"GRUPCODIGO": 4,
|
||||
"GRUPNOME": "BEBIDAS",
|
||||
"GRUPCODORDENACAO": 4
|
||||
},
|
||||
{
|
||||
"GRUPCODIGO": 6,
|
||||
"GRUPNOME": "ACOMPANHAMENTOS",
|
||||
"GRUPCODORDENACAO": 6
|
||||
}
|
||||
]
|
||||
@ -1,53 +0,0 @@
|
||||
|
||||
[
|
||||
{
|
||||
"PRODCODIGO": 307,
|
||||
"PRODCODIGOBARRA": "7890000003070",
|
||||
"PRODNOME": "ACENDEDEOR FOGO FACIL 10 UND",
|
||||
"PRODGRUPO": 4,
|
||||
"SERVICO": false,
|
||||
"PRODPRECOVENDA": 25,
|
||||
"PRODFOTO": "",
|
||||
"OBS": "",
|
||||
"EXPORTASITE": "S",
|
||||
"PRODATIVO": "S",
|
||||
"PRODMAXCOMPLEMENTOS": 0
|
||||
},
|
||||
{
|
||||
"PRODCODIGO": 306,
|
||||
"PRODCODIGOBARRA": "7890000003063",
|
||||
"PRODNOME": "ACENDEDOR FOGO FACIL INDUSTRIA",
|
||||
"PRODGRUPO": 6,
|
||||
"SERVICO": false,
|
||||
"PRODPRECOVENDA": 1.05,
|
||||
"PRODFOTO": "",
|
||||
"OBS": "",
|
||||
"EXPORTASITE": "S",
|
||||
"PRODATIVO": "S",
|
||||
"PRODMAXCOMPLEMENTOS": 0
|
||||
},
|
||||
{
|
||||
"PRODCODIGO": 4,
|
||||
"PRODNOME": "ALECRIM INDUSTRIA",
|
||||
"PRODGRUPO": 16,
|
||||
"SERVICO": false,
|
||||
"PRODPRECOVENDA": 11.86,
|
||||
"PRODFOTO": "",
|
||||
"OBS": "",
|
||||
"EXPORTASITE": "S",
|
||||
"PRODATIVO": "S",
|
||||
"PRODMAXCOMPLEMENTOS": 0
|
||||
},
|
||||
{
|
||||
"PRODCODIGO": 1,
|
||||
"PRODNOME": "AÇAFRÃO 4 ESTAÇÕES FD 10X20G",
|
||||
"PRODGRUPO": 14,
|
||||
"SERVICO": false,
|
||||
"PRODPRECOVENDA": 19.2,
|
||||
"PRODFOTO": "",
|
||||
"OBS": "",
|
||||
"EXPORTASITE": "S",
|
||||
"PRODATIVO": "S",
|
||||
"PRODMAXCOMPLEMENTOS": 0
|
||||
}
|
||||
]
|
||||
199
index.php
199
index.php
@ -1,59 +1,150 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pt-BR">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>cardapiQr</title>
|
||||
<meta name="description" content="Built with Flatlogic Generator">
|
||||
<meta name="keywords" content="qr code ordering, digital menu, restaurant menu, mobile ordering, contact-free dining, order from table, qr menu, Built with Flatlogic Generator">
|
||||
<meta property="og:title" content="cardapiQr">
|
||||
<meta property="og:description" content="Built with Flatlogic Generator">
|
||||
<meta property="og:image" content="">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="">
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
@ini_set('display_errors', '1');
|
||||
@error_reporting(E_ALL);
|
||||
@date_default_timezone_set('UTC');
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
$phpVersion = PHP_VERSION;
|
||||
$now = date('Y-m-d H:i:s');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>New Style</title>
|
||||
<?php
|
||||
// Read project preview data from environment
|
||||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||||
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
?>
|
||||
<?php if ($projectDescription): ?>
|
||||
<!-- Meta description -->
|
||||
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<!-- Twitter meta tags -->
|
||||
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<?php endif; ?>
|
||||
<?php if ($projectImageUrl): ?>
|
||||
<!-- Open Graph image -->
|
||||
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<!-- Twitter image -->
|
||||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<?php endif; ?>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
@keyframes bg-pan {
|
||||
0% { background-position: 0% 0%; }
|
||||
100% { background-position: 100% 100%; }
|
||||
}
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.loader {
|
||||
margin: 1.25rem auto 1.25rem;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 3px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
.hint {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px; height: 1px;
|
||||
padding: 0; margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap; border: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
code {
|
||||
background: rgba(0,0,0,0.2);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand fw-bold" href="#">Cardápio QR</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="container my-4">
|
||||
<div class="text-center mb-4">
|
||||
<h1 class="display-5 fw-bold">Nosso Cardápio</h1>
|
||||
<p class="lead text-muted">Explore nossos pratos e bebidas.</p>
|
||||
</div>
|
||||
|
||||
<section id="menu-section">
|
||||
<div class="d-flex justify-content-center mb-4">
|
||||
<div id="category-tabs"></div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-center">
|
||||
<div id="loader" class="loader" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
<div id="product-list" class="row">
|
||||
<!-- Products will be injected here by JavaScript -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer class="py-4 mt-auto bg-light">
|
||||
<div class="container text-center">
|
||||
<p class="mb-0 text-muted">© <?php echo date("Y"); ?> cardapiQr. Built with Flatlogic.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your website…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
</div>
|
||||
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
||||
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user