54 lines
1.2 KiB
HTML
54 lines
1.2 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>VIM and cats site</h1>
|
||
|
<img src='/get_cat?cat_name=vim_cats.png'/>
|
||
|
<br>
|
||
|
Press left and right arrows to view all gifs
|
||
|
<br>
|
||
|
<video id='cat-video' autoplay style='width:10vw' src='/get_cat?cat_name=гифка 1.mp4' loop=true>
|
||
|
<script>
|
||
|
position=0
|
||
|
names=['гифка 1.mp4',
|
||
|
'гифка 2.mp4',
|
||
|
'гифка 3.MP4',
|
||
|
'гифка 4.mp4',
|
||
|
'Гифка 5.MP4',
|
||
|
'гифка 6.mp4',
|
||
|
'гифка 7.mp4',
|
||
|
'гифка 8.MP4',
|
||
|
'гифка 9.mp4',
|
||
|
'гифка 10.mp4',
|
||
|
'гифка 11.mp4',
|
||
|
'гифка 12.mp4',
|
||
|
'гифка 13.mp4',
|
||
|
'гифка 14.mp4',
|
||
|
'гифка 15.mp4',
|
||
|
'гифка 16.mp4',
|
||
|
'гифка 17.mp4',
|
||
|
'гифка 18.mp4',
|
||
|
'гифка 19.mp4',
|
||
|
'гифка 20.mp4']
|
||
|
document.body.onkeydown = function (e) {
|
||
|
if(e.which==37) {
|
||
|
position+=19;position%=20;
|
||
|
} else if(e.which==39) {
|
||
|
position++;position%=20;
|
||
|
}
|
||
|
v=document.getElementById('cat-video');
|
||
|
v.remove();
|
||
|
v=document.createElement('video');
|
||
|
v.src='/get_cat?cat_name='+names[position];
|
||
|
v.loop=true;
|
||
|
v.style='width:10vw';
|
||
|
v.id='cat-video';
|
||
|
v.autoplay=true;
|
||
|
document.body.appendChild(v);
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|
||
|
|