mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 10:50:08 +00:00
75 lines
1.3 KiB
HTML
Executable File
75 lines
1.3 KiB
HTML
Executable File
<html>
|
|
<link rel="stylesheet" type="text/css" href="editor.css">
|
|
<style>
|
|
|
|
body.dark {
|
|
background: #0a0a0a;
|
|
color: silver;
|
|
}
|
|
|
|
|
|
body.gray {
|
|
background: #333;
|
|
color: silver;
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
<script src="jquery.js"></script>
|
|
<script src="jquery-ui.js"></script>
|
|
<script src="editor.js"></script>
|
|
<script>
|
|
|
|
// XXX this exists in jli, remove when not needed...
|
|
jQuery.fn.sortChildren = function(func){
|
|
return $(this).each(function(_, e){
|
|
return $(e).append($(e).children().detach().get().sort(func))
|
|
})
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************/
|
|
|
|
|
|
function toggleThemes(){
|
|
var b = $('body')
|
|
if(b.hasClass('gray')){
|
|
b.removeClass('gray')
|
|
b.addClass('dark')
|
|
} else if(b.hasClass('dark')){
|
|
b.removeClass('dark')
|
|
} else {
|
|
b.addClass('gray')
|
|
}
|
|
}
|
|
|
|
|
|
// setup...
|
|
$(function(){
|
|
var target = '#image'
|
|
|
|
var panel = makeControls(target).hide()
|
|
|
|
$('body').append(panel)
|
|
|
|
reloadControls(target)
|
|
|
|
$(target)
|
|
.click(function(){
|
|
panel.show()
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
/*********************************************************************/
|
|
</script>
|
|
<body>
|
|
<img id="image" src="image.jpg" >
|
|
<p>click image to show editor panel and <a href="javascript:toggleThemes()">here</a> to toggle theme...</p>
|
|
</body>
|
|
</html>
|