-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathlayout.html
75 lines (75 loc) · 3 KB
/
layout.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<html>
<head>
<title>rhes.es</title>
<style type="text/css">
body {
background-color: rgb(46,36,30);
background-image: url(img/x2/background-r.png);
background-size: 259px 259px;
}
@font-face {
font-family: 'wildride';
src: url('fonts/WildRide.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.trans {
background-color: rgba(255,255,255,.5);
width: 80%;
height: 80%;
display:none;
}
#logo {
background-repeat: no-repeat;
width:171;
height:64;
position: absolute;
background-image: url(img/x2/rheses-color.png);
background-repeat: no-repeat;
background-size: 171px 64px;
}
#slogan {
font-family: wildride;
white-space: nowrap;
color: rgb(154,123,75);
font-size: 72px;
position: absolute;
text-shadow: 0px 0px 4px rgb(46,36,30);
}
</style>
<script type="text/javascript" src="lib/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="lib/acorn.js"></script>
<script type="text/javascript" src="lib/coffee-script.js"></script>
<script type="text/javascript" src="layout.js"></script>
</head>
<body>
<div id="canvas"></div>
<view id="container" bgcolor="yellow" y="300">
<node name="barg" x="${this.parent.width + 10 + this.parent.height}" onx="console.log('yo from barg x', value, this)"></node>
<class name="foo" x="10" y="10" bgcolor="blue" width="20" height="20">
<view x="${this.parent.width - this.width}" y="${this.parent.height - this.height}" width="10" height="10" bgcolor="purple" onmouseover="this.setAttribute('bgcolor', 'red')" onmouseout="this.setAttribute('bgcolor', 'purple')" onclick="this.setAttribute('clickable', false)"></view>
</class>
<class name="lay" extends="layout">
<attribute name="spacing" type="number" value="15"></attribute>
<attribute name="inset" type="number" value="15"></attribute>
<attribute name="attribute" type="string" value="x"></attribute>
<handler name="onsubview">
console.log('onsubview', value, this)
value.bind('width', function(value, scope, name) {
console.debug(name, value, scope)
})
</handler>
</class>
<foo id="bazzle" name="baz"></foo>
<foo id="bazzleor" onclick="this.animate({width: 100, height: 90})" onmouseover="this.setAttribute('bgcolor', 'red')" onmouseout="this.setAttribute('bgcolor', 'orange')" bgcolor="orange"></foo>
<foo id="bazzlegr" bgcolor="green"></foo>
<simplelayout attribute="x" spacing="10"></simplelayout>
</view>
<view id="logo" y="100"></view>
<view id="slogan" x="200">You got your javascript in my css!</view>
<script>
canvas = new lz.view(null, {x: 100, y: 100, bgcolor: 'red', width: 100, height: 100, transform: 'rotate(45deg)', '-webkit-transform': 'rotate(45deg)', parent: $('#canvas')[0]})
aview = new lz.view(null, {x: 50, y:50, width:20, height:20, bgcolor: 'green', 'border-radius': '4px', parent:canvas})
</script>
</body>
</html>