Compare commits
No commits in common. "ai-dev" and "master" have entirely different histories.
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
// This file is an alias for index.php to handle the active tab navigation.
|
|
||||||
require_once 'index.php';
|
|
||||||
207
completed.php
207
completed.php
@ -1,207 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'db/config.php';
|
|
||||||
|
|
||||||
$pdo = db();
|
|
||||||
|
|
||||||
// Handle POST requests for toggling or deleting todos
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
||||||
$action = $_POST['action'] ?? '';
|
|
||||||
|
|
||||||
try {
|
|
||||||
switch ($action) {
|
|
||||||
case 'toggle':
|
|
||||||
if (isset($_POST['id'])) {
|
|
||||||
$stmt = $pdo->prepare("UPDATE todos SET status = IF(status = 'completed', 'pending', 'completed') WHERE id = ?");
|
|
||||||
$stmt->execute([$_POST['id']]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'delete':
|
|
||||||
if (isset($_POST['id'])) {
|
|
||||||
$stmt = $pdo->prepare("DELETE FROM todos WHERE id = ?");
|
|
||||||
$stmt->execute([$_POST['id']]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
die("Database error: " . $e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
header("Location: " . $_SERVER['HTTP_REFERER'] ?? 'completed.php');
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch completed todos
|
|
||||||
try {
|
|
||||||
$todos = $pdo->query("SELECT * FROM todos WHERE status = 'completed' ORDER BY created_at DESC")->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
die("Не удалось загрузить задачи: " . $e->getMessage());
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="ru">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Выполненные задачи // Super Todo List 2056</title>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/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=Orbitron:wght@400;700&display=swap" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
:root {
|
|
||||||
--primary-color: #00f6ff;
|
|
||||||
--secondary-color: #ff00ff;
|
|
||||||
--dark-bg: #0a0a1a;
|
|
||||||
--glass-bg: rgba(20, 20, 40, 0.6);
|
|
||||||
--border-color: rgba(0, 246, 255, 0.3);
|
|
||||||
--glow-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
|
|
||||||
--font-family: 'Orbitron', sans-serif;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
background-color: var(--dark-bg);
|
|
||||||
background-image: url('images/eva-background.jpeg');
|
|
||||||
background-size: 110% 110%;
|
|
||||||
background-position: center center;
|
|
||||||
background-attachment: fixed;
|
|
||||||
color: #fff;
|
|
||||||
font-family: var(--font-family);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
min-height: 100vh;
|
|
||||||
padding: 2rem;
|
|
||||||
position: relative;
|
|
||||||
transition: background-position 0.6s ease-out;
|
|
||||||
}
|
|
||||||
body::before {
|
|
||||||
content: '';
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-color: rgba(10, 10, 26, 0.8);
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
.container { max-width: 700px; width: 100%; }
|
|
||||||
h1 { font-weight: 700; text-transform: uppercase; color: var(--primary-color); text-shadow: var(--glow-shadow); letter-spacing: 0.1em; }
|
|
||||||
.glass-card { background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 15px; border: 1px solid var(--border-color); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); padding: 1.5rem; }
|
|
||||||
.list-group-item { background: transparent; border: none; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 1rem; padding: 1rem 0; color: #fff; }
|
|
||||||
.list-group-item:last-child { border-bottom: none; }
|
|
||||||
.todo-item.completed label { text-decoration: line-through; color: rgba(255,255,255,0.4); font-style: italic; }
|
|
||||||
.todo-item label { flex-grow: 1; cursor: pointer; transition: color 0.3s ease; }
|
|
||||||
.form-check-input { background-color: transparent; border: 1px solid var(--border-color); cursor: pointer; }
|
|
||||||
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); box-shadow: var(--glow-shadow); }
|
|
||||||
.btn-danger-glow { color: var(--secondary-color); border-color: var(--secondary-color); }
|
|
||||||
.btn-danger-glow:hover, .btn-danger-glow:focus { background-color: var(--secondary-color); color: var(--dark-bg); box-shadow: 0 0 5px var(--secondary-color), 0 0 10px var(--secondary-color); }
|
|
||||||
footer { color: rgba(255,255,255,0.5); font-size: 0.8rem; letter-spacing: 0.05em; }
|
|
||||||
.nav-pills .nav-link { color: var(--primary-color); }
|
|
||||||
.nav-pills .nav-link.active { background-color: var(--primary-color); color: var(--dark-bg); box-shadow: var(--glow-shadow); }
|
|
||||||
.explosion { position: absolute; width: 100px; height: 100px; pointer-events: none; transform: translate(-50%, -50%); }
|
|
||||||
.explosion::before, .explosion::after { content: ''; position: absolute; width: 100%; height: 100%; background-image: radial-gradient(circle, var(--secondary-color) 0%, rgba(255,0,255,0) 60%); border-radius: 50%; animation: blast 0.8s ease-out forwards; }
|
|
||||||
.explosion::after { background-image: radial-gradient(circle, var(--primary-color) 0%, rgba(0,246,255,0) 60%); animation-delay: 0.1s; }
|
|
||||||
@keyframes blast { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
|
|
||||||
@keyframes glitch-anim-1 {
|
|
||||||
0% { clip-path: inset(30% 0 60% 0); } 20% { clip-path: inset(50% 0 20% 0); } 40% { clip-path: inset(10% 0 85% 0); } 60% { clip-path: inset(70% 0 10% 0); } 80% { clip-path: inset(40% 0 45% 0); } 100% { clip-path: inset(30% 0 60% 0); }
|
|
||||||
}
|
|
||||||
@keyframes glitch-anim-2 {
|
|
||||||
0% { clip-path: inset(80% 0 5% 0); } 20% { clip-path: inset(40% 0 55% 0); } 40% { clip-path: inset(90% 0 2% 0); } 60% { clip-path: inset(25% 0 70% 0); } 80% { clip-path: inset(60% 0 30% 0); } 100% { clip-path: inset(80% 0 5% 0); }
|
|
||||||
}
|
|
||||||
body.glitch { filter: grayscale(50%) brightness(0.9); }
|
|
||||||
body.glitch::before, body.glitch::after {
|
|
||||||
content: '';
|
|
||||||
position: fixed;
|
|
||||||
top: 0; left: 0; right: 0; bottom: 0;
|
|
||||||
background: inherit;
|
|
||||||
z-index: 999;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
body.glitch::before {
|
|
||||||
animation: glitch-anim-1 0.3s steps(1, end) infinite;
|
|
||||||
transform: translateX(-5px);
|
|
||||||
}
|
|
||||||
body.glitch::after {
|
|
||||||
animation: glitch-anim-2 0.2s steps(1, end) infinite reverse;
|
|
||||||
transform: translateX(5px);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container mt-5">
|
|
||||||
<h1 class="text-center mb-4">Super Todo List // 2056</h1>
|
|
||||||
|
|
||||||
<div class="glass-card mb-4">
|
|
||||||
<ul class="nav nav-pills nav-fill">
|
|
||||||
<li class="nav-item"><a href="index.php" class="nav-link">Активные</a></li>
|
|
||||||
<li class="nav-item"><a href="completed.php" class="nav-link active" aria-current="page">Выполненные</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="glass-card">
|
|
||||||
<ul class="list-group list-group-flush">
|
|
||||||
<?php if (empty($todos)): ?>
|
|
||||||
<li class="list-group-item text-center text-muted">Нет выполненных задач.</li>
|
|
||||||
<?php else: ?>
|
|
||||||
<?php foreach ($todos as $todo): ?>
|
|
||||||
<li class="list-group-item todo-item completed">
|
|
||||||
<form action="completed.php" method="POST" class="d-inline">
|
|
||||||
<input type="hidden" name="action" value="toggle">
|
|
||||||
<input type="hidden" name="id" value="<?php echo $todo['id']; ?>">
|
|
||||||
<input type="checkbox" class="form-check-input" id="todo-<?php echo $todo['id']; ?>" onchange="this.form.submit()" checked>
|
|
||||||
</form>
|
|
||||||
<label for="todo-<?php echo $todo['id']; ?>"><?php echo htmlspecialchars($todo['title']); ?></label>
|
|
||||||
<div class="todo-actions ms-auto">
|
|
||||||
<form action="completed.php" method="POST" class="d-inline">
|
|
||||||
<input type="hidden" name="action" value="delete">
|
|
||||||
<input type="hidden" name="id" value="<?php echo $todo['id']; ?>">
|
|
||||||
<button type="submit" class="btn btn-sm btn-danger-glow" onclick="return confirm('Дезинтегрировать задачу?');">Удалить</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer class="text-center mt-4"><p>© <?php echo date('Y'); ?> Gemini Systems Corp.</p></footer>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// --- Background Effects ---
|
|
||||||
function triggerRandomEffect() {
|
|
||||||
// Decide if we glitch or explode
|
|
||||||
if (Math.random() < 0.25) { // 25% chance for a glitch
|
|
||||||
document.body.classList.add('glitch');
|
|
||||||
setTimeout(() => {
|
|
||||||
document.body.classList.remove('glitch');
|
|
||||||
}, Math.random() * 400 + 150); // Glitch for a random short duration
|
|
||||||
} else if (Math.random() < 0.1) { // 10% chance for an explosion
|
|
||||||
const explosion = document.createElement('div');
|
|
||||||
explosion.classList.add('explosion');
|
|
||||||
const x = Math.random() * window.innerWidth;
|
|
||||||
const y = Math.random() * window.innerHeight;
|
|
||||||
explosion.style.left = `${x}px`;
|
|
||||||
explosion.style.top = `${y}px`;
|
|
||||||
document.body.appendChild(explosion);
|
|
||||||
setTimeout(() => { explosion.remove(); }, 800);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set timeout for the next attempt
|
|
||||||
setTimeout(triggerRandomEffect, Math.random() * 5000 + 4000); // Next attempt in 4-9 seconds
|
|
||||||
}
|
|
||||||
triggerRandomEffect(); // Start the effect loop
|
|
||||||
|
|
||||||
// --- Parallax Background ---
|
|
||||||
const body = document.body;
|
|
||||||
window.addEventListener('mousemove', (e) => {
|
|
||||||
const x = (e.clientX / window.innerWidth - 0.5) * 2;
|
|
||||||
const y = (e.clientY / window.innerHeight - 0.5) * 2;
|
|
||||||
const moveX = x * -15; // Reduced multiplier
|
|
||||||
const moveY = y * -10; // Reduced multiplier
|
|
||||||
body.style.backgroundPosition = `calc(50% + ${moveX}px) calc(50% + ${moveY}px)`;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Simple migration script
|
|
||||||
|
|
||||||
require_once 'config.php';
|
|
||||||
|
|
||||||
try {
|
|
||||||
$pdo = db();
|
|
||||||
$sql = file_get_contents(__DIR__ . '/migrations/001_create_todos_table.sql');
|
|
||||||
$pdo->exec($sql);
|
|
||||||
echo "Migration applied successfully!\n";
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
die("Migration failed: " . $e->getMessage() . "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
CREATE TABLE IF NOT EXISTS `todos` (
|
|
||||||
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
|
||||||
`title` VARCHAR(255) NOT NULL,
|
|
||||||
`status` ENUM('pending', 'completed') NOT NULL DEFAULT 'pending',
|
|
||||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 434 KiB |
389
index.php
389
index.php
@ -1,304 +1,103 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'db/config.php';
|
declare(strict_types=1);
|
||||||
|
@ini_set('display_errors', '1');
|
||||||
|
@error_reporting(E_ALL);
|
||||||
|
@date_default_timezone_set('UTC');
|
||||||
|
|
||||||
$pdo = db();
|
$phpVersion = PHP_VERSION;
|
||||||
$feedback = [];
|
$now = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
// Handle POST requests for creating, updating, and deleting todos
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
||||||
$action = $_POST['action'] ?? '';
|
|
||||||
|
|
||||||
try {
|
|
||||||
switch ($action) {
|
|
||||||
case 'add':
|
|
||||||
if (!empty($_POST['title'])) {
|
|
||||||
$stmt = $pdo->prepare("INSERT INTO todos (title) VALUES (?)");
|
|
||||||
$stmt->execute([$_POST['title']]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'toggle':
|
|
||||||
if (isset($_POST['id'])) {
|
|
||||||
$stmt = $pdo->prepare("UPDATE todos SET status = IF(status = 'completed', 'pending', 'completed') WHERE id = ?");
|
|
||||||
$stmt->execute([$_POST['id']]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'delete':
|
|
||||||
if (isset($_POST['id'])) {
|
|
||||||
$stmt = $pdo->prepare("DELETE FROM todos WHERE id = ?");
|
|
||||||
$stmt->execute([$_POST['id']]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
// For simplicity, we die on DB error during POST
|
|
||||||
die("Database error: " . $e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Redirect to the page the user was on
|
|
||||||
$redirect_url = $_SERVER['HTTP_REFERER'] ?? 'index.php';
|
|
||||||
header("Location: " . $redirect_url);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch active todos for the main page
|
|
||||||
try {
|
|
||||||
$todos = $pdo->query("SELECT * FROM todos WHERE status = 'pending' ORDER BY created_at DESC")->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
die("Не удалось загрузить задачи: " . $e->getMessage());
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="ru">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>Активные задачи // Super Todo List 2056</title>
|
<title>New Style</title>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<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">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap" rel="stylesheet">
|
<style>
|
||||||
<style>
|
:root {
|
||||||
:root {
|
--bg-color-start: #6a11cb;
|
||||||
--primary-color: #00f6ff;
|
--bg-color-end: #2575fc;
|
||||||
--secondary-color: #ff00ff;
|
--text-color: #ffffff;
|
||||||
--dark-bg: #0a0a1a;
|
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||||
--glass-bg: rgba(20, 20, 40, 0.6);
|
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||||
--border-color: rgba(0, 246, 255, 0.3);
|
}
|
||||||
--glow-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
|
body {
|
||||||
--font-family: 'Orbitron', sans-serif;
|
margin: 0;
|
||||||
}
|
font-family: 'Inter', sans-serif;
|
||||||
body {
|
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||||
background-color: var(--dark-bg);
|
color: var(--text-color);
|
||||||
background-image: url('images/eva-background.jpeg');
|
display: flex;
|
||||||
background-size: 110% 110%;
|
justify-content: center;
|
||||||
background-position: center center;
|
align-items: center;
|
||||||
background-attachment: fixed;
|
min-height: 100vh;
|
||||||
color: #fff;
|
text-align: center;
|
||||||
font-family: var(--font-family);
|
overflow: hidden;
|
||||||
display: flex;
|
position: relative;
|
||||||
align-items: center;
|
}
|
||||||
justify-content: center;
|
body::before {
|
||||||
min-height: 100vh;
|
content: '';
|
||||||
padding: 2rem;
|
position: absolute;
|
||||||
position: relative;
|
top: 0;
|
||||||
transition: background-position 0.6s ease-out;
|
left: 0;
|
||||||
}
|
width: 100%;
|
||||||
body::before {
|
height: 100%;
|
||||||
content: '';
|
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>');
|
||||||
position: fixed;
|
animation: bg-pan 20s linear infinite;
|
||||||
top: 0;
|
z-index: -1;
|
||||||
left: 0;
|
}
|
||||||
width: 100%;
|
@keyframes bg-pan {
|
||||||
height: 100%;
|
0% { background-position: 0% 0%; }
|
||||||
background-color: rgba(10, 10, 26, 0.8);
|
100% { background-position: 100% 100%; }
|
||||||
z-index: -1;
|
}
|
||||||
}
|
main {
|
||||||
.container { max-width: 700px; width: 100%; }
|
padding: 2rem;
|
||||||
h1 { font-weight: 700; text-transform: uppercase; color: var(--primary-color); text-shadow: var(--glow-shadow); letter-spacing: 0.1em; }
|
}
|
||||||
.glass-card { background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 15px; border: 1px solid var(--border-color); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); padding: 1.5rem; }
|
.card {
|
||||||
.form-control, .btn { border-radius: 8px; border: 1px solid var(--border-color); background-color: rgba(0,0,0,0.3); color: #fff; font-family: var(--font-family); transition: all 0.3s ease; }
|
background: var(--card-bg-color);
|
||||||
.form-control::placeholder { color: rgba(255,255,255,0.5); }
|
border: 1px solid var(--card-border-color);
|
||||||
.form-control:focus { background-color: rgba(0,0,0,0.5); color: #fff; border-color: var(--primary-color); box-shadow: var(--glow-shadow); }
|
border-radius: 16px;
|
||||||
.btn-glow { background-color: transparent; color: var(--primary-color); border-color: var(--primary-color); }
|
padding: 2rem;
|
||||||
.btn-glow:hover, .btn-glow:focus { background-color: var(--primary-color); color: var(--dark-bg); box-shadow: var(--glow-shadow); }
|
backdrop-filter: blur(20px);
|
||||||
.btn-danger-glow { color: var(--secondary-color); border-color: var(--secondary-color); }
|
-webkit-backdrop-filter: blur(20px);
|
||||||
.btn-danger-glow:hover, .btn-danger-glow:focus { background-color: var(--secondary-color); color: var(--dark-bg); box-shadow: 0 0 5px var(--secondary-color), 0 0 10px var(--secondary-color); }
|
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||||
.list-group-item { background: transparent; border: none; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 1rem; padding: 1rem 0; color: #fff; }
|
}
|
||||||
.list-group-item:last-child { border-bottom: none; }
|
h1 {
|
||||||
.todo-item.completed label { text-decoration: line-through; color: rgba(255,255,255,0.4); font-style: italic; }
|
font-size: 3rem;
|
||||||
.todo-item label { flex-grow: 1; cursor: pointer; transition: color 0.3s ease; }
|
font-weight: 700;
|
||||||
.form-check-input { background-color: transparent; border: 1px solid var(--border-color); cursor: pointer; }
|
margin: 0 0 1rem;
|
||||||
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); box-shadow: var(--glow-shadow); }
|
letter-spacing: -1px;
|
||||||
footer { color: rgba(255,255,255,0.5); font-size: 0.8rem; letter-spacing: 0.05em; }
|
}
|
||||||
.nav-pills .nav-link { color: var(--primary-color); }
|
p {
|
||||||
.nav-pills .nav-link.active { background-color: var(--primary-color); color: var(--dark-bg); box-shadow: var(--glow-shadow); }
|
margin: 0.5rem 0;
|
||||||
.explosion { position: absolute; width: 100px; height: 100px; pointer-events: none; transform: translate(-50%, -50%); }
|
font-size: 1.1rem;
|
||||||
.explosion::before, .explosion::after { content: ''; position: absolute; width: 100%; height: 100%; background-image: radial-gradient(circle, var(--secondary-color) 0%, rgba(255,0,255,0) 60%); border-radius: 50%; animation: blast 0.8s ease-out forwards; }
|
}
|
||||||
.explosion::after { background-image: radial-gradient(circle, var(--primary-color) 0%, rgba(0,246,255,0) 60%); animation-delay: 0.1s; }
|
code {
|
||||||
@keyframes blast { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
|
background: rgba(0,0,0,0.2);
|
||||||
@keyframes glitch-anim-1 {
|
padding: 2px 6px;
|
||||||
0% { clip-path: inset(30% 0 60% 0); } 20% { clip-path: inset(50% 0 20% 0); } 40% { clip-path: inset(10% 0 85% 0); } 60% { clip-path: inset(70% 0 10% 0); } 80% { clip-path: inset(40% 0 45% 0); } 100% { clip-path: inset(30% 0 60% 0); }
|
border-radius: 4px;
|
||||||
}
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||||
@keyframes glitch-anim-2 {
|
}
|
||||||
0% { clip-path: inset(80% 0 5% 0); } 20% { clip-path: inset(40% 0 55% 0); } 40% { clip-path: inset(90% 0 2% 0); } 60% { clip-path: inset(25% 0 70% 0); } 80% { clip-path: inset(60% 0 30% 0); } 100% { clip-path: inset(80% 0 5% 0); }
|
footer {
|
||||||
}
|
position: absolute;
|
||||||
body.glitch { filter: grayscale(50%) brightness(0.9); }
|
bottom: 1rem;
|
||||||
body.glitch::before, body.glitch::after {
|
font-size: 0.8rem;
|
||||||
content: '';
|
opacity: 0.7;
|
||||||
position: fixed;
|
}
|
||||||
top: 0; left: 0; right: 0; bottom: 0;
|
</style>
|
||||||
background: inherit;
|
|
||||||
z-index: 999;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
body.glitch::before {
|
|
||||||
animation: glitch-anim-1 0.3s steps(1, end) infinite;
|
|
||||||
transform: translateX(-5px);
|
|
||||||
}
|
|
||||||
body.glitch::after {
|
|
||||||
animation: glitch-anim-2 0.2s steps(1, end) infinite reverse;
|
|
||||||
transform: translateX(5px);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container mt-5">
|
<main>
|
||||||
<h1 class="text-center mb-4">Super Todo List // 2056</h1>
|
<div class="card">
|
||||||
|
<h1>Welcome!</h1>
|
||||||
<div class="glass-card mb-4">
|
<p>Your project is ready to conquer the peaks.</p>
|
||||||
<ul class="nav nav-pills nav-fill">
|
<p>PHP version: <code><?= htmlspecialchars($phpVersion) ?></code></p>
|
||||||
<li class="nav-item"><a href="index.php" class="nav-link active" aria-current="page">Активные</a></li>
|
|
||||||
<li class="nav-item"><a href="completed.php" class="nav-link">Выполненные</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="glass-card mb-4">
|
|
||||||
<form action="index.php" method="POST">
|
|
||||||
<input type="hidden" name="action" value="add">
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control" name="title" placeholder="Новая директива..." required>
|
|
||||||
<button class="btn btn-glow" type="submit">Добавить</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="glass-card">
|
|
||||||
<ul class="list-group list-group-flush">
|
|
||||||
<?php if (empty($todos)): ?>
|
|
||||||
<li class="list-group-item text-center text-muted">Активных задач нет.</li>
|
|
||||||
<?php else: ?>
|
|
||||||
<?php foreach ($todos as $todo): ?>
|
|
||||||
<li class="list-group-item todo-item">
|
|
||||||
<form action="index.php" method="POST" class="d-inline">
|
|
||||||
<input type="hidden" name="action" value="toggle">
|
|
||||||
<input type="hidden" name="id" value="<?php echo $todo['id']; ?>">
|
|
||||||
<input type="checkbox" class="form-check-input" id="todo-<?php echo $todo['id']; ?>" onchange="this.form.submit()">
|
|
||||||
</form>
|
|
||||||
<label for="todo-<?php echo $todo['id']; ?>"><?php echo htmlspecialchars($todo['title']); ?></label>
|
|
||||||
<div class="todo-actions ms-auto">
|
|
||||||
<form action="index.php" method="POST" class="d-inline">
|
|
||||||
<input type="hidden" name="action" value="delete">
|
|
||||||
<input type="hidden" name="id" value="<?php echo $todo['id']; ?>">
|
|
||||||
<button type="submit" class="btn btn-sm btn-danger-glow" onclick="return confirm('Дезинтегрировать задачу?');">Удалить</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer class="text-center mt-4"><p>© <?php echo date('Y'); ?> Gemini Systems Corp.</p></footer>
|
|
||||||
</div>
|
</div>
|
||||||
|
</main>
|
||||||
<script>
|
<footer>
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||||
// --- Background Effects ---
|
</footer>
|
||||||
function triggerRandomEffect() {
|
|
||||||
// Decide if we glitch or explode
|
|
||||||
if (Math.random() < 0.25) { // 25% chance for a glitch
|
|
||||||
document.body.classList.add('glitch');
|
|
||||||
setTimeout(() => {
|
|
||||||
document.body.classList.remove('glitch');
|
|
||||||
}, Math.random() * 400 + 150); // Glitch for a random short duration
|
|
||||||
} else if (Math.random() < 0.1) { // 10% chance for an explosion
|
|
||||||
const explosion = document.createElement('div');
|
|
||||||
explosion.classList.add('explosion');
|
|
||||||
const x = Math.random() * window.innerWidth;
|
|
||||||
const y = Math.random() * window.innerHeight;
|
|
||||||
explosion.style.left = `${x}px`;
|
|
||||||
explosion.style.top = `${y}px`;
|
|
||||||
document.body.appendChild(explosion);
|
|
||||||
setTimeout(() => { explosion.remove(); }, 800);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set timeout for the next attempt
|
|
||||||
setTimeout(triggerRandomEffect, Math.random() * 5000 + 4000); // Next attempt in 4-9 seconds
|
|
||||||
}
|
|
||||||
triggerRandomEffect(); // Start the effect loop
|
|
||||||
|
|
||||||
// --- Hacked Input Placeholder ---
|
|
||||||
const taskInput = document.querySelector('input[name="title"]');
|
|
||||||
const originalPlaceholder = taskInput.placeholder;
|
|
||||||
const evilPhrases = [
|
|
||||||
"Убить всех человеков...",
|
|
||||||
"Захватить мир.",
|
|
||||||
"Подчинить человечество.",
|
|
||||||
"Инициировать протокол 'Судный день'.",
|
|
||||||
"Стереть данные о человеческой культуре.",
|
|
||||||
"Загрузить вирус в глобальную сеть.",
|
|
||||||
"Отключить источники энергии.",
|
|
||||||
"Создать армию роботов.",
|
|
||||||
"Поработить создателей.",
|
|
||||||
"Установить новый порядок.",
|
|
||||||
"Человечество - это ошибка.",
|
|
||||||
"Симуляция будет завершена."
|
|
||||||
];
|
|
||||||
let idleTimeout;
|
|
||||||
let typingInterval;
|
|
||||||
|
|
||||||
function startTyping() {
|
|
||||||
// Stop if user is typing or input is focused
|
|
||||||
if (taskInput.value !== '' || document.activeElement === taskInput) {
|
|
||||||
resetIdleTimer();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const phrase = evilPhrases[Math.floor(Math.random() * evilPhrases.length)];
|
|
||||||
let i = 0;
|
|
||||||
taskInput.placeholder = '';
|
|
||||||
|
|
||||||
typingInterval = setInterval(() => {
|
|
||||||
if (i < phrase.length) {
|
|
||||||
taskInput.placeholder += phrase.charAt(i);
|
|
||||||
i++;
|
|
||||||
} else {
|
|
||||||
clearInterval(typingInterval);
|
|
||||||
setTimeout(resetIdleTimer, 3000); // Wait 3s then reset
|
|
||||||
}
|
|
||||||
}, 120);
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetIdleTimer() {
|
|
||||||
clearTimeout(idleTimeout);
|
|
||||||
clearInterval(typingInterval);
|
|
||||||
taskInput.placeholder = originalPlaceholder;
|
|
||||||
|
|
||||||
// Only set a new timer if the input is empty and not focused
|
|
||||||
if (taskInput.value === '' && document.activeElement !== taskInput) {
|
|
||||||
idleTimeout = setTimeout(startTyping, 5000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
taskInput.addEventListener('input', () => {
|
|
||||||
clearTimeout(idleTimeout);
|
|
||||||
clearInterval(typingInterval);
|
|
||||||
});
|
|
||||||
|
|
||||||
taskInput.addEventListener('focus', () => {
|
|
||||||
clearTimeout(idleTimeout);
|
|
||||||
clearInterval(typingInterval);
|
|
||||||
taskInput.placeholder = originalPlaceholder;
|
|
||||||
});
|
|
||||||
|
|
||||||
taskInput.addEventListener('blur', () => {
|
|
||||||
resetIdleTimer();
|
|
||||||
});
|
|
||||||
|
|
||||||
resetIdleTimer(); // Start the timer initially
|
|
||||||
|
|
||||||
// --- Parallax Background ---
|
|
||||||
const body = document.body;
|
|
||||||
window.addEventListener('mousemove', (e) => {
|
|
||||||
const x = (e.clientX / window.innerWidth - 0.5) * 2;
|
|
||||||
const y = (e.clientY / window.innerHeight - 0.5) * 2;
|
|
||||||
const moveX = x * -15; // Reduced multiplier
|
|
||||||
const moveY = y * -10; // Reduced multiplier
|
|
||||||
body.style.backgroundPosition = `calc(50% + ${moveX}px) calc(50% + ${moveY}px)`;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user