Answer To: For your final project, you are to create a webpage that uses JavaScript to provide user...
Swapnil answered on May 03 2021
82830/Food Restaurant Information Application/css/styles.css
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
.logo{
width: 64px;
height: 50px;
margin: 10px;
border-radius: 50%;
}
.search-bar{
display: flex;
}
.filters{
display: flex;
margin-bottom: 20px;
}
.restaurants{
flex-wrap: wrap;
/* flex: 1; */
width: 90%;
/* height: 100%; */
display: flex;
justify-content: flex-start;
flex-direction: row;
margin-top: 10px;
padding: 20px;
}
.hotel-card{
display: flex;
flex-direction: column;
margin: 10px;
padding: 10px;
border: 1px solid lightgray;
}
.hotel-location{
background: orange;
width: 51px;
padding: 5px;
color: white;
}
.hotel-eta{
font-size: 12px;
}
.hotel-name{
font-weight: bold;
padding: 0 10px;
}
.hotel-tags{
font-size: 10px;
padding: 10px;
}
button.favourite {
width: 20px;
height: 20px;
border-radius: 50%;
/* float: left; */
align-self: flex-end;
border: none;
position: absolute;
outline: transparent;
}
#fav-id{
background: white;
}
#fav-id-red{
background: red;
}
#search {
width: 90%;
padding: 10px;
margin: 10px;
}
.show-fav{
width: 100px;
height: 40px;
text-align: center;
/* padding: 3px; */
color: white;
background: red;
border: 1px solid;
/* float: right; */
right: 10%;
/* margin-bottom: 20px; */
position: absolute;
outline: transparent;
/* margin: 100px; */
}
#sortby{
position: absolute;
padding: 10px;
left: 3%;
}
82830/Food Restaurant Information Application/data/api.json
[
{
"name": "Subway(MCF)",
"id": 20423,
"location": "udyog vihar",
"rating": 4.2,
"eta": 25,
"tags": ["American", "Fast Food"],
"img": "./images/1.png"
},
{
"name": "Prince Ki Rasoi",
"id": 27213,
"location": "Ramada Hotel, Huda City",
"rating": 3.8,
"eta": 30,
"tags": ["North Indian", "Chinese", "Mughlai", "Fast Food"],
"img": "./images/2.jpg"
},
{
"name": "Aggarwal Sweets & Restaurant",
"id": 52778,
"location": "Near Jain Dharamshala, Huda City",
"rating": 3.4,
"eta": 25,
"tags": ["North Indian", "Chinese", "Sweets"],
"img": "./images/3.jpg"
},
{
"name": "Rasoi",
"id": 13018,
"location": "Near Hanuman Mandir, Sector-14",
"rating": 3.9,
"eta": 50,
"tags": ["Indian", "Chinese", "North Indian"],
"img": "./images/4.jpg"
},
{
"name": "Fork with Sticks",
"id": 1015,
"location": "DLF Phase 4, New DLF Phase 4",
"rating": 4.0,
"eta": 44,
"tags": ["Chinese", "Fast Food"],
"img": "./images/5.jpg"
},
{
"name": "South Store",
"id": 23893,
"location": "sector 14 Market, Sector-14",
"rating": 4.1,
"eta": 53,
"tags": ["American", "South Indian"],
"img": "./images/6.jpg"
},
{
"name": "Chinese Corner",
"id": 30361,
"location": "Sushant Lok, DLF Phase 4",
"rating": 4.1,
"eta": 47,
"tags": ["Chinese",...