├── .gitattributes ├── .github └── workflows │ └── static.yml ├── README.md ├── account.html ├── assets ├── css │ └── style.css ├── images │ ├── app-store.png │ ├── buy-1.jpg │ ├── buy-2.jpg │ ├── buy-3.jpg │ ├── cart.png │ ├── category-1.jpg │ ├── category-2.jpg │ ├── category-3.jpg │ ├── exclusive.png │ ├── gallery-1.jpg │ ├── gallery-2.jpg │ ├── gallery-3.jpg │ ├── gallery-4.jpg │ ├── image1.png │ ├── img-credit.txt │ ├── logo-coca-cola.png │ ├── logo-godrej.png │ ├── logo-oppo.png │ ├── logo-paypal.png │ ├── logo-philips.png │ ├── logo-white.png │ ├── logo.png │ ├── menu.png │ ├── play-store.png │ ├── product-1.jpg │ ├── product-10.jpg │ ├── product-11.jpg │ ├── product-12.jpg │ ├── product-2.jpg │ ├── product-3.jpg │ ├── product-4.jpg │ ├── product-5.jpg │ ├── product-6.jpg │ ├── product-7.jpg │ ├── product-8.jpg │ ├── product-9.jpg │ ├── user-1.png │ ├── user-2.png │ └── user-3.png └── js │ ├── account.js │ ├── gallery.js │ └── toggleMenu.js ├── cart.html ├── index.html ├── product-details.html ├── products.html └── rellax.min.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/static.yml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Deploy static content to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ["master"] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 20 | concurrency: 21 | group: "pages" 22 | cancel-in-progress: false 23 | 24 | jobs: 25 | # Single deploy job since we're just deploying 26 | deploy: 27 | environment: 28 | name: github-pages 29 | url: ${{ steps.deployment.outputs.page_url }} 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v4 34 | - name: Setup Pages 35 | uses: actions/configure-pages@v5 36 | - name: Upload artifact 37 | uses: actions/upload-pages-artifact@v3 38 | with: 39 | # Upload entire repository 40 | path: '.' 41 | - name: Deploy to GitHub Pages 42 | id: deployment 43 | uses: actions/deploy-pages@v4 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## E-Commerce Website Design Using HTML CSS and JS 2 | ![Screenshot (517)](https://user-images.githubusercontent.com/51481476/97994919-e0cdf680-1e0b-11eb-9567-fd78c9595f77.png) 3 | ![Screenshot (518)](https://user-images.githubusercontent.com/51481476/97995225-40c49d00-1e0c-11eb-910c-3f837e7b6e70.png) 4 | ![Screenshot (519)](https://user-images.githubusercontent.com/51481476/97995052-0e1aa480-1e0c-11eb-88b5-e2b058925326.png) 5 | ![Screenshot (520)](https://user-images.githubusercontent.com/51481476/97995142-25599200-1e0c-11eb-9061-484b73b1fcc1.png) 6 | ![Screenshot (521)](https://user-images.githubusercontent.com/51481476/97994908-dc094280-1e0b-11eb-9946-08e28f042189.png) 7 | 8 | ### Credits : Easy Tuts YouTube Channel 9 | https://www.youtube.com/c/EasyTutorialsVideo/videos 10 | -------------------------------------------------------------------------------- /account.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Products - Red store 8 | 9 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 36 |
37 |
38 | 39 | 40 | 41 |
42 |
43 |
44 |
45 | 46 |
47 |
48 |
49 |
50 | Login 51 | Register 52 |
53 |
54 |
55 | 56 | 57 | 58 | 59 | Forgot Password 60 |
61 |
62 | 63 | 64 | 65 | 66 | 67 |
68 |
69 |
70 |
71 |
72 |
73 | 74 | 75 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /assets/css/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --main-text-color: #555; 3 | --main-bg-color: #fff; 4 | --accent-color: #ff523b; 5 | --hover-color: #563434; 6 | --slate-gray: #8a8a8a; 7 | --smoth-pink: #ffd6d6; 8 | } 9 | 10 | *::selection { 11 | background-color: var(--accent-color); 12 | color: var(--main-bg-color); 13 | } 14 | 15 | * { 16 | margin: 0; 17 | padding: 0; 18 | box-sizing: border-box; 19 | } 20 | 21 | body { 22 | font-family: "Poppins", sans-serif; 23 | } 24 | 25 | .navbar { 26 | display: flex; 27 | align-items: center; 28 | padding: 20px; 29 | } 30 | 31 | nav { 32 | flex: 1; 33 | text-align: right; 34 | } 35 | 36 | nav ul { 37 | display: inline-block; 38 | list-style-type: none; 39 | } 40 | 41 | nav ul li { 42 | display: inline-block; 43 | margin-right: 30px; 44 | } 45 | 46 | a { 47 | text-decoration: none; 48 | color: var(--main-text-color); 49 | ; 50 | 51 | } 52 | 53 | p { 54 | color: var(--main-text-color); 55 | } 56 | 57 | .navbar a { 58 | text-decoration: none; 59 | color: var(--main-text-color); 60 | font-weight: 600; 61 | } 62 | 63 | .navbar a:hover { 64 | color: var(--accent-color); 65 | } 66 | 67 | .container { 68 | max-width: 1300px; 69 | margin: auto; 70 | padding-left: 25px; 71 | padding-right: 25px; 72 | } 73 | 74 | .row { 75 | margin-top: 50px; 76 | display: flex; 77 | align-items: center; 78 | flex-wrap: wrap; 79 | justify-content: space-around; 80 | } 81 | 82 | .col-2 { 83 | flex-basis: 50%; 84 | min-width: 300px; 85 | } 86 | 87 | .col-2 img { 88 | max-width: 100%; 89 | padding: 50px 0; 90 | /* top and bottom 50 left and right 0 */ 91 | } 92 | 93 | .col-2 h1 { 94 | font-size: 50px; 95 | line-height: 60px; 96 | margin: 25px 0; 97 | } 98 | 99 | .btn { 100 | display: inline-block; 101 | background: var(--accent-color); 102 | color: var(--main-bg-color); 103 | padding: 8px 30px; 104 | margin: 30px 0; 105 | border-radius: 5px; 106 | transition: background 0.5s; 107 | } 108 | 109 | .btn:hover { 110 | background-color: var(--hover-color); 111 | /* Green */ 112 | color: var(--main-bg-color); 113 | } 114 | 115 | .header { 116 | background: radial-gradient(#fff, #ffd6d6); 117 | } 118 | 119 | .header .row { 120 | margin-top: 20px; 121 | } 122 | 123 | .categories { 124 | margin: 70px 0; 125 | } 126 | 127 | .col-3 { 128 | flex-basis: 30%; 129 | min-width: 250px; 130 | margin-bottom: 30px; 131 | } 132 | 133 | .col-3 img { 134 | width: 100%; 135 | transition: 0.5s; 136 | border-radius: 10px; 137 | } 138 | 139 | .col-3 img:hover { 140 | scale: 1.1; 141 | } 142 | 143 | .small-container { 144 | max-width: 1080px; 145 | margin: auto; 146 | padding-left: 25px; 147 | padding-right: 25px; 148 | } 149 | 150 | .col-4 { 151 | flex-basis: 25%; 152 | padding: 10px; 153 | min-width: 200px; 154 | margin-bottom: 50px; 155 | transition: transform 0.5s; 156 | } 157 | 158 | .col-4 img { 159 | width: 100%; 160 | border-radius: 10px; 161 | } 162 | 163 | .title { 164 | text-align: center; 165 | margin: 0 auto 80px; 166 | position: relative; 167 | line-height: 60px; 168 | color: var(--main-text-color); 169 | } 170 | 171 | .title::after { 172 | content: ""; 173 | background: var(--accent-color); 174 | width: 80px; 175 | height: 5px; 176 | border-radius: 5px; 177 | position: absolute; 178 | bottom: 0; 179 | left: 50%; 180 | transform: translateX(-50%); 181 | } 182 | 183 | h4 { 184 | color: var(--main-text-color); 185 | font-weight: normal; 186 | } 187 | 188 | .col-4 p { 189 | font-size: 14px; 190 | } 191 | 192 | .rating .fa { 193 | color: var(--accent-color); 194 | } 195 | 196 | .col-4:hover { 197 | transform: translateY(-5px); 198 | } 199 | 200 | /* offer */ 201 | .offer { 202 | background: radial-gradient(#fff, #ffd6d6); 203 | margin-top: 80px; 204 | padding: 30px 0; 205 | } 206 | 207 | .col-2 .offer-img { 208 | padding: 50px; 209 | } 210 | 211 | small { 212 | color: var(--main-text-color); 213 | } 214 | 215 | /* -----Testimonial----- */ 216 | 217 | .testimonial { 218 | padding-top: 100px; 219 | } 220 | 221 | .testimonial .col-3 { 222 | text-align: center; 223 | padding: 40px 20px; 224 | box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.1); 225 | cursor: pointer; 226 | transition: transform 0.5s; 227 | } 228 | 229 | .testimonial .col-3 img { 230 | width: 50px; 231 | margin-top: 20px; 232 | border-radius: 50%; 233 | } 234 | 235 | .testimonial .col-3:hover { 236 | transform: translateY(-10px); 237 | } 238 | 239 | .fa.fa-quote-left { 240 | font-size: 34px; 241 | color: var(--accent-color); 242 | } 243 | 244 | .col-3 p { 245 | font-size: 12px; 246 | margin: 12px 0; 247 | color: #777; 248 | } 249 | 250 | .testimonial .col-3 h3 { 251 | font-weight: 600; 252 | color: var(--main-text-color); 253 | font-size: 16px; 254 | } 255 | 256 | /* brands */ 257 | 258 | .brands { 259 | margin: 100px auto; 260 | } 261 | 262 | .col-5 { 263 | width: 160px; 264 | } 265 | 266 | .col-5 img { 267 | width: 100%; 268 | cursor: pointer; 269 | filter: grayscale(100%); 270 | transition: 0.2s; 271 | } 272 | 273 | .col-5 img:hover { 274 | filter: grayscale(0); 275 | scale: 1.1; 276 | } 277 | 278 | /* footer */ 279 | .footer { 280 | background: #000; 281 | color: var(--slate-gray); 282 | font-size: 14px; 283 | padding: 60px 0 20px; 284 | } 285 | 286 | .footer p { 287 | color: var(--slate-gray); 288 | } 289 | 290 | .footer h3 { 291 | color: var(--main-bg-color); 292 | margin-bottom: 20px; 293 | } 294 | 295 | .footer-col-1, 296 | .footer-col-2, 297 | .footer-col-3, 298 | .footer-col-4 { 299 | min-width: 250px; 300 | margin-bottom: 20px; 301 | } 302 | 303 | .footer-col-1 { 304 | flex-basis: 30px; 305 | } 306 | 307 | .footer-col-2 { 308 | flex: 1; 309 | text-align: center; 310 | } 311 | 312 | .footer-col-2 img { 313 | width: 180px; 314 | margin-bottom: 20px; 315 | } 316 | 317 | .footer-col-3, 318 | .footer-col-4 { 319 | flex-basis: 12%; 320 | text-align: center; 321 | } 322 | 323 | ul { 324 | list-style-type: none; 325 | } 326 | 327 | .app-logo { 328 | margin-top: 20px; 329 | } 330 | 331 | .app-logo img { 332 | width: 140px; 333 | } 334 | 335 | .footer hr { 336 | border: none; 337 | background: #b5b5b5; 338 | height: 1px; 339 | margin: 20px 0; 340 | } 341 | 342 | .copyright { 343 | text-align: center; 344 | } 345 | 346 | .menu-icon { 347 | width: 28px; 348 | margin-left: 20px; 349 | display: none; 350 | } 351 | 352 | /* Media Quer for menu */ 353 | 354 | @media only screen and (max-width: 800px) { 355 | nav ul { 356 | position: absolute; 357 | top: 70px; 358 | left: 0; 359 | background: #333; 360 | width: 100%; 361 | overflow: hidden; 362 | transition: max-height 0.5s; 363 | } 364 | 365 | nav ul li { 366 | display: block; 367 | margin-right: 50px; 368 | margin-top: 10px; 369 | margin-bottom: 10px; 370 | } 371 | 372 | nav ul li a { 373 | color: var(--main-bg-color); 374 | } 375 | 376 | .menu-icon { 377 | display: block; 378 | cursor: pointer; 379 | } 380 | } 381 | 382 | /* All Products */ 383 | .row-2 { 384 | justify-content: space-between; 385 | margin: 100px auto 50px; 386 | } 387 | 388 | select { 389 | border: 1px solid var(--accent-color); 390 | padding: 5px; 391 | } 392 | 393 | select:focus { 394 | outline: none; 395 | } 396 | 397 | .page-btn { 398 | margin: 0 auto 80px; 399 | } 400 | 401 | .page-btn span { 402 | display: inline-block; 403 | border: 1px solid var(--accent-color); 404 | margin-left: 10px; 405 | width: 40px; 406 | height: 40px; 407 | text-align: center; 408 | line-height: 40px; 409 | line-height: 40px; 410 | cursor: pointer; 411 | } 412 | 413 | .page-btn span:hover { 414 | background: var(--accent-color); 415 | color: var(--main-bg-color); 416 | } 417 | 418 | /* Media Quer for less than 600 screen size */ 419 | @media only screen and (max-width: 600px) { 420 | .row { 421 | text-align: center; 422 | } 423 | 424 | .col-2, 425 | .col-3, 426 | .col-4 { 427 | flex-basis: 100%; 428 | } 429 | 430 | .single-product .row { 431 | text-align: left; 432 | } 433 | 434 | .single-product .col-2 { 435 | padding: 20px 0; 436 | } 437 | 438 | .single-product h2 { 439 | font-size: 26px; 440 | line-height: 32px; 441 | } 442 | 443 | .cart-info p { 444 | display: none; 445 | } 446 | } 447 | 448 | /* Single Product Detail */ 449 | .single-product { 450 | margin-top: 80px; 451 | } 452 | 453 | .single-product .col-2 img { 454 | padding: 0; 455 | } 456 | 457 | .single-product .col-2 { 458 | padding: 20px; 459 | } 460 | 461 | .single-product h4 { 462 | margin: 20px 0; 463 | font-size: 22px; 464 | font-weight: bold; 465 | } 466 | 467 | .single-product select { 468 | display: block; 469 | padding: 10px; 470 | margin-top: 20px; 471 | } 472 | 473 | .single-product input { 474 | width: 50px; 475 | height: 40px; 476 | padding-left: 10px; 477 | font-size: 20px; 478 | margin-right: 10px; 479 | border: 1px solid var(--accent-color); 480 | } 481 | 482 | input:focus { 483 | outline: none; 484 | } 485 | 486 | .single-product .fa { 487 | color: var(--accent-color); 488 | margin-left: 10px; 489 | } 490 | 491 | .small-img-row { 492 | display: flex; 493 | justify-content: space-between; 494 | } 495 | 496 | .small-img-col { 497 | flex-basis: 24%; 498 | cursor: pointer; 499 | } 500 | 501 | /* Cart Items Details */ 502 | .cart-page { 503 | margin: 30px auto; 504 | } 505 | 506 | table { 507 | width: 100%; 508 | border-collapse: collapse; 509 | } 510 | 511 | .cart-info { 512 | display: flex; 513 | flex-wrap: wrap; 514 | } 515 | 516 | th { 517 | text-align: left; 518 | padding: 5px; 519 | color: var(--main-bg-color); 520 | background: var(--accent-color); 521 | font-weight: normal; 522 | } 523 | 524 | td { 525 | padding: 10px 5px; 526 | } 527 | 528 | td input { 529 | width: 40px; 530 | height: 30px; 531 | padding: 5px; 532 | } 533 | 534 | td a { 535 | color: var(--accent-color); 536 | font-size: 12px; 537 | } 538 | 539 | td img { 540 | width: 80px; 541 | height: 80px; 542 | margin-right: 10px; 543 | } 544 | 545 | .total-price { 546 | display: flex; 547 | justify-content: flex-end; 548 | } 549 | 550 | .total-price table { 551 | border-top: 3px solid var(--accent-color); 552 | width: 100%; 553 | max-width: 400px; 554 | } 555 | 556 | td:last-child { 557 | text-align: right; 558 | } 559 | 560 | th:last-child { 561 | text-align: right; 562 | } 563 | 564 | /* Account Page */ 565 | 566 | .account-page { 567 | padding: 50px 0; 568 | background: radial-gradient(var(--main-bg-color), var(--smoth-pink)); 569 | } 570 | 571 | .form-container { 572 | background: var(--main-bg-color); 573 | backdrop-filter: blur(10px); 574 | width: 300px; 575 | height: 400px; 576 | position: relative; 577 | text-align: center; 578 | padding: 20px 0; 579 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1); 580 | border-radius: 10px; 581 | overflow: hidden; 582 | } 583 | 584 | .form-container span { 585 | font-weight: bold; 586 | padding: 0 10px; 587 | color: var(--main-text-color); 588 | cursor: pointer; 589 | width: 100px; 590 | display: inline-block; 591 | } 592 | 593 | .form-btn { 594 | display: inline-block; 595 | } 596 | 597 | .form-container form { 598 | max-width: 300px; 599 | padding: 0 20px; 600 | position: absolute; 601 | top: 130px; 602 | transition: transform 1s; 603 | } 604 | 605 | form input { 606 | width: 100%; 607 | height: 30px; 608 | margin: 10px 0; 609 | padding: 6px 12px; 610 | border-radius: 10px; 611 | border: 1px solid var(--slate-gray); 612 | } 613 | 614 | form .btn { 615 | width: 100%; 616 | border: none; 617 | cursor: pointer; 618 | margin: 10px; 619 | } 620 | 621 | form .btn:focus { 622 | outline: none; 623 | } 624 | 625 | #LoginForm { 626 | left: -300px; 627 | } 628 | 629 | #RegForm { 630 | left: 0; 631 | } 632 | 633 | form a { 634 | font-size: 12px; 635 | } 636 | 637 | #indicator { 638 | width: 100px; 639 | border: none; 640 | background: var(--accent-color); 641 | height: 3px; 642 | margin-top: 8px; 643 | transform: translateX(100px); 644 | transition: transform 1s; 645 | } -------------------------------------------------------------------------------- /assets/images/app-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/app-store.png -------------------------------------------------------------------------------- /assets/images/buy-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/buy-1.jpg -------------------------------------------------------------------------------- /assets/images/buy-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/buy-2.jpg -------------------------------------------------------------------------------- /assets/images/buy-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/buy-3.jpg -------------------------------------------------------------------------------- /assets/images/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/cart.png -------------------------------------------------------------------------------- /assets/images/category-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/category-1.jpg -------------------------------------------------------------------------------- /assets/images/category-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/category-2.jpg -------------------------------------------------------------------------------- /assets/images/category-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/category-3.jpg -------------------------------------------------------------------------------- /assets/images/exclusive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/exclusive.png -------------------------------------------------------------------------------- /assets/images/gallery-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/gallery-1.jpg -------------------------------------------------------------------------------- /assets/images/gallery-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/gallery-2.jpg -------------------------------------------------------------------------------- /assets/images/gallery-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/gallery-3.jpg -------------------------------------------------------------------------------- /assets/images/gallery-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/gallery-4.jpg -------------------------------------------------------------------------------- /assets/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/image1.png -------------------------------------------------------------------------------- /assets/images/img-credit.txt: -------------------------------------------------------------------------------- 1 | Banner psd created by freepik - www.freepik.com 2 | 3 | Products image: www.myntra.com -------------------------------------------------------------------------------- /assets/images/logo-coca-cola.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/logo-coca-cola.png -------------------------------------------------------------------------------- /assets/images/logo-godrej.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/logo-godrej.png -------------------------------------------------------------------------------- /assets/images/logo-oppo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/logo-oppo.png -------------------------------------------------------------------------------- /assets/images/logo-paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/logo-paypal.png -------------------------------------------------------------------------------- /assets/images/logo-philips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/logo-philips.png -------------------------------------------------------------------------------- /assets/images/logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/logo-white.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/menu.png -------------------------------------------------------------------------------- /assets/images/play-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/play-store.png -------------------------------------------------------------------------------- /assets/images/product-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-1.jpg -------------------------------------------------------------------------------- /assets/images/product-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-10.jpg -------------------------------------------------------------------------------- /assets/images/product-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-11.jpg -------------------------------------------------------------------------------- /assets/images/product-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-12.jpg -------------------------------------------------------------------------------- /assets/images/product-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-2.jpg -------------------------------------------------------------------------------- /assets/images/product-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-3.jpg -------------------------------------------------------------------------------- /assets/images/product-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-4.jpg -------------------------------------------------------------------------------- /assets/images/product-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-5.jpg -------------------------------------------------------------------------------- /assets/images/product-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-6.jpg -------------------------------------------------------------------------------- /assets/images/product-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-7.jpg -------------------------------------------------------------------------------- /assets/images/product-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-8.jpg -------------------------------------------------------------------------------- /assets/images/product-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/product-9.jpg -------------------------------------------------------------------------------- /assets/images/user-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/user-1.png -------------------------------------------------------------------------------- /assets/images/user-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/user-2.png -------------------------------------------------------------------------------- /assets/images/user-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/introidx/E-Commerce-website-html-css-js/32fdef04c5fe60bc3a3e38b9b5f1069ebf0393c1/assets/images/user-3.png -------------------------------------------------------------------------------- /assets/js/account.js: -------------------------------------------------------------------------------- 1 | // js for toggle form 2 | var LoginForm = document.getElementById("LoginForm"); 3 | var RegForm = document.getElementById("RegForm"); 4 | var indicator = document.getElementById("indicator"); 5 | 6 | function register() { 7 | RegForm.style.transform = "translateX(0px)"; 8 | LoginForm.style.transform = "translateX(0px)"; 9 | indicator.style.transform = "translateX(100px)"; 10 | } 11 | 12 | function login() { 13 | RegForm.style.transform = "translateX(300px)"; 14 | LoginForm.style.transform = "translateX(300px)"; 15 | indicator.style.transform = "translateX(0px)"; 16 | } 17 | 18 | // JS for Toggle menu 19 | var MenuItems = document.getElementById("MenuItems"); 20 | 21 | MenuItems.style.maxHeight = "0px"; 22 | 23 | function menutoggle() { 24 | if (MenuItems.style.maxHeight == "0px") { 25 | MenuItems.style.maxHeight = "200px"; 26 | } else { 27 | MenuItems.style.maxHeight = "0px"; 28 | } 29 | } -------------------------------------------------------------------------------- /assets/js/gallery.js: -------------------------------------------------------------------------------- 1 | // js for product gallery 2 | var ProductImg = document.getElementById("ProductImg"); 3 | var smallImg = document.getElementsByClassName("small-img"); 4 | smallImg[0].onclick = function () { 5 | ProductImg.src = smallImg[0].src; 6 | }; 7 | smallImg[1].onclick = function () { 8 | ProductImg.src = smallImg[1].src; 9 | }; 10 | smallImg[2].onclick = function () { 11 | ProductImg.src = smallImg[2].src; 12 | }; 13 | smallImg[3].onclick = function () { 14 | ProductImg.src = smallImg[3].src; 15 | }; -------------------------------------------------------------------------------- /assets/js/toggleMenu.js: -------------------------------------------------------------------------------- 1 | // < !--JS for Toggle menu-- > 2 | var MenuItems = document.getElementById("MenuItems"); 3 | 4 | MenuItems.style.maxHeight = "0px"; 5 | 6 | function menutoggle() { 7 | if (MenuItems.style.maxHeight == "0px") { 8 | MenuItems.style.maxHeight = "200px"; 9 | } else { 10 | MenuItems.style.maxHeight = "0px"; 11 | } 12 | } 13 | 14 | // copyright section change by year 15 | let copyrightElem = document.getElementById('copyright-text'); 16 | let currentYear = new Date().getFullYear() 17 | let fullText = `Copyright ${currentYear} - introidx`; 18 | copyrightElem.innerText = fullText; -------------------------------------------------------------------------------- /cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Products - Red store 8 | 9 | 12 | 13 | 14 | 15 | 16 |
17 | 35 |
36 | 37 | 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 57 | 58 | 59 | 60 | 61 | 62 | 73 | 74 | 75 | 76 | 77 | 78 | 89 | 90 | 91 | 92 |
ProductQuantitySubtotal
47 |
48 | 49 |
50 |

Red Printed T-shirt

51 | Price: $50.00 52 |
53 | Remove 54 |
55 |
56 |
$50.00
63 |
64 | 65 |
66 |

Red Printed T-shirt

67 | Price: $50.00 68 |
69 | Remove 70 |
71 |
72 |
$50.00
79 |
80 | 81 |
82 |

Red Printed T-shirt

83 | Price: $50.00 84 |
85 | Remove 86 |
87 |
88 |
$50.00
93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
Subtotal$200.00
Tax$30.00
Total$230.00
109 |
110 |
111 | 112 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Red store | Ecommerce Website Design 7 | 8 | 12 | 16 | 17 | 18 |
19 |
20 | 46 |
47 |
48 |

49 | Give your Workout
50 | a new Style! 51 |

52 |

53 | Lorem ipsum dolor sit amet consectetur adipisicing elit.
54 | Voluptas rerum maiores animi officiis 55 |

56 | Explore Now → 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 |

Featured Products

83 |
84 |
85 | 86 | 88 |

Red Printed T-shirt

89 |
90 | 91 | 92 | 93 | 94 | 95 |
96 |

$50.00

97 |
98 | 99 |
100 | 101 |

Red Printed T-shirt

102 |
103 | 104 | 105 | 106 | 107 | 108 |
109 |

$50.00

110 |
111 | 112 |
113 | 114 |

Red Printed T-shirt

115 |
116 | 117 | 118 | 119 | 120 | 121 |
122 |

$50.00

123 |
124 |
125 | 126 |

Red Printed T-shirt

127 |
128 | 129 | 130 | 131 | 132 | 133 |
134 |

$50.00

135 |
136 |
137 |

Latest Products

138 |
139 |
140 | 141 |

Red Printed T-shirt

142 |
143 | 144 | 145 | 146 | 147 | 148 |
149 |

$50.00

150 |
151 | 152 |
153 | 154 |

Red Printed T-shirt

155 |
156 | 157 | 158 | 159 | 160 | 161 |
162 |

$50.00

163 |
164 | 165 |
166 | 167 |

Red Printed T-shirt

168 |
169 | 170 | 171 | 172 | 173 | 174 |
175 |

$50.00

176 |
177 |
178 | 179 |

Red Printed T-shirt

180 |
181 | 182 | 183 | 184 | 185 | 186 |
187 |

$50.00

188 |
189 |
190 |
191 |
192 | 193 |

Red Printed T-shirt

194 |
195 | 196 | 197 | 198 | 199 | 200 |
201 |

$50.00

202 |
203 | 204 |
205 | 206 |

Red Printed T-shirt

207 |
208 | 209 | 210 | 211 | 212 | 213 |
214 |

$50.00

215 |
216 | 217 |
218 | 219 |

Red Printed T-shirt

220 |
221 | 222 | 223 | 224 | 225 | 226 |
227 |

$50.00

228 |
229 |
230 | 231 |

Red Printed T-shirt

232 |
233 | 234 | 235 | 236 | 237 | 238 |
239 |

$50.00

240 |
241 |
242 |
243 | 244 | 245 |
246 |
247 |
248 |
249 | 250 |
251 |
252 |

Exclusively available on RedStore

253 |

Smart Band 4

254 | Lorem ipsum dolor sit amet consectetur adipisicing elit. 256 | Excepturi rerum maiores eveniet minus ut deserunt vitae 257 | 258 | Buy Now → 259 |
260 |
261 |
262 |
263 | 264 | 265 |
266 |
267 |
268 |
269 | 270 | 271 |

272 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, esse 273 | quae ex sequi praesentium fuga voluptatem placeat voluptates odio 274 | rerum. 275 |

276 |
277 | 278 | 279 | 280 | 281 | 282 |
283 | 284 |

Sean Parker

285 |
286 | 287 |
288 | 289 | 290 |

291 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, esse 292 | quae ex sequi praesentium fuga voluptatem placeat voluptates odio 293 | rerum. 294 |

295 |
296 | 297 | 298 | 299 | 300 | 301 |
302 | 303 |

Michel Joe

304 |
305 | 306 |
307 | 308 | 309 |

310 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, esse 311 | quae ex sequi praesentium fuga voluptatem placeat voluptates odio 312 | rerum. 313 |

314 |
315 | 316 | 317 | 318 | 319 | 320 |
321 | 322 |

Kaily Jenner

323 |
324 |
325 |
326 |
327 | 328 | 329 | 330 |
331 |
332 |
333 |
334 | 335 |
336 |
337 | 338 |
339 |
340 | 341 |
342 |
343 | 344 |
345 |
346 | 347 |
348 |
349 |
350 |
351 | 352 | 353 | 398 | 399 | 400 | 401 | 402 | 403 | -------------------------------------------------------------------------------- /product-details.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Products - Red store 8 | 9 | 12 | 13 | 14 | 15 | 16 |
17 | 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 |

Home / T-shirt

60 |

Red Printed T-Shirt By HRX

61 |

$50.00

62 | 70 | 71 | Add to Cart 72 |

Product Details

73 |
74 |

75 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugit nemo 76 | nam magnam rerum sunt explicabo! Distinctio ipsam doloremque nostrum 77 | ipsum? 78 |

79 |
80 |
81 |
82 | 83 | 84 |
85 |
86 |

Related Products

87 |

View More

88 |
89 |
90 | 91 | 92 | 93 |
94 |
95 |
96 | 97 |

Red Printed T-shirt

98 |
99 | 100 | 101 | 102 | 103 | 104 |
105 |

$50.00

106 |
107 | 108 |
109 | 110 |

Red Printed T-shirt

111 |
112 | 113 | 114 | 115 | 116 | 117 |
118 |

$50.00

119 |
120 | 121 |
122 | 123 |

Red Printed T-shirt

124 |
125 | 126 | 127 | 128 | 129 | 130 |
131 |

$50.00

132 |
133 |
134 | 135 |

Red Printed T-shirt

136 |
137 | 138 | 139 | 140 | 141 | 142 |
143 |

$50.00

144 |
145 |
146 |
147 | 148 | 149 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /products.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Products - Red store 8 | 9 | 12 | 13 | 14 | 15 | 16 |
17 | 35 |
36 | 37 |
38 |
39 |

All Products

40 | 47 |
48 | 49 |
50 |
51 | 52 |

Red Printed T-shirt

53 |
54 | 55 | 56 | 57 | 58 | 59 |
60 |

$50.00

61 |
62 | 63 |
64 | 65 |

Red Printed T-shirt

66 |
67 | 68 | 69 | 70 | 71 | 72 |
73 |

$50.00

74 |
75 | 76 |
77 | 78 |

Red Printed T-shirt

79 |
80 | 81 | 82 | 83 | 84 | 85 |
86 |

$50.00

87 |
88 |
89 | 90 |

Red Printed T-shirt

91 |
92 | 93 | 94 | 95 | 96 | 97 |
98 |

$50.00

99 |
100 |
101 |
102 |
103 | 104 |

Red Printed T-shirt

105 |
106 | 107 | 108 | 109 | 110 | 111 |
112 |

$50.00

113 |
114 | 115 |
116 | 117 |

Red Printed T-shirt

118 |
119 | 120 | 121 | 122 | 123 | 124 |
125 |

$50.00

126 |
127 | 128 |
129 | 130 |

Red Printed T-shirt

131 |
132 | 133 | 134 | 135 | 136 | 137 |
138 |

$50.00

139 |
140 |
141 | 142 |

Red Printed T-shirt

143 |
144 | 145 | 146 | 147 | 148 | 149 |
150 |

$50.00

151 |
152 |
153 |
154 |
155 | 156 |

Red Printed T-shirt

157 |
158 | 159 | 160 | 161 | 162 | 163 |
164 |

$50.00

165 |
166 | 167 |
168 | 169 |

Red Printed T-shirt

170 |
171 | 172 | 173 | 174 | 175 | 176 |
177 |

$50.00

178 |
179 | 180 |
181 | 182 |

Red Printed T-shirt

183 |
184 | 185 | 186 | 187 | 188 | 189 |
190 |

$50.00

191 |
192 |
193 | 194 |

Red Printed T-shirt

195 |
196 | 197 | 198 | 199 | 200 | 201 |
202 |

$50.00

203 |
204 |
205 | 206 |
207 | 1 208 | 2 209 | 3 210 | 4 211 | 212 |
213 |
214 | 215 | 216 | 261 | 262 | 263 | 264 | 265 | -------------------------------------------------------------------------------- /rellax.min.js: -------------------------------------------------------------------------------- 1 | (function (q, g) { 2 | "function" === typeof define && define.amd 3 | ? define([], g) 4 | : "object" === typeof module && module.exports 5 | ? (module.exports = g()) 6 | : (q.Rellax = g()); 7 | })("undefined" !== typeof window ? window : global, function () { 8 | var q = function (g, u) { 9 | function C() { 10 | if ( 11 | 3 === a.options.breakpoints.length && 12 | Array.isArray(a.options.breakpoints) 13 | ) { 14 | var f = !0, 15 | c = !0, 16 | b; 17 | a.options.breakpoints.forEach(function (a) { 18 | "number" !== typeof a && (c = !1); 19 | null !== b && a < b && (f = !1); 20 | b = a; 21 | }); 22 | if (f && c) return; 23 | } 24 | a.options.breakpoints = [576, 768, 1201]; 25 | console.warn( 26 | "Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted" 27 | ); 28 | } 29 | var a = Object.create(q.prototype), 30 | l = 0, 31 | v = 0, 32 | m = 0, 33 | n = 0, 34 | d = [], 35 | w = !0, 36 | A = 37 | window.requestAnimationFrame || 38 | window.webkitRequestAnimationFrame || 39 | window.mozRequestAnimationFrame || 40 | window.msRequestAnimationFrame || 41 | window.oRequestAnimationFrame || 42 | function (a) { 43 | return setTimeout(a, 1e3 / 60); 44 | }, 45 | p = null, 46 | x = !1; 47 | try { 48 | var k = Object.defineProperty({}, "passive", { 49 | get: function () { 50 | x = !0; 51 | }, 52 | }); 53 | window.addEventListener("testPassive", null, k); 54 | window.removeEventListener("testPassive", null, k); 55 | } catch (f) {} 56 | var D = 57 | window.cancelAnimationFrame || 58 | window.mozCancelAnimationFrame || 59 | clearTimeout, 60 | E = 61 | window.transformProp || 62 | (function () { 63 | var a = document.createElement("div"); 64 | if (null === a.style.transform) { 65 | var c = ["Webkit", "Moz", "ms"], 66 | b; 67 | for (b in c) 68 | if (void 0 !== a.style[c[b] + "Transform"]) 69 | return c[b] + "Transform"; 70 | } 71 | return "transform"; 72 | })(); 73 | a.options = { 74 | speed: -2, 75 | verticalSpeed: null, 76 | horizontalSpeed: null, 77 | breakpoints: [576, 768, 1201], 78 | center: !1, 79 | wrapper: null, 80 | relativeToWrapper: !1, 81 | round: !0, 82 | vertical: !0, 83 | horizontal: !1, 84 | verticalScrollAxis: "y", 85 | horizontalScrollAxis: "x", 86 | callback: function () {}, 87 | }; 88 | u && 89 | Object.keys(u).forEach(function (d) { 90 | a.options[d] = u[d]; 91 | }); 92 | u && u.breakpoints && C(); 93 | g || (g = ".rellax"); 94 | k = "string" === typeof g ? document.querySelectorAll(g) : [g]; 95 | if (0 < k.length) { 96 | a.elems = k; 97 | if (a.options.wrapper && !a.options.wrapper.nodeType) 98 | if ((k = document.querySelector(a.options.wrapper))) 99 | a.options.wrapper = k; 100 | else { 101 | console.warn( 102 | "Rellax: The wrapper you're trying to use doesn't exist." 103 | ); 104 | return; 105 | } 106 | var F, 107 | B = function () { 108 | for (var f = 0; f < d.length; f++) 109 | a.elems[f].style.cssText = d[f].style; 110 | d = []; 111 | v = window.innerHeight; 112 | n = window.innerWidth; 113 | f = a.options.breakpoints; 114 | F = 115 | n < f[0] 116 | ? "xs" 117 | : n >= f[0] && n < f[1] 118 | ? "sm" 119 | : n >= f[1] && n < f[2] 120 | ? "md" 121 | : "lg"; 122 | H(); 123 | for (f = 0; f < a.elems.length; f++) { 124 | var c = void 0, 125 | b = a.elems[f], 126 | e = b.getAttribute("data-rellax-percentage"), 127 | y = b.getAttribute("data-rellax-speed"), 128 | t = b.getAttribute("data-rellax-xs-speed"), 129 | g = b.getAttribute("data-rellax-mobile-speed"), 130 | h = b.getAttribute("data-rellax-tablet-speed"), 131 | k = b.getAttribute("data-rellax-desktop-speed"), 132 | l = b.getAttribute("data-rellax-vertical-speed"), 133 | m = b.getAttribute("data-rellax-horizontal-speed"), 134 | p = b.getAttribute("data-rellax-vertical-scroll-axis"), 135 | q = b.getAttribute("data-rellax-horizontal-scroll-axis"), 136 | u = b.getAttribute("data-rellax-zindex") || 0, 137 | x = b.getAttribute("data-rellax-min"), 138 | A = b.getAttribute("data-rellax-max"), 139 | C = b.getAttribute("data-rellax-min-x"), 140 | D = b.getAttribute("data-rellax-max-x"), 141 | E = b.getAttribute("data-rellax-min-y"), 142 | L = b.getAttribute("data-rellax-max-y"), 143 | r = !0; 144 | t || g || h || k ? (c = { xs: t, sm: g, md: h, lg: k }) : (r = !1); 145 | t = a.options.wrapper 146 | ? a.options.wrapper.scrollTop 147 | : window.pageYOffset || 148 | document.documentElement.scrollTop || 149 | document.body.scrollTop; 150 | a.options.relativeToWrapper && 151 | (t = 152 | (window.pageYOffset || 153 | document.documentElement.scrollTop || 154 | document.body.scrollTop) - a.options.wrapper.offsetTop); 155 | var z = a.options.vertical ? (e || a.options.center ? t : 0) : 0, 156 | I = a.options.horizontal 157 | ? e || a.options.center 158 | ? a.options.wrapper 159 | ? a.options.wrapper.scrollLeft 160 | : window.pageXOffset || 161 | document.documentElement.scrollLeft || 162 | document.body.scrollLeft 163 | : 0 164 | : 0; 165 | t = z + b.getBoundingClientRect().top; 166 | g = b.clientHeight || b.offsetHeight || b.scrollHeight; 167 | h = I + b.getBoundingClientRect().left; 168 | k = b.clientWidth || b.offsetWidth || b.scrollWidth; 169 | z = e ? e : (z - t + v) / (g + v); 170 | e = e ? e : (I - h + n) / (k + n); 171 | a.options.center && (z = e = 0.5); 172 | c = r && null !== c[F] ? Number(c[F]) : y ? y : a.options.speed; 173 | l = l ? l : a.options.verticalSpeed; 174 | m = m ? m : a.options.horizontalSpeed; 175 | p = p ? p : a.options.verticalScrollAxis; 176 | q = q ? q : a.options.horizontalScrollAxis; 177 | y = J(e, z, c, l, m); 178 | b = b.style.cssText; 179 | r = ""; 180 | if ((e = /transform\s*:/i.exec(b))) 181 | (r = b.slice(e.index)), 182 | (r = (e = r.indexOf(";")) 183 | ? " " + r.slice(11, e).replace(/\s/g, "") 184 | : " " + r.slice(11).replace(/\s/g, "")); 185 | d.push({ 186 | baseX: y.x, 187 | baseY: y.y, 188 | top: t, 189 | left: h, 190 | height: g, 191 | width: k, 192 | speed: c, 193 | verticalSpeed: l, 194 | horizontalSpeed: m, 195 | verticalScrollAxis: p, 196 | horizontalScrollAxis: q, 197 | style: b, 198 | transform: r, 199 | zindex: u, 200 | min: x, 201 | max: A, 202 | minX: C, 203 | maxX: D, 204 | minY: E, 205 | maxY: L, 206 | }); 207 | } 208 | K(); 209 | w && (window.addEventListener("resize", B), (w = !1), G()); 210 | }, 211 | H = function () { 212 | var d = l, 213 | c = m; 214 | l = a.options.wrapper 215 | ? a.options.wrapper.scrollTop 216 | : ( 217 | document.documentElement || 218 | document.body.parentNode || 219 | document.body 220 | ).scrollTop || window.pageYOffset; 221 | m = a.options.wrapper 222 | ? a.options.wrapper.scrollLeft 223 | : ( 224 | document.documentElement || 225 | document.body.parentNode || 226 | document.body 227 | ).scrollLeft || window.pageXOffset; 228 | a.options.relativeToWrapper && 229 | (l = 230 | (( 231 | document.documentElement || 232 | document.body.parentNode || 233 | document.body 234 | ).scrollTop || window.pageYOffset) - a.options.wrapper.offsetTop); 235 | return (d != l && a.options.vertical) || 236 | (c != m && a.options.horizontal) 237 | ? !0 238 | : !1; 239 | }, 240 | J = function (d, c, b, e, g) { 241 | var f = {}; 242 | d = 100 * (g ? g : b) * (1 - d); 243 | c = 100 * (e ? e : b) * (1 - c); 244 | f.x = a.options.round ? Math.round(d) : Math.round(100 * d) / 100; 245 | f.y = a.options.round ? Math.round(c) : Math.round(100 * c) / 100; 246 | return f; 247 | }, 248 | h = function () { 249 | window.removeEventListener("resize", h); 250 | window.removeEventListener("orientationchange", h); 251 | (a.options.wrapper ? a.options.wrapper : window).removeEventListener( 252 | "scroll", 253 | h 254 | ); 255 | (a.options.wrapper 256 | ? a.options.wrapper 257 | : document 258 | ).removeEventListener("touchmove", h); 259 | p = A(G); 260 | }, 261 | G = function () { 262 | H() && !1 === w 263 | ? (K(), (p = A(G))) 264 | : ((p = null), 265 | window.addEventListener("resize", h), 266 | window.addEventListener("orientationchange", h), 267 | (a.options.wrapper ? a.options.wrapper : window).addEventListener( 268 | "scroll", 269 | h, 270 | x ? { passive: !0 } : !1 271 | ), 272 | (a.options.wrapper 273 | ? a.options.wrapper 274 | : document 275 | ).addEventListener("touchmove", h, x ? { passive: !0 } : !1)); 276 | }, 277 | K = function () { 278 | for (var f, c = 0; c < a.elems.length; c++) { 279 | var b = d[c].verticalScrollAxis.toLowerCase(), 280 | e = d[c].horizontalScrollAxis.toLowerCase(); 281 | f = -1 != b.indexOf("x") ? l : 0; 282 | b = -1 != b.indexOf("y") ? l : 0; 283 | var g = -1 != e.indexOf("x") ? m : 0; 284 | e = -1 != e.indexOf("y") ? m : 0; 285 | f = J( 286 | (f + g - d[c].left + n) / (d[c].width + n), 287 | (b + e - d[c].top + v) / (d[c].height + v), 288 | d[c].speed, 289 | d[c].verticalSpeed, 290 | d[c].horizontalSpeed 291 | ); 292 | e = f.y - d[c].baseY; 293 | b = f.x - d[c].baseX; 294 | null !== d[c].min && 295 | (a.options.vertical && 296 | !a.options.horizontal && 297 | (e = e <= d[c].min ? d[c].min : e), 298 | a.options.horizontal && 299 | !a.options.vertical && 300 | (b = b <= d[c].min ? d[c].min : b)); 301 | null != d[c].minY && (e = e <= d[c].minY ? d[c].minY : e); 302 | null != d[c].minX && (b = b <= d[c].minX ? d[c].minX : b); 303 | null !== d[c].max && 304 | (a.options.vertical && 305 | !a.options.horizontal && 306 | (e = e >= d[c].max ? d[c].max : e), 307 | a.options.horizontal && 308 | !a.options.vertical && 309 | (b = b >= d[c].max ? d[c].max : b)); 310 | null != d[c].maxY && (e = e >= d[c].maxY ? d[c].maxY : e); 311 | null != d[c].maxX && (b = b >= d[c].maxX ? d[c].maxX : b); 312 | a.elems[c].style[E] = 313 | "translate3d(" + 314 | (a.options.horizontal ? b : "0") + 315 | "px," + 316 | (a.options.vertical ? e : "0") + 317 | "px," + 318 | d[c].zindex + 319 | "px) " + 320 | d[c].transform; 321 | } 322 | a.options.callback(f); 323 | }; 324 | a.destroy = function () { 325 | for (var f = 0; f < a.elems.length; f++) 326 | a.elems[f].style.cssText = d[f].style; 327 | w || (window.removeEventListener("resize", B), (w = !0)); 328 | D(p); 329 | p = null; 330 | }; 331 | B(); 332 | a.refresh = B; 333 | return a; 334 | } 335 | console.warn("Rellax: The elements you're trying to select don't exist."); 336 | }; 337 | return q; 338 | }); 339 | --------------------------------------------------------------------------------