silverstripe-framework/admin/thirdparty/jlayout/examples/borderlayout.html
2011-04-24 11:46:45 +12:00

74 lines
1.7 KiB
HTML
Executable File

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Border Layout example</title>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
<script type="text/javascript" src="../../lib/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../lib/jquery.metadata.js"></script>
<script type="text/javascript" src="../jsizes/jquery.sizes.js"></script>
<script type="text/javascript" src="jlayout.border.js"></script>
<script type="text/javascript" src="jquery.jlayout.js"></script>
<script type="text/javascript">
jQuery(function($)
{
var container = $('.layout');
function relayout() {
container.layout({resize: false});
}
relayout();
$(window).resize(relayout);
});
</script>
<style>
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
.layout {
height: 100%;
}
.center, .east, .west, .north, .south {
background-color: rgb(220,220,220);
border: 1px solid rgb(200,200,200);
text-align: center;
display: inline-block;
}
.west, .east {
width: 8%;
}
.north, .south {
height: 10%;
}
</style>
</head>
<body>
<div class="layout {layout: {type: 'border', hgap: 3, vgap: 3}}">
<div class="center">
Center
<h1><a href="http://www.bramstein.com/projects/jlayout/">jLayout project homepage</a></h1>
</div>
<div class="east">
East
</div>
<div class="west">
West
</div>
<div class="north">
North
</div>
<div class="south">
South
</div>
</div>
</body>
</html>