From 83da63e273b7a6fbdc7e1c4f4887a6cc8fef2d60 Mon Sep 17 00:00:00 2001 From: Patrick <patrick.wuerstle@gmx.de> Date: Mon, 10 May 2021 11:29:27 +0200 Subject: [PATCH] update link to profile update small language setting update content list --- public/index.html | 8 ++++---- public/js/add_content.js | 20 +++++++++++++++++--- public/js/language.js | 12 ++++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/public/index.html b/public/index.html index e544934..5b22333 100644 --- a/public/index.html +++ b/public/index.html @@ -288,7 +288,7 @@ <h5 class="font-weight-bold mt-4 mb-3">Prof. Dr. Volker Coors</h5> <p class="text-uppercase blue-text"><strong>Lab Leader</strong></p> <a href="https://www.hft-stuttgart.de/p/volker-coors" target="_blank"> - <button class="btn btn-primary btn-sm">See full profile</button> + <button class="btn btn-primary btn-sm profile">See full profile</button> </a> <p class="grey-text">Research topic: Smart Cities | OGC Standards | Sensors & IoT | 3D City Models | 3D Web Visualization | 3D Simulation | Big Data</p> <ul class="list-unstyled mb-0"> @@ -314,7 +314,7 @@ <h5 class="font-weight-bold mt-4 mb-3">Joe T. Santhanavanich</h5> <p class="text-uppercase blue-text"><strong>Researcher</strong></p> <a href="https://www.hft-stuttgart.de/p/thunyathep-santhanavanich" target="_blank"> - <button class="btn btn-primary btn-sm">See full profile</button> + <button class="btn btn-primary btn-sm profile">See full profile</button> </a> <p class="grey-text">Research topic: Smart Cities | OGC Standards | Sensors & IoT | 3D City Models | 3D Web Visualization | 3D Simulation | Big Data</p> <ul class="list-unstyled mb-0"> @@ -343,7 +343,7 @@ <h5 class="font-weight-bold mt-4 mb-3">Rosanny S.</h5> <p class="text-uppercase blue-text"><strong>Researcher</strong></p> <a href="https://www.hft-stuttgart.de/p/rosanny-sihombing" target="_blank"> - <button class="btn btn-primary btn-sm">See full profile</button> + <button class="btn btn-primary btn-sm profile">See full profile</button> </a> <p class="grey-text">Research topic: Smart Cities | 3D City Models | 3D Web Visualization | AR/VR</p> <ul class="list-unstyled mb-0"> @@ -368,7 +368,7 @@ <h5 class="font-weight-bold mt-4 mb-3">Patrick Wuerstle</h5> <p class="text-uppercase blue-text"><strong>Researcher</strong></p> <a href="https://www.hft-stuttgart.de/p/patrick-wuerstle" target="_blank"> - <button class="btn btn-primary btn-sm">See full profile</button> + <button class="btn btn-primary btn-sm profile">See full profile</button> </a> <p class="grey-text">Research topic: Smart Cities | OGC Standards | Participation Platform | 3D City Models | 3D Web Visualization | 3D Simulation | Big Data </p> <ul class="list-unstyled mb-0"> diff --git a/public/js/add_content.js b/public/js/add_content.js index 4e6e033..1337884 100644 --- a/public/js/add_content.js +++ b/public/js/add_content.js @@ -1,4 +1,6 @@ function addcontent(item){ + var lang_cont_person = "" + var lang_keywords = "" var new_row = document.getElementById("row_main") if(item === undefined) { @@ -15,8 +17,12 @@ function addcontent(item){ var description = "" if (lang_setting == "1"){ description = item.item.description_en + lang_cont_person = " Contact Person" + lang_keywords = " Keywords" } else if (lang_setting == "2"){ description = item.item.description_de + lang_cont_person = " Kontaktperson" + lang_keywords = " Stichworte" } // Prepare Explore Link // var array_contains_explore_link = true @@ -34,10 +40,10 @@ function addcontent(item){ '<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 + + '<b><i class="fas fa-user"></i>' + lang_cont_person + '</b>: <a ' + + ' href="https://www.hft-stuttgart.de/p/'+ replaceUmlauts(item.item.author.firstName) +'-' + replaceUmlauts(item.item.author.lastName) + ' "> ' + item.item.author.firstName + ' ' + item.item.author.lastName + '</a> <br>' + - '<b><i class="fas fa-star"></i> Keywords</b>: ' + item.item.keywords.join(', ') + '</br>' + + '<b><i class="fas fa-star"></i>' + lang_keywords + '</b>: ' + item.item.keywords.join(', ') + '</br>' + ExploreHTML + ' ' + YouTubeHTML + '</p>' + @@ -47,3 +53,11 @@ function addcontent(item){ } } +function replaceUmlauts(value) +{ + + value = value.replace('ä', 'ae'); + value = value.replace('ö', 'oe'); + value = value.replace('ü', 'ue'); + return value; +} \ No newline at end of file diff --git a/public/js/language.js b/public/js/language.js index ba6728d..85daa8a 100644 --- a/public/js/language.js +++ b/public/js/language.js @@ -51,6 +51,12 @@ function language(lang){ rgc_backtotop.innerHTML = "Back to top" rgc_button_next.innerHTML = "Next" rgc_button_previous.innerHTML = "Previous" + + var matches = document.getElementsByClassName('profile'); + + for (var i=0; i<matches.length; i++) { + matches[i].innerHTML = "See full profile" + } } else if (lang == "2"){ rgc_about.innerHTML = "About" rgc_group.innerHTML = "Details über unsere Gruppe... " @@ -67,5 +73,11 @@ function language(lang){ rgc_button_next.innerHTML = "Weiter" rgc_button_previous.innerHTML = "Zurück" + var matches = document.getElementsByClassName('profile'); + + for (var i=0; i<matches.length; i++) { + matches[i].innerHTML = "Vollständiges Profil ansehen" + } } + } \ No newline at end of file -- GitLab