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

Merge branch 'MLAB-547' into 'testing'

added cookie banner with link to HfT Datenschutz page

See merge request !115
parents d24f17bc 67df3ada
Pipeline #4842 passed with stage
in 25 seconds
...@@ -588,3 +588,12 @@ justify-content:space-evenly;} ...@@ -588,3 +588,12 @@ justify-content:space-evenly;}
filter: invert(0%); filter: invert(0%);
color: white; color: white;
} }
.cookie-banner {
position: fixed;
bottom: 0px;
left: 10%;
right: 10%;
width: 80%;
height: 20%;
}
...@@ -219,11 +219,35 @@ function foot() { ...@@ -219,11 +219,35 @@ function foot() {
containerdivrow.appendChild(m4labgrau); containerdivrow.appendChild(m4labgrau);
containerdivrow.appendChild(socialdiv); containerdivrow.appendChild(socialdiv);
containerdivrow.appendChild(contactdiv); containerdivrow.appendChild(contactdiv);
containerdiv.appendChild(containerdivrow); containerdiv.appendChild(containerdivrow);
footerdiv.appendChild(containerdiv); footerdiv.appendChild(containerdiv);
// cookiebanner
let cookiediv = document.createElement("div");
cookiediv.classList.add("alert", "alert-info", "alert-dismissible", "fade", "cookie-banner" );
cookiediv.style = "text-align:center;";
cookiediv.id="cookiediv";
cookiediv.innerHTML="<strong>Cookie-Benachrichtigung</strong><br/> Diese Webseite nutzt technisch notwendige Session-Cookies und gegebenenfalls Cookies zur Authentifizierung. Mit der Benutzung der Webseite erklären Sie sich damit einverstanden. <br/> Weitere Informationen finden Sie in unserer <a href='https://www.hft-stuttgart.de/datenschutz'> Datenschutzerklärung </a>"
let cookiebutton = document.createElement("button");
cookiebutton.type = "button";
cookiebutton.classList.add("close");
cookiebutton.setAttribute("data-dismiss", "alert");
cookiebutton.innerHTML = "&times;";
prependChild(cookiediv, cookiebutton);
footerdiv.appendChild(cookiediv);
document.body.appendChild(footerdiv); document.body.appendChild(footerdiv);
} }
function setCookieSeen(){
if (localStorage.getItem("cookieSeen") != "shown") {
document.getElementById("cookiediv").classList.add("show");
localStorage.setItem("cookieSeen","shown")
};
}
head(); head();
foot(); foot();
setCookieSeen();
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