Commit 4fd34e22 authored by Sylvain Kerkour's avatar Sylvain Kerkour

open in new tab links

parent cff824eb
Pipeline #121835253 passed with stages
in 59 seconds
......@@ -30,18 +30,18 @@ people with open technologies ✌️
You can contact the authors using one of the following way:
* Using email: <span class="obfuscated-email">Javascript is required to access email address</span>
* By saying <i>Hi</i> on Twitter: <a href="https://twitter.com/42bloom" target="_blank" rel="noopener">@42bloom</a>
* By saying <i>Hi</i> on Twitter: [@42bloom](https://twitter.com/42bloom).
<br />
## License
All the content on this website is licensed under the
<a rel="noopener" target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/" >CC BY-SA 4.0 License</a>.
[CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/).
<br />
## Source code
The source code of this website is available on GitLab:
<a href="{{< giturl >}}" target="_blank" rel="noopener">{{< giturl >}}</a>
[{{< giturl >}}]({{< giturl >}}).
......@@ -8,29 +8,31 @@ function rot13(s) {
}
// document ready
(function ($) {
$(document).ready(function() {
var previousScroll = 20;
var minimumScroll = 71;
// scroll functions
$(window).scroll(function(e) {
// add/remove class to navbar when scrolling to hide/show
var scroll = $(window).scrollTop();
if (scroll >= previousScroll && scroll >= minimumScroll) {
$('.navbar').addClass("navbar-hide");
} else if (scroll < previousScroll) {
$('.navbar').removeClass("navbar-hide");
}
previousScroll = scroll;
});
// scroll functions
$(window).scroll(function(e) {
// add/remove class to navbar when scrolling to hide/show
var scroll = $(window).scrollTop();
if (scroll >= previousScroll && scroll >= minimumScroll) {
$('.navbar').addClass("navbar-hide");
} else if (scroll < previousScroll) {
$('.navbar').removeClass("navbar-hide");
}
previousScroll = scroll;
});
// deofuscate emails
var emails = document.getElementsByClassName("obfuscated-email");
if (emails) {
for (var i = 0; i < emails.length; i += 1) {
emails[i].innerHTML = rot13(window.obfuscatedEmail);
}
// deofuscate emails
var emails = document.getElementsByClassName("obfuscated-email");
if (emails) {
for (var i = 0; i < emails.length; i += 1) {
emails[i].innerHTML = rot13(window.obfuscatedEmail);
}
}
})(jQuery);
$(document.links).filter(function() {
return this.hostname != window.location.hostname;
}).attr('target', '_blank').attr('rel', 'noopener');
});
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