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
}

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
{
"name": "webpack-template",
"version": "1.0.0",
"description": "Vanilla template for webpack",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack serve --open --config webpack.dev.js",
"build": "webpack --config webpack.prod.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"css-loader": "^6.8.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"html-webpack-plugin": "^5.6.0",
"prettier": "3.1.1",
"style-loader": "^3.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.10.0"
}
"name": "webpack-template",
"version": "1.0.0",
"description": "Vanilla template for webpack",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack serve --open --config webpack.dev.js",
"build": "webpack --config webpack.prod.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"css-loader": "^6.8.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"html-webpack-plugin": "^5.6.0",
"prettier": "3.1.1",
"style-loader": "^3.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.10.0"
}
}

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();