Skip to content

Commit

Permalink
Revert Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanYehuda committed Sep 20, 2021
1 parent 8afa70e commit 1ee71ad
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/scripts/views/templates/template-creator.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
import CONFIG from '../../globals/config';

const createRestaurantDetailTemplate = (restaurants) => `
<h2 class="content-title-detail">${restaurants.name}</h2>
<img class="content-thumbnail-detail lazyload" data-src="${CONFIG.BASE_IMAGE_URL + restaurants.pictureId}" alt="${restaurants.name}" />
<h3>Information</h3>
<div class="content-rating-detail">Rating : ${restaurants.rating}</div>
<div class="content-location-detail">Lokasi : ${restaurants.city}</div>
<div class="content-address-detail">Alamat : ${restaurants.address}</div>
<div class="content-category-detail">Kategori : ${restaurants.categories.map((category) => category.name)}</div>
<div class="restaurant-overview">
<h3>Description</h3>
<div class="content-description"><p>${restaurants.description}</p></div>
<h3>Foods Menu</h3>
<div class="content-description"><p>${restaurants.menus.foods.map((food) => `${food.name}<br>`).join('')}</p></div>
<h3>Drinks Menu</h3>
<div class="content-description"><p>${restaurants.menus.drinks.map((drink) => `${drink.name}<br>`).join('')}</p></div>
<h3>Customer Reviews</h3>
<div class="content-description">
${restaurants.customerReviews.map((review) => `
<h4 tabindex="0">Name : ${review.name}</h4>
<p tabindex="0">Date : ${review.date}</p>
<p tabindex="0">Review : ${review.review}</p>
`).join('')}
</div>
</div>
`;

Expand Down

0 comments on commit 1ee71ad

Please sign in to comment.