diff --git a/index.html b/index.html index be6da78c5e9ec9f23846a724d7820f71b1816897..c61794736007600718afb311ce6ea2c5e29dad8a 100644 --- a/index.html +++ b/index.html @@ -1,48 +1,60 @@ - Page Title - - + Page Title + +
- -
-
+ +
+
+ + - @@ -50,6 +62,7 @@ + diff --git a/js/Car.js b/js/Car.js new file mode 100644 index 0000000000000000000000000000000000000000..5681e93209523c930f2b7988270137b35149ff49 --- /dev/null +++ b/js/Car.js @@ -0,0 +1,41 @@ + +function Car(image, make, model, description, price, category, year, mileage, exts = []) { + this.image = image; + this.make = make; + this.model = model; + this.description = description; + this.price = price; + this.category = category; + this.year = year; + this.mileage = mileage; + this.lstExt = []; +} +Car.prototype.constructor = Car + +Car.prototype.addEtra = function(ext) { + var dernCase =this.lstExt.length; + this.lstExt[dernCase] = ext; +} + + +Car.prototype.generateImage = function(elt) { + console.log(elt); + /* + var imm = decoment.CreateElement('img') + imm.setAttribute('src' = this.image); + imm.setAttribute('alt' = this.make + this.model); + imm.setAttribute('class' = "card-img-top"); + */ + var imm = document.createTextNode("\"""); + elt.Text = imm; +} + +Car.prototype.generateExtras = function(elt) { + var tempo, element; + elt.appendChild(""); +} \ No newline at end of file diff --git a/js/extra.js b/js/extra.js new file mode 100644 index 0000000000000000000000000000000000000000..921e91f2f38039fc1c450401c63f804f59934217 --- /dev/null +++ b/js/extra.js @@ -0,0 +1,8 @@ + +function Extra(name,price) { + this.name = name; + this.price = price; +} +Extra.prototype.constructor = Extra + +