diff --git a/9/bundle.8205e1f042ab4813e45c.js b/9/bundle.8205e1f042ab4813e45c.js new file mode 100644 index 0000000..19386ae --- /dev/null +++ b/9/bundle.8205e1f042ab4813e45c.js @@ -0,0 +1,2 @@ +(()=>{"use strict";const e="beforeend";function t(e){const t=document.createElement("div");return t.innerHTML=e,t.firstElementChild}function i(t,i,a=e){i.insertAdjacentElement(a,t.getElement())}class a{constructor({point:e,offers:t,destination:i}){this.point=e,this.offers=t,this.destination=i}getTemplate(){return((e,t,i)=>{const{basePrice:a,type:s,isFavorite:n}=e,d=s[0].toUpperCase()+s.slice(1,s.length),o=t.map((e=>`\n
  • \n ${e.title}\n\n ${e.price}\n
  • \n `)).join(""),r=n?"event__favorite-btn event__favorite-btn--active":"event__favorite-btn";return`
  • \n
    \n \n
    \n Event type icon\n
    \n

    ${d} ${i.name}

    \n
    \n

    \n \n —\n \n

    \n

    30M

    \n
    \n

    \n € ${a}\n

    \n

    Offers:

    \n \n \n \n
    \n
  • \n `})(this.point,this.offers,this.destination)}getElement(){return this.element||(this.element=t(this.getTemplate())),this.element}removeElement(){this.element=null}}const s=["Taxi","Bus","Train","Ship","Drive","Flight","Check-in","Sightseeing","Restaurant"];class n{constructor({point:e,allOffers:t,allDestination:i,pointDestination:a}){this.point=e,this.allOffers=t,this.allDestination=i,this.pointDestination=a}getTemplate(){return function(e,t,i,a){const{basePrice:n,type:d}=e,o=d[0].toUpperCase()+d.slice(1,d.length),{name:r,description:c,pictures:f}=a,l=t.offers.map((i=>{const a=e.offers.includes(i.id)?"checked":"";return((e,t,i,a)=>`\n
    \n \n \n
    \n`)(t.type,i.title,i.price,a)})).join(""),b=i.map((e=>``)).join("");return`
  • \n
    \n
    \n
    \n \n \n
    \n
    \n Event type\n ${s.map((e=>((e,t)=>`\n
    \n \n \n
    \n`)(e,e===o?"checked":""))).join("")}\n
    \n
    \n
    \n
    \n \n \n \n ${b}\n \n
    \n
    \n \n \n —\n \n \n
    \n
    \n \n \n
    \n \n \n \n
    \n
    \n
    \n

    Offers

    \n
    \n ${l}\n
    \n
    \n
    \n

    Destination

    \n

    ${c}

    \n
    \n
    \n Event photo\n Event photo\n Event photo\n Event photo\n Event photo\n
    \n
    \n
    \n
    \n
  • `}(this.point,this.allOffers,this.allDestination,this.pointDestination)}getElement(){return this.element||(this.element=t(this.getTemplate())),this.element}removeElement(){this.element=null}}const d=[{id:"0d685664-4f88-42a5-9dc7-7bcdcc5f20d3",basePrice:60,dateFrom:"2024-09-08T04:36:09.239Z",dateTo:"2024-09-08T13:05:09.239Z",destination:"36eb5b49-2cec-4834-87e7-c464e155c2d4",isFavorite:!1,offers:["fdec3690-03d4-437d-96ce-3beb5cd46988","417d4d4e-8f10-4963-9156-b9b8998eb157"],type:"drive"},{id:"d84bd54e-b2b8-43b6-b7bd-4620e7228c78",basePrice:6774,dateFrom:"2024-09-10T09:06:09.239Z",dateTo:"2024-09-12T07:58:09.239Z",destination:"d9e9fc03-d3c9-4f60-baed-e5106dbfe007",isFavorite:!1,offers:["fdec3690-03d4-437d-96ce-3beb5cd46988","417d4d4e-8f10-4963-9156-b9b8998eb157"],type:"drive"},{id:"cf78f6f1-89fa-4525-9b06-630f76085018",basePrice:2278,dateFrom:"2024-09-13T18:59:09.239Z",dateTo:"2024-09-14T15:54:09.239Z",destination:"f9bc02d8-df0d-45c6-89a3-efcf48289a39",isFavorite:!0,offers:["253d0cac-ef24-48eb-8123-ea44cce78948","e3a256a9-423a-44f3-8953-fb771f6272ce","47987680-6915-4dfa-b219-360d004bcdd5","ba7e1ad7-223a-4a88-bfd5-123b7ea84741","f5e972a5-0868-4dcc-b744-832185567ff4","a73620d0-5978-4568-8a94-f6c83be59056"],type:"ship"},{id:"6d9e8075-ad19-4565-9872-ffd7f574d352",basePrice:374,dateFrom:"2024-09-15T13:16:09.239Z",dateTo:"2024-09-17T08:39:09.239Z",destination:"6b7d7f4e-739e-46e3-a7bc-8bde066d1e40",isFavorite:!0,offers:[],type:"sightseeing"},{id:"188f3207-7aeb-406b-9e5e-6924dd4fb7bd",basePrice:7569,dateFrom:"2024-09-18T21:15:09.239Z",dateTo:"2024-09-19T11:01:09.239Z",destination:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",isFavorite:!1,offers:[],type:"sightseeing"},{id:"725626fd-6452-46d6-bd29-be7db7c1b245",basePrice:6727,dateFrom:"2024-09-20T14:32:09.239Z",dateTo:"2024-09-21T14:52:09.239Z",destination:"7e34b1b2-15ea-4f47-a0d1-e35a233774f2",isFavorite:!0,offers:["b839e0ce-46b4-4cfa-8953-e6957874ebd3","0e10983a-ce28-4a91-9e6c-d7042d5bcd7d","5cd19fae-7e59-454c-a390-be20c182effd"],type:"flight"},{id:"6d033118-fbab-4dcc-bb8e-750c0a5bb523",basePrice:3008,dateFrom:"2024-09-23T15:34:09.239Z",dateTo:"2024-09-23T22:57:09.239Z",destination:"6b7d7f4e-739e-46e3-a7bc-8bde066d1e40",isFavorite:!1,offers:["776b2af8-48b5-49ad-bf4c-bbcee0139e1c","a2611bbb-1e05-4670-93ba-b7827c45b2f3"],type:"check-in"},{id:"87fc6ece-f0ac-4b39-81b5-244a94865004",basePrice:9246,dateFrom:"2024-09-25T06:52:09.239Z",dateTo:"2024-09-26T05:21:09.239Z",destination:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",isFavorite:!1,offers:["9badcbbd-1e40-4a42-b696-3da3052bc571","32ac83c4-7a14-4f4d-aeff-7a94d00bc202","2e554d1d-7ed4-4db5-983a-366d7fe120e0"],type:"bus"},{id:"c1d05f2c-8a64-4f7b-a7f0-8bba0ebec169",basePrice:7028,dateFrom:"2024-09-26T16:29:09.239Z",dateTo:"2024-09-27T10:59:09.239Z",destination:"d9e9fc03-d3c9-4f60-baed-e5106dbfe007",isFavorite:!0,offers:[],type:"restaurant"},{id:"ce0c9436-4245-4994-b257-d986f8900386",basePrice:6476,dateFrom:"2024-09-27T19:33:09.239Z",dateTo:"2024-09-29T02:15:09.239Z",destination:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",isFavorite:!0,offers:["fdec3690-03d4-437d-96ce-3beb5cd46988","417d4d4e-8f10-4963-9156-b9b8998eb157"],type:"drive"},{id:"e9cfcd4a-e4e2-4e66-805c-5fb9057b3f0b",basePrice:4321,dateFrom:"2024-09-30T17:50:09.239Z",dateTo:"2024-10-02T01:48:09.239Z",destination:"d26b78f2-6da4-49a2-9e70-15646eb228e0",isFavorite:!1,offers:["ff5bb648-e5bc-4ebf-9f3a-67647118f765","05437e62-aeae-4399-abab-548d0aa6befe"],type:"restaurant"},{id:"e0061dbd-9844-4efb-91a5-d0610bab7a1f",basePrice:6414,dateFrom:"2024-10-02T10:01:09.239Z",dateTo:"2024-10-03T21:11:09.239Z",destination:"7e34b1b2-15ea-4f47-a0d1-e35a233774f2",isFavorite:!0,offers:["a2611bbb-1e05-4670-93ba-b7827c45b2f3"],type:"check-in"},{id:"fa6d2b97-c59a-4fdc-818c-36954aa281a7",basePrice:7229,dateFrom:"2024-10-04T17:24:09.239Z",dateTo:"2024-10-05T11:45:09.239Z",destination:"d9e9fc03-d3c9-4f60-baed-e5106dbfe007",isFavorite:!0,offers:["2e554d1d-7ed4-4db5-983a-366d7fe120e0"],type:"bus"},{id:"6d4158a7-8664-4989-91f5-0da781f24811",basePrice:6182,dateFrom:"2024-10-07T10:53:09.239Z",dateTo:"2024-10-09T05:46:09.239Z",destination:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",isFavorite:!1,offers:[],type:"restaurant"},{id:"fff6b6c9-1bce-4267-84eb-9afd49ae14b8",basePrice:9377,dateFrom:"2024-10-10T03:59:09.239Z",dateTo:"2024-10-11T21:10:09.239Z",destination:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",isFavorite:!0,offers:["ba7e1ad7-223a-4a88-bfd5-123b7ea84741","f5e972a5-0868-4dcc-b744-832185567ff4","a73620d0-5978-4568-8a94-f6c83be59056"],type:"ship"},{id:"eaf7cd69-399e-44bd-82da-2997fa3e0e7a",basePrice:7972,dateFrom:"2024-10-12T23:51:09.239Z",dateTo:"2024-10-13T23:01:09.239Z",destination:"68c7958d-37a6-41df-b563-38eb8d4cda75",isFavorite:!1,offers:["fdec3690-03d4-437d-96ce-3beb5cd46988","417d4d4e-8f10-4963-9156-b9b8998eb157"],type:"drive"},{id:"6f6d74d1-bbc8-494f-85b4-0b54e412b87a",basePrice:4790,dateFrom:"2024-10-14T18:27:09.239Z",dateTo:"2024-10-15T06:14:09.239Z",destination:"8a5e9c25-35e5-49ff-b3ba-ecde45919cb9",isFavorite:!1,offers:[],type:"sightseeing"},{id:"4a97801e-d477-4077-88ae-8a6d2da5d9a9",basePrice:7166,dateFrom:"2024-10-15T22:19:09.239Z",dateTo:"2024-10-17T14:12:09.239Z",destination:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",isFavorite:!1,offers:["05437e62-aeae-4399-abab-548d0aa6befe"],type:"restaurant"},{id:"f4f9a516-7956-4097-a144-d7feae96c353",basePrice:5237,dateFrom:"2024-10-19T08:46:09.239Z",dateTo:"2024-10-20T17:35:09.239Z",destination:"6b7d7f4e-739e-46e3-a7bc-8bde066d1e40",isFavorite:!0,offers:["cc1e55e9-e7ca-4b96-a8f5-f8872adf8d96","8c379b95-bf04-4e0b-ac27-af7dadc9cfd0"],type:"taxi"},{id:"247efdf7-b15f-43d0-a4d0-1ce94872f3f3",basePrice:8872,dateFrom:"2024-10-21T12:56:09.239Z",dateTo:"2024-10-22T08:43:09.239Z",destination:"d26b78f2-6da4-49a2-9e70-15646eb228e0",isFavorite:!0,offers:[],type:"restaurant"},{id:"8cfd5929-62ef-4979-893d-55d7791d0520",basePrice:2011,dateFrom:"2024-10-23T20:56:09.239Z",dateTo:"2024-10-25T18:31:09.239Z",destination:"36eb5b49-2cec-4834-87e7-c464e155c2d4",isFavorite:!0,offers:["b9a0d3c2-8ca1-4723-ae6d-401836c55af1"],type:"train"},{id:"77aebdaa-c06f-486e-8fcb-fc09562a14d1",basePrice:8633,dateFrom:"2024-10-26T18:10:09.239Z",dateTo:"2024-10-27T22:56:09.239Z",destination:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",isFavorite:!0,offers:["e3a256a9-423a-44f3-8953-fb771f6272ce","47987680-6915-4dfa-b219-360d004bcdd5","ba7e1ad7-223a-4a88-bfd5-123b7ea84741","f5e972a5-0868-4dcc-b744-832185567ff4","a73620d0-5978-4568-8a94-f6c83be59056"],type:"ship"},{id:"e474d26f-5414-4860-b0c3-bab975b1c9ec",basePrice:5081,dateFrom:"2024-10-29T09:15:09.239Z",dateTo:"2024-10-29T17:24:09.239Z",destination:"8a5e9c25-35e5-49ff-b3ba-ecde45919cb9",isFavorite:!1,offers:["32ac83c4-7a14-4f4d-aeff-7a94d00bc202","2e554d1d-7ed4-4db5-983a-366d7fe120e0"],type:"bus"},{id:"a59fb3a2-2cf2-4412-b95a-16e8b43d9440",basePrice:9345,dateFrom:"2024-10-31T15:57:09.239Z",dateTo:"2024-11-02T15:21:09.239Z",destination:"36eb5b49-2cec-4834-87e7-c464e155c2d4",isFavorite:!0,offers:["754d4038-22ec-4ae4-90c9-7b53b9d846cb","37f742d3-cf91-47d9-9089-156c62569bdc","776b2af8-48b5-49ad-bf4c-bbcee0139e1c","a2611bbb-1e05-4670-93ba-b7827c45b2f3"],type:"check-in"},{id:"4724a5ea-5c4d-4eb3-9ac1-d5d2f85c75f1",basePrice:7989,dateFrom:"2024-11-03T04:36:09.239Z",dateTo:"2024-11-04T01:37:09.239Z",destination:"8a5e9c25-35e5-49ff-b3ba-ecde45919cb9",isFavorite:!0,offers:["9badcbbd-1e40-4a42-b696-3da3052bc571","32ac83c4-7a14-4f4d-aeff-7a94d00bc202","2e554d1d-7ed4-4db5-983a-366d7fe120e0"],type:"bus"}];function o(){return(e=d)[Math.floor(Math.random()*e.length)];var e}const r=[{type:"taxi",offers:[{id:"740a41fa-f027-4a53-adff-58d2b28d5ebd",title:"Upgrade to a business class",price:36},{id:"a12e7bfc-6420-4184-b192-fb5e960752cd",title:"Choose the radio station",price:122},{id:"c71d2c6c-ce6b-47b9-b687-d210ed14c09f",title:"Choose temperature",price:97},{id:"cc1e55e9-e7ca-4b96-a8f5-f8872adf8d96",title:"Drive quickly, I'm in a hurry",price:74},{id:"8c379b95-bf04-4e0b-ac27-af7dadc9cfd0",title:"Drive slowly",price:143}]},{type:"bus",offers:[{id:"9badcbbd-1e40-4a42-b696-3da3052bc571",title:"Infotainment system",price:185},{id:"32ac83c4-7a14-4f4d-aeff-7a94d00bc202",title:"Order meal",price:60},{id:"2e554d1d-7ed4-4db5-983a-366d7fe120e0",title:"Choose seats",price:167}]},{type:"train",offers:[{id:"2251f26f-ebba-4f3f-ac2a-fe5a3ff5bbfb",title:"Book a taxi at the arrival point",price:92},{id:"b4a9180f-fe2b-45a4-8a95-b4dce6dbf222",title:"Order a breakfast",price:195},{id:"b9a0d3c2-8ca1-4723-ae6d-401836c55af1",title:"Wake up at a certain time",price:179}]},{type:"flight",offers:[{id:"f33cba70-44f4-49e2-8b48-82778e76ba51",title:"Choose meal",price:45},{id:"376a6e68-2721-4f37-bb3b-a577b48db7c9",title:"Choose seats",price:69},{id:"1d75be2c-dc40-4d66-a2ab-1163af258996",title:"Upgrade to comfort class",price:36},{id:"b839e0ce-46b4-4cfa-8953-e6957874ebd3",title:"Upgrade to business class",price:200},{id:"0e10983a-ce28-4a91-9e6c-d7042d5bcd7d",title:"Add luggage",price:49},{id:"5cd19fae-7e59-454c-a390-be20c182effd",title:"Business lounge",price:33}]},{type:"check-in",offers:[{id:"5b4eb446-15cc-455c-bcc5-d0b8413a36b2",title:"Choose the time of check-in",price:63},{id:"754d4038-22ec-4ae4-90c9-7b53b9d846cb",title:"Choose the time of check-out",price:109},{id:"37f742d3-cf91-47d9-9089-156c62569bdc",title:"Add breakfast",price:90},{id:"776b2af8-48b5-49ad-bf4c-bbcee0139e1c",title:"Laundry",price:103},{id:"a2611bbb-1e05-4670-93ba-b7827c45b2f3",title:"Order a meal from the restaurant",price:124}]},{type:"sightseeing",offers:[]},{type:"ship",offers:[{id:"253d0cac-ef24-48eb-8123-ea44cce78948",title:"Choose meal",price:54},{id:"e3a256a9-423a-44f3-8953-fb771f6272ce",title:"Choose seats",price:171},{id:"47987680-6915-4dfa-b219-360d004bcdd5",title:"Upgrade to comfort class",price:37},{id:"ba7e1ad7-223a-4a88-bfd5-123b7ea84741",title:"Upgrade to business class",price:136},{id:"f5e972a5-0868-4dcc-b744-832185567ff4",title:"Add luggage",price:191},{id:"a73620d0-5978-4568-8a94-f6c83be59056",title:"Business lounge",price:60}]},{type:"drive",offers:[{id:"fdec3690-03d4-437d-96ce-3beb5cd46988",title:"With automatic transmission",price:48},{id:"417d4d4e-8f10-4963-9156-b9b8998eb157",title:"With air conditioning",price:117}]},{type:"restaurant",offers:[{id:"ff5bb648-e5bc-4ebf-9f3a-67647118f765",title:"Choose live music",price:139},{id:"05437e62-aeae-4399-abab-548d0aa6befe",title:"Choose VIP area",price:192}]}],c=[{id:"d9e9fc03-d3c9-4f60-baed-e5106dbfe007",description:"Paris - is a wonderful city!",name:"Paris",pictures:[]},{id:"6b7d7f4e-739e-46e3-a7bc-8bde066d1e40",description:"Venice - with a beautiful old town",name:"Venice",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/4.jpg",description:"Venice with an embankment of a mighty river as a centre of attraction"}]},{id:"a9670654-21d6-4ccf-bde9-e1fa264f46cb",description:"Frankfurt - with an embankment of a mighty river as a centre of attraction",name:"Frankfurt",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/16.jpg",description:"Frankfurt is a beautiful city"},{src:"https://24.objects.htmlacademy.pro/static/destinations/4.jpg",description:"Frankfurt with an embankment of a mighty river as a centre of attraction"}]},{id:"f9bc02d8-df0d-45c6-89a3-efcf48289a39",description:"Oslo - in a middle of Europe",name:"Oslo",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/6.jpg",description:"Oslo with crowded streets"},{src:"https://24.objects.htmlacademy.pro/static/destinations/4.jpg",description:"Oslo is a beautiful city"},{src:"https://24.objects.htmlacademy.pro/static/destinations/14.jpg",description:"Oslo for those who value comfort and coziness"}]},{id:"36eb5b49-2cec-4834-87e7-c464e155c2d4",description:"Monaco - middle-eastern paradise",name:"Monaco",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/3.jpg",description:"Monaco for those who value comfort and coziness"},{src:"https://24.objects.htmlacademy.pro/static/destinations/2.jpg",description:"Monaco middle-eastern paradise"},{src:"https://24.objects.htmlacademy.pro/static/destinations/2.jpg",description:"Monaco with a beautiful old town"}]},{id:"68c7958d-37a6-41df-b563-38eb8d4cda75",description:"Berlin - a true asian pearl",name:"Berlin",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/13.jpg",description:"Berlin famous for its crowded street markets with the best street food in Asia"},{src:"https://24.objects.htmlacademy.pro/static/destinations/8.jpg",description:"Berlin is a beautiful city"}]},{id:"f4bf1e21-1019-4532-889a-8f0ec673be63",description:"Barcelona - famous for its crowded street markets with the best street food in Asia",name:"Barcelona",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/8.jpg",description:"Barcelona a perfect place to stay with a family"},{src:"https://24.objects.htmlacademy.pro/static/destinations/11.jpg",description:"Barcelona is a beautiful city"},{src:"https://24.objects.htmlacademy.pro/static/destinations/1.jpg",description:"Barcelona in a middle of Europe"},{src:"https://24.objects.htmlacademy.pro/static/destinations/20.jpg",description:"Barcelona for those who value comfort and coziness"},{src:"https://24.objects.htmlacademy.pro/static/destinations/14.jpg",description:"Barcelona with crowded streets"}]},{id:"7e34b1b2-15ea-4f47-a0d1-e35a233774f2",description:"Helsinki - with an embankment of a mighty river as a centre of attraction",name:"Helsinki",pictures:[]},{id:"d26b78f2-6da4-49a2-9e70-15646eb228e0",description:"Geneva - a perfect place to stay with a family",name:"Geneva",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/4.jpg",description:"Geneva full of of cozy canteens where you can try the best coffee in the Middle East"},{src:"https://24.objects.htmlacademy.pro/static/destinations/11.jpg",description:"Geneva full of of cozy canteens where you can try the best coffee in the Middle East"},{src:"https://24.objects.htmlacademy.pro/static/destinations/16.jpg",description:"Geneva for those who value comfort and coziness"},{src:"https://24.objects.htmlacademy.pro/static/destinations/16.jpg",description:"Geneva is a beautiful city"},{src:"https://24.objects.htmlacademy.pro/static/destinations/6.jpg",description:"Geneva full of of cozy canteens where you can try the best coffee in the Middle East"}]},{id:"8a5e9c25-35e5-49ff-b3ba-ecde45919cb9",description:"Rotterdam - full of of cozy canteens where you can try the best coffee in the Middle East",name:"Rotterdam",pictures:[{src:"https://24.objects.htmlacademy.pro/static/destinations/9.jpg",description:"Rotterdam with an embankment of a mighty river as a centre of attraction"},{src:"https://24.objects.htmlacademy.pro/static/destinations/13.jpg",description:"Rotterdam with crowded streets"},{src:"https://24.objects.htmlacademy.pro/static/destinations/3.jpg",description:"Rotterdam famous for its crowded street markets with the best street food in Asia"},{src:"https://24.objects.htmlacademy.pro/static/destinations/15.jpg",description:"Rotterdam in a middle of Europe"}]}],f=document.querySelector(".page-body"),l=f.querySelector(".trip-main"),b=f.querySelector(".trip-info"),p=l.querySelector(".trip-controls__filters"),m=f.querySelector(".trip-events"),h=new class{points=Array.from({length:4},o);offers=r;destination=c;getPoints(){return this.points}getOffers(){return this.offers}getDestinations(){return this.destination}getDestinationsById(e){return this.getDestinations().find((t=>t.id===e))}getOffersByType(e){return this.getOffers().find((t=>t.type===e))}getOffersById(e,t){return this.getOffersByType(e).offers.filter((e=>t.find((t=>e.id===t))))}},v=new class{constructor({container:e,pointsModel:t}){this.container=e,this.pointsModel=t}init(){this.boardPoints=[...this.pointsModel.getPoints()],this.boardOffers=[...this.pointsModel.getOffers()],i(new n({point:this.boardPoints[0],allOffers:this.pointsModel.getOffersByType(this.boardPoints[0].type),pointDestination:this.pointsModel.getDestinationsById(this.boardPoints[0].destination),allDestination:this.pointsModel.getDestinations()}),this.container);for(let t=0;t\n
    \n

    Amsterdam — Chamonix — Geneva

    \n\n

    18 — 20 Mar

    \n
    \n\n

    \n Total: € 1230\n

    \n '}getElement(){return this.element||(this.element=t(this.getTemplate())),this.element}removeElement(){this.element=null}},b),i(new class{getTemplate(){return'
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n \n
    '}getElement(){return this.element||(this.element=t(this.getTemplate())),this.element}removeElement(){this.element=null}},p),i(new class{getTemplate(){return'
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    '}getElement(){return this.element||(this.element=t(this.getTemplate())),this.element}removeElement(){this.element=null}},m),v.init()})(); +//# sourceMappingURL=bundle.8205e1f042ab4813e45c.js.map \ No newline at end of file diff --git a/9/bundle.8205e1f042ab4813e45c.js.map b/9/bundle.8205e1f042ab4813e45c.js.map new file mode 100644 index 0000000..3dbc52f --- /dev/null +++ b/9/bundle.8205e1f042ab4813e45c.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.8205e1f042ab4813e45c.js","mappings":"mBAAA,MAAMA,EAGO,YAIb,SAASC,EAAcC,GACrB,MAAMC,EAAaC,SAASH,cAAc,OAG1C,OAFAE,EAAWE,UAAYH,EAEhBC,EAAWG,iBACpB,CAEA,SAASC,EAAOC,EAAWC,EAAWC,EAAQV,GAC5CS,EAAUE,sBAAsBD,EAAOF,EAAUI,aACnD,CCyCe,MAAMC,EACnBC,WAAAA,EAAY,MAACC,EAAK,OAAEC,EAAM,YAAEC,IAC1BC,KAAKH,MAAQA,EACbG,KAAKF,OAASA,EACdE,KAAKD,YAAcA,CACrB,CAEAE,WAAAA,GACE,MA/DuBC,EAACL,EAAOC,EAAQC,KACzC,MAAM,UAAEI,EAAS,KAAEC,EAAI,WAAEC,GAAcR,EACjCS,EAAWF,EAAK,GAAGG,cAAgBH,EAAKI,MAAM,EAAGJ,EAAKK,QAUtDC,EAAoBZ,EACvBa,KAAKC,GAT4C,2EASTA,EAAMC,0DAAOD,EAAME,8CAAQC,KAA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://big-trip/./src/view/trip-point-view.js","webpack://big-trip/./src/const.js","webpack://big-trip/./src/view/trip-edit-point-view.js","webpack://big-trip/./src/utils.js","webpack://big-trip/./src/mock/points.js","webpack://big-trip/./src/mock/offers.js","webpack://big-trip/./src/mock/destination.js","webpack://big-trip/./src/main.js","webpack://big-trip/./src/model/point-model.js","webpack://big-trip/./src/presenter/board-presenter.js","webpack://big-trip/./src/view/trip-info-view.js","webpack://big-trip/./src/view/trip-filter-view.js","webpack://big-trip/./src/view/trip-event-view.js"],"sourcesContent":["const RenderPosition = {\n BEFOREBEGIN: 'beforebegin',\n AFTERBEGIN: 'afterbegin',\n BEFOREEND: 'beforeend',\n AFTEREND: 'afterend',\n};\n\nfunction createElement(template) {\n const newElement = document.createElement('div');\n newElement.innerHTML = template;\n\n return newElement.firstElementChild;\n}\n\nfunction render(component, container, place = RenderPosition.BEFOREEND) {\n container.insertAdjacentElement(place, component.getElement());\n}\nfunction renderBegin(component, container, place = RenderPosition.BEFOREBEGIN) {\n container.insertAdjacentElement(place, component.getElement());\n}\nfunction renderAfterBegin(component, container, place = RenderPosition.AFTERBEGIN) {\n container.insertAdjacentElement(place, component.getElement());\n}\nexport {RenderPosition, createElement, render, renderBegin, renderAfterBegin};\n","import {createElement} from '../render.js';\n//import { getRandomInteger } from '../utils.js';\nconst createListTemplate = (point, offers, destination) => {\n const { basePrice, type, isFavorite} = point;\n const typeName = type[0].toUpperCase() + type.slice(1, type.length);\n\n const createEventOfferTemplate = (title, price) => (`\n
  • \n ${title}\n\n ${price}\n
  • \n `);\n\n const createEventOffers = offers\n .map((offer) => createEventOfferTemplate(offer.title, offer.price)).join('');\n\n const favoriteClassName = isFavorite\n ? 'event__favorite-btn event__favorite-btn--active'\n : 'event__favorite-btn';\n\n return (\n `
  • \n
    \n \n
    \n \"Event\n
    \n

    ${typeName} ${destination.name}

    \n
    \n

    \n \n —\n \n

    \n

    30M

    \n
    \n

    \n € ${basePrice}\n

    \n

    Offers:

    \n
      \n ${createEventOffers}\n
    \n \n \n
    \n
  • \n `);\n};\nexport default class PointView {\n constructor({point, offers, destination}) {\n this.point = point;\n this.offers = offers;\n this.destination = destination;\n }\n\n getTemplate() {\n return createListTemplate(this.point, this.offers, this.destination);\n }\n\n getElement() {\n if (!this.element) {\n this.element = createElement(this.getTemplate());\n }\n\n return this.element;\n }\n\n removeElement() {\n this.element = null;\n }\n}\n","const TYPES = [\n 'Taxi',\n 'Bus',\n 'Train',\n 'Ship',\n 'Drive',\n 'Flight',\n 'Check-in',\n 'Sightseeing',\n 'Restaurant',\n];\nconst CITIES = [\n 'New-York',\n 'Tokio',\n 'Saint-Petersburg',\n 'London',\n 'Paris',\n 'San-Francisco',\n 'Moscow',\n];\nconst OFFERS = [\n 'Add luggage',\n 'Switch to comfort class',\n 'Add meal',\n 'Choose seats',\n 'Travel by train',\n 'Order Uber',\n 'Rent a car',\n 'Add breakfast',\n 'Book tickets',\n 'Lunch in city',\n];\nexport { TYPES, CITIES, OFFERS };\n","import {createElement} from '../render.js';\nimport { TYPES } from '../const.js';\nimport { createOfferItemTemplate, createTypeGroupTemplate } from '../utils.js';\n\nfunction createAddPointTemplate(point, allOffers, allDestination, pointDestination) {\n const { basePrice, type } = point;\n const typeName = type[0].toUpperCase() + type.slice(1, type.length);\n const { name, description, pictures } = pointDestination;\n function asa() {\n if(pictures.length !== 0) {\n const [{src}] = pictures;\n return src;\n }\n }\n //console.log(description, src)\n const createAllOffers = allOffers.offers\n .map((offer) => {\n const checkedClassName = point.offers.includes(offer.id) ? 'checked' : '';\n return createOfferItemTemplate(allOffers.type, offer.title, offer.price, checkedClassName);\n }).join('');\n\n const createDesinationTemplate = allDestination\n .map((item) => ``).join('');\n\n const createTypeList = TYPES\n .map((group) => {\n const checkedClassName = group === typeName ? 'checked' : '';\n return createTypeGroupTemplate(group, checkedClassName);\n }).join('');\n\n return (\n `
  • \n
    \n
    \n
    \n \n \n
    \n
    \n Event type\n ${createTypeList}\n
    \n
    \n
    \n
    \n \n \n \n ${createDesinationTemplate}\n \n
    \n
    \n \n \n —\n \n \n
    \n
    \n \n \n
    \n \n \n \n
    \n
    \n
    \n

    Offers

    \n
    \n ${createAllOffers}\n
    \n
    \n
    \n

    Destination

    \n

    ${description}

    \n
    \n
    \n \"Event\n \"Event\n \"Event\n \"Event\n \"Event\n
    \n
    \n
    \n
    \n
  • `\n );\n}\nexport default class OffersView {\n constructor({point, allOffers, allDestination, pointDestination}) {\n this.point = point;\n this.allOffers = allOffers;\n this.allDestination = allDestination;\n this.pointDestination = pointDestination;\n }\n\n getTemplate() {\n return createAddPointTemplate(this.point, this.allOffers, this.allDestination, this.pointDestination);\n }\n\n getElement() {\n if (!this.element) {\n this.element = createElement(this.getTemplate());\n }\n\n return this.element;\n }\n\n removeElement() {\n this.element = null;\n }\n}\n","function getRandomArrayElement(items) {\n return items[Math.floor(Math.random() * items.length)];\n}\nfunction getRandomInteger(min, max) {\n const rand = Math.floor(min + Math.random() * (max + 1 - min));\n return Math.floor(rand);\n}\n\nconst createOfferItemTemplate = (type, title, price, className) => `\n
    \n \n \n
    \n`;\n\nconst createTypeGroupTemplate = (group, className) => `\n
    \n \n \n
    \n`;\n\nexport { getRandomArrayElement, getRandomInteger, createOfferItemTemplate, createTypeGroupTemplate };\n","import { getRandomArrayElement } from '../utils.js';\n//import { TYPE, CITIES, OFFERS } from '../const.js';\n\nconst mockPoints = [\n {\n 'id': '0d685664-4f88-42a5-9dc7-7bcdcc5f20d3',\n 'basePrice': 60,\n 'dateFrom': '2024-09-08T04:36:09.239Z',\n 'dateTo': '2024-09-08T13:05:09.239Z',\n 'destination': '36eb5b49-2cec-4834-87e7-c464e155c2d4',\n 'isFavorite': false,\n 'offers': [\n 'fdec3690-03d4-437d-96ce-3beb5cd46988',\n '417d4d4e-8f10-4963-9156-b9b8998eb157'\n ],\n 'type': 'drive'\n },\n {\n 'id': 'd84bd54e-b2b8-43b6-b7bd-4620e7228c78',\n 'basePrice': 6774,\n 'dateFrom': '2024-09-10T09:06:09.239Z',\n 'dateTo': '2024-09-12T07:58:09.239Z',\n 'destination': 'd9e9fc03-d3c9-4f60-baed-e5106dbfe007',\n 'isFavorite': false,\n 'offers': [\n 'fdec3690-03d4-437d-96ce-3beb5cd46988',\n '417d4d4e-8f10-4963-9156-b9b8998eb157'\n ],\n 'type': 'drive'\n },\n {\n 'id': 'cf78f6f1-89fa-4525-9b06-630f76085018',\n 'basePrice': 2278,\n 'dateFrom': '2024-09-13T18:59:09.239Z',\n 'dateTo': '2024-09-14T15:54:09.239Z',\n 'destination': 'f9bc02d8-df0d-45c6-89a3-efcf48289a39',\n 'isFavorite': true,\n 'offers': [\n '253d0cac-ef24-48eb-8123-ea44cce78948',\n 'e3a256a9-423a-44f3-8953-fb771f6272ce',\n '47987680-6915-4dfa-b219-360d004bcdd5',\n 'ba7e1ad7-223a-4a88-bfd5-123b7ea84741',\n 'f5e972a5-0868-4dcc-b744-832185567ff4',\n 'a73620d0-5978-4568-8a94-f6c83be59056'\n ],\n 'type': 'ship'\n },\n {\n 'id': '6d9e8075-ad19-4565-9872-ffd7f574d352',\n 'basePrice': 374,\n 'dateFrom': '2024-09-15T13:16:09.239Z',\n 'dateTo': '2024-09-17T08:39:09.239Z',\n 'destination': '6b7d7f4e-739e-46e3-a7bc-8bde066d1e40',\n 'isFavorite': true,\n 'offers': [],\n 'type': 'sightseeing'\n },\n {\n 'id': '188f3207-7aeb-406b-9e5e-6924dd4fb7bd',\n 'basePrice': 7569,\n 'dateFrom': '2024-09-18T21:15:09.239Z',\n 'dateTo': '2024-09-19T11:01:09.239Z',\n 'destination': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'isFavorite': false,\n 'offers': [],\n 'type': 'sightseeing'\n },\n {\n 'id': '725626fd-6452-46d6-bd29-be7db7c1b245',\n 'basePrice': 6727,\n 'dateFrom': '2024-09-20T14:32:09.239Z',\n 'dateTo': '2024-09-21T14:52:09.239Z',\n 'destination': '7e34b1b2-15ea-4f47-a0d1-e35a233774f2',\n 'isFavorite': true,\n 'offers': [\n 'b839e0ce-46b4-4cfa-8953-e6957874ebd3',\n '0e10983a-ce28-4a91-9e6c-d7042d5bcd7d',\n '5cd19fae-7e59-454c-a390-be20c182effd'\n ],\n 'type': 'flight'\n },\n {\n 'id': '6d033118-fbab-4dcc-bb8e-750c0a5bb523',\n 'basePrice': 3008,\n 'dateFrom': '2024-09-23T15:34:09.239Z',\n 'dateTo': '2024-09-23T22:57:09.239Z',\n 'destination': '6b7d7f4e-739e-46e3-a7bc-8bde066d1e40',\n 'isFavorite': false,\n 'offers': [\n '776b2af8-48b5-49ad-bf4c-bbcee0139e1c',\n 'a2611bbb-1e05-4670-93ba-b7827c45b2f3'\n ],\n 'type': 'check-in'\n },\n {\n 'id': '87fc6ece-f0ac-4b39-81b5-244a94865004',\n 'basePrice': 9246,\n 'dateFrom': '2024-09-25T06:52:09.239Z',\n 'dateTo': '2024-09-26T05:21:09.239Z',\n 'destination': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'isFavorite': false,\n 'offers': [\n '9badcbbd-1e40-4a42-b696-3da3052bc571',\n '32ac83c4-7a14-4f4d-aeff-7a94d00bc202',\n '2e554d1d-7ed4-4db5-983a-366d7fe120e0'\n ],\n 'type': 'bus'\n },\n {\n 'id': 'c1d05f2c-8a64-4f7b-a7f0-8bba0ebec169',\n 'basePrice': 7028,\n 'dateFrom': '2024-09-26T16:29:09.239Z',\n 'dateTo': '2024-09-27T10:59:09.239Z',\n 'destination': 'd9e9fc03-d3c9-4f60-baed-e5106dbfe007',\n 'isFavorite': true,\n 'offers': [],\n 'type': 'restaurant'\n },\n {\n 'id': 'ce0c9436-4245-4994-b257-d986f8900386',\n 'basePrice': 6476,\n 'dateFrom': '2024-09-27T19:33:09.239Z',\n 'dateTo': '2024-09-29T02:15:09.239Z',\n 'destination': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'isFavorite': true,\n 'offers': [\n 'fdec3690-03d4-437d-96ce-3beb5cd46988',\n '417d4d4e-8f10-4963-9156-b9b8998eb157'\n ],\n 'type': 'drive'\n },\n {\n 'id': 'e9cfcd4a-e4e2-4e66-805c-5fb9057b3f0b',\n 'basePrice': 4321,\n 'dateFrom': '2024-09-30T17:50:09.239Z',\n 'dateTo': '2024-10-02T01:48:09.239Z',\n 'destination': 'd26b78f2-6da4-49a2-9e70-15646eb228e0',\n 'isFavorite': false,\n 'offers': [\n 'ff5bb648-e5bc-4ebf-9f3a-67647118f765',\n '05437e62-aeae-4399-abab-548d0aa6befe'\n ],\n 'type': 'restaurant'\n },\n {\n 'id': 'e0061dbd-9844-4efb-91a5-d0610bab7a1f',\n 'basePrice': 6414,\n 'dateFrom': '2024-10-02T10:01:09.239Z',\n 'dateTo': '2024-10-03T21:11:09.239Z',\n 'destination': '7e34b1b2-15ea-4f47-a0d1-e35a233774f2',\n 'isFavorite': true,\n 'offers': [\n 'a2611bbb-1e05-4670-93ba-b7827c45b2f3'\n ],\n 'type': 'check-in'\n },\n {\n 'id': 'fa6d2b97-c59a-4fdc-818c-36954aa281a7',\n 'basePrice': 7229,\n 'dateFrom': '2024-10-04T17:24:09.239Z',\n 'dateTo': '2024-10-05T11:45:09.239Z',\n 'destination': 'd9e9fc03-d3c9-4f60-baed-e5106dbfe007',\n 'isFavorite': true,\n 'offers': [\n '2e554d1d-7ed4-4db5-983a-366d7fe120e0'\n ],\n 'type': 'bus'\n },\n {\n 'id': '6d4158a7-8664-4989-91f5-0da781f24811',\n 'basePrice': 6182,\n 'dateFrom': '2024-10-07T10:53:09.239Z',\n 'dateTo': '2024-10-09T05:46:09.239Z',\n 'destination': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'isFavorite': false,\n 'offers': [],\n 'type': 'restaurant'\n },\n {\n 'id': 'fff6b6c9-1bce-4267-84eb-9afd49ae14b8',\n 'basePrice': 9377,\n 'dateFrom': '2024-10-10T03:59:09.239Z',\n 'dateTo': '2024-10-11T21:10:09.239Z',\n 'destination': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'isFavorite': true,\n 'offers': [\n 'ba7e1ad7-223a-4a88-bfd5-123b7ea84741',\n 'f5e972a5-0868-4dcc-b744-832185567ff4',\n 'a73620d0-5978-4568-8a94-f6c83be59056'\n ],\n 'type': 'ship'\n },\n {\n 'id': 'eaf7cd69-399e-44bd-82da-2997fa3e0e7a',\n 'basePrice': 7972,\n 'dateFrom': '2024-10-12T23:51:09.239Z',\n 'dateTo': '2024-10-13T23:01:09.239Z',\n 'destination': '68c7958d-37a6-41df-b563-38eb8d4cda75',\n 'isFavorite': false,\n 'offers': [\n 'fdec3690-03d4-437d-96ce-3beb5cd46988',\n '417d4d4e-8f10-4963-9156-b9b8998eb157'\n ],\n 'type': 'drive'\n },\n {\n 'id': '6f6d74d1-bbc8-494f-85b4-0b54e412b87a',\n 'basePrice': 4790,\n 'dateFrom': '2024-10-14T18:27:09.239Z',\n 'dateTo': '2024-10-15T06:14:09.239Z',\n 'destination': '8a5e9c25-35e5-49ff-b3ba-ecde45919cb9',\n 'isFavorite': false,\n 'offers': [],\n 'type': 'sightseeing'\n },\n {\n 'id': '4a97801e-d477-4077-88ae-8a6d2da5d9a9',\n 'basePrice': 7166,\n 'dateFrom': '2024-10-15T22:19:09.239Z',\n 'dateTo': '2024-10-17T14:12:09.239Z',\n 'destination': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'isFavorite': false,\n 'offers': [\n '05437e62-aeae-4399-abab-548d0aa6befe'\n ],\n 'type': 'restaurant'\n },\n {\n 'id': 'f4f9a516-7956-4097-a144-d7feae96c353',\n 'basePrice': 5237,\n 'dateFrom': '2024-10-19T08:46:09.239Z',\n 'dateTo': '2024-10-20T17:35:09.239Z',\n 'destination': '6b7d7f4e-739e-46e3-a7bc-8bde066d1e40',\n 'isFavorite': true,\n 'offers': [\n 'cc1e55e9-e7ca-4b96-a8f5-f8872adf8d96',\n '8c379b95-bf04-4e0b-ac27-af7dadc9cfd0'\n ],\n 'type': 'taxi'\n },\n {\n 'id': '247efdf7-b15f-43d0-a4d0-1ce94872f3f3',\n 'basePrice': 8872,\n 'dateFrom': '2024-10-21T12:56:09.239Z',\n 'dateTo': '2024-10-22T08:43:09.239Z',\n 'destination': 'd26b78f2-6da4-49a2-9e70-15646eb228e0',\n 'isFavorite': true,\n 'offers': [],\n 'type': 'restaurant'\n },\n {\n 'id': '8cfd5929-62ef-4979-893d-55d7791d0520',\n 'basePrice': 2011,\n 'dateFrom': '2024-10-23T20:56:09.239Z',\n 'dateTo': '2024-10-25T18:31:09.239Z',\n 'destination': '36eb5b49-2cec-4834-87e7-c464e155c2d4',\n 'isFavorite': true,\n 'offers': [\n 'b9a0d3c2-8ca1-4723-ae6d-401836c55af1'\n ],\n 'type': 'train'\n },\n {\n 'id': '77aebdaa-c06f-486e-8fcb-fc09562a14d1',\n 'basePrice': 8633,\n 'dateFrom': '2024-10-26T18:10:09.239Z',\n 'dateTo': '2024-10-27T22:56:09.239Z',\n 'destination': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'isFavorite': true,\n 'offers': [\n 'e3a256a9-423a-44f3-8953-fb771f6272ce',\n '47987680-6915-4dfa-b219-360d004bcdd5',\n 'ba7e1ad7-223a-4a88-bfd5-123b7ea84741',\n 'f5e972a5-0868-4dcc-b744-832185567ff4',\n 'a73620d0-5978-4568-8a94-f6c83be59056'\n ],\n 'type': 'ship'\n },\n {\n 'id': 'e474d26f-5414-4860-b0c3-bab975b1c9ec',\n 'basePrice': 5081,\n 'dateFrom': '2024-10-29T09:15:09.239Z',\n 'dateTo': '2024-10-29T17:24:09.239Z',\n 'destination': '8a5e9c25-35e5-49ff-b3ba-ecde45919cb9',\n 'isFavorite': false,\n 'offers': [\n '32ac83c4-7a14-4f4d-aeff-7a94d00bc202',\n '2e554d1d-7ed4-4db5-983a-366d7fe120e0'\n ],\n 'type': 'bus'\n },\n {\n 'id': 'a59fb3a2-2cf2-4412-b95a-16e8b43d9440',\n 'basePrice': 9345,\n 'dateFrom': '2024-10-31T15:57:09.239Z',\n 'dateTo': '2024-11-02T15:21:09.239Z',\n 'destination': '36eb5b49-2cec-4834-87e7-c464e155c2d4',\n 'isFavorite': true,\n 'offers': [\n '754d4038-22ec-4ae4-90c9-7b53b9d846cb',\n '37f742d3-cf91-47d9-9089-156c62569bdc',\n '776b2af8-48b5-49ad-bf4c-bbcee0139e1c',\n 'a2611bbb-1e05-4670-93ba-b7827c45b2f3'\n ],\n 'type': 'check-in'\n },\n {\n 'id': '4724a5ea-5c4d-4eb3-9ac1-d5d2f85c75f1',\n 'basePrice': 7989,\n 'dateFrom': '2024-11-03T04:36:09.239Z',\n 'dateTo': '2024-11-04T01:37:09.239Z',\n 'destination': '8a5e9c25-35e5-49ff-b3ba-ecde45919cb9',\n 'isFavorite': true,\n 'offers': [\n '9badcbbd-1e40-4a42-b696-3da3052bc571',\n '32ac83c4-7a14-4f4d-aeff-7a94d00bc202',\n '2e554d1d-7ed4-4db5-983a-366d7fe120e0'\n ],\n 'type': 'bus'\n }\n];\n\nfunction getRandomPoint() {\n return getRandomArrayElement(mockPoints); //Функция-обертка, возвращающая getRandomArrayElement ОДНОГО ПОИНТА!!!\n}\nexport {getRandomPoint};\n\n","//import { getRandomArrayElement } from '../utils.js';\n//import { TYPE, OFFERS } from '../const.js';\n\nconst mockOffers = [\n {\n 'type': 'taxi',\n 'offers': [\n {\n 'id': '740a41fa-f027-4a53-adff-58d2b28d5ebd',\n 'title': 'Upgrade to a business class',\n 'price': 36\n },\n {\n 'id': 'a12e7bfc-6420-4184-b192-fb5e960752cd',\n 'title': 'Choose the radio station',\n 'price': 122\n },\n {\n 'id': 'c71d2c6c-ce6b-47b9-b687-d210ed14c09f',\n 'title': 'Choose temperature',\n 'price': 97\n },\n {\n 'id': 'cc1e55e9-e7ca-4b96-a8f5-f8872adf8d96',\n 'title': 'Drive quickly, I\\'m in a hurry',\n 'price': 74\n },\n {\n 'id': '8c379b95-bf04-4e0b-ac27-af7dadc9cfd0',\n 'title': 'Drive slowly',\n 'price': 143\n }\n ]\n },\n {\n 'type': 'bus',\n 'offers': [\n {\n 'id': '9badcbbd-1e40-4a42-b696-3da3052bc571',\n 'title': 'Infotainment system',\n 'price': 185\n },\n {\n 'id': '32ac83c4-7a14-4f4d-aeff-7a94d00bc202',\n 'title': 'Order meal',\n 'price': 60\n },\n {\n 'id': '2e554d1d-7ed4-4db5-983a-366d7fe120e0',\n 'title': 'Choose seats',\n 'price': 167\n }\n ]\n },\n {\n 'type': 'train',\n 'offers': [\n {\n 'id': '2251f26f-ebba-4f3f-ac2a-fe5a3ff5bbfb',\n 'title': 'Book a taxi at the arrival point',\n 'price': 92\n },\n {\n 'id': 'b4a9180f-fe2b-45a4-8a95-b4dce6dbf222',\n 'title': 'Order a breakfast',\n 'price': 195\n },\n {\n 'id': 'b9a0d3c2-8ca1-4723-ae6d-401836c55af1',\n 'title': 'Wake up at a certain time',\n 'price': 179\n }\n ]\n },\n {\n 'type': 'flight',\n 'offers': [\n {\n 'id': 'f33cba70-44f4-49e2-8b48-82778e76ba51',\n 'title': 'Choose meal',\n 'price': 45\n },\n {\n 'id': '376a6e68-2721-4f37-bb3b-a577b48db7c9',\n 'title': 'Choose seats',\n 'price': 69\n },\n {\n 'id': '1d75be2c-dc40-4d66-a2ab-1163af258996',\n 'title': 'Upgrade to comfort class',\n 'price': 36\n },\n {\n 'id': 'b839e0ce-46b4-4cfa-8953-e6957874ebd3',\n 'title': 'Upgrade to business class',\n 'price': 200\n },\n {\n 'id': '0e10983a-ce28-4a91-9e6c-d7042d5bcd7d',\n 'title': 'Add luggage',\n 'price': 49\n },\n {\n 'id': '5cd19fae-7e59-454c-a390-be20c182effd',\n 'title': 'Business lounge',\n 'price': 33\n }\n ]\n },\n {\n 'type': 'check-in',\n 'offers': [\n {\n 'id': '5b4eb446-15cc-455c-bcc5-d0b8413a36b2',\n 'title': 'Choose the time of check-in',\n 'price': 63\n },\n {\n 'id': '754d4038-22ec-4ae4-90c9-7b53b9d846cb',\n 'title': 'Choose the time of check-out',\n 'price': 109\n },\n {\n 'id': '37f742d3-cf91-47d9-9089-156c62569bdc',\n 'title': 'Add breakfast',\n 'price': 90\n },\n {\n 'id': '776b2af8-48b5-49ad-bf4c-bbcee0139e1c',\n 'title': 'Laundry',\n 'price': 103\n },\n {\n 'id': 'a2611bbb-1e05-4670-93ba-b7827c45b2f3',\n 'title': 'Order a meal from the restaurant',\n 'price': 124\n }\n ]\n },\n {\n 'type': 'sightseeing',\n 'offers': []\n },\n {\n 'type': 'ship',\n 'offers': [\n {\n 'id': '253d0cac-ef24-48eb-8123-ea44cce78948',\n 'title': 'Choose meal',\n 'price': 54\n },\n {\n 'id': 'e3a256a9-423a-44f3-8953-fb771f6272ce',\n 'title': 'Choose seats',\n 'price': 171\n },\n {\n 'id': '47987680-6915-4dfa-b219-360d004bcdd5',\n 'title': 'Upgrade to comfort class',\n 'price': 37\n },\n {\n 'id': 'ba7e1ad7-223a-4a88-bfd5-123b7ea84741',\n 'title': 'Upgrade to business class',\n 'price': 136\n },\n {\n 'id': 'f5e972a5-0868-4dcc-b744-832185567ff4',\n 'title': 'Add luggage',\n 'price': 191\n },\n {\n 'id': 'a73620d0-5978-4568-8a94-f6c83be59056',\n 'title': 'Business lounge',\n 'price': 60\n }\n ]\n },\n {\n 'type': 'drive',\n 'offers': [\n {\n 'id': 'fdec3690-03d4-437d-96ce-3beb5cd46988',\n 'title': 'With automatic transmission',\n 'price': 48\n },\n {\n 'id': '417d4d4e-8f10-4963-9156-b9b8998eb157',\n 'title': 'With air conditioning',\n 'price': 117\n }\n ]\n },\n {\n 'type': 'restaurant',\n 'offers': [\n {\n 'id': 'ff5bb648-e5bc-4ebf-9f3a-67647118f765',\n 'title': 'Choose live music',\n 'price': 139\n },\n {\n 'id': '05437e62-aeae-4399-abab-548d0aa6befe',\n 'title': 'Choose VIP area',\n 'price': 192\n }\n ]\n }\n];\n\nexport {mockOffers};\n\n\n","const mockDestinations = [\n {\n 'id': 'd9e9fc03-d3c9-4f60-baed-e5106dbfe007',\n 'description': 'Paris - is a wonderful city!',\n 'name': 'Paris',\n 'pictures': []\n },\n {\n 'id': '6b7d7f4e-739e-46e3-a7bc-8bde066d1e40',\n 'description': 'Venice - with a beautiful old town',\n 'name': 'Venice',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/4.jpg',\n 'description': 'Venice with an embankment of a mighty river as a centre of attraction'\n }\n ]\n },\n {\n 'id': 'a9670654-21d6-4ccf-bde9-e1fa264f46cb',\n 'description': 'Frankfurt - with an embankment of a mighty river as a centre of attraction',\n 'name': 'Frankfurt',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/16.jpg',\n 'description': 'Frankfurt is a beautiful city'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/4.jpg',\n 'description': 'Frankfurt with an embankment of a mighty river as a centre of attraction'\n }\n ]\n },\n {\n 'id': 'f9bc02d8-df0d-45c6-89a3-efcf48289a39',\n 'description': 'Oslo - in a middle of Europe',\n 'name': 'Oslo',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/6.jpg',\n 'description': 'Oslo with crowded streets'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/4.jpg',\n 'description': 'Oslo is a beautiful city'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/14.jpg',\n 'description': 'Oslo for those who value comfort and coziness'\n }\n ]\n },\n {\n 'id': '36eb5b49-2cec-4834-87e7-c464e155c2d4',\n 'description': 'Monaco - middle-eastern paradise',\n 'name': 'Monaco',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/3.jpg',\n 'description': 'Monaco for those who value comfort and coziness'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/2.jpg',\n 'description': 'Monaco middle-eastern paradise'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/2.jpg',\n 'description': 'Monaco with a beautiful old town'\n }\n ]\n },\n {\n 'id': '68c7958d-37a6-41df-b563-38eb8d4cda75',\n 'description': 'Berlin - a true asian pearl',\n 'name': 'Berlin',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/13.jpg',\n 'description': 'Berlin famous for its crowded street markets with the best street food in Asia'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/8.jpg',\n 'description': 'Berlin is a beautiful city'\n }\n ]\n },\n {\n 'id': 'f4bf1e21-1019-4532-889a-8f0ec673be63',\n 'description': 'Barcelona - famous for its crowded street markets with the best street food in Asia',\n 'name': 'Barcelona',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/8.jpg',\n 'description': 'Barcelona a perfect place to stay with a family'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/11.jpg',\n 'description': 'Barcelona is a beautiful city'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/1.jpg',\n 'description': 'Barcelona in a middle of Europe'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/20.jpg',\n 'description': 'Barcelona for those who value comfort and coziness'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/14.jpg',\n 'description': 'Barcelona with crowded streets'\n }\n ]\n },\n {\n 'id': '7e34b1b2-15ea-4f47-a0d1-e35a233774f2',\n 'description': 'Helsinki - with an embankment of a mighty river as a centre of attraction',\n 'name': 'Helsinki',\n 'pictures': []\n },\n {\n 'id': 'd26b78f2-6da4-49a2-9e70-15646eb228e0',\n 'description': 'Geneva - a perfect place to stay with a family',\n 'name': 'Geneva',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/4.jpg',\n 'description': 'Geneva full of of cozy canteens where you can try the best coffee in the Middle East'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/11.jpg',\n 'description': 'Geneva full of of cozy canteens where you can try the best coffee in the Middle East'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/16.jpg',\n 'description': 'Geneva for those who value comfort and coziness'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/16.jpg',\n 'description': 'Geneva is a beautiful city'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/6.jpg',\n 'description': 'Geneva full of of cozy canteens where you can try the best coffee in the Middle East'\n }\n ]\n },\n {\n 'id': '8a5e9c25-35e5-49ff-b3ba-ecde45919cb9',\n 'description': 'Rotterdam - full of of cozy canteens where you can try the best coffee in the Middle East',\n 'name': 'Rotterdam',\n 'pictures': [\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/9.jpg',\n 'description': 'Rotterdam with an embankment of a mighty river as a centre of attraction'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/13.jpg',\n 'description': 'Rotterdam with crowded streets'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/3.jpg',\n 'description': 'Rotterdam famous for its crowded street markets with the best street food in Asia'\n },\n {\n 'src': 'https://24.objects.htmlacademy.pro/static/destinations/15.jpg',\n 'description': 'Rotterdam in a middle of Europe'\n }\n ]\n }\n];\n\nexport { mockDestinations };\n\n","import TripInfoView from './view/trip-info-view.js'; //Инфо в шапке про маршрут\nimport TripFilterView from './view/trip-filter-view.js'; //Фильтры\nimport TripSortView from './view/trip-event-view.js'; //Сортировка DAY, EVENT, PRICE\n//import AddPointView from './view/trip-add-point-view.js'; //Форма создания\n\nimport BoardPresenter from './presenter/board-presenter.js';\nimport PointsModel from './model/point-model.js';\nimport {render, renderBegin} from './render.js';\n\n\nconst siteMainElement = document.querySelector('.page-body');\nconst siteTripInfoElement = siteMainElement.querySelector('.trip-main'); // шапка\nconst siteTripInfo = siteMainElement.querySelector('.trip-info'); // Инфо в шапке про маршрут\nconst siteFiltersElement = siteTripInfoElement.querySelector('.trip-controls__filters'); // Фильтры EVERYTHING, FUTURE, PAST и т.д\nconst siteEventsElement = siteMainElement.querySelector('.trip-events'); // Сортировка DAY, EVENT, TIME итд., Форма создания и Точка маршрута\n\nconst pointsModel = new PointsModel(); //Создаем инстанс класса из модели\n\nconst boardPresenter = new BoardPresenter({\n container: siteEventsElement,\n pointsModel\n});\n\nrenderBegin(new TripInfoView(), siteTripInfo); // Отображение информации в шапке про маршрут\nrender(new TripFilterView(), siteFiltersElement); // Фильтры EVERYTHING, FUTURE, PAST и т.д\nrender(new TripSortView(), siteEventsElement); // Сортировка DAY, EVENT, TIME, PRICE, OFFER\n\nboardPresenter.init(); //Вызов презентера и ОТРИСОВКА!!! 2=х вьюшек\n","import { getRandomPoint } from '../mock/points.js';\nimport { mockOffers } from '../mock/offers.js';\nimport { mockDestinations } from '../mock/destination.js';\nconst POINT_COUNT = 4; //Количество поинтов (сколько раз отрисуется поинт getRandomPoint)\n\nexport default class PointsModel {\n points = Array.from({length: POINT_COUNT}, getRandomPoint); //Записываем в points массив поинтов\n offers = mockOffers;\n destination = mockDestinations;\n\n getPoints() {\n return this.points;\n }\n\n getOffers() {\n return this.offers;\n }\n\n getDestinations() {\n return this.destination;\n }\n\n getDestinationsById(id) {\n const allDestinations = this.getDestinations();\n return allDestinations.find((item) => item.id === id);\n }\n\n getOffersByType(type) {\n const allOffers = this.getOffers();\n return allOffers.find((item) => item.type === type);\n }\n\n getOffersById(type, itemsId) {\n const offersType = this.getOffersByType(type);\n return offersType.offers.filter((item) => itemsId.find((id) => item.id === id));\n }\n}\n\n","\nimport PointView from '../view/trip-point-view.js'; //Точка маршрута\nimport OffersView from '../view/trip-edit-point-view.js';//Форма редактирования\nimport {render, RenderPosition} from '../render.js';\n\nexport default class BoardPresenter {\n\n constructor({container, pointsModel}) {\n this.container = container;\n this.pointsModel = pointsModel;\n }\n\n init() {\n this.boardPoints = [...this.pointsModel.getPoints()];\n\n this.boardOffers = [...this.pointsModel.getOffers()];\n const offersView = new OffersView({\n point: this.boardPoints[0],\n allOffers: this.pointsModel.getOffersByType(this.boardPoints[0].type),\n pointDestination: this.pointsModel.getDestinationsById(this.boardPoints[0].destination),\n allDestination: this.pointsModel.getDestinations()\n });\n render(offersView, this.container); //Отображение формы редактирования\n\n for (let i = 0; i < this.boardPoints.length; i++) {\n const point = new PointView({\n point: this.boardPoints[i],\n offers: [...this.pointsModel.getOffersById(this.boardPoints[i].type, this.boardPoints[i].offers)],\n destination: this.pointsModel.getDestinationsById(this.boardPoints[i].destination)\n });\n render(point, this.container, RenderPosition.BEFOREEND);\n // render(new PointView({points: this.boardPoints[i]}), this.container, RenderPosition.BEFOREEND); //Отображение Точки маршрута 3 раза\n }\n }\n}\n\n","import {createElement} from '../render.js';\n\nfunction createTripInfoTemplate() {\n\n return (\n `
    \n
    \n

    Amsterdam — Chamonix — Geneva

    \n\n

    18 — 20 Mar

    \n
    \n\n

    \n Total: € 1230\n

    \n
    `\n );\n}\n\nexport default class TripInfoView {\n getTemplate() {\n return createTripInfoTemplate();\n }\n\n getElement() {\n if (!this.element) {\n this.element = createElement(this.getTemplate());\n }\n\n return this.element;\n }\n\n removeElement() {\n this.element = null;\n }\n}\n","import {createElement} from '../render.js';\n\nfunction createTripFilterTemplate() {\n return (\n `
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n \n
    `);\n}\n\nexport default class TripFilterView {\n getTemplate() {\n return createTripFilterTemplate();\n }\n\n getElement() {\n if (!this.element) {\n this.element = createElement(this.getTemplate());\n }\n\n return this.element;\n }\n\n removeElement() {\n this.element = null;\n }\n}\n","import {createElement} from '../render.js';\n\nfunction createTripSortTemplate() {\n return (\n `
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    `);\n}\n\nexport default class SortView {\n getTemplate() {\n return createTripSortTemplate();\n }\n\n getElement() {\n if (!this.element) {\n this.element = createElement(this.getTemplate());\n }\n\n return this.element;\n }\n\n removeElement() {\n this.element = null;\n }\n}\n"],"names":["RenderPosition","createElement","template","newElement","document","innerHTML","firstElementChild","render","component","container","place","insertAdjacentElement","getElement","PointView","constructor","point","offers","destination","this","getTemplate","createListTemplate","basePrice","type","isFavorite","typeName","toUpperCase","slice","length","createEventOffers","map","offer","title","price","join","favoriteClassName","name","element","removeElement","TYPES","OffersView","allOffers","allDestination","pointDestination","description","pictures","createAllOffers","checkedClassName","includes","id","createOfferItemTemplate","className","createDesinationTemplate","item","group","createTypeGroupTemplate","toLowerCase","src","asa","createAddPointTemplate","mockPoints","getRandomPoint","items","Math","floor","random","mockOffers","mockDestinations","siteMainElement","querySelector","siteTripInfoElement","siteTripInfo","siteFiltersElement","siteEventsElement","pointsModel","points","Array","from","getPoints","getOffers","getDestinations","getDestinationsById","find","getOffersByType","getOffersById","itemsId","filter","boardPresenter","init","boardPoints","boardOffers","i","renderBegin"],"sourceRoot":""} \ No newline at end of file diff --git a/9/css/style.css b/9/css/style.css new file mode 100644 index 0000000..aefb5e2 --- /dev/null +++ b/9/css/style.css @@ -0,0 +1,835 @@ +@font-face { + font-family: 'Montserrat'; + font-style: normal; + font-weight: 400; + src: local('Montserrat Regular'), local('Montserrat-Regular'), url('../fonts/Montserrat-Regular.woff2') format('woff2'); +} + +@font-face { + font-family: 'Montserrat'; + font-style: normal; + font-weight: 500; + src: local('Montserrat Medium'), local('Montserrat-Medium'), url('../fonts/Montserrat-Medium.woff2') format('woff2'); +} + +@font-face { + font-family: 'Montserrat'; + font-style: normal; + font-weight: 600; + src: local('Montserrat SemiBold'), local('Montserrat-SemiBold'), url('../fonts/Montserrat-SemiBold.woff2') format('woff2'); +} + +@font-face { + font-family: 'Montserrat'; + font-style: normal; + font-weight: 700; + src: local('Montserrat Bold'), local('Montserrat-Bold'), url('../fonts/Montserrat-Bold.woff2') format('woff2'); +} + +@font-face { + font-family: 'Montserrat'; + font-style: normal; + font-weight: 800; + src: local('Montserrat ExtraBold'), local('Montserrat-ExtraBold'), url('../fonts/Montserrat-ExtraBold.woff2') format('woff2'); +} + +html { + height: 100%; } + +body { + padding: 0; + margin: 0; + -webkit-font-smoothing: antialiased; + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; } + +main { + display: block; } + +@-moz-document url-prefix() { + body { + font-weight: 200; + -moz-osx-font-smoothing: grayscale; } } + +.visually-hidden { + position: absolute; + overflow: hidden; + clip: rect(0 0 0 0); + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + border: 0; } + +.page-body { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + height: 100%; + min-width: 1200px; + padding: 0; + margin: 0; + font-size: 17px; + line-height: 1.2; + font-family: "Montserrat", "Arial", sans-serif; + color: #000000; + background-color: #f2f2f2; } + +.page-body__container { + -ms-flex-positive: 1; + flex-grow: 1; + position: relative; + z-index: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 1200px; + padding: 0 10px; + margin: 0 auto; } + .page-body__container::after { + content: ""; + position: absolute; + z-index: -1; + top: 0; + bottom: 0; + left: 130px; + width: 2px; + background-color: rgba(255, 255, 255, 0.58); } + +.page-body__page-main { + -ms-flex-positive: 1; + flex-grow: 1; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; } + +.btn { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + padding: 4px 16px 5px; + font-weight: 500; + font-size: 17px; + line-height: 21px; + font-family: inherit; + text-decoration: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + border: none; + border-radius: 15px; + cursor: pointer; + -webkit-transition: opacity 0.2s; + transition: opacity 0.2s; } + .btn:hover { + opacity: 0.8; } + .btn:active { + opacity: 0.6; } + .btn--big { + padding: 17px 29px 16px; + font-size: 18px; + line-height: 21px; + border-radius: 27px; } + .btn--yellow { + color: #424242; + background-color: #ffd054; } + .btn--blue { + color: #ffffff; + background-color: #0d8ae4; } + .btn:disabled { + opacity: 0.46; + cursor: default; } + +.page-header { + padding-top: 23px; + color: #ffffff; + background-color: #078ff0; + background-image: url("../img/header-bg.png"); + background-size: cover; + background-repeat: no-repeat; } + @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) { + .page-header { + background-image: url("../img/header-bg@2x.png"); } } + +.page-header__container { + display: -ms-flexbox; + display: flex; + -ms-flex-align: start; + align-items: flex-start; + padding-left: 110px; } + +.page-header__logo { + display: block; + width: 42px; + height: 42px; + margin-right: 18px; } + +.trip-main { + -ms-flex-positive: 1; + flex-grow: 1; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: start; + align-items: flex-start; + -ms-flex-pack: justify; + justify-content: space-between; + padding-bottom: 10px; } + .trip-main--hidden { + display: none; } + +.trip-main__trip-info { + width: 100%; + margin-bottom: 35px; } + +.trip-main__trip-controls { + margin-top: 36px; + width: 600px; } + +.trip-main__event-add-btn { + min-width: 170px; + margin-left: auto; } + .trip-main__event-add-btn::before { + content: "\002B\000A0"; } + .trip-main__event-add-btn--hidden { + display: none; } + +.trip-info { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; } + +.trip-info__main { + width: 600px; } + +.trip-info__title { + margin: 0; + margin-bottom: 4px; + font-weight: 800; + font-size: 17px; + line-height: 21px; } + +.trip-info__dates { + margin: 0; + font-weight: 800; + font-size: 13px; + line-height: 16px; + text-transform: uppercase; + opacity: 0.8; } + +.trip-info__cost { + width: 170px; + margin: 0 0 0 auto; + font-weight: 700; + font-size: 21px; + line-height: 25px; + text-align: center; } + +.trip-controls__trip-tabs { + margin-bottom: 9px; } + +.trip-tabs { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: start; + align-items: flex-start; } + +.trip-tabs__btn { + display: block; + font-weight: 500; + font-size: 21px; + line-height: 25px; + text-decoration: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + color: inherit; + opacity: 0.8; + -webkit-transition: opacity 0.2s; + transition: opacity 0.2s; } + .trip-tabs__btn:not(:last-of-type) { + margin-right: 26px; } + .trip-tabs__btn:hover { + opacity: 1; } + .trip-tabs__btn:active { + opacity: 0.6; } + .trip-tabs__btn--active, .trip-tabs__btn--active:hover, .trip-tabs__btn--active:active { + opacity: 1; + cursor: default; } + +.trip-filters { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: start; + align-items: flex-start; } + .trip-filters--hidden { + display: none; } + +.trip-filters__filter:not(:last-of-type) { + margin-right: 19px; } + +.trip-filters__filter-label { + font-weight: 800; + font-size: 14px; + line-height: 17px; + letter-spacing: 0.5px; + text-transform: uppercase; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + opacity: 0.6; + cursor: pointer; + -webkit-transition: opacity 0.2s; + transition: opacity 0.2s; } + .trip-filters__filter-label:hover { + opacity: 1; } + .trip-filters__filter-label:active { + opacity: 0.6; } + .trip-filters__filter-input:checked + .trip-filters__filter-label { + opacity: 1; + cursor: default; } + .trip-filters__filter-input:disabled + .trip-filters__filter-label { + opacity: 0.4; + cursor: default; } + +.trip-events { + padding-top: 22px; } + .trip-events--hidden { + display: none; } + +.trip-events__trip-sort { + margin-bottom: 8px; } + +.trip-events__msg { + margin: 0; + margin-top: 280px; + font-weight: 500; + font-size: 44px; + line-height: 60px; + text-align: center; + opacity: 0.89; } + .trip-events__msg--hidden { + display: none; } + +.trip-events__list { + padding: 0; + margin: 0; + list-style: none; } + +.trip-events__item { + margin-bottom: 54px; + margin-left: auto; + list-style-type: none; +} + +.trip-sort { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: center; + align-items: center; } + +.trip-sort__item { + margin-right: 15px; + font-weight: 800; + font-size: 13px; + line-height: 16px; + letter-spacing: 0.6px; + text-transform: uppercase; + color: #b4b4b4; + cursor: default; + -webkit-transition: color 0.2s; + transition: color 0.2s; } + .trip-sort__item:last-child { + margin-right: 0; } + .trip-sort__item--day { + width: 55px; + text-align: center; + margin-right: 83px; } + .trip-sort__item--event { + width: 300px; } + .trip-sort__item--time { + width: 225px; } + .trip-sort__item--price { + width: 90px; } + +.trip-sort__btn { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + padding: 7px 15px 6px 22px; + border: 1px solid transparent; + border-radius: 14px; + cursor: pointer; } + .trip-sort__btn:hover { + color: #000000; } + .trip-sort__input:checked + .trip-sort__btn { + position: relative; + color: #000000; + border-color: #000000; } + .trip-sort__input:checked + .trip-sort__btn::before { + content: ""; + position: absolute; + top: 50%; + left: 8px; + width: 8px; + height: 8px; + background-color: #ffd054; + border-radius: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } + +.trip-sort__input:disabled + .trip-sort__btn { + opacity: 0.6; } +.trip-sort__input:disabled + .trip-sort__btn:hover { + color: #b4b4b4; + cursor: default; } + +.event { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 20px; + font-size: 17px; + line-height: 21px; } + .event--edit { + display: block; + margin-left: 80px; + padding: 0; + background-color: #ffffff; + border-radius: 18px; + -webkit-box-shadow: 0 11px 20px rgba(0, 0, 0, 0.043); + box-shadow: 0 11px 20px rgba(0, 0, 0, 0.043); } + +.event__header { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding: 20px; } + +.event__date { + display: block; + min-width: 80px; + font-size: 13px; + line-height: 16px; + text-transform: uppercase; + text-align: left; } + +.event__type-wrapper { + position: relative; } + +.event__type { + -ms-flex-negative: 0; + flex-shrink: 0; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 42px; + height: 42px; + margin-right: 18px; + background-color: #ffffff; + border-radius: 50%; } + +.event__type-btn { + padding: 0; + border: 1px solid #0d8ae4; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; } + +.event__type-icon { + display: block; + width: 17px; + height: 17px; } + +.event__type-list { + position: absolute; + z-index: 2; + top: calc(100% + 7px); + left: -20px; + display: none; + width: 180px; + background-color: #ffffff; + border: 1px solid rgba(151, 151, 151, 0.169724); + -webkit-box-shadow: 0 11px 20px rgba(0, 0, 0, 0.219146); + box-shadow: 0 11px 20px rgba(0, 0, 0, 0.219146); + border-radius: 4px; } + +.event__type-toggle:checked + .event__type-list { + display: block; } + +.event__type-group { + padding: 13px 0 11px; + margin: 0; + border: none; } + .event__type-group:not(:last-of-type) { + border-bottom: 1px solid rgba(151, 151, 151, 0.33); } + +.event__type-item:not(:last-child) { + margin-bottom: 5px; } + +.event__type-label { + position: relative; + display: block; + padding: 5px 10px 5px 62px; + font-size: 17px; + line-height: 21px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + -webkit-transition: color 0.2s; + transition: color 0.2s; } + .event__type-label::before { + content: ""; + position: absolute; + top: calc(50% - 3px); + left: 32px; + width: 17px; + height: 17px; + background-position: 0 0; + background-size: 17px 17px; + background-repeat: no-repeat; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } + .event__type-label--taxi::before { + background-image: url("../img/icons/taxi.png"); } + .event__type-label--bus::before { + background-image: url("../img/icons/bus.png"); } + .event__type-label--train::before { + background-image: url("../img/icons/train.png"); } + .event__type-label--ship::before { + background-image: url("../img/icons/ship.png"); } + .event__type-label--drive::before { + background-image: url("../img/icons/drive.png"); } + .event__type-label--flight::before { + background-image: url("../img/icons/flight.png"); } + .event__type-label--check-in::before { + background-image: url("../img/icons/check-in.png"); } + .event__type-label--sightseeing::before { + background-image: url("../img/icons/sightseeing.png"); } + .event__type-label--restaurant::before { + background-image: url("../img/icons/restaurant.png"); } + .event__type-label:hover { + color: #ffd054; } + +.event__type-input:checked + .event__type-label { + color: #000000; + background-color: #ffd054; } + .event__type-input:checked + .event__type-label::after { + content: ""; + position: absolute; + top: 50%; + left: 11px; + width: 8px; + height: 8px; + background-color: #ffffff; + border-radius: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } + +.event__title { + -ms-flex-negative: 0; + flex-shrink: 0; + width: 298px; + margin: 0; + margin-right: 15px; + font-weight: 400; + font-size: inherit; } + .event__title::first-letter { + text-transform: capitalize; } + +.event__schedule { + -ms-flex-negative: 0; + flex-shrink: 0; + width: 230px; + margin-right: 15px; } + +.event__time { + margin: 0; + margin-bottom: 4px; } + +.event__duration { + margin: 0; + font-size: 14px; + line-height: 17px; + letter-spacing: 0.6px; + text-transform: uppercase; + color: #999999; + opacity: 0.9; } + +.event__price { + -ms-flex-negative: 0; + flex-shrink: 0; + width: 90px; + margin: 0; + margin-right: 15px; } + +.event__selected-offers { + width: 220px; + padding: 0; + margin: 0; + font-weight: 600; + list-style: none; } + +.event__rollup-btn { + position: relative; + display: block; + width: 40px; + height: 40px; + padding: 0; + margin: 0; + background-color: transparent; + border: none; + cursor: pointer; } + .event__rollup-btn::after { + content: ""; + position: absolute; + top: calc(50% - 5px); + left: 50%; + width: 10px; + height: 10px; + border-right: 2px solid #000000; + border-bottom: 2px solid #000000; + -webkit-transform: translate(-50%, -50%) rotate(45deg); + transform: translate(-50%, -50%) rotate(45deg); + -webkit-transition: border-color 0.2s, -webkit-transform 0.6s; + transition: border-color 0.2s, -webkit-transform 0.6s; + transition: border-color 0.2s, transform 0.6s; + transition: border-color 0.2s, transform 0.6s, -webkit-transform 0.6s; } + .event__rollup-btn:hover::after { + border-color: #0d8ae4; } + +.event--edit .event__rollup-btn { + margin-left: auto; } +.event--edit .event__rollup-btn::after { + top: calc(50% + 3px); + -webkit-transform: translate(-50%, -50%) rotate(225deg); + transform: translate(-50%, -50%) rotate(225deg); } + +.event__field-group { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding: 5px 2px; + margin-right: 18px; + border-bottom: 1px solid #0d8ae4; } + .event__field-group--destination { + width: 290px; } + +.event__label { + margin-right: 5px; + cursor: pointer; } + .event__label::first-letter { + text-transform: capitalize; } + +.event__input { + -ms-flex-positive: 1; + flex-grow: 1; + padding: 0; + font-size: inherit; + line-height: inherit; + font-family: inherit; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border: none; } + .event__input--destination { + width: 150px; } + .event__input--destination::-webkit-calendar-picker-indicator { + display: none; } + .event__input--time { + width: 130px; + text-align: center; } + .event__input--price { + width: 66px; } + +.event__save-btn { + margin-right: 18px; } + +.event__reset-btn { + display: block; + padding: 0; + font-weight: 500; + font-size: 17px; + line-height: 21px; + font-family: inherit; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + color: #0d8ae4; + background-color: transparent; + border: none; + cursor: pointer; + -webkit-transition: opacity 0.2s; + transition: opacity 0.2s; } + .event__reset-btn:hover { + opacity: 0.8; } + .event__reset-btn:active { + opacity: 0.6; } + +.event__favorite-btn { + margin: 0 10px; + margin-left: auto; + color: #ebebeb; + background-color: transparent; + border: none; + cursor: pointer; + outline: none; + -webkit-transition: color 0.2s; + transition: color 0.2s; } + .event__favorite-btn:hover, + .event__favorite-btn:focus { + color: rgba(255, 208, 84, 0.6); } + .event__favorite-btn--active { + color: #ffd054; + } + +.event__favorite-icon { + display: block; + width: 28px; + height: 28px; + fill: currentColor; + -webkit-transition: fill 0.2s; + transition: fill 0.2s; } + +.event__details { + padding: 20px 0 27px; + border-top: 2px solid #ffd054; } + +.event--blocked .event__details { + position: relative; } + .event--blocked .event__details::after { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: rgba(255, 255, 255, 0.8); + border-radius: 0 0 18px 18px; } + +.event__details-title { + padding-left: 20px; + margin: 0; + margin-bottom: 24px; + font-weight: 500; + font-size: 23px; + line-height: 27px; } + +.event__section:not(:last-child) { + margin-bottom: 28px; } + +.event__section--offers { + padding: 0 20px; } + +.event__section-title { + margin: 0; + font-weight: 800; + font-size: 14px; + line-height: 17px; + letter-spacing: 0.6px; + text-transform: uppercase; + color: #ffd054; } + .event__section-title--offers { + margin-bottom: 15px; } + .event__section-title--destination { + margin-bottom: 8px; + margin-left: 20px; } + +.event__available-offers { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-bottom: -6px; } + +.event__offer::first-letter { + text-transform: capitalize; } + +.event__offer-selector { + margin-bottom: 6px; } + .event__offer-selector:not(:last-of-type) { + margin-right: 6px; } + +.event__offer-label { + display: block; + padding: 22px 30px 21px; + font-size: 17px; + line-height: 21px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #f2f2f2; + border-radius: 32px; + cursor: pointer; + -webkit-transition: background-color 0.2s; + transition: background-color 0.2s; } + .event__offer-label:hover { + background-color: rgba(13, 138, 228, 0.6); } + .event__offer-label::first-letter { + text-transform: capitalize; } + +.event__offer-checkbox:checked + .event__offer-label { + background-color: #0d8ae4; } + +.event__destination-description { + width: 560px; + margin: 0; + margin-bottom: 16px; + margin-left: 20px; + font-size: 15px; + line-height: 18px; } + +.event__photos-container { + width: 100%; + overflow-x: scroll; } + +.event__photos-tape { + display: -ms-flexbox; + display: flex; + -ms-flex-align: start; + align-items: flex-start; } + +.event__photo { + display: block; + height: 152px; + width: auto; + border-radius: 4px; } + .event__photo:first-child { + padding-left: 20px; } + .event__photo:last-child { + padding-right: 20px; } + .event__photo:not(:last-child) { + margin-right: 5px; } diff --git a/9/fonts/Montserrat-Bold.woff2 b/9/fonts/Montserrat-Bold.woff2 new file mode 100644 index 0000000..3d0b409 Binary files /dev/null and b/9/fonts/Montserrat-Bold.woff2 differ diff --git a/9/fonts/Montserrat-ExtraBold.woff2 b/9/fonts/Montserrat-ExtraBold.woff2 new file mode 100644 index 0000000..0abb707 Binary files /dev/null and b/9/fonts/Montserrat-ExtraBold.woff2 differ diff --git a/9/fonts/Montserrat-Medium.woff2 b/9/fonts/Montserrat-Medium.woff2 new file mode 100644 index 0000000..9dc5c7f Binary files /dev/null and b/9/fonts/Montserrat-Medium.woff2 differ diff --git a/9/fonts/Montserrat-Regular.woff2 b/9/fonts/Montserrat-Regular.woff2 new file mode 100644 index 0000000..70788c2 Binary files /dev/null and b/9/fonts/Montserrat-Regular.woff2 differ diff --git a/9/fonts/Montserrat-SemiBold.woff2 b/9/fonts/Montserrat-SemiBold.woff2 new file mode 100644 index 0000000..29cc1a9 Binary files /dev/null and b/9/fonts/Montserrat-SemiBold.woff2 differ diff --git a/9/img/header-bg.png b/9/img/header-bg.png new file mode 100644 index 0000000..c7ccbda Binary files /dev/null and b/9/img/header-bg.png differ diff --git a/9/img/header-bg@2x.png b/9/img/header-bg@2x.png new file mode 100644 index 0000000..26716e3 Binary files /dev/null and b/9/img/header-bg@2x.png differ diff --git a/9/img/icons/bus.png b/9/img/icons/bus.png new file mode 100644 index 0000000..bb2bad6 Binary files /dev/null and b/9/img/icons/bus.png differ diff --git a/9/img/icons/check-in.png b/9/img/icons/check-in.png new file mode 100644 index 0000000..866702e Binary files /dev/null and b/9/img/icons/check-in.png differ diff --git a/9/img/icons/drive.png b/9/img/icons/drive.png new file mode 100644 index 0000000..ef3522d Binary files /dev/null and b/9/img/icons/drive.png differ diff --git a/9/img/icons/flight.png b/9/img/icons/flight.png new file mode 100644 index 0000000..3e690ca Binary files /dev/null and b/9/img/icons/flight.png differ diff --git a/9/img/icons/restaurant.png b/9/img/icons/restaurant.png new file mode 100644 index 0000000..d677771 Binary files /dev/null and b/9/img/icons/restaurant.png differ diff --git a/9/img/icons/ship.png b/9/img/icons/ship.png new file mode 100644 index 0000000..e854301 Binary files /dev/null and b/9/img/icons/ship.png differ diff --git a/9/img/icons/sightseeing.png b/9/img/icons/sightseeing.png new file mode 100644 index 0000000..a87e06b Binary files /dev/null and b/9/img/icons/sightseeing.png differ diff --git a/9/img/icons/taxi.png b/9/img/icons/taxi.png new file mode 100644 index 0000000..f052e81 Binary files /dev/null and b/9/img/icons/taxi.png differ diff --git a/9/img/icons/train.png b/9/img/icons/train.png new file mode 100644 index 0000000..1dfd1f3 Binary files /dev/null and b/9/img/icons/train.png differ diff --git a/9/img/icons/transport.png b/9/img/icons/transport.png new file mode 100644 index 0000000..9200b63 Binary files /dev/null and b/9/img/icons/transport.png differ diff --git a/9/img/logo.png b/9/img/logo.png new file mode 100644 index 0000000..f11c3ae Binary files /dev/null and b/9/img/logo.png differ diff --git a/9/img/photos/1.jpg b/9/img/photos/1.jpg new file mode 100644 index 0000000..2234819 Binary files /dev/null and b/9/img/photos/1.jpg differ diff --git a/9/img/photos/2.jpg b/9/img/photos/2.jpg new file mode 100644 index 0000000..833055b Binary files /dev/null and b/9/img/photos/2.jpg differ diff --git a/9/img/photos/3.jpg b/9/img/photos/3.jpg new file mode 100644 index 0000000..b63e90a Binary files /dev/null and b/9/img/photos/3.jpg differ diff --git a/9/img/photos/4.jpg b/9/img/photos/4.jpg new file mode 100644 index 0000000..de034f4 Binary files /dev/null and b/9/img/photos/4.jpg differ diff --git a/9/img/photos/5.jpg b/9/img/photos/5.jpg new file mode 100644 index 0000000..fa162ab Binary files /dev/null and b/9/img/photos/5.jpg differ diff --git a/9/index.html b/9/index.html new file mode 100644 index 0000000..c664743 --- /dev/null +++ b/9/index.html @@ -0,0 +1 @@ +Big Trip

    Trip events

    \ No newline at end of file