Skip to content

Commit

Permalink
added turnery operator
Browse files Browse the repository at this point in the history
  • Loading branch information
samiulislam09 committed Mar 2, 2022
1 parent 71f2a8b commit 051d37a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mobile Hut</title>
<title>Phone Finder</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
Expand All @@ -17,7 +17,7 @@
<div class="container">
<!-- navbar -->
<nav class="row navbar navbar-expand-lg navbar-light bg-light px-5">
<a class="col-12 col-md-6 navbar-brand text-center" href="#"><h4>Mobile Hut</h4></a>
<a class="col-12 col-md-6 navbar-brand text-center" href="#"><h4>Phone Finder</h4></a>
<div class="col-12 col-md-6 ">
<div class="my-2 my-lg-0 d-flex ms-auto">
<input class="form-control mr-sm-2" id="name-input" type="search" placeholder="Search" aria-label="Search">
Expand Down
18 changes: 9 additions & 9 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const displayPhone = (data) => {
cards.textContent = "";
document.getElementById('feature').textContent = '';
const allData = data.data;
const firstData = data.data.slice(1, 21);
const firstData = data.data.slice(0, 20);
for (let item of firstData) {
const div = document.createElement('div');
div.classList.add('col-12');
Expand Down Expand Up @@ -86,19 +86,19 @@ const specDetails = (data) => {
<div class="row features">
<div class="col col-md-12">
<h2 class="text-center m-2">Features</h2>
<p><span>Chipset: </span>${(data.mainFeatures.chipSet) == true}</p>
<p><span>Chipset: </span>${data.mainFeatures.chipSet}</p>
<p><span>Storage: </span>${data.mainFeatures.storage}</p>
<p><span>Display Size: </span>${data.mainFeatures.displaySize}</p>
<p><span>Memory: </span>${data.mainFeatures.memory}</p>
<p><span>Sensors: </span>${data.mainFeatures.sensors}</p>
<p><span>Others</span></p>
<p><span>WLAN: </span>${data.others.WLAN}</p>
<p><span>Bluetooth: </span>${data.others.Bluetooth}</p>
<p><span>GPS: </span>${data.others.GPS}</p>
<p><span>NFC: </span>${data.others.NFC}</p>
<p><span>Radio: </span>${data.others.Radio}</p>
<p><span>USB: </span>${data.others.USB}</p>
<p><span>Release Date: </span>${data.releaseDate}</p>
<p><span>WLAN: </span>${data.others.WLAN ? data.others.WLAN:"not available"}</p>
<p><span>Bluetooth: </span>${data.others.Bluetooth?data.others.Bluetooth:"Not avaolable"}</p>
<p><span>GPS: </span>${data.others.GPS?data.others.GPS:"Not available"}</p>
<p><span>NFC: </span>${data.others.NFC ? data.others.NFC:"not availbale"}</p>
<p><span>Radio: </span>${data.others.Radio ? data.others.Radio:"not available"}</p>
<p><span>USB: </span>${data.others.USB ? data.others.USB:"not available"}</p>
<p><span>Release Date: </span>${data.releaseDate?data.releaseDate : 'not available'}</p>
</div>
</div>
`
Expand Down

0 comments on commit 051d37a

Please sign in to comment.