function addcontent(item){
    var new_row = document.getElementById("row_main")
    if(item === undefined) {

    }else{
      
    
    // Prepare YouTube Link
    // var array_contains_youtube = true
    var YouTubeHTML = ''
    if ('youtube' in item.links) { // to be replaced by if (item.YouTubelink) or so...
      var YouTubelink = item.links.youtube // to be replaced by item.YouTubelink or so...
      YouTubeHTML = `<a class="btn btn-sm btn-outline-danger" href="${YouTubelink}">YouTube</a>` 
    }
    var description = ""
    if (lang_setting == "1"){
        description = item.item.description_en
    } else if (lang_setting == "2"){
        description = item.item.description_de
    }
    // Prepare Explore Link
    // var array_contains_explore_link = true
    var ExploreHTML = ''
    if ('demo' in item.links) { // to be replaced by if (item.YouTubelink) or so...
      var ExploreLink = item.links.demo // to be replaced by item.ExploreLink or so...
      ExploreHTML = `<a class="btn btn-sm btn-outline-secondary" href="${ExploreLink}">Explore</a>` 
    }

    new_row.innerHTML = new_row.innerHTML + '<div class="col-lg-4">' +
    '<div class="card mb-4 shadow-sm extension">' +
      '<h5>'+ item.item.title +' <span class="lead text-muted"> ' + item.item.project + '</span></h5>' +
      '<img class="thumbimg" src="' + item.item.imageLink + '" alt="">' +
      '<div class="card-body">' +
        '<p class="card-text-lg small">' +
          description +
          '<br>' +
          '<b><i class="fas fa-user"></i> Contact Person</b>: <a' +
          'href="https://www.hft-stuttgart.de/p/thunyathep-santhanavanich"> ' + item.item.author.firstName +
          ' ' + item.item.author.lastName + '</a> <br>' +
          '<b><i class="fas fa-star"></i> Keywords</b>: ' + item.item.keywords.join(', ') + '</br>' +
        ExploreHTML + '&nbsp;' +
        YouTubeHTML +
        '</p>' +
      '</div>' +
    '</div>' +
  '</div>'
}
}

