pythonic-delight / index.html
rioteknikmesin's picture
can it into phyton
8878be9 verified
Raw History Blame Contribute Delete
10.8 kB
<!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>