Spaces:
Running
Running
File size: 10,766 Bytes
8878be9 5d76fd0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pythonic Delight</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<style>
.code-bg {
background-color: #282c34;
}
.python-yellow {
color: #FFD43B;
}
.python-blue {
color: #4584b6;
}
.snake-pattern {
background-image: linear-gradient(135deg, #4584b6 25%, transparent 25%),
linear-gradient(225deg, #4584b6 25%, transparent 25%),
linear-gradient(45deg, #4584b6 25%, transparent 25%),
linear-gradient(315deg, #4584b6 25%, #282c34 25%);
background-size: 20px 20px;
}
</style>
</head>
<body class="min-h-screen bg-gray-100" id="vanta-bg">
<div class="container mx-auto px-4">
<!-- Header -->
<header class="py-8 text-center">
<div class="flex justify-center mb-4">
<div class="w-20 h-20 rounded-full bg-white shadow-lg flex items-center justify-center">
<i data-feather="code" class="w-10 h-10 python-blue"></i>
</div>
</div>
<h1 class="text-4xl md:text-5xl font-bold mb-2 python-blue">Pythonic Delight</h1>
<p class="text-lg text-gray-600">Where Python magic happens 🪄</p>
</header>
<!-- Main Content -->
<main class="mb-16">
<!-- Hero Section -->
<section class="mb-16">
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<div class="md:flex">
<div class="md:w-1/2 p-8 md:p-12 flex flex-col justify-center">
<h2 class="text-3xl font-bold mb-4 python-blue">Unleash the Python Power</h2>
<p class="text-gray-600 mb-6">Discover the elegance of Python programming through interactive examples and beautiful visualizations.</p>
<div class="flex space-x-4">
<button class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-lg transition duration-300">
Get Started
</button>
<button class="border border-blue-500 text-blue-500 hover:bg-blue-50 px-6 py-2 rounded-lg transition duration-300">
Learn More
</button>
</div>
</div>
<div class="md:w-1/2 code-bg p-8 flex items-center justify-center">
<pre class="text-white text-sm md:text-base overflow-x-auto">
<code class="font-mono">
<span class="python-yellow">def</span> <span class="text-purple-400">fibonacci</span>(n):
<span class="python-yellow">if</span> n <= 1:
<span class="python-yellow">return</span> n
<span class="python-yellow">else</span>:
<span class="python-yellow">return</span> fibonacci(n-1) + fibonacci(n-2)
<span class="python-yellow">for</span> i <span class="python-yellow">in</span> range(10):
print(fibonacci(i))
</code>
</pre>
</div>
</div>
</div>
</section>
<!-- Features Section -->
<section class="mb-16">
<h2 class="text-3xl font-bold text-center mb-12 python-blue">Why Python Rocks</h2>
<div class="grid md:grid-cols-3 gap-8">
<!-- Feature 1 -->
<div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mb-4">
<i data-feather="zap" class="python-blue"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Simple & Powerful</h3>
<p class="text-gray-600">Python's clean syntax makes it easy to read and write, yet it's powerful enough for complex applications.</p>
</div>
<!-- Feature 2 -->
<div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="w-12 h-12 rounded-full bg-yellow-100 flex items-center justify-center mb-4">
<i data-feather="cpu" class="text-yellow-500"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Versatile</h3>
<p class="text-gray-600">From web development to data science and AI, Python can do it all with its vast ecosystem of libraries.</p>
</div>
<!-- Feature 3 -->
<div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center mb-4">
<i data-feather="users" class="text-green-500"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Community</h3>
<p class="text-gray-600">Join one of the largest and most supportive programming communities in the world.</p>
</div>
</div>
</section>
<!-- Interactive Section -->
<section class="mb-16">
<div class="snake-pattern rounded-xl p-8 text-center">
<h2 class="text-3xl font-bold text-white mb-6">Try Python in Your Browser</h2>
<div class="max-w-3xl mx-auto bg-white bg-opacity-90 rounded-lg p-6">
<div id="terminal" class="code-bg rounded-t-lg p-4 h-64 overflow-y-auto font-mono text-sm text-white">
<div class="text-green-400">$ python</div>
<div class="text-blue-300">Python 3.9.0 (default, Oct 6 2021, 00:00:00)</div>
<div class="text-blue-300">Type "help", "copyright", "credits" or "license" for more information.</div>
<div class="mt-2">>>> <span id="cursor" class="animate-pulse">|</span></div>
</div>
<div class="bg-gray-100 rounded-b-lg p-4">
<div class="flex">
<input type="text" class="flex-grow px-4 py-2 rounded-l-lg border focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter Python code...">
<button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-r-lg transition duration-300">
Run
</button>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="py-8 border-t border-gray-200">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<p class="text-gray-600">© 2023 Pythonic Delight. All rights reserved.</p>
</div>
<div class="flex space-x-4">
<a href="#" class="text-gray-600 hover:text-blue-500 transition duration-300">
<i data-feather="github"></i>
</a>
<a href="#" class="text-gray-600 hover:text-blue-400 transition duration-300">
<i data-feather="twitter"></i>
</a>
<a href="#" class="text-gray-600 hover:text-red-500 transition duration-300">
<i data-feather="youtube"></i>
</a>
</div>
</div>
</footer>
</div>
<script>
// Initialize Vanta.js globe background
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: "#4584b6",
backgroundColor: "#f8fafc"
});
// Initialize feather icons
feather.replace();
// Simple terminal animation
const commands = [
"print('Hello, World!')",
"import this",
"[x**2 for x in range(10)]",
"import math\nmath.pi"
];
let currentCommand = 0;
function animateTerminal() {
const terminal = document.getElementById('terminal');
terminal.innerHTML += `<div class="text-green-400">$ python</div>
<div class="text-blue-300">Python 3.9.0 (default, Oct 6 2021, 00:00:00)</div>
<div class="text-blue-300">Type "help", "copyright", "credits" or "license" for more information.</div>
<div class="mt-2">>>> ${commands[currentCommand]}</div>
<div class="mb-2">${evalPython(commands[currentCommand])}</div>
<div>>> <span id="cursor" class="animate-pulse">|</span></div>`;
terminal.scrollTop = terminal.scrollHeight;
currentCommand = (currentCommand + 1) % commands.length;
}
function evalPython(code) {
try {
// This is just for display - in a real app you'd use Pyodide or similar
if (code.includes("import this")) return "The Zen of Python, by Tim Peters...";
if (code.includes("Hello")) return "Hello, World!";
if (code.includes("math.pi")) return "3.141592653589793";
if (code.includes("x**2")) return "[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]";
return "Command executed successfully";
} catch {
return "Error executing command";
}
}
// Animate terminal every 5 seconds
setInterval(animateTerminal, 5000);
</script>
</body>
</html>
|