diff --git a/src/presenter/trip-presenter.js b/src/presenter/trip-presenter.js index 7fb15c8..749408e 100644 --- a/src/presenter/trip-presenter.js +++ b/src/presenter/trip-presenter.js @@ -5,18 +5,18 @@ import TripView from '../view/point-list-view.js'; import { render } from '../render.js'; export default class TripPresenter { - constructor(tripContainer) { - this.tripContainer = tripContainer; - this.pointList = new TripView(); - } + constructor(tripContainer) { + this.tripContainer = tripContainer; + this.pointList = new TripView(); + } - init() { - render(new SortView(), this.tripContainer); - render(this.pointList, this.tripContainer); - render(new EditPointView(), this.pointList.getElement()); + init() { + render(new SortView(), this.tripContainer); + render(this.pointList, this.tripContainer); + render(new EditPointView(), this.pointList.getElement()); - for (let i = 0; i < 3; i++) { - render(new PointView(), this.pointList.getElement()); - } + for (let i = 0; i < 3; i++) { + render(new PointView(), this.pointList.getElement()); } + } } \ No newline at end of file diff --git a/src/view/edit-point-view.js b/src/view/edit-point-view.js index e58867c..0da1726 100644 --- a/src/view/edit-point-view.js +++ b/src/view/edit-point-view.js @@ -1,186 +1,186 @@ import { createElement } from '../render.js'; -const createEditPointTemplate = () => { - return ( - `
  • -
    -
    -
    - - - -
    -
    - Event type - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    -
    -
    -
    - -
    - - - - - - - -
    - -
    - - - — - - -
    - -
    - - -
    - - - -
    -
    -
    -

    Offers

    - -
    -
    - - -
    - -
    - -
    -
    - -
    -

    Destination

    -

    Geneva is a city in Switzerland that lies at the southern tip of expansive Lac Léman (Lake Geneva). Surrounded by the Alps and Jura mountains, the city has views of dramatic Mont Blanc.

    - -
    -
    - Event photo - Event photo - Event photo - Event photo - Event photo +
    + +
    +

    Destination

    +

    Geneva is a city in Switzerland that lies at the southern tip of expansive Lac Léman (Lake Geneva). Surrounded by the Alps and Jura mountains, the city has views of dramatic Mont Blanc.

    + +
    +
    + Event photo + Event photo + Event photo + Event photo + Event photo +
    - +
    - -
    -
  • ` - ); + + + `); } export default class EditPointView { - getTemplate() { - return createEditPointTemplate(); - } - - getElement() { - if (!this.element) { - this.element = createElement(this.getTemplate()); - } - - return this.element; - } - - removeElement() { - this.element = null; + getTemplate() { + return createEditPointTemplate(); + } + + getElement() { + if (!this.element) { + this.element = createElement(this.getTemplate()); } + + return this.element; + } + + removeElement() { + this.element = null; + } } \ No newline at end of file diff --git a/src/view/filter-view.js b/src/view/filter-view.js index 3044dd3..a072dd3 100644 --- a/src/view/filter-view.js +++ b/src/view/filter-view.js @@ -1,42 +1,46 @@ import { createElement } from '../render.js'; -const createFilterTemplate = () => { - return ( - `
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    - -
    ` - ); +function createFilterTemplate () { + return (` +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + +
    + `); } export default class FilterView { - getTemplate() { - return createFilterTemplate(); - } - - getElement() { - if (!this.element) { - this.element = createElement(this.getTemplate()); - } - - return this.element; + getTemplate() { + return createFilterTemplate(); + } + + getElement() { + if (!this.element) { + this.element = createElement(this.getTemplate()); } - + + return this.element; + } + removeElement() { this.element = null; } diff --git a/src/view/point-list-view.js b/src/view/point-list-view.js index 08670f1..9019d0c 100644 --- a/src/view/point-list-view.js +++ b/src/view/point-list-view.js @@ -1,25 +1,23 @@ import { createElement } from '../render.js'; -const createPointListTemplate = () => { - return ( - `