Commit b355b091 authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

test dynamic header

parent c7068034
Pipeline #107 passed with stage
in 4 seconds
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment