mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2024-11-13 00:42:47 +01:00
commit
3984c8aae3
@ -6,8 +6,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="css/css.css">
|
<link rel="stylesheet" href="css/css.css">
|
||||||
<link rel="icon" href="img/vhs.ico">
|
<link rel="icon" href="img/vhs.ico">
|
||||||
<script src="js/jquery.min.js"></script>
|
|
||||||
<script src="js/js.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -125,6 +123,7 @@
|
|||||||
<li><code>.mxf</code>: Audio Codec: pcm_s16le, Video Codec: mpeg2video</li>
|
<li><code>.mxf</code>: Audio Codec: pcm_s16le, Video Codec: mpeg2video</li>
|
||||||
<li><code>.wav</code>: Audio Codec: pcm_s16le (16 bit PCM)</li>
|
<li><code>.wav</code>: Audio Codec: pcm_s16le (16 bit PCM)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p class="link"></p>
|
||||||
</div>
|
</div>
|
||||||
<!-- End Codec Defaults -->
|
<!-- End Codec Defaults -->
|
||||||
|
|
||||||
@ -2863,5 +2862,6 @@ Change the above data-target field, the hover-over description, the button text,
|
|||||||
<p>Made with ♥ at <a href="https://wiki.curatecamp.org/index.php/Association_of_Moving_Image_Archivists_%26_Digital_Library_Federation_Hack_Day_2015" target="_blank">AMIA #AVhack15</a>! Contribute to the project via <a href="https://github.com/amiaopensource/ffmprovisr" target="_blank">our GitHub page</a>!</p>
|
<p>Made with ♥ at <a href="https://wiki.curatecamp.org/index.php/Association_of_Moving_Image_Archivists_%26_Digital_Library_Federation_Hack_Day_2015" target="_blank">AMIA #AVhack15</a>! Contribute to the project via <a href="https://github.com/amiaopensource/ffmprovisr" target="_blank">our GitHub page</a>!</p>
|
||||||
</footer>
|
</footer>
|
||||||
</div><!-- ends "grid" -->
|
</div><!-- ends "grid" -->
|
||||||
|
<script src="js/js.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
4
js/jquery.min.js
vendored
4
js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
138
js/js.js
138
js/js.js
@ -1,52 +1,96 @@
|
|||||||
$(document).ready(function() {
|
function scrollTo(element, to, duration) {
|
||||||
|
var start = element.scrollTop,
|
||||||
|
change = to - start,
|
||||||
|
currentTime = 0,
|
||||||
|
increment = 20;
|
||||||
|
|
||||||
function appendLink(id) {
|
var animateScroll = function(){
|
||||||
$(id).next('div').find('.link').empty();
|
currentTime += increment;
|
||||||
$(id).next('div').find('.link').append("<small>Link to this command: <a href='https://amiaopensource.github.io/ffmprovisr/index.html" + id + "'>https://amiaopensource.github.io/ffmprovisr/index.html" + id + "</a></small>");
|
var val = Math.easeInOutQuad(currentTime, start, change, duration);
|
||||||
}
|
element.scrollTop = val;
|
||||||
|
if(currentTime < duration) {
|
||||||
function moveToRecipe(id) {
|
setTimeout(animateScroll, increment);
|
||||||
document.getElementById(id.substring(1)).checked = true;
|
|
||||||
$('html, body').animate({ scrollTop: $(id).offset().top }, 1000);
|
|
||||||
appendLink(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
// open recipe window if a hash is found in URL
|
|
||||||
if (window.location.hash) {
|
|
||||||
id = window.location.hash
|
|
||||||
moveToRecipe(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
// add hash URL when recipe is opened
|
|
||||||
$('label[class="recipe"]').on("click", function(){
|
|
||||||
id = $(this).attr("for");
|
|
||||||
window.location.hash = ('#' + id)
|
|
||||||
appendLink('#' + id)
|
|
||||||
})
|
|
||||||
|
|
||||||
// open recipe when clicked
|
|
||||||
$('a').on("click", function(){
|
|
||||||
intralink = $(this).attr("href")
|
|
||||||
if (intralink[0] == "#") {
|
|
||||||
moveToRecipe(intralink)
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
animateScroll()
|
||||||
|
}
|
||||||
|
|
||||||
|
//t = current time, b = start value, c = change in value, d = duration
|
||||||
|
Math.easeInOutQuad = function (t, b, c, d) {
|
||||||
|
t /= d/2;
|
||||||
|
if (t < 1) return c/2*t*t + b;
|
||||||
|
t--;
|
||||||
|
return -c/2 * (t*(t-2) - 1) + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
function appendLink(id) {
|
||||||
|
const link = document.getElementById(id).nextElementSibling.querySelector('.link')
|
||||||
|
if (link) {
|
||||||
|
link.innerHTML = ("<small>Link to this command: <a href='https://amiaopensource.github.io/ffmprovisr/index.html#" + id + "'>https://amiaopensource.github.io/ffmprovisr/index.html#" + id + "</a></small>")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function moveToRecipe(id) {
|
||||||
|
document.getElementById(id).checked = true;
|
||||||
|
scrollTo(document.body, 0, 1000);
|
||||||
|
appendLink(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// open recipe window if a hash is found in URL
|
||||||
|
if (window.location.hash) {
|
||||||
|
id = window.location.hash.slice(1)
|
||||||
|
moveToRecipe(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// add hash URL when recipe is opened
|
||||||
|
const recipes = document.querySelectorAll('label[class="recipe"]')
|
||||||
|
recipes.forEach(function(item, i){
|
||||||
|
item.addEventListener("click", function(){
|
||||||
|
id = this.getAttribute("for");
|
||||||
|
window.location.hash = (id)
|
||||||
|
appendLink(id)
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// Collapse all recipes when button is clicked
|
|
||||||
$('#toggle-expand-collapse-all').on("click", function(){
|
|
||||||
var checkboxes = $('input[type=checkbox]');
|
|
||||||
var anyRecipesOpen = $(checkboxes).is(':checked');
|
|
||||||
|
|
||||||
if (anyRecipesOpen) {
|
// open recipe when clicked
|
||||||
// Collapse all
|
const links = document.querySelectorAll('a')
|
||||||
$('input[type=checkbox]').each(function() {
|
links.forEach(function(item, i){
|
||||||
this.checked = false;
|
|
||||||
});
|
item.addEventListener("click", function(){
|
||||||
} else new Promise(function(resolve, reject) {
|
intralink = this.getAttribute("href")
|
||||||
// Expand all
|
if (intralink[0] == "#") {
|
||||||
$('input[type=checkbox]').each(function() {
|
moveToRecipe(intralink.substring(1))
|
||||||
this.checked = true;
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
});
|
|
||||||
});
|
|
||||||
|
function getCheckedBoxes(checkboxes) {
|
||||||
|
var checkboxesChecked = [];
|
||||||
|
for (var i = 0; i < checkboxes.length; i++) {
|
||||||
|
if (checkboxes[i].checked) {
|
||||||
|
checkboxesChecked.push(checkboxes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return checkboxesChecked.length > 0 ? checkboxesChecked : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Collapse all recipes when button is clicked
|
||||||
|
document.getElementById('toggle-expand-collapse-all').addEventListener("click", function(){
|
||||||
|
const checkboxes = document.querySelectorAll('input[type=checkbox]')
|
||||||
|
var checked = getCheckedBoxes(checkboxes);
|
||||||
|
|
||||||
|
if (checked) {
|
||||||
|
// Collapse all
|
||||||
|
document.querySelectorAll('input[type=checkbox]').forEach(function(item, i){
|
||||||
|
item.checked = false;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// Expand all
|
||||||
|
document.querySelectorAll('input[type=checkbox]').forEach(function(item, i){
|
||||||
|
item.checked = true;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user