DataScience / Python /index.html
AashishAIHub's picture
Refactor Python module: split monolithic index.html into clean index.html + app.js architecture (matching GenAI pattern)
45fc8e3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python for Data Science & AI | Complete Masterclass</title>
<meta name="description"
content="Comprehensive Python for Data Science & AI curriculum. Python Fundamentals, NumPy, Pandas, Matplotlib, Scikit-learn, PyTorch, TensorFlow, Production Python, and Performance Optimization.">
<link rel="stylesheet" href="../shared/css/design-system.css">
<link rel="stylesheet" href="../shared/css/components.css">
<style>
:root {
--python-blue: #3776AB;
--python-yellow: #FFD43B;
--color-primary: var(--python-blue);
--color-secondary: var(--python-yellow);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background: linear-gradient(135deg, #0a0f1e 0%, #1a1f3a 100%);
color: #e0e6ed;
line-height: 1.6;
min-height: 100vh;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
}
/* Header */
header {
text-align: center;
margin-bottom: 3rem;
padding: 2rem 0;
}
header h1 {
font-size: 3rem;
background: linear-gradient(135deg, var(--python-blue), var(--python-yellow));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
}
.subtitle {
font-size: 1.2rem;
color: #8892a6;
max-width: 700px;
margin: 0 auto;
}
.back-home {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: #8892a6;
text-decoration: none;
font-size: 0.9rem;
margin-bottom: 1.5rem;
transition: color 0.3s;
}
.back-home:hover {
color: var(--python-yellow);
text-decoration: none;
}
/* Dashboard */
.dashboard {
display: none;
}
.dashboard.active {
display: block;
}
.modules-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 2rem;
margin-bottom: 3rem;
}
.card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(55, 118, 171, 0.3);
border-radius: 16px;
padding: 2rem;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, var(--python-blue), var(--python-yellow));
transform: scaleX(0);
transition: transform 0.3s ease;
}
.card:hover::before {
transform: scaleX(1);
}
.card:hover {
transform: translateY(-8px);
border-color: var(--python-blue);
box-shadow: 0 20px 40px rgba(55, 118, 171, 0.3);
}
.card-icon {
font-size: 3rem;
margin-bottom: 1rem;
}
.card h3 {
font-size: 1.4rem;
color: var(--python-yellow);
margin-bottom: 0.5rem;
}
.card p {
color: #b3b9c5;
font-size: 0.95rem;
margin-bottom: 1rem;
}
.category-label {
display: inline-block;
padding: 0.25rem 0.75rem;
background: rgba(55, 118, 171, 0.2);
border: 1px solid var(--python-blue);
border-radius: 12px;
font-size: 0.75rem;
color: var(--python-blue);
font-weight: 600;
}
/* Module View */
.module {
display: none;
}
.module.active {
display: block;
animation: fadeIn 0.5s;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.btn-back {
background: linear-gradient(135deg, var(--python-blue), var(--python-yellow));
color: #fff;
border: none;
padding: 0.75rem 1.5rem;
border-radius: 8px;
cursor: pointer;
font-size: 1rem;
font-weight: 600;
margin-bottom: 2rem;
transition: all 0.3s;
}
.btn-back:hover {
opacity: 0.9;
transform: translateX(-4px);
}
.module header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
}
/* Tabs */
.tabs {
display: flex;
gap: 1rem;
margin: 2rem 0;
border-bottom: 2px solid rgba(255, 255, 255, 0.1);
flex-wrap: wrap;
}
.tab-btn {
background: transparent;
border: none;
color: #8892a6;
padding: 1rem 1.5rem;
cursor: pointer;
font-size: 1rem;
border-bottom: 3px solid transparent;
transition: all 0.3s;
position: relative;
}
.tab-btn.active {
color: var(--python-yellow);
border-bottom-color: var(--python-yellow);
}
.tab-btn:hover {
color: #fff;
}
/* Tab Content */
.tab {
display: none;
animation: fadeIn 0.4s;
}
.tab.active {
display: block;
}
.section {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 12px;
padding: 2rem;
margin-bottom: 2rem;
}
.section h2 {
color: var(--python-yellow);
margin-bottom: 1.5rem;
font-size: 1.8rem;
}
.section h3 {
color: var(--python-blue);
margin: 1.5rem 0 1rem;
font-size: 1.3rem;
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin: 1.5rem 0;
background: rgba(0, 0, 0, 0.2);
border-radius: 8px;
overflow: hidden;
}
th,
td {
padding: 1rem;
text-align: left;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
th {
background: rgba(55, 118, 171, 0.3);
color: var(--python-yellow);
font-weight: 600;
}
tr:hover {
background: rgba(255, 255, 255, 0.03);
}
/* Code Blocks */
.code-block {
background: #0d1117;
border: 1px solid #30363d;
border-radius: 8px;
padding: 1.5rem;
margin: 1.5rem 0;
overflow-x: auto;
font-family: 'Fira Code', 'Consolas', monospace;
line-height: 1.6;
white-space: pre-wrap;
font-size: 0.9rem;
color: #ccc;
}
/* Syntax Highlighting */
.keyword {
color: #ff7b72;
}
.string {
color: #a5d6ff;
}
.comment {
color: #8b949e;
}
.function {
color: #d2a8ff;
}
.number {
color: #79c0ff;
}
.class {
color: #ffa657;
}
.preprocessor {
color: #7ee787;
}
/* Info Boxes */
.info-box {
background: linear-gradient(135deg, rgba(55, 118, 171, 0.08), rgba(255, 212, 59, 0.08));
border-left: 4px solid var(--python-blue);
border-radius: 8px;
padding: 1.5rem;
margin: 1.5rem 0;
}
.box-title {
font-weight: 700;
color: var(--python-yellow);
margin-bottom: 0.75rem;
font-size: 1.1rem;
}
.box-content {
color: #d0d7de;
line-height: 1.7;
}
/* Interview Box */
.interview-box {
background: linear-gradient(135deg, rgba(55, 118, 171, 0.08), rgba(255, 212, 59, 0.05));
border-left: 4px solid var(--python-yellow);
border-radius: 8px;
padding: 1.5rem;
margin: 1.5rem 0;
}
.interview-box strong {
color: var(--python-yellow);
}
/* Callouts */
.callout {
border-radius: 8px;
padding: 1rem 1.5rem;
margin: 1.5rem 0;
border-left: 4px solid;
}
.callout.tip {
background: rgba(46, 204, 113, 0.08);
border-color: #2ecc71;
}
.callout.warning {
background: rgba(255, 193, 7, 0.08);
border-color: #ffc107;
}
.callout.insight {
background: rgba(55, 118, 171, 0.08);
border-color: var(--python-blue);
}
.callout-title {
font-weight: 700;
margin-bottom: 0.5rem;
}
/* Comparison */
.comparison {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
margin: 1.5rem 0;
}
.comparison-bad {
background: rgba(255, 60, 60, 0.08);
border: 1px solid rgba(255, 60, 60, 0.25);
border-radius: 8px;
padding: 1.5rem;
}
.comparison-good {
background: rgba(0, 255, 136, 0.08);
border: 1px solid rgba(0, 255, 136, 0.25);
border-radius: 8px;
padding: 1.5rem;
}
strong {
color: var(--python-yellow);
}
.hidden {
display: none;
}
@media (max-width: 768px) {
header h1 {
font-size: 2rem;
}
.comparison {
grid-template-columns: 1fr;
}
.modules-grid {
grid-template-columns: 1fr;
}
.container {
padding: 1rem;
}
}
</style>
</head>
<body>
<div class="container">
<div class="dashboard active" id="dashboard">
<a href="../index.html" class="back-home">← Back to Main Dashboard</a>
<header>
<h1>🐍 Python for Data Science & AI</h1>
<p class="subtitle">From Fundamentals to Production — NumPy · Pandas · Scikit-learn · PyTorch ·
TensorFlow · Performance Optimization</p>
</header>
<div class="modules-grid" id="modulesGrid"></div>
</div>
<div id="modulesContainer"></div>
</div>
<script src="app.js"></script>
</body>
</html>