This commit is contained in:
Flatlogic Bot 2025-11-01 09:51:53 +00:00
parent 093242f656
commit 61f3814abe
3 changed files with 294 additions and 142 deletions

136
assets/css/custom.css Normal file
View File

@ -0,0 +1,136 @@
body {
background-color: #121212;
color: #FFFFFF;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
overflow: hidden;
height: 100vh;
width: 100vw;
margin: 0;
}
.app-container {
height: 100vh;
width: 100%;
max-width: 480px; /* Mobile-first constraint */
margin: 0 auto;
position: relative;
overflow: hidden;
border-left: 1px solid #1F1F1F;
border-right: 1px solid #1F1F1F;
}
.video-feed {
height: 100%;
width: 100%;
scroll-snap-type: y mandatory;
overflow-y: scroll;
overflow-x: hidden;
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.video-feed::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera */
}
.video-slide {
height: 100%;
width: 100%;
scroll-snap-align: start;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.video-slide video {
width: 100%;
height: 100%;
object-fit: cover;
}
.video-overlay {
position: absolute;
bottom: 70px; /* Above bottom nav */
left: 0;
width: 100%;
padding: 16px;
background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
color: #fff;
}
.video-overlay .username {
font-weight: 700;
font-size: 1rem;
}
.video-overlay .caption {
font-size: 0.9rem;
margin-top: 4px;
}
.video-actions {
position: absolute;
bottom: 90px;
right: 10px;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.video-actions .action-btn {
display: flex;
flex-direction: column;
align-items: center;
color: #fff;
text-decoration: none;
font-size: 0.8rem;
}
.video-actions .action-btn i {
font-size: 2rem;
}
.video-actions .action-btn .bi-heart-fill {
color: #FF3B6C;
}
.bottom-nav {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
background-color: #000000;
border-top: 1px solid #1F1F1F;
display: flex;
justify-content: space-around;
align-items: center;
}
.bottom-nav .nav-item {
color: #fff;
text-decoration: none;
display: flex;
flex-direction: column;
align-items: center;
font-size: 0.7rem;
opacity: 0.7;
}
.bottom-nav .nav-item.active {
opacity: 1;
font-weight: 600;
}
.bottom-nav .nav-item i {
font-size: 1.5rem;
margin-bottom: 2px;
}
.bottom-nav .upload-btn i {
font-size: 2.2rem;
color: #FF3B6C;
}

44
assets/js/main.js Normal file
View File

@ -0,0 +1,44 @@
document.addEventListener('DOMContentLoaded', () => {
const videos = document.querySelectorAll('.video-slide video');
// Toggle play/pause on click
videos.forEach(video => {
video.addEventListener('click', () => {
if (video.paused) {
video.play();
} else {
video.pause();
}
});
});
// Observer to play/pause videos when they enter/leave the viewport
const observerOptions = {
root: document.querySelector('.video-feed'),
rootMargin: '0px',
threshold: 0.8 // Trigger when 80% of the video is visible
};
const videoObserver = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
const video = entry.target;
if (entry.isIntersecting) {
// Use a promise to avoid errors if play() is interrupted
const playPromise = video.play();
if (playPromise !== undefined) {
playPromise.catch(error => {
// Auto-play was prevented, which is common in some browsers.
// The user can still click to play.
});
}
} else {
video.pause();
}
});
}, observerOptions);
videos.forEach(video => {
videoObserver.observe(video);
});
});

256
index.php
View File

@ -1,150 +1,122 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
// Placeholder data for the video feed
$videos = [
[
"video_url" => "https://media.w3.org/2010/05/sintel/trailer.mp4",
"username" => "@coolcreator",
"caption" => "This is an amazing video! #epic #awesome",
"likes" => "1.2M",
"comments" => "4,521",
"shares" => "2,310"
],
[
"video_url" => "https://www.w3schools.com/html/mov_bbb.mp4",
"username" => "@anotherstar",
"caption" => "Just having fun with this app!",
"likes" => "892K",
"comments" => "1,123",
"shares" => "987"
],
[
"video_url" => "https://media.w3.org/2010/05/bunny/movie.mp4",
"username" => "@bunnylover",
"caption" => "Check out this cute bunny! ❤️ #cute #animals",
"likes" => "2.5M",
"comments" => "10.1K",
"shares" => "5,432"
]
];
?>
<!doctype html>
<!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>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- SEO and Meta Tags -->
<title>Kannadigas</title>
<meta name="description" content="A TikTok-style web app built with Flatlogic Generator.">
<meta name="keywords" content="video sharing, social media, creator content, vertical video, mobile entertainment, Kannadigas, Built with Flatlogic Generator">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:title" content="Kannadigas">
<meta property="og:description" content="A TikTok-style web app built with Flatlogic Generator.">
<meta property="og:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Kannadigas">
<meta name="twitter:description" content="A TikTok-style web app built with Flatlogic Generator.">
<meta name="twitter:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
<!-- Stylesheets -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<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;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<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 class="app-container">
<!-- Main Video Feed -->
<div class="video-feed">
<?php foreach ($videos as $video): ?>
<div class="video-slide">
<video src="<?php echo htmlspecialchars($video['video_url']); ?>" loop muted playsinline></video>
<div class="video-overlay">
<div class="username"><?php echo htmlspecialchars($video['username']); ?></div>
<div class="caption"><?php echo htmlspecialchars($video['caption']); ?></div>
</div>
<div class="video-actions">
<a href="#" class="action-btn">
<i class="bi bi-heart-fill"></i>
<span><?php echo htmlspecialchars($video['likes']); ?></span>
</a>
<a href="#" class="action-btn">
<i class="bi bi-chat-dots"></i>
<span><?php echo htmlspecialchars($video['comments']); ?></span>
</a>
<a href="#" class="action-btn">
<i class="bi bi-send"></i>
<span><?php echo htmlspecialchars($video['shares']); ?></span>
</a>
</div>
</div>
<?php endforeach; ?>
</div>
<!-- Bottom Navigation -->
<div class="bottom-nav">
<a href="#" class="nav-item active">
<i class="bi bi-house-door-fill"></i>
<span>Home</span>
</a>
<a href="#" class="nav-item">
<i class="bi bi-compass"></i>
<span>Discover</span>
</a>
<a href="#" class="nav-item upload-btn">
<i class="bi bi-plus-square-fill"></i>
</a>
<a href="#" class="nav-item">
<i class="bi bi-inbox"></i>
<span>Inbox</span>
</a>
<a href="#" class="nav-item">
<i class="bi bi-person-circle"></i>
<span>Profile</span>
</a>
</div>
</div>
</main>
<footer>
Page updated: <?= htmlspecialchars($now) ?> (UTC)
</footer>
<!-- JavaScript -->
<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>
</body>
</html>
</html>