showFood.js 839 Bytes
//import position from 'getPlaceList'

var entName = '';
var entType = '';
var entPhoto = '';
var card = '<div class="col-xl-6 col-sm-6 mb-3">'+
'<div class="card text-white bg-light o-hidden h-100">'+
'<div class="card-body"' + ' style="height:300px; background-size: 100% 100%; background-repeat: no-repeat; background-image:url(' + "'" + entPhoto + "');" + '">' + // place photo
'<div class="mr-5" id="nameDiv">'+entName+'</div>'+ // place name
'<div class="mr-5" id="typeDiv">'+entType+'</div>'+ // place type
'</div>'+
'</div>'+
'</div>';


for(var i=0; i<entList.size(); i++){
    entName = entList[i][name];
    entType = entList[i][type];
    if(entList[i][photo]==null){
        entPhoto = "noimage.png";
    }
    else{
        entPhoto = entList[i][photo];
    }
    card+=card;
}
document.getElementById("body").innerHTML=card;