Spaces:
Running
Running
Update index.html
Browse files- index.html +248 -502
index.html
CHANGED
|
@@ -5,558 +5,304 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
| 6 |
<title>Calculus Portfolio — Introduction to Calculus</title>
|
| 7 |
|
| 8 |
-
<!--
|
| 9 |
-
<link href="https://fonts.googleapis.com/css2?family=
|
| 10 |
|
| 11 |
<style>
|
| 12 |
:root{
|
| 13 |
-
--
|
| 14 |
-
--card:#
|
| 15 |
-
--muted:#
|
| 16 |
-
--accent:#
|
| 17 |
-
--accent-2:#
|
| 18 |
--glass: rgba(255,255,255,0.04);
|
| 19 |
-
--
|
| 20 |
-
--danger:#fb7185;
|
| 21 |
-
--radius:16px;
|
| 22 |
-
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
|
| 23 |
}
|
| 24 |
-
|
| 25 |
*{box-sizing:border-box}
|
| 26 |
-
html,body{height:100%}
|
| 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 |
-
.logo h1{
|
| 76 |
-
font-size:16px;
|
| 77 |
-
margin:0;
|
| 78 |
-
line-height:1;
|
| 79 |
-
letter-spacing:0.2px;
|
| 80 |
-
}
|
| 81 |
-
.logo p{margin:0;margin-top:4px;color:var(--muted);font-size:13px}
|
| 82 |
-
|
| 83 |
-
.meta{
|
| 84 |
-
display:flex;
|
| 85 |
-
gap:12px;
|
| 86 |
-
flex-wrap:wrap;
|
| 87 |
-
margin:18px 0 12px;
|
| 88 |
-
}
|
| 89 |
-
.chip{
|
| 90 |
-
background:var(--glass);
|
| 91 |
-
padding:8px 10px;
|
| 92 |
-
border-radius:10px;
|
| 93 |
-
font-size:13px;
|
| 94 |
-
color:var(--muted);
|
| 95 |
-
box-shadow: 0 3px 10px rgba(2,6,23,0.45);
|
| 96 |
-
}
|
| 97 |
-
|
| 98 |
-
.summary{
|
| 99 |
-
color:var(--muted);
|
| 100 |
-
font-size:14px;
|
| 101 |
-
line-height:1.55;
|
| 102 |
-
margin-bottom:14px;
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
.objectives{
|
| 106 |
-
margin-top:12px;
|
| 107 |
-
}
|
| 108 |
-
.objectives h3{font-size:13px;margin:0 0 8px;color:var(--accent)}
|
| 109 |
-
.objectives ul{margin:0;padding-left:18px;color:var(--muted);line-height:1.6;font-size:14px}
|
| 110 |
-
|
| 111 |
-
/* MAIN */
|
| 112 |
-
main{
|
| 113 |
-
background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
|
| 114 |
-
border-radius:var(--radius);
|
| 115 |
-
padding:26px;
|
| 116 |
-
min-height:520px;
|
| 117 |
-
box-shadow: 0 6px 40px rgba(2,6,23,0.6);
|
| 118 |
-
}
|
| 119 |
-
|
| 120 |
-
header.port{
|
| 121 |
-
display:flex;
|
| 122 |
-
align-items:center;
|
| 123 |
-
justify-content:space-between;
|
| 124 |
-
gap:12px;
|
| 125 |
-
margin-bottom:20px;
|
| 126 |
-
}
|
| 127 |
-
.title{
|
| 128 |
-
display:flex;
|
| 129 |
-
gap:16px;
|
| 130 |
-
align-items:center;
|
| 131 |
-
}
|
| 132 |
-
.title h2{
|
| 133 |
-
margin:0;font-size:20px;
|
| 134 |
-
}
|
| 135 |
-
.title p{margin:0;color:var(--muted);font-size:13px}
|
| 136 |
-
|
| 137 |
-
.badge{
|
| 138 |
-
background:linear-gradient(90deg,var(--accent-2),var(--accent));
|
| 139 |
-
color:#04263b;
|
| 140 |
-
padding:10px 14px;
|
| 141 |
-
border-radius:12px;
|
| 142 |
-
font-weight:700;
|
| 143 |
-
box-shadow: 0 8px 30px rgba(96,165,250,0.08);
|
| 144 |
-
}
|
| 145 |
-
|
| 146 |
-
/* Sections */
|
| 147 |
-
section.block{
|
| 148 |
-
margin-bottom:20px;
|
| 149 |
-
padding:16px;
|
| 150 |
-
background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.015));
|
| 151 |
-
border-radius:12px;
|
| 152 |
-
}
|
| 153 |
-
.block h3{margin:0 0 10px;font-size:16px}
|
| 154 |
-
.block p{margin:0;color:var(--muted);line-height:1.6}
|
| 155 |
-
|
| 156 |
-
.outline-grid{
|
| 157 |
-
display:grid;
|
| 158 |
-
grid-template-columns:repeat(2,1fr);
|
| 159 |
-
gap:12px;
|
| 160 |
-
margin-top:10px;
|
| 161 |
-
}
|
| 162 |
-
.outline-item{
|
| 163 |
-
background:rgba(255,255,255,0.02);
|
| 164 |
-
padding:12px;border-radius:10px;
|
| 165 |
-
border:1px solid rgba(255,255,255,0.02);
|
| 166 |
-
color:var(--muted);
|
| 167 |
-
font-size:14px;
|
| 168 |
-
}
|
| 169 |
-
.outline-item strong{display:block;color:#e6eef8;margin-bottom:6px}
|
| 170 |
-
|
| 171 |
-
/* Accordion */
|
| 172 |
-
.accordion{
|
| 173 |
-
margin-top:10px;
|
| 174 |
-
}
|
| 175 |
-
.acco-item{
|
| 176 |
-
border-radius:10px;
|
| 177 |
-
overflow:hidden;
|
| 178 |
-
margin-bottom:8px;
|
| 179 |
-
border:1px solid rgba(255,255,255,0.03);
|
| 180 |
}
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
.acco-body{
|
| 187 |
-
padding:12px 14px 16px;
|
| 188 |
-
color:var(--muted);
|
| 189 |
-
font-size:14px;
|
| 190 |
-
display:none;
|
| 191 |
-
line-height:1.6;
|
| 192 |
-
border-top:1px solid rgba(255,255,255,0.02);
|
| 193 |
-
}
|
| 194 |
-
|
| 195 |
-
/* Interactive demo */
|
| 196 |
-
.demo{
|
| 197 |
-
display:grid;
|
| 198 |
-
grid-template-columns: 1fr 260px;
|
| 199 |
-
gap:16px;
|
| 200 |
-
align-items:center;
|
| 201 |
-
margin-top:12px;
|
| 202 |
-
}
|
| 203 |
-
.graph{
|
| 204 |
-
background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.015));
|
| 205 |
-
border-radius:12px;padding:14px;
|
| 206 |
-
min-height:260px;
|
| 207 |
-
}
|
| 208 |
-
|
| 209 |
-
.controls{
|
| 210 |
-
padding:14px;border-radius:12px;background:rgba(255,255,255,0.02);
|
| 211 |
}
|
| 212 |
-
.controls label{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}
|
| 213 |
-
.controls input[type="range"]{width:100%}
|
| 214 |
-
.controls .val{font-weight:700;color:#e6eef8;margin-top:8px}
|
| 215 |
-
|
| 216 |
-
footer.note{
|
| 217 |
-
display:flex;justify-content:space-between;align-items:center;
|
| 218 |
-
gap:10px;margin-top:16px;color:var(--muted);font-size:13px;
|
| 219 |
-
}
|
| 220 |
-
|
| 221 |
-
/* small screens */
|
| 222 |
-
@media (max-width:980px){
|
| 223 |
-
.wrap{grid-template-columns:1fr; padding:0 12px}
|
| 224 |
-
aside{position:relative;top:0}
|
| 225 |
-
.demo{grid-template-columns:1fr}
|
| 226 |
-
}
|
| 227 |
-
|
| 228 |
-
/* small decorative details */
|
| 229 |
-
.sparkle{
|
| 230 |
-
width:100%;height:6px;margin-bottom:12px;
|
| 231 |
-
background: linear-gradient(90deg, rgba(125,211,252,0.06), rgba(96,165,250,0.06));
|
| 232 |
-
border-radius:6px;
|
| 233 |
-
}
|
| 234 |
-
|
| 235 |
-
.cta{
|
| 236 |
-
display:inline-flex;gap:10px;align-items:center;padding:10px 14px;border-radius:12px;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#04263b;font-weight:700;border:none;cursor:pointer;
|
| 237 |
-
}
|
| 238 |
-
|
| 239 |
-
/* tiny legend dots */
|
| 240 |
-
.legend{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:13px}
|
| 241 |
-
.dot{width:10px;height:10px;border-radius:50%}
|
| 242 |
-
.dot.sec{background:rgba(125,211,252,0.9)}
|
| 243 |
-
.dot.tan{background:rgba(96,165,250,0.9)}
|
| 244 |
</style>
|
| 245 |
</head>
|
| 246 |
<body>
|
| 247 |
-
<div class="
|
| 248 |
-
<
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
<div class="mark">∫d</div>
|
| 252 |
<div>
|
| 253 |
<h1>Calculus Portfolio</h1>
|
| 254 |
-
<
|
| 255 |
</div>
|
| 256 |
</div>
|
| 257 |
|
| 258 |
-
<div class="
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
<
|
| 262 |
-
<
|
| 263 |
-
<div class="chip">Format: Theory + Demo</div>
|
| 264 |
-
</div>
|
| 265 |
-
|
| 266 |
-
<p class="summary">
|
| 267 |
-
Calculus studies continuous change. This portfolio summarizes the course objectives, outline, key concepts (limits, derivatives, integrals), and includes a tiny interactive demo illustrating how a secant slope approaches a derivative (tangent slope).
|
| 268 |
-
</p>
|
| 269 |
-
|
| 270 |
-
<div class="objectives" aria-labelledby="obj">
|
| 271 |
-
<h3 id="obj">Course Objectives</h3>
|
| 272 |
-
<ul>
|
| 273 |
-
<li>Understand limits, derivatives & integrals</li>
|
| 274 |
-
<li>Apply techniques to physics, engineering & economics</li>
|
| 275 |
-
<li>Analyze & model real-world functions</li>
|
| 276 |
-
<li>Use derivatives to find maxima/minima</li>
|
| 277 |
-
</ul>
|
| 278 |
</div>
|
|
|
|
| 279 |
|
| 280 |
-
|
| 281 |
-
<button class="cta" id="downloadBtn" title="Save as PDF (print)">
|
| 282 |
-
📄 Save / Print
|
| 283 |
-
</button>
|
| 284 |
-
</div>
|
| 285 |
|
| 286 |
-
<
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
|
|
|
|
|
|
| 290 |
|
| 291 |
-
<!-- MAIN -->
|
| 292 |
-
<main>
|
| 293 |
-
<header class="port">
|
| 294 |
-
<div class="title">
|
| 295 |
<div>
|
| 296 |
-
<h2>
|
| 297 |
-
<p>
|
| 298 |
</div>
|
| 299 |
</div>
|
| 300 |
|
| 301 |
-
<div class="
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
<
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
<strong>Integral Calculus</strong>
|
| 314 |
-
Indefinite/Definite Integrals • Techniques • Area & accumulation problems
|
| 315 |
</div>
|
| 316 |
-
<div class="outline-item" role="listitem">
|
| 317 |
-
<strong>Foundations</strong>
|
| 318 |
-
Limits, continuity, algebra of functions
|
| 319 |
-
</div>
|
| 320 |
-
<div class="outline-item" role="listitem">
|
| 321 |
-
<strong>Applications</strong>
|
| 322 |
-
Physics (velocity/acceleration), engineering, economics & area computations
|
| 323 |
-
</div>
|
| 324 |
-
</div>
|
| 325 |
-
</section>
|
| 326 |
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
<div class="accordion" id="accordion">
|
| 335 |
-
<div class="acco-item">
|
| 336 |
-
<button class="acco-head" data-target="a1"><h4>Differential Calculus</h4><span>▸</span></button>
|
| 337 |
-
<div class="acco-body" id="a1">
|
| 338 |
-
Differential calculus studies rates of change (derivatives). The derivative f'(x) = dy/dx measures how the function y = f(x) changes as x changes. It arises from the limit of a quotient: the slope of the secant line approaches the slope of the tangent line.
|
| 339 |
-
</div>
|
| 340 |
-
</div>
|
| 341 |
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 346 |
</div>
|
| 347 |
-
</div>
|
| 348 |
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
</div>
|
| 354 |
</div>
|
| 355 |
</div>
|
| 356 |
</section>
|
| 357 |
|
| 358 |
-
<!--
|
| 359 |
-
<section class="
|
| 360 |
-
<
|
| 361 |
-
|
|
|
|
| 362 |
|
| 363 |
-
<div
|
| 364 |
-
<div class="
|
| 365 |
-
<
|
| 366 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
</div>
|
| 368 |
|
| 369 |
-
<
|
| 370 |
-
<
|
| 371 |
-
<
|
| 372 |
-
<div
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
<div class="val" style="margin-top:12px">
|
| 378 |
-
Secant slope: <strong id="secSlope">2.6</strong>
|
| 379 |
-
</div>
|
| 380 |
-
<div class="val" style="margin-top:6px">
|
| 381 |
-
Tangent (derivative) at x: <strong id="tanSlope">2</strong>
|
| 382 |
-
</div>
|
| 383 |
|
| 384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 385 |
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 391 |
</div>
|
| 392 |
-
</div>
|
| 393 |
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
</section>
|
| 399 |
|
| 400 |
-
<!--
|
| 401 |
-
<section class="
|
| 402 |
-
<
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
<strong>Indefinite Integral:</strong> ∫ f(x) dx = F(x) + C<br>
|
| 406 |
-
<strong>Definite Integral:</strong> ∫ₐᵇ f(x) dx = F(b) - F(a)
|
| 407 |
-
</p>
|
| 408 |
|
| 409 |
-
<div style="
|
| 410 |
-
<div class="
|
| 411 |
-
|
| 412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
</div>
|
| 414 |
-
</section>
|
| 415 |
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
<
|
| 421 |
</div>
|
| 422 |
</section>
|
| 423 |
-
</main>
|
| 424 |
-
</div>
|
| 425 |
|
| 426 |
-
|
| 427 |
-
/* ---------- Accordion ---------- */
|
| 428 |
-
document.querySelectorAll('.acco-head').forEach(btn=>{
|
| 429 |
-
btn.addEventListener('click', ()=>{
|
| 430 |
-
const target = btn.getAttribute('data-target');
|
| 431 |
-
const body = document.getElementById(target);
|
| 432 |
-
const open = body.style.display === 'block';
|
| 433 |
-
// close all
|
| 434 |
-
document.querySelectorAll('.acco-body').forEach(b=>b.style.display='none');
|
| 435 |
-
// rotate arrows
|
| 436 |
-
document.querySelectorAll('.acco-head span').forEach(s=>s.textContent='▸');
|
| 437 |
-
if(!open){
|
| 438 |
-
body.style.display='block';
|
| 439 |
-
btn.querySelector('span').textContent='▾';
|
| 440 |
-
}
|
| 441 |
-
});
|
| 442 |
-
});
|
| 443 |
|
| 444 |
-
|
| 445 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 446 |
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
|
|
|
|
|
|
| 451 |
|
| 452 |
-
|
| 453 |
-
const
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 467 |
});
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
// coordinate mapping (x from -1 to 3, y from -1 to 9)
|
| 476 |
-
const xMin = -1, xMax = 3, yMin = -1, yMax = 9;
|
| 477 |
-
const mapX = x => ( (x - xMin) / (xMax - xMin) ) * (w-60) + 40;
|
| 478 |
-
const mapY = y => h - ( (y - yMin) / (yMax - yMin) ) * (h-40) - 20;
|
| 479 |
-
|
| 480 |
-
// draw axes + grid
|
| 481 |
-
function drawAxes(){
|
| 482 |
-
svg.innerHTML = '';
|
| 483 |
-
const ns = 'http://www.w3.org/2000/svg';
|
| 484 |
-
|
| 485 |
-
// grid lines
|
| 486 |
-
for(let gx = Math.ceil(xMin); gx<=Math.floor(xMax); gx++){
|
| 487 |
-
const xPos = mapX(gx);
|
| 488 |
-
const line = document.createElementNS(ns,'line');
|
| 489 |
-
line.setAttribute('x1',xPos); line.setAttribute('x2',xPos);
|
| 490 |
-
line.setAttribute('y1',20); line.setAttribute('y2',h-20);
|
| 491 |
-
line.setAttribute('stroke','rgba(255,255,255,0.02)');
|
| 492 |
-
line.setAttribute('stroke-width','1');
|
| 493 |
-
svg.appendChild(line);
|
| 494 |
-
|
| 495 |
-
const txt = document.createElementNS(ns,'text');
|
| 496 |
-
txt.setAttribute('x', xPos);
|
| 497 |
-
txt.setAttribute('y', h-6);
|
| 498 |
-
txt.setAttribute('fill','rgba(230,238,248,0.45)');
|
| 499 |
-
txt.setAttribute('font-size','10');
|
| 500 |
-
txt.setAttribute('text-anchor','middle');
|
| 501 |
-
txt.textContent = gx;
|
| 502 |
-
svg.appendChild(txt);
|
| 503 |
-
}
|
| 504 |
-
|
| 505 |
-
for(let gy = 0; gy<=8; gy+=1){
|
| 506 |
-
const yPos = mapY(gy);
|
| 507 |
-
const line = document.createElementNS(ns,'line');
|
| 508 |
-
line.setAttribute('y1',yPos); line.setAttribute('y2',yPos);
|
| 509 |
-
line.setAttribute('x1',40); line.setAttribute('x2',w-20);
|
| 510 |
-
line.setAttribute('stroke','rgba(255,255,255,0.02)');
|
| 511 |
-
line.setAttribute('stroke-width','1');
|
| 512 |
-
svg.appendChild(line);
|
| 513 |
-
}
|
| 514 |
-
|
| 515 |
-
// axes
|
| 516 |
-
const axisX = document.createElementNS(ns,'line');
|
| 517 |
-
axisX.setAttribute('x1',mapX(xMin)); axisX.setAttribute('x2',mapX(xMax));
|
| 518 |
-
axisX.setAttribute('y1', mapY(0)); axisX.setAttribute('y2', mapY(0));
|
| 519 |
-
axisX.setAttribute('stroke','rgba(230,238,248,0.12)');
|
| 520 |
-
axisX.setAttribute('stroke-width','1.5');
|
| 521 |
-
svg.appendChild(axisX);
|
| 522 |
-
|
| 523 |
-
const axisY = document.createElementNS(ns,'line');
|
| 524 |
-
axisY.setAttribute('x1',mapX(0)); axisY.setAttribute('x2',mapX(0));
|
| 525 |
-
axisY.setAttribute('y1', mapY(yMin)); axisY.setAttribute('y2', mapY(yMax));
|
| 526 |
-
axisY.setAttribute('stroke','rgba(230,238,248,0.12)');
|
| 527 |
-
axisY.setAttribute('stroke-width','1.5');
|
| 528 |
-
svg.appendChild(axisY);
|
| 529 |
-
}
|
| 530 |
-
|
| 531 |
-
function plotFunction(){
|
| 532 |
-
const ns = 'http://www.w3.org/2000/svg';
|
| 533 |
-
const path = document.createElementNS(ns,'path');
|
| 534 |
-
let d = '';
|
| 535 |
-
const steps = 200;
|
| 536 |
-
for(let i=0;i<=steps;i++){
|
| 537 |
-
const t = i/steps;
|
| 538 |
-
const x = xMin + t*(xMax - xMin);
|
| 539 |
-
const y = x*x; // f(x)=x^2
|
| 540 |
-
const px = mapX(x), py = mapY(y);
|
| 541 |
-
d += (i===0? 'M':'L') + px + ' ' + py + ' ';
|
| 542 |
-
}
|
| 543 |
-
path.setAttribute('d', d);
|
| 544 |
-
path.setAttribute('stroke','rgba(125,211,252,0.95)');
|
| 545 |
-
path.setAttribute('stroke-width','2.2');
|
| 546 |
-
path.setAttribute('fill','none');
|
| 547 |
-
svg.appendChild(path);
|
| 548 |
-
}
|
| 549 |
-
|
| 550 |
-
function drawPoints(x, h){
|
| 551 |
-
const ns = 'http://www.w3.org/2000/svg';
|
| 552 |
-
const x1 = x;
|
| 553 |
-
const x2 = x + h;
|
| 554 |
-
const y1 = x1*x1;
|
| 555 |
-
const y2 = x2*x2;
|
| 556 |
-
|
| 557 |
-
const p1x = mapX(x1), p1y = mapY(y1);
|
| 558 |
-
const p2x = mapX(x2), p2y = mapY(y2);
|
| 559 |
-
|
| 560 |
-
// points
|
| 561 |
-
const c1 = document.createElementNS(ns,'circle');
|
| 562 |
-
c1.setAttribute('cx',p1x); c1.setAttribute('cy',p1y); c1.setAttribute.
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
| 6 |
<title>Calculus Portfolio — Introduction to Calculus</title>
|
| 7 |
|
| 8 |
+
<!-- fonts -->
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600;700&family=Montserrat:ital,wght@0,300;0,600;1,700&display=swap" rel="stylesheet">
|
| 10 |
|
| 11 |
<style>
|
| 12 |
:root{
|
| 13 |
+
--bg1:#0b1320;
|
| 14 |
+
--card:#0f1724;
|
| 15 |
+
--muted: #cbd5e1;
|
| 16 |
+
--accent:#60a5fa;
|
| 17 |
+
--accent-2:#7dd3fc;
|
| 18 |
--glass: rgba(255,255,255,0.04);
|
| 19 |
+
--radius:14px;
|
|
|
|
|
|
|
|
|
|
| 20 |
}
|
|
|
|
| 21 |
*{box-sizing:border-box}
|
| 22 |
+
html,body{height:100%;margin:0;font-family:"Quicksand",system-ui,Segoe UI,Roboto,"Helvetica Neue",Arial;color:#fff;background:linear-gradient(180deg,#071027 0%, #081827 100%)}
|
| 23 |
+
a{color:inherit}
|
| 24 |
+
.site{max-width:1100px;margin:0 auto;padding:20px}
|
| 25 |
+
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
|
| 26 |
+
.brand{display:flex;gap:12px;align-items:center}
|
| 27 |
+
.logo{width:56px;height:56px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--accent-2),var(--accent));color:#04263b;font-weight:800;font-size:18px;box-shadow:0 8px 24px rgba(96,165,250,0.12)}
|
| 28 |
+
.brand h1{margin:0;font-size:18px;font-weight:700;letter-spacing:0.6px}
|
| 29 |
+
.nav{display:flex;gap:10px;align-items:center}
|
| 30 |
+
.nav button{background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted);padding:8px 12px;border-radius:10px;cursor:pointer}
|
| 31 |
+
|
| 32 |
+
.pages{position:relative;margin-top:8px;border-radius:18px;overflow:hidden;box-shadow: 0 8px 40px rgba(2,6,23,0.6)}
|
| 33 |
+
.page{min-height:70vh;padding:28px;display:none;background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01))}
|
| 34 |
+
.page.active{display:block}
|
| 35 |
+
|
| 36 |
+
.hero{display:grid;grid-template-columns:1fr;gap:18px;align-items:center}
|
| 37 |
+
.hero-media{height:44vh;border-radius:12px;overflow:hidden;position:relative;background:#000}
|
| 38 |
+
.hero img{width:100%;height:100%;object-fit:cover;display:block;filter:contrast(1.03) saturate(1.05)}
|
| 39 |
+
.hero h2{font-family:"Montserrat",sans-serif;font-size:44px;margin:0;line-height:1;letter-spacing:2px;text-transform:uppercase;text-shadow:0 6px 24px rgba(2,6,23,0.6)}
|
| 40 |
+
.hero p{color:var(--muted);margin:8px 0 0;font-size:15px;max-width:68%}
|
| 41 |
+
|
| 42 |
+
.cols{display:grid;grid-template-columns:1fr 380px;gap:22px;margin-top:20px}
|
| 43 |
+
.card{background:rgba(255,255,255,0.02);padding:18px;border-radius:12px;border:1px solid rgba(255,255,255,0.03)}
|
| 44 |
+
.card h3{margin:0 0 8px;font-size:18px}
|
| 45 |
+
.muted{color:var(--muted);line-height:1.65;font-size:15px}
|
| 46 |
+
|
| 47 |
+
ul.simple{padding-left:18px;color:var(--muted)}
|
| 48 |
+
ul.simple li{margin:8px 0}
|
| 49 |
+
|
| 50 |
+
.big-title{height:220px;border-radius:12px;padding:22px;display:flex;align-items:flex-end;background-size:cover;background-position:center;color:#04263b;font-weight:800;background-blend-mode:multiply;box-shadow:inset 0 -60px 120px rgba(0,0,0,0.18)}
|
| 51 |
+
.big-title h2{font-family:"Montserrat",sans-serif;font-size:42px;margin:0;color:#fff;text-transform:uppercase;text-shadow:0 4px 14px rgba(0,0,0,0.45)}
|
| 52 |
+
|
| 53 |
+
.student-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
|
| 54 |
+
.student{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));padding:18px;border-radius:10px;border:1px solid rgba(255,255,255,0.03)}
|
| 55 |
+
.student h4{margin:0 0 6px;font-size:16px}
|
| 56 |
+
.kv{color:var(--muted);line-height:1.6;font-weight:600}
|
| 57 |
+
|
| 58 |
+
.pager{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding:12px 6px}
|
| 59 |
+
.dots{display:flex;gap:8px;align-items:center}
|
| 60 |
+
.dot{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,0.12);cursor:pointer}
|
| 61 |
+
.dot.active{background:linear-gradient(90deg,var(--accent-2),var(--accent))}
|
| 62 |
+
.btn{background:linear-gradient(90deg,var(--accent-2),var(--accent));color:#04263b;border:none;padding:10px 14px;border-radius:12px;font-weight:700;cursor:pointer}
|
| 63 |
+
|
| 64 |
+
@media (max-width:900px){
|
| 65 |
+
.cols{grid-template-columns:1fr}
|
| 66 |
+
.hero p{max-width:100%}
|
| 67 |
+
.hero h2{font-size:36px}
|
| 68 |
+
.big-title{height:180px}
|
| 69 |
+
.student-grid{grid-template-columns:1fr}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
}
|
| 71 |
+
@media (max-width:480px){
|
| 72 |
+
.topbar{flex-direction:column;align-items:flex-start;gap:10px}
|
| 73 |
+
.nav{width:100%;justify-content:space-between}
|
| 74 |
+
.hero h2{font-size:30px}
|
| 75 |
+
.page{padding:18px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
</style>
|
| 78 |
</head>
|
| 79 |
<body>
|
| 80 |
+
<div class="site" role="main">
|
| 81 |
+
<div class="topbar" aria-hidden="false">
|
| 82 |
+
<div class="brand">
|
| 83 |
+
<div class="logo">∫d</div>
|
|
|
|
| 84 |
<div>
|
| 85 |
<h1>Calculus Portfolio</h1>
|
| 86 |
+
<div style="font-size:12px;color:var(--muted)">Introduction to Calculus — Differential & Integral</div>
|
| 87 |
</div>
|
| 88 |
</div>
|
| 89 |
|
| 90 |
+
<div class="nav" role="navigation" aria-label="Pages">
|
| 91 |
+
<button onclick="goTo(0)">Overview</button>
|
| 92 |
+
<button onclick="goTo(1)">Differential</button>
|
| 93 |
+
<button onclick="goTo(2)">Integral</button>
|
| 94 |
+
<button onclick="goTo(3)">Summary</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
</div>
|
| 96 |
+
</div>
|
| 97 |
|
| 98 |
+
<div class="pages" id="pages">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
+
<!-- PAGE 1: Overview -->
|
| 101 |
+
<section class="page active" id="page-0" aria-labelledby="p0t">
|
| 102 |
+
<div class="hero">
|
| 103 |
+
<div class="hero-media" aria-hidden="false">
|
| 104 |
+
<img src="./ca1.jpg" alt="Functions and Graphs" />
|
| 105 |
+
</div>
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
<div>
|
| 108 |
+
<h2 id="p0t">Course Overview</h2>
|
| 109 |
+
<p class="muted">Calculus is the branch of mathematics that studies continuous change. This course covers limits, derivatives, integrals and tools to model and analyze real-world phenomena in physics, engineering and economics.</p>
|
| 110 |
</div>
|
| 111 |
</div>
|
| 112 |
|
| 113 |
+
<div class="cols" style="margin-top:18px">
|
| 114 |
+
<div class="card">
|
| 115 |
+
<h3>Course Objectives</h3>
|
| 116 |
+
<ul class="simple">
|
| 117 |
+
<li>Understand limits, derivatives and integrals</li>
|
| 118 |
+
<li>Apply calculus techniques to physics, engineering & economics</li>
|
| 119 |
+
<li>Analyze and model functions</li>
|
| 120 |
+
<li>Use derivatives to find extrema and model change</li>
|
| 121 |
+
</ul>
|
| 122 |
+
|
| 123 |
+
<h3 style="margin-top:12px">Meaning & Definition</h3>
|
| 124 |
+
<p class="muted">Calculus — developed by Newton and Leibniz — is the study of rates of change and accumulation. Differential calculus studies derivatives (rates), while integral calculus deals with accumulation (areas, totals).</p>
|
|
|
|
|
|
|
| 125 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
+
<aside class="card">
|
| 128 |
+
<h3>Quick facts</h3>
|
| 129 |
+
<p class="muted"><strong>Duration:</strong> 10–12 weeks<br><strong>Format:</strong> Theory + Visuals + Examples<br><strong>Prereqs:</strong> Functions, algebra, exponents</p>
|
| 130 |
+
<div style="height:12px"></div>
|
| 131 |
+
<button class="btn" onclick="window.print()">Save / Print</button>
|
| 132 |
+
</aside>
|
| 133 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
+
<!-- Student details block added/updated -->
|
| 136 |
+
<div style="margin-top:18px" class="card">
|
| 137 |
+
<h3>Student Details</h3>
|
| 138 |
+
<div class="student-grid" role="list">
|
| 139 |
+
<div class="student" role="listitem" aria-label="Student Siddarth">
|
| 140 |
+
<h4>Student 1</h4>
|
| 141 |
+
<div class="kv">Name: <span style="color:#fff;margin-left:6px;font-weight:700">Srushti G Joshi</span></div>
|
| 142 |
+
<div class="kv">Division: <span style="color:#fff;margin-left:6px;font-weight:700">S</span></div>
|
| 143 |
+
<div class="kv">Roll No: <span style="color:#fff;margin-left:6px;font-weight:700">1913</span></div>
|
| 144 |
+
<div class="kv">USN: <span style="color:#fff;margin-left:6px;font-weight:700">01FE24BAR014</span></div>
|
| 145 |
+
<div style="height:8px"></div>
|
| 146 |
+
<div class="muted">KLE Technological University</div>
|
| 147 |
</div>
|
|
|
|
| 148 |
|
| 149 |
+
<div class="student" role="listitem" aria-label="Student Rani">
|
| 150 |
+
<h4>Student 2</h4>
|
| 151 |
+
<div class="kv">Name: <span style="color:#fff;margin-left:6px;font-weight:700">Rani N B G</span></div>
|
| 152 |
+
<div class="kv">Division: <span style="color:#fff;margin-left:6px;font-weight:700">G</span></div>
|
| 153 |
+
<div class="kv">Roll No: <span style="color:#fff;margin-left:6px;font-weight:700">741</span></div>
|
| 154 |
+
<div class="kv">USN: <span style="color:#fff;margin-left:6px;font-weight:700">01FE25BCS465</span></div>
|
| 155 |
+
<div style="height:8px"></div>
|
| 156 |
+
<div class="muted">KLE Technological University</div>
|
| 157 |
</div>
|
| 158 |
</div>
|
| 159 |
</div>
|
| 160 |
</section>
|
| 161 |
|
| 162 |
+
<!-- PAGE 2: Differential Calculus -->
|
| 163 |
+
<section class="page" id="page-1" aria-labelledby="p1t">
|
| 164 |
+
<div class="big-title" style="background-image:url('./ca2.jpg');">
|
| 165 |
+
<h2 id="p1t">Limits & Derivatives</h2>
|
| 166 |
+
</div>
|
| 167 |
|
| 168 |
+
<div style="display:grid;grid-template-columns:1fr 340px;gap:18px;margin-top:18px">
|
| 169 |
+
<div class="card">
|
| 170 |
+
<h3>What is Differential Calculus?</h3>
|
| 171 |
+
<p class="muted">Differential calculus focuses on rates of change and slopes. The derivative f'(x) = dy/dx measures how y changes with x. It is defined via limits: f'(x) = limₕ→0 (f(x+h) - f(x))/h. Derivatives let us find instantaneous velocity, slopes of tangents, and optimize functions (maxima/minima).</p>
|
| 172 |
+
|
| 173 |
+
<h3 style="margin-top:12px">Key Concepts</h3>
|
| 174 |
+
<ul class="simple">
|
| 175 |
+
<li>Limits and continuity — foundation of derivatives</li>
|
| 176 |
+
<li>Definition of derivative (difference quotient)</li>
|
| 177 |
+
<li>Rules: power, product, quotient, chain</li>
|
| 178 |
+
<li>Applications: tangent lines, velocity, optimization</li>
|
| 179 |
+
</ul>
|
| 180 |
</div>
|
| 181 |
|
| 182 |
+
<aside class="card">
|
| 183 |
+
<h3>Visual</h3>
|
| 184 |
+
<img src="./ca3.jpg" alt="Derivative visual" style="width:100%;border-radius:10px;display:block;margin-bottom:10px" />
|
| 185 |
+
<div class="muted"><strong>Derivative at x:</strong> f'(x) gives the slope of the tangent. Example: if f(x)=x², f'(x)=2x.</div>
|
| 186 |
+
</aside>
|
| 187 |
+
</div>
|
| 188 |
+
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
|
| 190 |
+
<!-- PAGE 3: Integral Calculus -->
|
| 191 |
+
<section class="page" id="page-2" aria-labelledby="p2t">
|
| 192 |
+
<div class="big-title" style="background-image:url('./ca4.jpg');">
|
| 193 |
+
<h2 id="p2t">Integral Calculus</h2>
|
| 194 |
+
</div>
|
| 195 |
|
| 196 |
+
<div class="cols" style="margin-top:18px">
|
| 197 |
+
<div class="card">
|
| 198 |
+
<h3>What is Integral Calculus?</h3>
|
| 199 |
+
<p class="muted">Integration accumulates small pieces to form a whole. It's the inverse operation of differentiation. Integrals are used to compute areas under curves, accumulated quantities, and to reconstruct a function from its derivative.</p>
|
| 200 |
+
|
| 201 |
+
<h3 style="margin-top:10px">Types of Integrals</h3>
|
| 202 |
+
<ul class="simple">
|
| 203 |
+
<li><strong>Indefinite integral:</strong> ∫ f(x) dx = F(x) + C (no limits)</li>
|
| 204 |
+
<li><strong>Definite integral:</strong> ∫ₐᵇ f(x) dx = F(b) − F(a) (area/accumulation)</li>
|
| 205 |
+
<li>Techniques: substitution, integration by parts, partial fractions</li>
|
| 206 |
+
</ul>
|
| 207 |
</div>
|
|
|
|
| 208 |
|
| 209 |
+
<aside class="card">
|
| 210 |
+
<h3>Uses</h3>
|
| 211 |
+
<p class="muted">Compute areas, total distance from velocity, work done by a force, probability (area under density curves), and many engineering applications.</p>
|
| 212 |
+
<div style="height:10px"></div>
|
| 213 |
+
<strong>Formula</strong>
|
| 214 |
+
<p class="muted" style="margin-top:6px">Definite: ∫ₐᵇ f(x) dx = F(b) − F(a) <br> Indefinite: ∫ f(x) dx = F(x) + C</p>
|
| 215 |
+
</aside>
|
| 216 |
+
</div>
|
| 217 |
</section>
|
| 218 |
|
| 219 |
+
<!-- PAGE 4: Summary & Course Outline -->
|
| 220 |
+
<section class="page" id="page-3" aria-labelledby="p3t">
|
| 221 |
+
<div style="padding:8px 0">
|
| 222 |
+
<h2 id="p3t" style="margin:0;font-family:'Montserrat',sans-serif;font-size:28px">Course Outline & Notes</h2>
|
| 223 |
+
</div>
|
|
|
|
|
|
|
|
|
|
| 224 |
|
| 225 |
+
<div class="cols" style="margin-top:12px">
|
| 226 |
+
<div class="card">
|
| 227 |
+
<h3>Course Outline</h3>
|
| 228 |
+
<ul class="simple">
|
| 229 |
+
<li><strong>Differential calculus:</strong> Limits, derivatives, applications of derivatives (optimization, motion)</li>
|
| 230 |
+
<li><strong>Integral calculus:</strong> Indefinite & definite integrals, techniques of integration, applications</li>
|
| 231 |
+
<li>Foundations: continuity, functions, algebra of limits</li>
|
| 232 |
+
<li>Applications across physics, engineering, and economics</li>
|
| 233 |
+
</ul>
|
| 234 |
+
|
| 235 |
+
<h3 style="margin-top:12px">Meaning & History</h3>
|
| 236 |
+
<p class="muted">Calculus—developed independently by Newton and Leibniz—studies the properties of derivatives and integrals and enables mathematical modelling of changing systems.</p>
|
| 237 |
+
|
| 238 |
+
<h3 style="margin-top:12px">Differentiation vs Integration</h3>
|
| 239 |
+
<p class="muted">Differentiation: splitting changes into infinitesimal parts to find rates. Integration: summing infinitesimal parts to recreate totals (areas, accumulations).</p>
|
| 240 |
+
</div>
|
| 241 |
+
|
| 242 |
+
<aside class="card">
|
| 243 |
+
<h3>Study Tips</h3>
|
| 244 |
+
<ul class="simple">
|
| 245 |
+
<li>Master limits and algebraic manipulation first</li>
|
| 246 |
+
<li>Practice derivative rules until they are automatic</li>
|
| 247 |
+
<li>Work many integration problems using different techniques</li>
|
| 248 |
+
<li>Visualize functions with graphs (GeoGebra is great)</li>
|
| 249 |
+
</ul>
|
| 250 |
+
|
| 251 |
+
<div style="height:12px"></div>
|
| 252 |
+
<button class="btn" onclick="goTo(0)">Back to Overview</button>
|
| 253 |
+
</aside>
|
| 254 |
</div>
|
|
|
|
| 255 |
|
| 256 |
+
<div style="margin-top:18px" class="card">
|
| 257 |
+
<h3>Short Reference</h3>
|
| 258 |
+
<p class="muted"><strong>Derivative:</strong> f'(x)=limₕ→0 (f(x+h)-f(x))/h<br>
|
| 259 |
+
<strong>Indefinite Integral:</strong> ∫ f(x) dx = F(x) + C<br>
|
| 260 |
+
<strong>Definite Integral:</strong> ∫ₐᵇ f(x) dx = F(b) - F(a)</p>
|
| 261 |
</div>
|
| 262 |
</section>
|
|
|
|
|
|
|
| 263 |
|
| 264 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
|
| 266 |
+
<div class="pager" aria-hidden="false">
|
| 267 |
+
<div class="dots" id="dots">
|
| 268 |
+
<div class="dot active" onclick="goTo(0)" aria-label="Overview page"></div>
|
| 269 |
+
<div class="dot" onclick="goTo(1)" aria-label="Differential page"></div>
|
| 270 |
+
<div class="dot" onclick="goTo(2)" aria-label="Integral page"></div>
|
| 271 |
+
<div class="dot" onclick="goTo(3)" aria-label="Summary page"></div>
|
| 272 |
+
</div>
|
| 273 |
|
| 274 |
+
<div style="display:flex;gap:10px;align-items:center">
|
| 275 |
+
<button class="btn" onclick="prev()">Prev</button>
|
| 276 |
+
<button class="btn" onclick="next()">Next</button>
|
| 277 |
+
</div>
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
|
| 281 |
+
<script>
|
| 282 |
+
const pages = Array.from(document.querySelectorAll('.page'));
|
| 283 |
+
const dots = Array.from(document.querySelectorAll('.dot'));
|
| 284 |
+
let idx = 0;
|
| 285 |
+
function show(i){
|
| 286 |
+
pages.forEach((p,pi)=> p.classList.toggle('active', pi===i));
|
| 287 |
+
dots.forEach((d,di)=> d.classList.toggle('active', di===i));
|
| 288 |
+
idx = i;
|
| 289 |
+
document.querySelector('.site').scrollIntoView({behavior:'smooth'});
|
| 290 |
+
}
|
| 291 |
+
function goTo(i){
|
| 292 |
+
if(i<0) i = 0;
|
| 293 |
+
if(i>pages.length-1) i = pages.length-1;
|
| 294 |
+
show(i);
|
| 295 |
+
}
|
| 296 |
+
function next(){ goTo(idx+1) }
|
| 297 |
+
function prev(){ goTo(idx-1) }
|
| 298 |
+
document.addEventListener('keydown', (e)=>{
|
| 299 |
+
if(e.key === 'ArrowRight') next();
|
| 300 |
+
if(e.key === 'ArrowLeft') prev();
|
| 301 |
});
|
| 302 |
+
document.querySelectorAll('img').forEach(img=>{
|
| 303 |
+
img.onerror = () => { img.style.display='none' }
|
| 304 |
+
});
|
| 305 |
+
show(0);
|
| 306 |
+
</script>
|
| 307 |
+
</body>
|
| 308 |
+
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|