made the impressum open based on the link

This commit is contained in:
Ellpeck 2018-07-27 00:35:55 +02:00
parent 25e9676784
commit 122f2b7f44
2 changed files with 9 additions and 1 deletions

View file

@ -111,7 +111,7 @@
<!-- Footer -->
<div class="footer">
<span class="text-muted"><a href="https://github.com/Ellpeck/Web">&copy; 2018 Ellpeck</a> - <a href="" data-toggle="modal" data-target="#impressum-modal">Impressum</a></span>
<span class="text-muted"><a href="https://github.com/Ellpeck/Web">&copy; 2018 Ellpeck</a> - <a id="impressum-button" href="#impressum">Impressum</a></span>
<img src="res/blobheart.png" id="blobheart">
</div>

View file

@ -1,4 +1,12 @@
$(function() {
let openImp = function() {
$('#impressum-modal').modal('show');
}
$('#impressum-button').on('click', openImp);
if (window.location.hash.includes('#impressum')) {
openImp();
}
$('.navbar-collapse a').on('click', function() {
$('.navbar-collapse').collapse('hide');
});