carousel for programview
@@ -202,7 +202,15 @@ body {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
height: 100%;
|
||||
width: 100%; }
|
||||
width: 100%;
|
||||
display: flex; }
|
||||
|
||||
.imgcarousel_content video {
|
||||
object-fit: contain;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
align-self: center; }
|
||||
|
||||
.imgcarousel_prev, .imgcarousel_next {
|
||||
display: flex;
|
||||
@@ -215,6 +223,9 @@ body {
|
||||
.imgcarousel_next {
|
||||
margin-left: 5px; }
|
||||
|
||||
.imgcarousel_next, .imgcarousel_prev {
|
||||
outline: none; }
|
||||
|
||||
.imgcarousel_prev svg {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
@@ -1133,6 +1144,11 @@ html, body {
|
||||
|
||||
#prgv_header h1 {
|
||||
font-size: 28pt; } }
|
||||
.progv_extra {
|
||||
height: 500px;
|
||||
border: 1px solid #333;
|
||||
margin: 10px; }
|
||||
|
||||
/* 400px */
|
||||
.booklst_entry {
|
||||
display: flex;
|
||||
|
||||
5
www/data/css/styles.min.css
vendored
@@ -42,10 +42,12 @@ body{background-color:#EEE;color:#CCC;font-family:serif}
|
||||
.stripedtable tbody tr:last-child td{border-bottom:0}
|
||||
.stripedtable tbody tr:nth-child(odd){background-color:#ccc}
|
||||
.imgcarousel_parent{display:flex;flex-direction:row;align-content:center;justify-content:center;padding:5px;background:#BBB}
|
||||
.imgcarousel_content{background-size:contain;background-position:center;background-repeat:no-repeat;height:100%;width:100%}
|
||||
.imgcarousel_content{background-size:contain;background-position:center;background-repeat:no-repeat;height:100%;width:100%;display:flex}
|
||||
.imgcarousel_content video{object-fit:contain;width:100%;height:auto;max-height:100%;align-self:center}
|
||||
.imgcarousel_prev,.imgcarousel_next{display:flex;flex-direction:column;justify-content:center}
|
||||
.imgcarousel_prev{margin-right:5px}
|
||||
.imgcarousel_next{margin-left:5px}
|
||||
.imgcarousel_next,.imgcarousel_prev{outline:0}
|
||||
.imgcarousel_prev svg{width:48px;height:48px;border:1px solid black;background:#333;fill:#DDD}
|
||||
.imgcarousel_next svg{width:48px;height:48px;border:1px solid black;background:#333;fill:#DDD}
|
||||
.imgcarousel_prev:hover svg{background:#000;fill:#FFF;cursor:pointer}
|
||||
@@ -276,6 +278,7 @@ html,body{margin:0;padding:0;height:100%}
|
||||
.prgv_right_lang{justify-content:space-evenly}
|
||||
#prgv_header h1{font-size:28pt}
|
||||
}
|
||||
.progv_extra{height:500px;border:1px solid #333;margin:10px}
|
||||
.booklst_entry{display:flex;flex-direction:row;text-decoration:none;background:#BBB;border:solid 1px #444;margin:5px 0}
|
||||
.booklst_entry:hover{background:white;color:black;border:solid 1px black}
|
||||
.booklst_entry:hover .booklst_date{color:black}
|
||||
|
||||
@@ -249,8 +249,16 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display:flex;
|
||||
}
|
||||
|
||||
.imgcarousel_content video {
|
||||
object-fit: contain;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.imgcarousel_prev, .imgcarousel_next
|
||||
{
|
||||
@@ -269,6 +277,11 @@ body {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.imgcarousel_next, .imgcarousel_prev
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.imgcarousel_prev svg { width: 48px; height: 48px; border: 1px solid black; background: #333; fill: #DDD; }
|
||||
.imgcarousel_next svg { width: 48px; height: 48px; border: 1px solid black; background: #333; fill: #DDD; }
|
||||
.imgcarousel_prev:hover svg { background: #000; fill: #FFF; cursor: pointer; }
|
||||
|
||||
@@ -140,4 +140,10 @@
|
||||
#prgv_header h1 {
|
||||
font-size: 28pt;
|
||||
}
|
||||
}
|
||||
|
||||
.progv_extra {
|
||||
height: 500px;
|
||||
border: 1px solid #333;
|
||||
margin: 10px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 567 KiB |
BIN
www/data/images/program_img/CannonConquest_01.webm
Normal file
|
Before Width: | Height: | Size: 698 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 505 KiB After Width: | Height: | Size: 204 KiB |
|
Before Width: | Height: | Size: 729 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 1018 KiB After Width: | Height: | Size: 205 KiB |
BIN
www/data/images/program_img/CannonConquest_06.png
Normal file
|
After Width: | Height: | Size: 278 KiB |
BIN
www/data/images/program_img/CannonConquest_07.png
Normal file
|
After Width: | Height: | Size: 211 KiB |
BIN
www/data/images/program_img/CannonConquest_08.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
www/data/images/program_img/CannonConquest_09.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
www/data/images/program_img/CannonConquest_10.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
www/data/images/program_img/CannonConquest_11.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
www/data/images/program_img/CannonConquest_12.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
www/data/images/program_img/HexSolver_02.png
Normal file
|
After Width: | Height: | Size: 224 KiB |
BIN
www/data/images/program_img/HexSolver_03.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
www/data/images/program_img/HexSolver_04.png
Normal file
|
After Width: | Height: | Size: 320 KiB |
BIN
www/data/images/program_img/HexSolver_05.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
www/data/images/program_img/HexSolver_06.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
www/data/images/program_img/HexSolver_07.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
www/data/images/program_img/HexSolver_08.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
www/data/images/program_img/HexSolver_09.png
Normal file
|
After Width: | Height: | Size: 226 KiB |
BIN
www/data/images/program_img/HexSolver_10.png
Normal file
|
After Width: | Height: | Size: 200 KiB |
BIN
www/data/images/program_img/HexSolver_11.png
Normal file
|
After Width: | Height: | Size: 217 KiB |
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 344 KiB After Width: | Height: | Size: 80 KiB |
@@ -770,14 +770,14 @@ function collapse(code) {
|
||||
|
||||
//######################################################
|
||||
|
||||
window.onload = function ()
|
||||
window.addEventListener("load",function ()
|
||||
{
|
||||
document.getElementById("a_expand").onclick = onExpandClicked;
|
||||
document.getElementById("a_collapse").onclick = onCollapseClicked;
|
||||
document.getElementById("a_run").onclick = onRunClicked;
|
||||
document.getElementById("a_stop").onclick = onStopClicked;
|
||||
document.getElementById("a_arena").onclick = onArenaClicked;
|
||||
};
|
||||
},false);
|
||||
|
||||
|
||||
function onExpandClicked() {
|
||||
|
||||
@@ -445,7 +445,7 @@ function htmlescape(str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
window.onload = function ()
|
||||
window.addEventListener("load",function ()
|
||||
{
|
||||
let elements = document.getElementsByClassName("b93rnr_base");
|
||||
|
||||
@@ -468,4 +468,4 @@ window.onload = function ()
|
||||
if (befungeObject.btnEdit !== undefined)
|
||||
befungeObject.btnEdit.onclick = function () { if (befungeObject.btnEdit.classList.contains('ctrl_btn_disabled')) return; befungeObject.startEdit(); };
|
||||
}
|
||||
};
|
||||
},false);
|
||||
@@ -15,7 +15,7 @@ function formatDate(date) {
|
||||
return wday + ' ' + day + suffix + ' ' + monthNames[monthIndex] + ', ' + year;
|
||||
}
|
||||
|
||||
window.onload = function ()
|
||||
window.addEventListener("load",function ()
|
||||
{
|
||||
let svgtips = document.getElementsByClassName("svg-tip");
|
||||
let rects = document.getElementsByClassName("egg_rect");
|
||||
@@ -54,4 +54,4 @@ window.onload = function ()
|
||||
masterTip.style.display = 'none';
|
||||
});
|
||||
}
|
||||
};
|
||||
},false);
|
||||
@@ -1,3 +1,10 @@
|
||||
window.addEventListener("load", function()
|
||||
{
|
||||
|
||||
imgcarousel_init();
|
||||
|
||||
},false);
|
||||
|
||||
function findParent(el, selector) {
|
||||
let retval = null;
|
||||
while (el) {
|
||||
@@ -19,14 +26,51 @@ function findChild(el, selector) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function imgcarousel_init() {
|
||||
for (let carousel of document.getElementsByClassName("imgcarousel_parent"))
|
||||
{
|
||||
let images = JSON.parse(carousel.getAttribute('data-imgcarousel-images'));
|
||||
|
||||
let btnPrev = findChild(carousel, '.imgcarousel_prev');
|
||||
let btnNext = findChild(carousel, '.imgcarousel_next');
|
||||
|
||||
btnPrev.setAttribute('href', "javascript:void(0)");
|
||||
btnNext.setAttribute('href', "javascript:void(0)");
|
||||
|
||||
btnPrev.onclick = function () { imgcarousel_move(carousel, -1); };
|
||||
btnNext.onclick = function () { imgcarousel_move(carousel, +1); };
|
||||
|
||||
if (images.length <= 1)
|
||||
{
|
||||
btnPrev.setAttribute('style', 'visibility:hidden');
|
||||
btnNext.setAttribute('style', 'visibility:hidden');
|
||||
}
|
||||
|
||||
imgcarousel_move(carousel, 0);
|
||||
}
|
||||
}
|
||||
|
||||
function imgcarousel_move(source, delta) {
|
||||
let carousel = findParent(source, ".imgcarousel_parent");
|
||||
let carousel = findParent(source, ".imgcarousel_parent"); // <div>
|
||||
let index = parseInt(carousel.getAttribute('data-imgcarousel-index'));
|
||||
let images = JSON.parse(carousel.getAttribute('data-imgcarousel-images'));
|
||||
let content = findChild(carousel, '.imgcarousel_content');
|
||||
let content = findChild(carousel, '.imgcarousel_content'); // <img>
|
||||
|
||||
index = (index + delta + images.length) % images.length;
|
||||
|
||||
let img = images[index];
|
||||
|
||||
carousel.setAttribute('data-imgcarousel-index', index);
|
||||
content.setAttribute('style', 'background-image: url(' + images[index] + ');');
|
||||
|
||||
if (img.toLowerCase().endsWith('.webm'))
|
||||
{
|
||||
content.setAttribute('style', '');
|
||||
content.innerHTML = '<video autoplay loop muted><source src="' + img + '"></video>';
|
||||
}
|
||||
else
|
||||
{
|
||||
content.setAttribute('style', 'background-image: url(' + img + ');');
|
||||
content.innerHTML = '';
|
||||
}
|
||||
|
||||
}
|
||||