1.0
This commit is contained in:
parent
b94b57ff88
commit
fee9213453
69
assets/css/custom.css
Normal file
69
assets/css/custom.css
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #0E0E10;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-family: 'Inter', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
background-color: #18181B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
color: #9146FF !important;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: #18181B;
|
||||||
|
border: 1px solid #2A2A2E;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:hover {
|
||||||
|
transform: scale(1.03);
|
||||||
|
border-color: #9146FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-text {
|
||||||
|
color: #ADADB8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-genre {
|
||||||
|
background-color: #3A3A3D;
|
||||||
|
color: #EFEFF1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewers {
|
||||||
|
color: #EFEFF1;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewers .icon {
|
||||||
|
color: #FF4545; /* Red dot for 'live' */
|
||||||
|
font-size: 0.6rem;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: #9146FF;
|
||||||
|
border-color: #9146FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: #772CE8;
|
||||||
|
border-color: #772CE8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
background-color: #18181B;
|
||||||
|
color: #ADADB8;
|
||||||
|
padding: 1rem 0;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
5
assets/js/main.js
Normal file
5
assets/js/main.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Future JavaScript for interactivity
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
console.log('Twitch Dashboard Ready');
|
||||||
|
});
|
||||||
292
index.php
292
index.php
@ -1,150 +1,162 @@
|
|||||||
<?php
|
<?php
|
||||||
declare(strict_types=1);
|
// Mock data for the dashboard
|
||||||
@ini_set('display_errors', '1');
|
$top_games = [
|
||||||
@error_reporting(E_ALL);
|
[
|
||||||
@date_default_timezone_set('UTC');
|
'title' => 'Just Chatting',
|
||||||
|
'viewers' => '350K',
|
||||||
|
'tags' => ['IRL'],
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/509658-285x380.jpg'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => 'League of Legends',
|
||||||
|
'viewers' => '125K',
|
||||||
|
'tags' => ['MOBA', 'Action'],
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/21779-285x380.jpg'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => 'VALORANT',
|
||||||
|
'viewers' => '98K',
|
||||||
|
'tags' => ['FPS', 'Shooter'],
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/516575-285x380.jpg'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => 'Grand Theft Auto V',
|
||||||
|
'viewers' => '88K',
|
||||||
|
'tags' => ['Adventure'],
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/32982_IGDB-285x380.jpg'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$live_channels = [
|
||||||
|
[
|
||||||
|
'name' => 'xQc',
|
||||||
|
'game' => 'Just Chatting',
|
||||||
|
'viewers' => '78K',
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/xqc-profile_image-9298d2877057642a-70x70.png'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Tarik',
|
||||||
|
'game' => 'VALORANT',
|
||||||
|
'viewers' => '45K',
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/tarik-profile_image-d6f82a69354da623-70x70.png'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'summit1g',
|
||||||
|
'game' => 'Old School RuneScape',
|
||||||
|
'viewers' => '21K',
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/summit1g-profile_image-d29b89b15533818c-70x70.png'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'LIRIK',
|
||||||
|
'game' => 'DayZ',
|
||||||
|
'viewers' => '15K',
|
||||||
|
'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/lirik-profile_image-4ac8c3250307d433-70x70.png'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// Read project preview data from environment
|
||||||
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Twitch.TV Statistics Dashboard';
|
||||||
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||||
|
$projectName = $_SERVER['PROJECT_NAME'] ?? 'Twitch Stats';
|
||||||
|
|
||||||
$phpVersion = PHP_VERSION;
|
|
||||||
$now = date('Y-m-d H:i:s');
|
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<title>New Style</title>
|
<title><?= htmlspecialchars($projectName) ?> - Dashboard</title>
|
||||||
<?php
|
|
||||||
// Read project preview data from environment
|
<!-- Meta description -->
|
||||||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>"/>
|
||||||
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
<!-- Open Graph meta tags -->
|
||||||
?>
|
<meta property="og:title" content="<?= htmlspecialchars($projectName) ?>"/>
|
||||||
<?php if ($projectDescription): ?>
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>"/>
|
||||||
<!-- Meta description -->
|
<!-- Twitter meta tags -->
|
||||||
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<!-- Open Graph meta tags -->
|
<meta property="twitter:title" content="<?= htmlspecialchars($projectName) ?>"/>
|
||||||
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>"/>
|
||||||
<!-- Twitter meta tags -->
|
|
||||||
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
<?php if ($projectImageUrl): ?>
|
||||||
<?php endif; ?>
|
<!-- Open Graph image -->
|
||||||
<?php if ($projectImageUrl): ?>
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>"/>
|
||||||
<!-- Open Graph image -->
|
<!-- Twitter image -->
|
||||||
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>"/>
|
||||||
<!-- Twitter image -->
|
<?php endif; ?>
|
||||||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
||||||
<?php endif; ?>
|
<!-- Bootstrap 5 CSS -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||||
<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">
|
<!-- Google Fonts & Icons -->
|
||||||
<style>
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
:root {
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
--bg-color-start: #6a11cb;
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
|
||||||
--bg-color-end: #2575fc;
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||||
--text-color: #ffffff;
|
|
||||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
<!-- Custom CSS -->
|
||||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||||
}
|
|
||||||
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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
|
||||||
<div class="card">
|
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||||
<h1>Analyzing your requirements and generating your website…</h1>
|
<div class="container-fluid">
|
||||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
<a class="navbar-brand" href="#"><i class="fab fa-twitch"></i> <?= htmlspecialchars($projectName) ?></a>
|
||||||
<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>
|
</div>
|
||||||
</main>
|
</nav>
|
||||||
<footer>
|
|
||||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
<main class="container my-5">
|
||||||
</footer>
|
<h1 class="mb-4">Top Categories</h1>
|
||||||
|
<div class="row g-4">
|
||||||
|
<?php foreach ($top_games as $game): ?>
|
||||||
|
<div class="col-6 col-md-4 col-lg-3">
|
||||||
|
<div class="card h-100">
|
||||||
|
<img src="<?= htmlspecialchars($game['img']) ?>" class="card-img-top" alt="<?= htmlspecialchars($game['title']) ?>">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title mb-1"><?= htmlspecialchars($game['title']) ?></h5>
|
||||||
|
<p class="viewers mb-2"><i class="fas fa-circle icon"></i> <?= htmlspecialchars($game['viewers']) ?> viewers</p>
|
||||||
|
<div>
|
||||||
|
<?php foreach ($game['tags'] as $tag): ?>
|
||||||
|
<span class="badge rounded-pill badge-genre"><?= htmlspecialchars($tag) ?></span>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="my-4 pt-4">Recommended Live Channels</h1>
|
||||||
|
<div class="row g-3">
|
||||||
|
<?php foreach ($live_channels as $channel): ?>
|
||||||
|
<div class="col-12 col-md-6 col-lg-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body d-flex align-items-center">
|
||||||
|
<img src="<?= htmlspecialchars($channel['img']) ?>" class="rounded-circle me-3" alt="<?= htmlspecialchars($channel['name']) ?>" width="60" height="60">
|
||||||
|
<div class="flex-grow-1">
|
||||||
|
<h5 class="card-title mb-0"><?= htmlspecialchars($channel['name']) ?></h5>
|
||||||
|
<p class="card-text mb-1"><?= htmlspecialchars($channel['game']) ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="viewers text-end">
|
||||||
|
<i class="fas fa-circle icon"></i> <?= htmlspecialchars($channel['viewers']) ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="footer mt-5">
|
||||||
|
<div class="container text-center">
|
||||||
|
<p>© <?php echo date("Y"); ?> <?= htmlspecialchars($projectName) ?>. All rights reserved.</p>
|
||||||
|
<p>Powered by Flatlogic.</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Bootstrap 5 JS -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
||||||
|
<!-- Custom JS -->
|
||||||
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user