diff --git a/js/headfoot.js b/js/headfoot.js index b5c6f81998050c1da9a49138bad99578b22851a0..fb41274e08dc0fa6b4fafbbb4e7327815b3828c5 100755 --- a/js/headfoot.js +++ b/js/headfoot.js @@ -4,7 +4,7 @@ var hft_links = [{'url':'#', 'name':'Kontakt'},{'url':'#', 'name':'Impressum'},{ var socialmedias = [{'url':'https://twitter.com/HFT_Presse', 'name': 'fa-twitter'}, {'url':'https://www.facebook.com/HfTStuttgart/', 'name': 'fa-facebook-square'}, {'url':'https://www.instagram.com/hft_stuttgart/', 'name': 'fa-instagram'}, {'url':'https://de.linkedin.com/school/hochschule-f%C3%BCr-technik-stuttgart-%E2%80%93-university-of-applied-sciences/', 'name': 'fa-linkedin'}, {'url':'https://www.youtube.com/channel/UCi0_JfF2qMZbOhOnNH5PyHA', 'name': 'fa-youtube'}]; -var footer_images = [{'src':'images/demo/bbf_logo.png', 'alt':'BMBF'}, {'src':'images/demo/ihs_logo.jpg', 'alt':'Innovative Hochschule'}] +var footer_images = [{'src':'/images/demo/bbf_logo.png', 'alt':'BMBF'}, {'src':'/images/demo/ihs_logo.jpg', 'alt':'Innovative Hochschule'}] function prependChild(parent,child){ parent.insertBefore(child, parent.childNodes[0]); @@ -53,7 +53,7 @@ function head(){ let logos = document.createElement('li'); let link_m4lab = document.createElement('a'); link_m4lab.href = "/"; - link_m4lab.innerHTML = "<img src='images/demo/m4lab_logo.jpg' alt='Logo Innovationslabor M4_LAB'>"; + link_m4lab.innerHTML = "<img src='/images/demo/m4lab_logo.jpg' alt='Logo Innovationslabor M4_LAB'>"; logos.appendChild(link_m4lab); navelements.appendChild(logos); for(let j = 0; j<menu.length; j++){ @@ -94,6 +94,10 @@ function head(){ if(userAuthenticated()){ headlink.innerHTML="Account"; headlink.href="/account/"; + }else if(document.getElementById('loginswitch').getAttribute('authenticated') == '2'){ + headlink.innerHTML="Logout"; + headlink.setAttribute('th:action') = "@{logout}"; + headlink.setAttribute('method') = "post"; } } @@ -110,7 +114,7 @@ function head(){ searchitem.appendChild(searchinput); let magnifier = document.createElement('input'); magnifier.type="image" - magnifier.src="images/Lupe_grau.png"; + magnifier.src="/images/Lupe_grau.png"; magnifier.width="25"; magnifier.height="25"; magnifier.alt=""; @@ -142,7 +146,7 @@ function foot(){ hftlink.setAttribute('style','flex-basis: 400px;'); hftlink.href="https://www.hft-stuttgart.de"; let hftimage = document.createElement('img'); - hftimage.src="images/demo/hft_logo.jpg"; + hftimage.src="/images/demo/hft_logo.jpg"; hftimage.alt="Logo der Hochschule für Technik Stuttgart"; hftimage.height= '75'; hftlink.appendChild(hftimage);