diff --git a/public/content/content_internal_example.json b/public/content/content_internal_example.json new file mode 100644 index 0000000000000000000000000000000000000000..0b26f1509f845b94c397242d1638129a3a3e48e4 --- /dev/null +++ b/public/content/content_internal_example.json @@ -0,0 +1,26 @@ +{ + "item": { + "title": "Test", + "project": "", + "author": { + "firstName": "...", + "lastName": "...", + "hftURL": "..." + }, + "project_year_start": "2021", + "project_year_end": "2022", + "project_is_on_going": true, + "imageLink": "imgs/hft.jpg", + "keywords": ["..."], + "description_en": "...", + "description_de": "...", + "internal":true + }, + "links": { + "demo": "...", + "publication": "...", + "youtube": "...", + "project": "..." + }, + "refIndex": 15 + } \ No newline at end of file diff --git a/public/js/add_content.js b/public/js/add_content.js index 1f7681428f9aedd7d84c272540585b96ac6e98c6..a25d3a134bd0ba92ebed5ed9890382c3e7cc6da5 100644 --- a/public/js/add_content.js +++ b/public/js/add_content.js @@ -59,6 +59,14 @@ function addcontent(item) { repoHTML = `<a class="btn btn-sm btn-outline-info mt-1" href="${repoLink}" target="_blank"> <i class="fa fa-gitlab"></i> Git/Repository </a>` } + if ('internal' in item.item) { + if (item.item.internal) { + var internal_tag = `<span class="badge bg-secondary" style="color: white;">Internal Access Only</span> <br>` + description = internal_tag + description + } + + } + new_row.innerHTML = new_row.innerHTML + '<div class="col-lg-4">' + '<div class="card mb-4 shadow-sm extension overflow-auto">' + '<h5>' + item.item.title + ' <span class="content-subtitle text-muted"> ' + item.item.project + '</span></h5>' +