ImageGrid/ui/experiments/panels.html

80 lines
1.4 KiB
HTML
Raw Normal View History

<html>
<link rel="stylesheet" type="text/css" href="../css/editor.css">
<style>
body.dark {
background: #0a0a0a;
color: silver;
}
body.gray {
background: #333;
color: silver;
}
</style>
<script src="../ext-lib/jquery.js"></script>
<script src="../ext-lib/jquery-ui.js"></script>
<script src="../lib/panels.js"></script>
<script src="../lib/editor.js"></script>
<script>
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')
}
}
$(function(){
var panel = makePanel('Test Panel A', true)
.css({
top: 50,
left: 50,
})
makeSubPanel('Test Sub Panel A', true, panel)
.find('.content')
.html('<h1>Panel A</h1>')
makeSubPanel('Test Sub Panel B', true, panel)
.find('.content')
.html('<h2>Panel B</h2>')
makeSubPanel('Test Sub Panel C', true, panel)
.find('.content')
.html('<h3>Panel C</h3>')
$('body')
.append(panel)
//.append(makePanel('Test Panel B', true))
//.append(makePanel('Test Panel C', true))
.append(makeSidePanel('left'))
})
</script>
<body>
<p>click image to show editor panel and <a href="javascript:toggleThemes()">here</a> to toggle theme...</p>
</body>
</html>
<!-- vim:set ts=4 sw=4 : -->