feat: carousel class

This commit is contained in:
Mike 2024-01-10 01:15:11 -05:00
parent 0d843d6aa3
commit 2562bd4188
5 changed files with 5092 additions and 5065 deletions

View file

@ -0,0 +1,3 @@
{
"tabWidth": 4
}

View file

@ -0,0 +1,21 @@
class Carousel {
constructor() {
this.container = document.createElement("div");
this.setupCarouselStructure();
}
setupCarouselStructure() {
this.container.classList.add("container");
this.container.style.height = "60vh";
this.carousel = document.createElement("div");
this.carousel.classList.add("carousel");
this.container.append(this.carousel);
}
getCarousel = () => this.container;
}
export { Carousel };

View file

@ -1,3 +1,4 @@
import { Carousel } from "./components/imageCarousel";
import { DropDown } from "./components/dropDown";
import { Menu } from "./components/mobileMenu";
import "./style.css";
@ -14,14 +15,16 @@ function website() {
const _menu = ["main", "about", "store", "blog", "contact"];
const dropdown = new DropDown(_menu);
const mobile = new Menu(_menu);
const carouselObj = new Carousel();
const div = dropdown.dropdownComponent();
const h1 = document.createElement("h1");
const carousel = carouselObj.getCarousel();
h1.textContent = "DEEZ NUTS MAN";
const menuMobile = mobile.buildMenu();
document.body.append(menuMobile, div, h1);
document.body.append(menuMobile, div, h1, carousel);
}
fontAwesome();