Commit 79ac62a8 authored by Pietro Saccardi's avatar Pietro Saccardi

Konami: added dickbutt and back button

parent 0e9c3790
This diff is collapsed.
......@@ -6,5 +6,8 @@
<button type="button" class="btn btn-light m-2 d-konami" data-kn-fn="redraw">
Redraw
</button>
<button type="button" class="btn btn-warning m-2 d-konami" data-kn-fn="close">
Back
</button>
<svg class="w-100 h-100 position-fixed z-lowest" id="graph"></svg>
</div>
\ No newline at end of file
......@@ -167,22 +167,40 @@ function paintTree() {
}, 1)
}
var konamiParent = null
function konamiSetup() {
konamiParent = $('#knWrapper').parent()
$('#knWrapper')
.prependTo('body')
.addClass('fixed-fill')
.addClass('z-konami')
.addClass('inner-shadow')
.addClass('bg-dark')
$('#graph')
.removeClass('position-fixed')
.addClass('fixed-fill')
$('.d-konami').addClass('konami-show')
}
function konamiTearDown() {
$('#knWrapper')
.prependTo(konamiParent)
.removeClass('fixed-fill')
.removeClass('z-konami')
.removeClass('inner-shadow')
.removeClass('bg-dark')
$('#graph')
.addClass('position-fixed')
.removeClass('fixed-fill')
$('.d-konami').removeClass('konami-show')
}
document.addEventListener('DOMContentLoaded', () => {
$('[data-kn-fn="redraw"]').click(paintTree)
$('[data-kn-fn="close"]').click(konamiTearDown)
new Konami(konamiSetup)
paintTree()
new Konami(function () {
$('#knWrapper')
.prependTo('body')
.addClass('fixed-fill')
.addClass('z-konami')
.addClass('inner-shadow')
.addClass('bg-dark')
$('#graph')
.removeClass('position-fixed')
.addClass('fixed-fill')
$('.d-konami').removeClass('d-konami')
});
});
let resizeTimer = null
......
......@@ -136,6 +136,14 @@ footer {
clear: both;
}
.d-konami {
.d-konami:not(.konami-show) {
display: none !important;
}
#knWrapper {
background-image: url(/images/dick-butt.svg);
background-repeat: no-repeat;
background-position-x: 50%;
background-position-y: 30%;
background-size: 30%;
}
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