Skip to content

Commit

Permalink
cookie alert, fixes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
fgaz committed Mar 22, 2016
1 parent 74f2b8c commit cf877fc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions css/blog.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,18 @@ h6, .h6 {
.blog-footer p:last-child {
margin-bottom: 0;
}

/*
* Cookie alert
*/

#cookie-alert {
bottom: 0px;
position: fixed;
display: none;
width: 100%;
color: white;
background-color: black;
z-index: 666666;
padding: 4px 20px 4px 20px;
}
16 changes: 16 additions & 0 deletions templates/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,26 @@
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="/css/blog.css" rel="stylesheet">
<script src="/js/cookie-alert.js"></script>

</head>
<body>

<div id="cookie-alert">
Questo sito usa cookie per i commenti e altre funzioni. Utilizzandolo, ne accetti l'impiego.
<a href="//nibirumail.com/cookies/policy/?url=haskell-ita.it">Ulteriori informazioni</a>
<button class="btn btn-primary" onclick="hideCookieAlert();">Ok, nascondi questo messaggio</button>
</div>
<script type="text/javascript">
if(!window.localStorage.getItem("cookie-alert-hidden")){
document.getElementById("cookie-alert").style.display = "block";
}
function hideCookieAlert(){
document.getElementById("cookie-alert").style.display = "none";
window.localStorage.setItem("cookie-alert-hidden", true);
}
</script>

<div class="blog-masthead navbar-fixed-top">
<div class="container">
<nav class="blog-nav">
Expand Down

0 comments on commit cf877fc

Please sign in to comment.